/* tapdrum v5 — type-specimen-style site
   Dark charcoal bg with cream text, saturated blue/yellow/green/gray
   accents. CSS-driven preloader zoom, marquee auto-scroll, smooth scroll,
   IntersectionObserver-driven reveal animations. No external animation
   libraries — vanilla CSS + small JS.
*/

/* ---------- Tokens ---------------------------------------------------- */

:root {
  /* page tone — dark charcoal like the reference, with cream type */
  --bg:         #1C1D1E;
  --bg-soft:    #232426;
  --bg-deep:    #131415;

  /* ink (cream / off-white) */
  --ink:        #EEEFEB;
  --ink-soft:   #C9CAC4;
  --ink-mid:    #8E8F8A;
  --ink-fade:   #5A5B57;

  --rule:       #2A2B2D;
  --rule-soft:  #232426;

  /* saturated accents — blue / yellow / green / gray as requested */
  --blue:       #2546FF;
  --blue-soft:  #5C92FF;
  --yellow:     #FFCE2E;
  --yellow-soft:#FFE07A;
  --green:      #3CCB7F;
  --green-soft: #6FE0A2;
  --gray:       #8E8F8A;

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", "SF Mono", "Menlo", "Consolas", "Courier New", monospace;

  --gutter:    clamp(28px, 5vw, 88px);
  --col-wide:  1280px;

  --ease:      cubic-bezier(0.84, 0.01, 0.18, 1);
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html {
  background-color: var(--bg);
  scroll-behavior: smooth;
  /* iOS Safari occasionally lets descendants escape body's overflow-x:
     hidden when an ancestor uses position: fixed or 100vw children
     (we have both: nav fixed, marquees full-bleed). Setting it on
     html as well closes that escape hatch. */
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, pre { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
::selection { background: var(--green); color: var(--bg); }

#top { display: block; height: 0; }

main > section {
  padding: clamp(64px, 9vw, 130px) var(--gutter);
  max-width: var(--col-wide);
  margin: 0 auto;
  position: relative;
}

/* ---------- ASCII baseline ------------------------------------------ */

.ascii {
  font-family: var(--mono);
  font-size: 5.5px;
  line-height: 1.0;
  letter-spacing: 0;
  white-space: pre;
  margin: 0;
  color: var(--ink-soft);
  background: transparent;
  user-select: none;
  font-weight: 600;
  font-feature-settings: "kern" 0, "liga" 0;
}
.ascii--portrait { font-size: 5.5px; color: var(--ink); }
.ascii--mode  { font-size: 5px; color: var(--ink-soft); }
.ascii--voice { font-size: 5px; color: var(--ink-soft); }

/* ====================================================================
   NAV
   ==================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px var(--gutter);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
/* Once scrolled past the hero, drop a faint tint so links stay legible
   over body bg. Hero itself stays fully see-through. */
.nav.is-stuck {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.nav__brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.nav__links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 200ms var(--reveal-ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--reveal-ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--bg);
  background: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 200ms var(--reveal-ease), color 200ms var(--reveal-ease), transform 200ms var(--reveal-ease);
}
.nav__cta:hover {
  background: var(--green);
  color: var(--bg);
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ====================================================================
   HERO — text-led, oversized centered title
   ==================================================================== */

.hero {
  text-align: center;
  padding-top: clamp(56px, 11vw, 160px) !important;
  padding-bottom: clamp(40px, 7vw, 100px) !important;
  position: relative;
  isolation: isolate; /* clamp z-index stack to this section */
  /* Hero stays at the regular col-wide width — content lays out the same
     as every other section. Only the video + veil break out to viewport
     width via their own absolute positioning, so nothing else changes. */
}

/* Background video — absolutely positioned behind hero content,
   centered to viewport so it spans the full screen width regardless of
   the hero's constrained box. */
.hero__video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* Dark veil over the video for type contrast — same viewport-wide
   positioning so it covers the video edge to edge. Slight bottom-fade
   into the page background. */
.hero__veil {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28,29,30,0.24) 0%, rgba(28,29,30,0.18) 60%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(28,29,30,0.0) 0%, rgba(28,29,30,0.18) 90%);
}

/* Push hero contents above the video + veil. */
.hero > :not(.hero__video):not(.hero__veil) {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(72px, 16.2vw, 270px);
  line-height: 0.86;
  letter-spacing: -0.06em;
  margin: 0 auto 32px;
  color: var(--ink);
  text-align: center;
}
.hero__sub {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(14px, 1.1vw, 18px);
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-top: 18px;
  text-transform: none;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
  transition: color 240ms var(--reveal-ease), border-color 240ms var(--reveal-ease);
}
.hero__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: translateY(101%);
  transition: transform 320ms var(--reveal-ease);
  z-index: 0;
}
.hero__cta-label, .hero__cta-arrow { position: relative; z-index: 1; }
.hero__cta-arrow { transition: transform 240ms var(--reveal-ease); }
.hero__cta:hover {
  color: var(--bg);
  border-color: var(--green);
}
.hero__cta:hover::before { transform: translateY(0); }
.hero__cta:hover .hero__cta-arrow { transform: translateX(6px); }

.hero__meta {
  margin: 0 0 56px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-fade);
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.hero__menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.hero__menu a {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: background 200ms var(--reveal-ease), color 200ms var(--reveal-ease), border-color 200ms var(--reveal-ease);
}
.hero__menu a:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ====================================================================
   ABOUT — 2-col text + ASCII portrait
   ==================================================================== */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 760px) { .about { grid-template-columns: minmax(0, 1fr); } }
