/* ============================================================
   nickdecker.net — Things That Light Me Up
   Poster-stacked, full-bleed color bands. Big, bold, retro.
   ============================================================ */

:root {
  /* Palette sampled from the reference poster */
  --burnt:    #d0543d;   /* burnt red-orange — header + band 05 */
  --hunter:   #1f3a2c;   /* deep forest green — hero            */
  --grass:    #3e9e4f;   /* band 01                             */
  --chart:    #dde03a;   /* band 02 — chartreuse yellow         */
  --cobalt:   #3e72c4;   /* band 03                             */
  --cream:    #ece7da;   /* band 04                             */

  --ink:      #16140f;   /* near-black warm text                */
  --rule:     rgba(22, 20, 15, 0.22);

  /* High-end sans system — Helvetica Medium for the panels */
  --sans: "Helvetica Neue", Helvetica, "Arial Nova", Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* Subtle riso paper grain over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   HEADER — burnt-orange, four stacked wordmarks
   ============================================================ */
.masthead {
  background: var(--burnt);
}

.masthead__pin {
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 72px);
}

.masthead__stack {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vw, 16px);
  max-width: 1180px;
  margin: 0 auto;
}

.masthead__logo {
  width: 100%;
  position: relative;
  animation: rise 0.9s var(--ease) both;
}
.masthead__logo--cream  { z-index: 4; animation-delay: 0.04s; }  /* stays on top when synced */
.masthead__logo--hunter { z-index: 3; animation-delay: 0.12s; }
.masthead__logo--pink   { z-index: 2; animation-delay: 0.20s; }
.masthead__logo--wine   { z-index: 1; animation-delay: 0.28s; }

/* ---- enhanced: pinned scroll-driven convergence (added by JS) ---- */
.masthead.is-stack {
  height: var(--stack-runway, 160vh);
}
.masthead.is-stack .masthead__pin {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.masthead.is-stack .masthead__stack {
  position: relative;        /* anchor for the absolutely-placed bio */
  width: 100%;
  max-width: 1180px;
  will-change: transform, height;
}
.masthead.is-stack .masthead__logo {
  animation: none;           /* scroll drives position instead */
  will-change: transform;
  transform: translateY(var(--shift, 0px));
}

/* ---- bio that fades into the freed orange space as logos consolidate ---- */
/* Typographic scale tuned to the golden ratio (φ ≈ 1.618):
   measure ≈ 21em · leading 1.55 · entrance rise φ·10px */
.masthead__bio {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 27px);
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 21em;
  margin: clamp(20px, 3vw, 40px) auto 0;
  text-wrap: pretty;
}
.masthead__bio a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid rgba(22, 20, 15, 0.32);
  transition: border-color 0.2s ease;
}
.masthead__bio a:hover { border-color: var(--ink); }

/* enhanced: bio rides just beneath the collapsing stack, fading in.
   Absolutely placed so it never reserves space in the resting stack. */
.masthead.is-stack .masthead__bio {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;                  /* sits at the stack's (collapsing) bottom edge */
  width: min(96%, 1180px);
  max-width: 24em;
  margin: 0 auto;             /* JS sets margin-top gap + reveal transform */
  opacity: 0;                 /* JS drives reveal with scroll progress */
  pointer-events: none;
}

/* ============================================================
   HERO — hunter green, "Things That Light Me Up"
   ============================================================ */
.hero {
  background: var(--hunter);
  padding: clamp(48px, 9vw, 120px) clamp(20px, 5vw, 72px);
  text-align: center;
}

.hero img {
  width: 100%;
  max-width: 1100px;          /* matches the 01–05 band wordmarks below */
  margin: 0 auto;
  animation: rise 0.9s var(--ease) 0.34s both;
}

/* ============================================================
   BANDS — five expanding color sections
   ============================================================ */
.bands { display: flex; flex-direction: column; }

.band {
  background: var(--bg);
  color: var(--ink);
  position: relative;
}
.band--01 { --bg: var(--grass);  }
.band--02 { --bg: var(--chart);  }
.band--03 { --bg: var(--cobalt); }
.band--04 { --bg: var(--cream);  }
.band--05 { --bg: var(--burnt);  }

/* the always-visible bar holding the number wordmark + toggle */
.band__toggle {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: clamp(26px, 4.6vw, 60px) clamp(20px, 5vw, 72px);
  color: inherit;
}
.band__toggle:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

.band__mark {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 1100px;
}

/* the + / × toggle indicator */
.band__plus {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 0;
  color: var(--ink);
  transition: transform 0.45s var(--ease);
  transform: rotate(0deg);
}
.band.is-open .band__plus { transform: rotate(45deg); }

/* the collapsible panel — 0fr→1fr grid trick for smooth height */
.band__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.band__panel-inner {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease) 0.08s;
}

.band.is-open .band__panel { grid-template-rows: 1fr; }
.band.is-open .band__panel-inner { opacity: 1; }

/* panel content layout */
.band__content {
  padding: 0 clamp(20px, 5vw, 72px) clamp(36px, 5.5vw, 72px);
  max-width: 1280px;
  display: grid;
  gap: clamp(20px, 3vw, 48px);
  border-top: 2px solid var(--rule);
  margin: clamp(4px, 1vw, 12px) auto 0;
  padding-top: clamp(28px, 4vw, 52px);
}
@media (min-width: 820px) {
  .band__content {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.band__q {
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 6.2vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.band__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.band__list li {
  font-weight: 500;
  font-size: clamp(17px, 2.3vw, 24px);
  line-height: 1.25;
  letter-spacing: 0.005em;
  padding: clamp(11px, 1.5vw, 17px) 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0.7em;
}
.band__list li:first-child { padding-top: 0; }
.band__list li:last-child  { border-bottom: 0; }
.band__list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.78em;
  height: 2px;
  background: currentColor;
  margin-top: 0.62em;
  opacity: 0.65;
}

/* ============================================================
   FOOTER
   ============================================================ */
.colophon {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: clamp(40px, 7vw, 80px) 24px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  line-height: 2;
  text-transform: uppercase;
}
.colophon a { color: var(--burnt); text-decoration: none; }
.colophon a:hover { text-decoration: underline; }
.colophon .sep { opacity: 0.4; padding: 0 0.5em; }

/* ============================================================
   MOTION
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
