/* ══════════════════════════════════════════════════════════════════════
   layout.css — page chrome and section scaffolding
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. NAVIGATION ────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  /* Tracks --bg rather than a hard-coded value, so the nav stays in
     step with the album-derived background. */
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--t), background var(--t);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--gutter);
  max-width: var(--wrap);
  margin: 0 auto;
}

/* Gradient from --text to --accent-2 for a touch of album warmth */
.nav-logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Gradients don't transition cleanly, so no transition here. */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-link {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: color 200ms ease;
}

.nav-link:hover { color: var(--text); }

.nav-toggle { display: none; }   /* disclosure is mobile-only */


/* ── 2. SECTION SCAFFOLDING ───────────────────────────────────────── */
section {
  border-bottom: 1px solid var(--rule);
  padding: var(--sp-9) var(--gutter);
  /* Fixed header would otherwise cover the top of a jumped-to
     section. */
  scroll-margin-top: var(--nav-h);
  transition: border-color var(--t), background var(--t);
}

/* Alternating band background */
.section--alt {
  background: var(--bg-1);
}

.section-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--fs-display-sm);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.section-num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: var(--fs-xs);
  color: var(--accent-2);
  letter-spacing: 0.1em;
  padding-bottom: 0.2em;   /* nudge onto the serif baseline */
  transition: color var(--t);
}


/* ── 3. HERO ──────────────────────────────────────────────────────── */
.hero {
  /* svh rather than vh so the hero does not jump when mobile browser
     chrome hides on scroll. */
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 9rem var(--gutter) var(--sp-9);
  position: relative;
  isolation: isolate;   /* keeps .hero-bg out of the fixed header's way */
  overflow: hidden;     /* the blobs are oversized; clip them */
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--t);
}

/* Scrim between the gradient and the copy. Darkest where the text sits,
   returning to --bg at the edges so the hero blends into About. Sits
   above .hero-bg so its strength is independent of that layer's opacity. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 45%,
    color-mix(in srgb, var(--bg) 55%, transparent) 0%,
    color-mix(in srgb, var(--bg) 88%, transparent) 55%,
    var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 60rem;
  width: 100%;
  text-align: center;
}

.hero-eyebrow { margin-bottom: var(--sp-5); }

.hero-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: var(--fs-display-lg);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--sp-5);
  text-wrap: balance;
}

/* Italic clause picks up the mid-tone album colour */
.hero-heading em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-3);
  transition: color var(--t);
}

.hero-sub {
  font-size: var(--fs-md);
  /* --text rather than --text-2: this is the longest run of copy sitting
     over the gradient, and the extra headroom costs nothing visually. */
  color: var(--text);
  line-height: 1.75;
  max-width: 52ch;
  margin: 0 auto var(--sp-6);
}

.hero-now-label { margin-bottom: var(--sp-1); }

.hero-now-text {
  color: var(--text-2);
  min-height: 1.4em;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
  flex-wrap: wrap;
}

/* Underlined text CTA */
.btn-text {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: color 200ms ease, opacity 200ms ease;
}

.btn-text--primary { color: var(--accent); }
.btn-text--primary:hover { opacity: 0.75; }

.btn-text--muted {
  color: var(--text-3);
  border-bottom-color: var(--rule-2);
}
.btn-text--muted:hover { color: var(--text); }

/* Bordered stack holding the now-playing widget and the stat cells,
   centred beneath the identity block. */
.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 36rem;
  width: 100%;
  margin: var(--sp-8) auto 0;
  text-align: left;
  border: 1px solid var(--rule);
  transition: border-color var(--t);
}


/* ── 4. ABOUT ─────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
  align-items: start;
}

.about-bio {
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--text-2);
  max-width: 62ch;
}

.about-bio + .about-bio { margin-top: var(--sp-6); }


/* ── 5. CONTACT ───────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
}

/* Grid items default to min-width: auto, so a single long unbreakable
   string inside one can push the whole track wider than the page. */
.hero-inner > *,
.about-grid > *,
.contact-grid > * { min-width: 0; }

.contact-intro {
  color: var(--text-2);
  line-height: 1.8;
  max-width: 52ch;
  margin-bottom: var(--sp-7);
}


/* ── 6. FOOTER ────────────────────────────────────────────────────── */
.footer-bar {
  border-top: 1px solid var(--rule);
  transition: border-color var(--t);
}

footer {
  padding: var(--sp-6) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  max-width: var(--wrap);
  margin: 0 auto;
}

.footer-now {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}


/* ── 7. RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 1.5rem; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .hero   { padding: 7rem var(--gutter) var(--sp-8); }
  section { padding: var(--sp-8) var(--gutter); }

  /* ── Mobile disclosure ────────────────────────────────────────────
     DOM order is logo, toggle, links, widget. `order` only reshuffles
     within this block, and keeps tab order matching what is on screen. */
  .nav-inner { flex-wrap: wrap; gap: var(--sp-3); }

  .nav-toggle { display: inline-flex; order: 3; }
  .nav-np     { order: 2; width: auto; max-width: 45vw; }

  .nav-links {
    /* display: none rather than visibility or inert: the links are then
       genuinely out of the tab order, with no half-visible traps. */
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5) 0 var(--sp-3);
    border-top: 1px solid var(--rule);
  }

  /* Rendered fresh from display:none, so a plain animation runs without
     needing @starting-style or transition-behavior: allow-discrete. */
  .nav-links.is-open {
    display: flex;
    animation: navPanelIn 180ms ease both;
  }

  @keyframes navPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
  }
}

@media (max-width: 560px) {
  .nav-logo { font-size: 0.875rem; }
  .nav-np   { max-width: 40vw; }
}