.about__lede, .about__body { min-width: 0; word-break: normal; overflow-wrap: anywhere; }

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 24px;
}

.about__lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 28px;
  letter-spacing: -0.005em;
  max-width: 28ch;
}
.about__body {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 50ch;
}

.about__art {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  /* Pre tags don't respect max-width on their content, so the wide
     ASCII can push out of the grid cell on narrow screens. Clip here
     so it never bleeds into the page width. */
  min-width: 0;
  overflow: hidden;
}
.about__art .ascii { max-width: 100%; }
.about__art figcaption {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
}

/* ====================================================================
   TAP TESTER
   ==================================================================== */

.tester__head {
  margin-bottom: clamp(36px, 5vw, 64px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tester__title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 80px);
  letter-spacing: -0.04em;
  margin: 0;
  flex: 1;
  min-width: 18ch;
}
.tester__sub {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 36ch;
  line-height: 1.5;
}
.tester__sub kbd {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--bg-soft);
  color: var(--ink);
}

.tester__panel {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 920px) { .tester__panel { grid-template-columns: 1fr; } }

.tester__display {
  position: relative;
  background: var(--bg-deep);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 56px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  grid-row: span 2;
}
.tester__label {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(120px, 18vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--ink);
  transition: color 240ms var(--reveal-ease), transform 240ms var(--reveal-ease);
}
.tester__display.is-firing .tester__label {
  color: var(--yellow);
  transform: scale(1.04);
}
.tester__sub-label {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
}
.tester__velocity {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.tester__velbar {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue);
  transition: width 80ms var(--reveal-ease), background 200ms var(--reveal-ease);
}

.tester__pads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tpad {
  aspect-ratio: 1;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: background 160ms var(--reveal-ease), color 160ms var(--reveal-ease), border-color 160ms var(--reveal-ease), transform 100ms var(--reveal-ease);
}
.tpad:hover {
  background: var(--c, var(--ink));
  color: var(--bg);
  border-color: var(--c, var(--ink));
}
.tpad.is-firing {
  background: var(--c, var(--yellow));
  color: var(--bg);
  border-color: var(--c, var(--yellow));
  transform: scale(0.96);
}

.tester__controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tester__controls label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.tester__controls input[type="range"] {
  grid-column: span 2;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--rule);
  border-radius: 2px;
  outline: none;
}
.tester__controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: 2px solid var(--ink);
  transition: background 160ms var(--reveal-ease);
}
.tester__controls input[type="range"]:hover::-webkit-slider-thumb { background: var(--yellow); }
.tester__controls input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  border: 2px solid var(--ink);
}
.tester__controls output {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.tester__controls select {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  background: var(--bg-deep);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  grid-column: span 2;
}

/* ====================================================================
   VOICES GRID — 3x3 colored slabs
   ==================================================================== */

.voices__head {
  margin-bottom: clamp(36px, 5vw, 64px);
}
.voices__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 160px);
  letter-spacing: -0.05em;
  margin: 0 0 12px;
  line-height: 0.9;
}
.voices__sub {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  margin: 0;
}

.voices__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 760px) { .voices__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .voices__grid { grid-template-columns: minmax(0, 1fr); } }

/* Closing line under the voices grid — teases the upcoming sample-pack
   feature so visitors know the procedural-only limit is temporary. */
.voices__foot {
  margin: clamp(28px, 4vw, 48px) 0 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.voices__foot-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--green);
  padding: 4px 10px;
  border-radius: 999px;
}

.voice {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 32px);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 240ms var(--reveal-ease), border-color 240ms var(--reveal-ease), transform 240ms var(--reveal-ease);
}
.voice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--vc);
  opacity: 0;
  transform: translateY(101%);
  transition: transform 360ms var(--reveal-ease), opacity 240ms var(--reveal-ease);
  z-index: 0;
}
.voice:hover {
  border-color: var(--vc);
  transform: translateY(-2px);
}
.voice:hover::before { transform: translateY(0); opacity: 1; }
.voice:hover * { color: var(--bg) !important; }
.voice.is-firing { transform: translateY(-2px); }
.voice.is-firing::before { transform: translateY(0); opacity: 1; }
.voice.is-firing * { color: var(--bg) !important; }

