/* ============================================================================
   SchoenerBeats — single-track store page
   Premium, modern, confident. A dimensional dark room (lifted, not a void),
   one clean cold light from above, a present pool below. Modern grotesque type
   with real presence. Restraint, but no timidity.
   ========================================================================== */

/* --- Self-hosted fonts (Blueprint §10.4) — latin-subset variable WOFF2, served
   from this origin, so no fonts.googleapis.com/gstatic request. --------------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-var.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
}

:root {
  --bg:      #0c1318;
  --bg2:     #111c23;
  --lift:    #1a2b35;
  --ink:     #eef3f5;
  --ink-dim: #90a1aa;
  --light:   #dbe9f0;   --light-rgb: 219, 233, 240;
  --hair:    rgba(238, 243, 245, 0.13);
  --cta:     #eef3f5;
  --cta-ink: #0a1014;

  --dock-h: 23vh;
  --disp: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body { min-height: 100vh; overflow-x: hidden; }

/* --- The room: a dimensional dark space, light pooling from above ----------- */
.room { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.room::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(76% 50% at 50% 1%, rgba(var(--light-rgb), 0.16) 0%, transparent 60%),
    radial-gradient(128% 86% at 50% 30%, var(--lift) 0%, var(--bg2) 46%, var(--bg) 100%);
}
.glow {                   /* luminous pool of light on the title */
  position: absolute; top: 6vh; left: 50%; transform: translateX(-50%);
  width: 74vw; max-width: 820px; height: 58vh;
  background: radial-gradient(ellipse 54% 48% at 50% 30%,
    rgba(var(--light-rgb), 0.14) 0%, rgba(var(--light-rgb), 0.04) 42%, transparent 72%);
  filter: blur(26px);
}
.vignette { position: absolute; inset: 0;
  background: radial-gradient(122% 94% at 50% 24%, transparent 46%, rgba(0,0,0,0.58) 100%); }

/* Focus dim — on play the room light lowers slightly, in step with the tongue
   (same durations/curves). Only the backdrop dims; content (.stage: panel, text,
   CTA) keeps full brightness, so the buy button gains pop against the darker room.
   Tune brightness(): 0.92 = 8% dim; try 0.88–0.95. */
.room { transition: filter 450ms cubic-bezier(.4,0,1,1); }
body.sb-playing .room { filter: brightness(0.92); transition: filter 2350ms cubic-bezier(.22,.68,.28,1); }
@media (prefers-reduced-motion: reduce) {
  .room, body.sb-playing .room { transition: none; }
}

