/* ============================================================
   Headroom — design system
   Dark, audiophile-leaning. Matches the app's palette:
   near-black surfaces, Spotify-green accent, indigo secondary.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0b0d10;
  --bg-raised: #12151a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f2f4f7;
  --text-dim: #b6bdc9;
  --text-faint: #8f98a5;

  --accent: #1ed760;
  --accent-soft: rgba(30, 215, 96, 0.14);
  --accent-2: #6366f1;
  --accent-2-soft: rgba(99, 102, 241, 0.16);

  --radius: 16px;
  --radius-lg: 24px;

  --font:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient glow — a quiet green/violet haze at the top of every page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 26rem at 18% -6%, rgba(30, 215, 96, 0.13), transparent 65%),
    radial-gradient(38rem 26rem at 85% -10%, rgba(99, 102, 241, 0.14), transparent 65%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(11, 13, 16, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  align-items: center;
}

.site-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #04150a;
  box-shadow: 0 8px 28px rgba(30, 215, 96, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 10px 34px rgba(30, 215, 96, 0.4);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero-icon {
  width: 108px;
  height: 108px;
  margin: 0 auto 28px;
  border-radius: 26px;
  box-shadow:
    0 18px 60px rgba(30, 215, 96, 0.25),
    0 4px 18px rgba(0, 0, 0, 0.6);
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 16ch;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, #7be8a8 55%, var(--accent-2) 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  max-width: 56ch;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------
   Screenshot strip
   ------------------------------------------------------------ */

.shots {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 0 88px;
  flex-wrap: wrap;
}

.shot {
  margin: 0; /* reset figure's default 1em 40px margins */
  width: min(300px, 78vw);
  border-radius: 34px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  padding: 9px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease;
}

.shot:hover {
  transform: translateY(-6px);
}

.shot img {
  border-radius: 26px;
  width: 100%;
}

.shot:nth-child(2) {
  transform: translateY(22px);
}

.shot:nth-child(2):hover {
  transform: translateY(16px);
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section .sub {
  color: var(--text-dim);
  font-size: 1.06rem;
  line-height: 1.65;
  margin: 0;
}

/* Feature grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-3px);
}

.card .glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}

.card .glyph svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card:nth-child(even) .glyph {
  background: var(--accent-2-soft);
  color: #a5a8ff;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.97rem;
}

/* Server badges */

.servers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.server-badge {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.server-badge span {
  color: var(--text-faint);
  font-weight: 500;
}

/* Privacy callout */

.privacy-callout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  text-align: left;
}

.privacy-callout .card {
  text-align: left;
}

/* Beta band */

.band {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
  background:
    radial-gradient(30rem 14rem at 50% -40%, rgba(30, 215, 96, 0.16), transparent 70%),
    var(--bg-raised);
}

.band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
}

.band p {
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* ------------------------------------------------------------
   Legal / doc pages
   ------------------------------------------------------------ */

.doc {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.035em;
}

.doc .meta {
  color: var(--text-faint);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.doc .lede {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.7;
  margin: 18px 0 0;
}

.doc h2 {
  margin: 44px 0 4px;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.doc p,
.doc li {
  color: var(--text-dim);
  line-height: 1.75;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin: 8px 0;
}

.doc li::marker {
  color: var(--accent);
}

.doc .doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 18px 0;
}

/* Landing page cards that link to docs */
.doc-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.doc-links a {
  display: block;
  color: var(--text);
}

.doc-links a:hover {
  text-decoration: none;
}

.doc-links .card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-links .card h3::after {
  content: "→";
  color: var(--accent);
  transition: transform 0.15s ease;
}

.doc-links .card:hover h3::after {
  transform: translateX(4px);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  margin-top: 40px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .fine {
  color: var(--text-faint);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------

   Small screens
   ------------------------------------------------------------ */

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 48px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.88rem;
  }

  .shot:nth-child(2) {
    transform: none;
  }

  .shot:nth-child(2):hover {
    transform: translateY(-6px);
  }
}