.voice > * { position: relative; z-index: 1; }

.ascii--voice {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  text-align: center;
}

.voice__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.voice__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
}
.voice__name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
}
.voice__detail {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ====================================================================
   MODES — 2-up
   ==================================================================== */

.modes__head {
  margin-bottom: clamp(36px, 5vw, 64px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.modes__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 160px);
  letter-spacing: -0.05em;
  margin: 0;
  line-height: 0.9;
}
.modes__sub {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  margin: 0;
}

.modes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
@media (max-width: 760px) { .modes__grid { grid-template-columns: minmax(0, 1fr); } }

.mode {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  overflow: hidden;
  transition: border-color 240ms var(--reveal-ease);
}
.mode .ascii { max-width: 100%; }
.mode:hover { border-color: var(--green); }
.mode header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.mode__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--green);
}
.mode h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.025em;
  margin: 0;
}
.mode p {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.ascii--mode {
  background: transparent;
  padding: 0;
}

/* experimental mode card — full-width below 2-up grid, dashed outline,
   yellow caution badge. Two-column: copy left, dithered L/R deck right. */
.mode--exp {
  margin-top: 12px;
  padding: clamp(28px, 4vw, 48px);
  background: transparent;
  border: 1px dashed var(--yellow);
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  /* Same fix as .mode — clip wide ASCII inside the cell so it can't
     push the page wider than the viewport. */
  overflow: hidden;
  min-width: 0;
}
@media (max-width: 760px) {
  .mode--exp { grid-template-columns: minmax(0, 1fr); }
}
.mode--exp__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.mode--exp .ascii { max-width: 100%; min-width: 0; }
.mode--exp header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.mode--exp h3 { margin: 0; }
.mode--exp p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 64ch;
  margin: 0;
}
.mode--exp .ascii--mode {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mode__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--yellow);
  padding: 4px 10px;
  border-radius: 999px;
}
/* "soon" upcoming-feature badge — accent green so it reads as
   forward-looking rather than warning. */
.mode__badge--soon {
  background: var(--green);
}
/* "soon" block keeps the same 2-col copy + ASCII layout as the
   experimental block — only the badge color and dashed border tint
   change so it reads "future" rather than "warning". */
.mode--soon {
  border-color: var(--green);
}

/* ====================================================================
   INFO STRIP
   ==================================================================== */

.info {
  border-top: 1px solid var(--rule);
}
.info__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 160px);
  letter-spacing: -0.05em;
  margin: 0 0 clamp(36px, 5vw, 64px);
  line-height: 0.9;
}
.info__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 0;
}
@media (max-width: 760px) { .info__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .info__grid { grid-template-columns: 1fr; } }

.info__grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.info__grid dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.info__grid dd {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  margin: 0;
}

/* ====================================================================
   FAQ — collapsible question list, mirrors specs visual rhythm
   ==================================================================== */