#lightfx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* subtle film grain — keeps it filmic, not flat */
.grain { position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0.04; mix-blend-mode: overlay;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* --- Stage ------------------------------------------------------------------ */
.stage {
  position: relative; z-index: 2; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 34px 26px calc(var(--dock-h) + 36px);
}

.topbar { display: flex; align-items: center; gap: 12px; }

#logo { width: clamp(120px, 16vw, 176px); height: auto; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: contain; display: block; }

/* Tongue "peek" — rests ~3/4 out; the last quarter slides out on play and
   retracts a touch quicker on pause. Enabled per page via body[data-tongue].
   NOTE (2026-07-02): the retracted 3/4 rest state + clip are now BAKED INTO
   logo-round.svg itself (attributes on #tongue-window / #tongue-group), so the
   first-paint <img> already shows the correct rest state — no load flash.
   Without a data-tongue attribute the tongue therefore rests 3/4 out (a page
   wanting it fully out must set #tongue-group { transform: translate(0,0) }). */
#tongue-group { transform-box: fill-box; transform-origin: 50% 0%; }
body[data-tongue="peek"] #tongue-group { transform: scaleY(0.75); transition: transform 200ms cubic-bezier(.4,0,1,1); }
body[data-tongue="peek"].sb-playing #tongue-group { transform: scaleY(1); transition: transform 500ms cubic-bezier(.22,.68,.28,1); }
@media (prefers-reduced-motion: reduce) {
  body[data-tongue="peek"] #tongue-group,
  body[data-tongue="peek"].sb-playing #tongue-group { transition: none; }
}

/* Tongue "slide" — the rigid, premium version: the tongue translates behind a
   fixed clip at the mouth line (y=820), so it genuinely slides with no stretch.
   The 3/4-out REST state is the SVG's own default (baked attributes: clip on
   #tongue-window, translate(8.4 -55.3) on #tongue-group) — CSS only declares the
   return transition. Play overrides to translate(0,0) = fully out (2.35s); pause
   falls back to the baked attribute (0.45s). */
body[data-tongue="slide"] #tongue-group { transition: transform 450ms cubic-bezier(.4,0,1,1); }
body[data-tongue="slide"].sb-playing #tongue-group { transform: translate(0px, 0px); transition: transform 2350ms cubic-bezier(.22,.68,.28,1); }
@media (prefers-reduced-motion: reduce) {
  body[data-tongue="slide"] #tongue-group { transition: none; }
}
.topbar .wordmark { font-family: var(--disp); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.topbar .tagline {
  margin-left: 3px; padding-left: 14px; border-left: 1px solid var(--hair);
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim);
}

.middle {
  flex: 1 1 auto; width: 100%; max-width: 720px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 22px;
}
.title {
  margin: 0; font-family: var(--disp);
  font-size: clamp(76px, 16vw, 168px); font-weight: 600; line-height: 0.9; letter-spacing: -0.04em;
}
.specs {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim);
}
.specs .spec { position: relative; }
.specs .spec + .spec::before { content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(var(--light-rgb), 0.5); transform: translateY(-50%); }

/* acquire — confident and clear */
.acquire { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.price-line { display: flex; align-items: baseline; gap: 12px; }
.price { font-family: var(--disp); font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.price-meta { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px; border-radius: 4px;
  background: var(--cta); color: var(--cta-ink);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1), box-shadow 0.22s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(0,0,0,0.45); }
.cta:active { transform: translateY(0); }
.cta .arrow { width: 15px; height: 15px; }

/* --- The pool (player) ------------------------------------------------------ */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; height: var(--dock-h); min-height: 140px; }
#water { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dock-ui { position: absolute; inset: 0; display: flex; align-items: center; gap: 18px; padding: 0 32px; pointer-events: none; }
.play-btn {
  pointer-events: auto; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(var(--light-rgb), 0.5); background: rgba(12, 19, 24, 0.4);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(4px); transition: border-color 0.22s ease, background-color 0.22s ease, transform 0.12s ease;
}
.play-btn:hover { border-color: rgba(var(--light-rgb), 0.95); background: rgba(var(--light-rgb), 0.1); }
.play-btn:active { transform: scale(0.96); }
.play-btn svg { width: 19px; height: 19px; }
.play-btn .icon-pause { display: none; }
.dock.is-playing .play-btn .icon-play { display: none; }
.dock.is-playing .play-btn .icon-pause { display: block; }
.times { pointer-events: none; margin-left: auto; font-size: 11px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.times .sep { opacity: 0.45; margin: 0 7px; }

/* --- Step-4 additions: nav, blurb, tier selector, listings, footer ---------- */
.home-link { color: inherit; text-decoration: none; }

.blurb { margin: 0; max-width: 520px; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }

.tiers { display: flex; flex-direction: column; gap: 8px; width: min(440px, 88vw); }
.tier {
  display: flex; align-items: baseline; gap: 14px; text-align: left;
  padding: 12px 16px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--hair); background: rgba(12, 19, 24, 0.35);
  color: var(--ink); font-family: var(--sans);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.tier:hover { border-color: rgba(var(--light-rgb), 0.45); }
.tier.is-selected { border-color: rgba(var(--light-rgb), 0.9); background: rgba(var(--light-rgb), 0.07); }
.tier--unavailable { opacity: 0.35; cursor: default; }
.tier .tier-label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.tier .tier-delivers { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.tier .tier-price { margin-left: auto; font-family: var(--disp); font-size: 16px; font-weight: 600; }

.microcopy { margin: 0; font-size: 11px; letter-spacing: 0.06em; color: var(--ink-dim); }
.tape-cta {
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--hair);
  padding-bottom: 2px; transition: color 0.18s ease, border-color 0.18s ease;
}
.tape-cta:hover { color: var(--ink); border-color: rgba(var(--light-rgb), 0.6); }

/* listing pages (catalog + tape) */
.stage--list { justify-content: flex-start; }
.listing { width: 100%; max-width: 640px; margin: 0 auto; padding-top: 34px;
  display: flex; flex-direction: column; align-items: center; gap: 26px; }
.logo--list { width: clamp(96px, 12vw, 132px); }
.tape-title { margin: 0; font-family: var(--disp); font-size: clamp(44px, 9vw, 84px);
  font-weight: 600; line-height: 0.95; letter-spacing: -0.03em; text-align: center; }
.tracks { list-style: none; margin: 0; padding: 0; width: 100%;
  display: flex; flex-direction: column; }
.track-row { display: flex; align-items: center; gap: 16px; padding: 14px 6px;
  border-bottom: 1px solid var(--hair); }
.track-row:first-child { border-top: 1px solid var(--hair); }
.track-row.is-current .row-title { color: var(--ink); }
.row-play { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(var(--light-rgb), 0.4); background: transparent;
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: border-color 0.18s ease, background-color 0.18s ease; }
.row-play:hover { border-color: rgba(var(--light-rgb), 0.95); background: rgba(var(--light-rgb), 0.08); }
.row-play svg { width: 15px; height: 15px; }
.row-play .icon-pause { display: none; }
body.sb-playing .track-row.is-current .row-play .icon-play { display: none; }
body.sb-playing .track-row.is-current .row-play .icon-pause { display: block; }
.row-title { font-family: var(--disp); font-size: 19px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.row-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.row-specs { margin-left: auto; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }

.quiet { margin: 4px 0 0; }
.quiet-link { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none; }
.quiet-link:hover { color: var(--ink); }

.dock-title { pointer-events: none; font-family: var(--disp); font-size: 13px;
  font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.footer { width: 100%; margin-top: 40px; padding: 18px 0 8px; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; }
.footer-nav a { font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Step-5: static content pages (licenses / about / services) ------------- */
.content { max-width: 620px; align-items: stretch; }
.content .tape-title { text-align: left; font-size: clamp(38px, 7vw, 64px); }
.content .prose { margin: 0; max-width: none; font-size: 15px; line-height: 1.6; color: var(--ink); }
.content .prose a { color: var(--ink); }
.content .section-label { margin: 6px 0 -12px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); }
.content .tiers { width: 100%; }
.content .tier-terms { margin: -4px 2px 4px; max-width: none; line-height: 1.5; }
.content ul.plain { list-style: none; margin: 0; padding: 0; width: 100%;
  display: flex; flex-direction: column; gap: 12px; }
.content ul.plain li { position: relative; padding-left: 18px; font-size: 15px;
  line-height: 1.55; color: var(--ink); }
.content ul.plain li::before { content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: rgba(var(--light-rgb), 0.6); }
.content .newsletter { width: 100%; padding: 18px 20px; border: 1px solid var(--hair);
  border-radius: 4px; background: rgba(12, 19, 24, 0.35); }
.content .socials { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.content .socials a { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--hair); padding-bottom: 2px; }
.content .socials a:hover { color: var(--ink); }
.content .cta { align-self: flex-start; }

/* §9.3 — verbatim license text (Read Contract pages) + buy-surface acceptance */
.content .contract { white-space: pre-wrap; overflow-wrap: break-word; margin: 4px 0 0;
  font-family: var(--sans); font-size: 12.5px; line-height: 1.6; color: var(--ink); }
.acquire .accept-copy { margin-top: -8px; }
.read-contract { margin-top: -8px; }

@media (max-width: 520px) {
  :root { --dock-h: 18vh; }
  .title { font-size: clamp(60px, 20vw, 96px); }
  .dock-ui { padding: 0 18px; }
  .topbar .tagline { display: none; }
  .row-specs { display: none; }
  .dock-title { max-width: 40vw; }
}
@media (prefers-reduced-motion: reduce) { #lightfx { display: none; } }

/* --- Consent banner (Blueprint §10.4) — injected by the _head.html loader for
   EEA/UK/CH visitors or on geo-fetch failure. Never blocks playback or buying. -- */
.sb-consent {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border: 1px solid var(--hair); border-radius: 6px;
  background: rgba(12, 19, 24, 0.94); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.sb-consent-text { margin: 0; flex: 1 1 260px; font-family: var(--sans);
  font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); }
.sb-consent-text a.sb-consent-link { color: var(--ink); text-decoration: underline; }
.sb-consent-btns { display: flex; gap: 10px; margin-left: auto; }
.sb-consent-btn { font-family: var(--disp); font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 4px; cursor: pointer; border: 1px solid var(--hair);
  background: transparent; color: var(--ink); }
.sb-consent-btn:hover { border-color: var(--ink-dim); }
.sb-consent-yes { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.sb-consent-yes:hover { border-color: var(--cta); filter: brightness(0.94); }
@media (max-width: 520px) {
  .sb-consent { bottom: 0; border-radius: 6px 6px 0 0; width: 100vw; }
  .sb-consent-btns { width: 100%; }
  .sb-consent-btn { flex: 1; }
}

/* --- Newsletter (steps 5c/5b) — the shared form partial + one-of-us success --- */
.nl-form { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-field { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-email {
  flex: 1 1 200px; min-width: 0; padding: 13px 16px; border-radius: 4px;
  border: 1px solid var(--hair); background: rgba(12, 19, 24, 0.5); color: var(--ink);
  font-family: var(--sans); font-size: 14px;
}
.nl-email::placeholder { color: var(--ink-dim); }
.nl-email:focus { outline: none; border-color: rgba(var(--light-rgb), 0.7); }
.nl-submit { flex: 0 0 auto; padding: 13px 22px; }
.nl-trade { margin: 0; }
/* Turnstile renders nothing until a site key is wired — don't leave a gap. */
.cf-turnstile:empty { display: none; }

/* Beat-page free-download gate — a no-JS <details> next to the buy CTA (§9.10). */
.nl-gate { width: min(440px, 88vw); border: 1px solid var(--hair); border-radius: 4px;
  background: rgba(12, 19, 24, 0.35); }
.nl-summary { list-style: none; cursor: pointer; padding: 12px 16px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); }
.nl-summary::-webkit-details-marker { display: none; }
.nl-summary::after { content: "+"; float: right; color: var(--ink-dim); font-weight: 400; }
.nl-gate[open] .nl-summary::after { content: "\2013"; }
.nl-reveal { padding: 0 16px 16px; }
.nl-reveal .nl-form { max-width: none; }

.nl-block { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; }

/* one-of-us success page */
.promo { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 440px;
  padding: 18px 20px; border: 1px solid rgba(var(--light-rgb), 0.35); border-radius: 4px;
  background: rgba(var(--light-rgb), 0.05); }
.promo-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-dim); }
.promo-code { display: flex; align-items: center; gap: 14px; }
.promo-code code { font-family: var(--disp); font-size: 26px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--ink); }
.copy-btn { font-family: var(--disp); font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 4px; border: 1px solid var(--hair);
  background: transparent; color: var(--ink); }
.copy-btn:hover { border-color: var(--ink-dim); }
.nl-download { margin-top: 4px; }