.faq {
  border-top: 1px solid var(--rule);
}
.faq__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 160px);
  letter-spacing: -0.05em;
  margin: 0 0 clamp(36px, 5vw, 64px);
  line-height: 0.9;
}
.faq__list {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.faq__item {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}
.faq__item:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq__item > summary {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--ink);
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  outline: none;
  /* Lowercase styling matches the rest of the site's casing
     (titles, nav, meta lines). Source text + JSON-LD stay in
     sentence case so screen readers and rich-result snippets read
     naturally. */
  text-transform: lowercase;
}
.faq__item > summary::-webkit-details-marker {
  display: none;
}
.faq__item > summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink-mid);
  transition: transform 200ms ease;
  flex: 0 0 auto;
}
.faq__item[open] > summary::after {
  content: "−";
  color: var(--green);
}
.faq__item > p {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ====================================================================
   MARQUEE
   ==================================================================== */

.marquee {
  position: relative;
  /* Break out of main > section's max-width so the colored band reaches
     viewport edges. body has overflow-x: hidden, no horizontal scroll. */
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 22px 0 !important;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  white-space: nowrap;
  background: var(--bg);
}
.marquee--top    { background: var(--blue);   color: var(--bg); border-color: transparent; }
.marquee--bottom { background: var(--yellow); color: var(--bg); border-color: transparent; }
.marquee__track {
  display: inline-flex;
  gap: 32px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  animation: marquee-l 40s linear infinite;
  will-change: transform;
}
.marquee__track[data-dir="right"] { animation-name: marquee-r; }

@keyframes marquee-l {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes marquee-r {
  0%   { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ====================================================================
   CTA
   ==================================================================== */

.cta {
  text-align: center;
  padding-top: clamp(96px, 14vw, 200px) !important;
  padding-bottom: clamp(96px, 14vw, 200px) !important;
}
.cta__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 11vw, 200px);
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin: 0 auto 56px;
  max-width: 16ch;
}
.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 22px 36px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: -0.01em;
  transition: background 200ms var(--reveal-ease), color 200ms var(--reveal-ease), transform 200ms var(--reveal-ease);
}
.cta__btn:hover {
  background: var(--green);
  color: var(--bg);
  transform: translateY(-2px);
}
.cta__meta {
  margin: 28px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
}
.cta__price {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ====================================================================
   FOOTER
   ==================================================================== */

.foot {
  border-top: 1px solid var(--rule);
  padding: 28px var(--gutter);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mid);
  overflow: hidden; /* clip the giant footwave ASCII on narrow screens */
}
.foot__inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.foot__links { display: flex; gap: 18px; }
.foot__links a, .foot__credit a { color: var(--ink-soft); }
.foot__links a:hover, .foot__credit a:hover { color: var(--green); }

/* "Cookie settings" button — same mono / faded color as the rest of
   the footer copy so it sits as a quiet utility, not a CTA. Visible
   only after the user has made an initial consent choice. */
.foot__cookies {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.foot__cookies:hover { color: var(--green); }

/* ====================================================================
   COOKIE CONSENT BANNER — bottom-fixed, charcoal, accent button
   ==================================================================== */

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(28, 29, 30, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
/* Explicit display:none so the HTML [hidden] attribute actually
   wins over .cookie's display:flex above. Without this the
   Accept/Reject handlers flip the attribute but the banner stays
   visible because flex overrides browser-default hidden styling. */
.cookie[hidden],
.foot__cookies[hidden] { display: none !important; }
.cookie__copy {
  flex: 1 1 240px;
  margin: 0;
  color: var(--ink);
}
.cookie__link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie__link:hover { filter: brightness(1.15); }
.cookie__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.cookie__btn {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.cookie__btn--solid {
  background: var(--green);
  color: var(--bg);
  border: 1px solid var(--green);
}
.cookie__btn--solid:hover { filter: brightness(1.06); }
.cookie__btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.cookie__btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

@media (max-width: 480px) {
  .cookie { left: 8px; right: 8px; bottom: 8px; padding: 14px; gap: 10px; }
  .cookie__actions { width: 100%; justify-content: stretch; }
  .cookie__btn { flex: 1; }
}

/* ====================================================================
   REVEAL ANIMATIONS — IntersectionObserver flips .is-in
   ==================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 700ms var(--reveal-ease), transform 700ms var(--reveal-ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* per-character split-text reveal + color cycle through accents.
   Words are wrapped in .char-group (white-space:nowrap) so chars never
   line-break mid-word; spaces between words stay as normal text nodes
   so paragraphs still wrap naturally. */
.char-group { white-space: nowrap; }

[data-split] .char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 50%, 0);
  color: var(--blue);
  transition:
    opacity 500ms var(--reveal-ease),
    transform 500ms var(--reveal-ease);
  transition-delay: calc(var(--i, 0) * 18ms);
}
[data-split].is-in .char {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  animation: color-cycle 700ms var(--reveal-ease) forwards;
  animation-delay: calc(var(--i, 0) * 18ms);
}

@keyframes color-cycle {
  0%   { color: var(--blue); }
  30%  { color: var(--yellow); }
  60%  { color: var(--green); }
  100% { color: inherit; }
}

/* Dithered text fill — used on the "drum" half of "tapdrum" in the
   hero. Stipples each glyph with a tight radial-dot pattern clipped to
   the text shape. The pattern tracks currentColor so the color-cycle
   keyframe still drives the hue. */
.char--dither {
  background-image:
    radial-gradient(circle at center, currentColor 0.55px, transparent 1.1px);
  background-size: 4px 4px;
  background-position: 0 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          text-fill-color: transparent;
  /* Faint outline so the letterform still reads cleanly through the dither */
  text-shadow: 0 0 0.5px color-mix(in srgb, currentColor 35%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  [data-split] .char { opacity: 1; transform: none; color: inherit; animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
  [data-reveal], [data-split] .char {
    opacity: 1;
    transform: none;
  }
  .marquee__track { animation: none; }
}

/* ====================================================================
   MOBILE
   ==================================================================== */

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 96px !important; }
  .ascii          { font-size: 4.5px; }
  .ascii--portrait { font-size: 4.5px; }
  .ascii--mode    { font-size: 4px; }
  .hero__title    { font-size: clamp(56px, 18vw, 96px); }
  .voices__title, .modes__title, .info__title { font-size: clamp(40px, 14vw, 80px); }
  .cta__title     { font-size: clamp(44px, 14vw, 88px); }
  .marquee__track { font-size: clamp(18px, 5vw, 26px); }
  .tester__panel  { padding: 18px; }
}
