/* ============================================================
   FFM site — editorial / technical-manifesto
   Voice: open-source, anti-paywall, receipts-first.
   Influences: a sports-almanac scoreboard, an RFC,
   an indie zine, a well-set newspaper feature.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Warmer near-black, less "stock SaaS dark" */
  --bg:        #0c0b09;
  --bg-2:      #141210;
  --bg-3:      #1a1714;
  --ink:       #ece6d8;
  --ink-2:     #b8b1a1;
  --ink-3:     #7a7466;
  --ink-4:     #3a352d;
  --rule:      #221f1a;
  --rule-2:    #2c2822;

  /* Paper inverse (for one editorial section) */
  --paper:     #ece4d2;
  --paper-2:   #ddd4bd;
  --paper-ink: #16140f;

  /* Brand red — FF logo only */
  --brand-red:      #ef4452;
  --brand-red-deep: #c8323d;

  /* Mint accent — taken from the app's UI */
  --accent:     #4dd09a;
  --accent-2:   #1bb777;
  --accent-deep:#0e8e5c;

  --ok:    #4dd09a;
  --bad:   #ef4452;
  --warn:  #e8a548;

  /* Type stacks */
  --f-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --f-sans:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-display-sans: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1180px;
  --pad:  56px;
}

/* Lock all scrolling/interaction while the boot overlay is showing.
   Cleared (attribute removed) by the teardown script once the overlay lifts. */
html[data-boot="pending"],
html[data-boot="pending"] body {
  overflow: hidden !important;
  height: 100%;
  touch-action: none;
  overscroll-behavior: none;
}

/* ---------- BOOT OVERLAY ---------- */
/* 3.5s reload sequence. Removed from DOM by inline script in index.html.
   Letters rise from below with blur, settle, then the whole stage blurs into nothing. */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #050402;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: transform;
  /* Garage door teardown — the whole overlay (text + bg) slides upward off-screen */
  animation: boot-garage-up 0.80s cubic-bezier(0.55, 0.05, 0.7, 0.3) 4.65s forwards;
}
@keyframes boot-garage-up {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-110vh); }
}
.boot-overlay.boot-done { pointer-events: none; }

/* Drifting aurora — two huge mint blobs crawling diagonally behind the wordmark.
   Stage sits at z-index 2 on top of these. */
.boot-aurora { display: none; }
.boot-aurora::before,
.boot-aurora::after {
  content: '';
  position: absolute;
  width: 90vmin;
  height: 90vmin;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.boot-aurora::before {
  background: radial-gradient(circle, rgba(77, 208, 154, 0.22) 0%, rgba(77, 208, 154, 0) 60%);
  top: 10%;
  left: 5%;
  animation: boot-aurora-a 14s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
.boot-aurora::after {
  background: radial-gradient(circle, rgba(239, 68, 82, 0.16) 0%, rgba(239, 68, 82, 0) 60%);
  bottom: 10%;
  right: 5%;
  animation: boot-aurora-b 16s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
@keyframes boot-aurora-a {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30vmin, 20vmin) scale(1.15); }
}
@keyframes boot-aurora-b {
  0%   { transform: translate(0, 0) scale(1.05); }
  100% { transform: translate(-25vmin, -18vmin) scale(0.9); }
}
@keyframes boot-aurora-fade {
  to { opacity: 0; }
}

.boot-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* Icon + wordmark lockup. Icon space is reserved from the start so the text
   doesn't jump when the icon flies in; the offset is tiny (~32px). */
.boot-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Site icon — flies in FROM THE LEFT after the letters land, same blur-rise
   language as the letters but on the X axis. */
.boot-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  flex-shrink: 0;
  opacity: 0;
  filter: blur(8px);
  transform: translateX(-240px);
  animation: boot-icon-in 0.60s cubic-bezier(0.22, 1, 0.36, 1) 2.95s forwards;
  box-shadow: 0 10px 30px -10px rgba(239, 68, 82, 0.4);
}
@keyframes boot-icon-in {
  0%   { opacity: 0; filter: blur(8px); transform: translateX(-240px); }
  100% { opacity: 1; filter: blur(0);  transform: translateX(0); }
}

/* Light sweep (glint) — a bright skewed band that rides across the lockup
   left→right once the icon has settled. mix-blend screen brightens the text. */
.boot-shine {
  position: absolute;
  inset: -30% -8%;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.boot-shine::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -28%;
  width: 24%;
  height: 120%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  transform: skewX(-14deg);
  mix-blend-mode: screen;
  opacity: 0;
  animation: boot-shine-sweep 0.85s cubic-bezier(0.4, 0, 0.3, 1) 3.55s forwards;
}
@keyframes boot-shine-sweep {
  0%   { left: -28%; opacity: 0; }
  14%  { opacity: 1; }
  86%  { opacity: 1; }
  100% { left: 112%; opacity: 0; }
}

/* Logo — removed; wordmark now stands alone. Style kept for reference but no markup uses it. */
.boot-logo { display: none; }
@keyframes boot-logo-in {
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

/* Wordmark — letters reveal as a TRAIL: stagger 0.08s, duration 0.40s,
   so 5 letters are in motion at peak (0.40 / 0.08 = 5).
   Blur and translateY share the same ease curve so they reach 0 together. */
.boot-wordmark {
  font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 42px);
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: baseline;
  line-height: 1;
  white-space: nowrap;
  will-change: transform;
  /* Drifts up 40px over the cascade with ease-in-out — acceleration in middle,
     not the long slow tail of ease-out. End destination = screen center.
     Second track: wm-glint ramps the glow up as the light sweep passes. */
  transform: translateY(40px);
  animation:
    wm-drift 1.70s cubic-bezier(0.65, 0, 0.35, 1) 1.10s forwards,
    wm-glint 0.90s ease-in-out 3.55s;
  /* Subtle glow — dim halo, just enough to lift the text off the black */
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.35),
    0 0 12px rgba(255, 255, 255, 0.12),
    0 0 30px rgba(255, 255, 255, 0.06),
    0 0 50px rgba(77, 208, 154, 0.10);
}
@keyframes wm-drift {
  to { transform: translateY(0); }
}
/* Glow swells as the light ray crosses, then settles back to the base halo. */
@keyframes wm-glint {
  0% {
    text-shadow:
      0 0 1px rgba(255, 255, 255, 0.35),
      0 0 12px rgba(255, 255, 255, 0.12),
      0 0 30px rgba(255, 255, 255, 0.06),
      0 0 50px rgba(77, 208, 154, 0.10);
  }
  50% {
    text-shadow:
      0 0 2px rgba(255, 255, 255, 0.95),
      0 0 18px rgba(255, 255, 255, 0.55),
      0 0 44px rgba(255, 255, 255, 0.32),
      0 0 80px rgba(77, 208, 154, 0.32);
  }
  100% {
    text-shadow:
      0 0 1px rgba(255, 255, 255, 0.35),
      0 0 12px rgba(255, 255, 255, 0.12),
      0 0 30px rgba(255, 255, 255, 0.06),
      0 0 50px rgba(77, 208, 154, 0.10);
  }
}
.boot-wordmark .bl {
  display: inline-block;
  /* Base state — invisible. Letter stays hidden while waiting in the queue. */
  opacity: 0;
  animation: bl-in 0.40s cubic-bezier(0.42, 0, 0.7, 0.4) forwards;
  will-change: transform, filter, opacity;
}
.boot-wordmark .bl-space { width: 0.28em; }
.boot-wordmark .bl-reg {
  font-size: 0.4em;
  align-self: flex-start;
  margin-left: 0.1em;
  margin-top: 0.15em;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* 17 chars: "FastFlag Manager®". Stagger 0.08s starting at 1.10s (1.0s wait on black). */
.boot-wordmark .bl:nth-child(1)  { animation-delay: 1.10s; }
.boot-wordmark .bl:nth-child(2)  { animation-delay: 1.18s; }
.boot-wordmark .bl:nth-child(3)  { animation-delay: 1.26s; }
.boot-wordmark .bl:nth-child(4)  { animation-delay: 1.34s; }
.boot-wordmark .bl:nth-child(5)  { animation-delay: 1.42s; }
.boot-wordmark .bl:nth-child(6)  { animation-delay: 1.50s; }
.boot-wordmark .bl:nth-child(7)  { animation-delay: 1.58s; }
.boot-wordmark .bl:nth-child(8)  { animation-delay: 1.66s; }
.boot-wordmark .bl:nth-child(9)  { animation-delay: 1.74s; }
.boot-wordmark .bl:nth-child(10) { animation-delay: 1.82s; }
.boot-wordmark .bl:nth-child(11) { animation-delay: 1.90s; }
.boot-wordmark .bl:nth-child(12) { animation-delay: 1.98s; }
.boot-wordmark .bl:nth-child(13) { animation-delay: 2.06s; }
.boot-wordmark .bl:nth-child(14) { animation-delay: 2.14s; }
.boot-wordmark .bl:nth-child(15) { animation-delay: 2.22s; }
.boot-wordmark .bl:nth-child(16) { animation-delay: 2.30s; }
.boot-wordmark .bl:nth-child(17) { animation-delay: 2.38s; } /* ® — lands at 2.78s */

@keyframes bl-in {
  0% {
    opacity: 0.6;
    filter: blur(8px);
    /* Start 330px below — visible journey, identical on any screen size */
    transform: translateY(330px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-overlay { display: none; }
}

@media (max-width: 720px) {
  .boot-logo { width: 52px; height: 52px; }
  .boot-icon { width: 38px; height: 38px; }
  .boot-lockup { gap: 13px; }
  .boot-stage { gap: 20px; }
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- BASE ---------- */
html { background: #000; }
body {
  font-family: var(--f-sans);
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "tnum" 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fluid background — ABSOLUTELY positioned at the top of the page so it
   scrolls AWAY when the user scrolls down. Lives in the hero area. */
#fluid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  will-change: opacity;
}

/* subtle paper-grain noise; sits above the fluid bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(255, 240, 200, 0.018) 1px, transparent 1px);
  background-size: 3px 3px;
}

::selection { background: var(--accent-2); color: #0a0a08; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px; top: 16px;
  padding: 8px 14px;
  background: var(--accent); color: var(--paper-ink);
  z-index: 1000;
  font-family: var(--f-mono); font-size: 12px;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(12, 11, 9, 0.85);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display-sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
}
.brand-logo {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.brand-text { color: var(--ink); }

/* Brand-text morph — ping-pong A↔D wordmark loop driven by brand-loop.js.
   Container locked to state A's width via .brand-text-ghost so the version
   chip stays put while individual chars compress/expand. */
.brand-text {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
}
.brand-text-ghost {
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.brand-text-anim {
  position: absolute;
  inset: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
.brand-text .ch {
  display: inline-block;
  max-width: 1.6em;
  opacity: 1;
  transform: scaleX(1);
  transform-origin: left center;
  transition:
    max-width 550ms cubic-bezier(0.7, 0, 0.3, 1),
    opacity   400ms cubic-bezier(0.7, 0, 0.3, 1),
    transform 550ms cubic-bezier(0.7, 0, 0.3, 1);
  will-change: max-width, transform, opacity;
}
.brand-text .ch-space { max-width: 0.4em; }

/* Hide chars not present in the current state — they compress into their neighbors. */
.brand-text[data-state="A"] .ch:not([data-keep*="A"]),
.brand-text[data-state="B"] .ch:not([data-keep*="B"]),
.brand-text[data-state="C"] .ch:not([data-keep*="C"]),
.brand-text[data-state="D"] .ch:not([data-keep*="D"]) {
  max-width: 0;
  opacity: 0;
  transform: scaleX(0);
}
.brand-version {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 3px 8px 3px 12px;
  border: 0;
  border-left: 1px solid var(--rule-2);
  border-radius: 0;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 4px;
  font-family: var(--f-display-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.site-nav a {
  position: relative;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 160ms ease, background 160ms ease;
}
.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.header-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 4px;
  color: var(--paper-ink);
  background: var(--accent);
  letter-spacing: -0.005em;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(27, 183, 119, 0.5),
    0 6px 18px -8px rgba(77, 208, 154, 0.45);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.header-cta-label { line-height: 1; white-space: nowrap; }
.header-cta-version {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
  color: rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
}
.header-cta:hover {
  background: #5fdba9;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(27, 183, 119, 0.6),
    0 10px 22px -8px rgba(77, 208, 154, 0.55);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 40px 40px 0;
  border-bottom: 1px solid var(--rule);
  /* Desktop: hero + marquee fill exactly one screen so the fluid (which ends
     at the marquee) ends at the bottom of the viewport without scrolling.
     calc subtracts the sticky header height. */
  min-height: calc(100vh - 57px);
  display: flex;
  flex-direction: column;
}
.hero-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  flex: 1;
  align-content: center;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: start;
}
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: stretch;
  justify-content: flex-start;
  padding-top: 8px;
  transform: scale(0.85);
  transform-origin: top center;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 32px;
  text-transform: uppercase;
}
.eyebrow-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(77, 208, 154, 0.12);
}

/* Hero title — short pitch, bold sans, serif italic for the BEST word */
.hero-title {
  font-family: var(--f-display-sans);
  font-weight: 500;
  font-size: clamp(46px, 6.3vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 32px;
}
.hero-title em {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.18em;
  line-height: 0.85;
  letter-spacing: -0.015em;
  padding-right: 6px;
}
.hero-title-bang { display: none; }

.hero-sub {
  font-family: var(--f-sans);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 540px;
  line-height: 1.55;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

/* Primary CTA — confident, flat, not gradient-globby */
.btn-primary {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px 16px 18px;
  border-radius: 3px;
  font-family: var(--f-display-sans);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--paper-ink);
  background: var(--accent);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.18) inset,
    0 0 0 1px rgba(27, 183, 119, 0.6),
    0 12px 24px -12px rgba(77, 208, 154, 0.35);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 180ms ease,
              background 180ms ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: #5fdba9;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.2) inset,
    0 0 0 1px rgba(27, 183, 119, 0.7),
    0 16px 28px -12px rgba(77, 208, 154, 0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary .btn-arrow {
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1;
  transition: transform 200ms ease;
  order: 3;
}
.btn-primary:hover .btn-arrow { transform: translateY(2px); }
.btn-primary .btn-label { line-height: 1; order: 1; }
.btn-primary .btn-version {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 2px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  order: 2;
}

/* Hero right column — big logo card sits above the terminal */
.hero-logo-card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(239, 68, 82, 0.18), transparent 55%),
    linear-gradient(140deg, #1d0809 0%, #0c0b09 100%);
  border: 1px solid rgba(239, 68, 82, 0.25);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
    0 30px 60px -30px rgba(239, 68, 82, 0.3),
    0 8px 24px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.hero-logo-img {
  position: relative;
  z-index: 1;
  width: 38%;
  max-width: 180px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(239, 68, 82, 0.5);
}
.hero-logo-mark {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 2;
  font-family: var(--f-display-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.hero-logo-foot {
  position: absolute;
  bottom: 18px;
  right: 22px;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
}
.hero-logo-foot span { color: var(--accent); margin-left: 6px; }

/* ----- Trust marquee — scrolls right to left forever ----- */
.trust-marquee {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  height: 64px;
  display: flex;
  align-items: center;
}
.trust-marquee::before,
.trust-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.trust-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}
.trust-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg) 0%, transparent 100%);
}
.trust-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: trust-scroll 42s linear infinite;
  will-change: transform;
}
.trust-marquee:hover .trust-track { animation-play-state: running; }
.tm-ch {
  display: inline-block;
  transform-origin: center bottom;
  transition: transform 130ms ease-out, text-shadow 130ms ease-out;
  will-change: transform;
}
.trust-set {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  flex-shrink: 0;
}
.tm-item {
  font-family: var(--f-display-sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  text-transform: none;
}
.tm-item.tm-hot {
  color: var(--accent);
  font-weight: 600;
}
.tm-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  flex-shrink: 0;
}
@keyframes trust-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; }
}

/* ----- Terminal panel ----- */
.hero-terminal {
  position: relative;
  border-radius: 6px;
  background: rgba(10, 9, 7, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--rule-2);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.025) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  font-family: var(--f-mono);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.015);
}
.term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3) inset;
}
.dot-r { background: #ef4452; }
.dot-y { background: #e8a548; }
.dot-g { background: #4dd09a; }
.term-title {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.term-body {
  padding: 24px 26px 28px;
  font-size: 12.5px;
  line-height: 17px;
  color: var(--ink-2);
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  font-weight: 400;
}
.term-line { display: block; }
.term-prompt { color: var(--accent); }
.term-cmd { color: var(--ink); }
.term-banner {
  color: var(--accent);
  margin: 10px 0;
  font-size: 11px;
  line-height: 11px;
}
.term-meta { color: var(--ink-3); }
.term-meta .ok { color: var(--ok); }
.cursor {
  display: inline-block;
  animation: blink 1.1s steps(2, start) infinite;
  color: var(--accent);
}
@keyframes blink { to { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .cursor, .hero::after { animation: none; }
}

/* ---------- SECTION HEADERS (chapter-style) ---------- */
.section-h2 {
  font-family: var(--f-display-sans);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin-bottom: 14px;
  color: var(--ink);
}
.section-h2 .prompt {
  font-family: var(--f-mono);
  color: var(--accent);
  font-weight: 400;
  font-size: 0.45em;
  margin-right: 14px;
  vertical-align: 0.32em;
  letter-spacing: 0;
}
.section-sub {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 48px;
  max-width: 680px;
  line-height: 1.6;
}
.section-sub code {
  font-family: var(--f-mono);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--ink);
}

/* Section divider — hairline rule with a centered label, replaces chapter labels */
.section-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  width: 100%;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule-2);
}
.section-divider span {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section-divider-paper::before,
.section-divider-paper::after {
  background: rgba(22, 20, 15, 0.18);
}
.section-divider-paper span {
  color: rgba(22, 20, 15, 0.55);
}

/* Legacy .chapter — keep for any leftover references */
.chapter {
  display: none;
}

/* ---------- PITCH ROW ---------- */
.pitch {
  position: relative;
  z-index: 1;
  padding: 0;
}
.pitch-row {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
}
.pitch-cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 56px 32px 56px 32px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.pitch-cell:first-child { padding-left: 0; }
.pitch-cell:last-child { border-right: 0; padding-right: 0; }
.pitch-cell::before {
  content: attr(data-idx);
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
}
.pitch-cell:last-child::before { right: 0; }
.pitch-num {
  font-family: var(--f-display-sans);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.pitch-cell:first-child .pitch-num,
.pitch-cell:nth-child(3) .pitch-num { color: var(--accent); }
.pitch-label {
  font-family: var(--f-sans);
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 200px;
}

/* ---------- COMPARISON ---------- */
.compare {
  position: relative;
  z-index: 1;
  padding: 96px 40px 64px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.compare-wrap {
  position: relative;
  border: 1px solid var(--rule-2);
  background: rgba(10, 9, 7, 0.5);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 380ms ease,
    border-color 380ms ease;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.02) inset;
}
.compare-wrap:hover {
  transform: translateY(-2px) scale(1.005);
  border-color: rgba(77, 208, 154, 0.25);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.03) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(77, 208, 154, 0.12);
}

.compare-table { font-size: 13.5px; border-collapse: separate; border-spacing: 0; }
.compare-table th,
.compare-table td {
  padding: 16px 18px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
  transition: background 220ms ease;
}
.compare-table th:last-child,
.compare-table td:last-child { border-right: 0; }
.compare-table tr:last-child td,
.compare-table tr:last-child th { border-bottom: 0; }

.compare-table thead th {
  background: #060503;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 22px 18px 20px;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: bottom;
}

/* Row label column — stub */
.compare-table tbody th {
  font-family: var(--f-display-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: #060503;
  width: 240px;
  letter-spacing: -0.01em;
  border-right: 1px solid var(--rule-2);
}

/* Compare-table inner cells — keep readable over the fluid bg via cell tints */
.compare-table tbody td:not(.cell-ffm) {
  background: rgba(0, 0, 0, 0.42);
}
.compare-table thead th:not(.col-ffm) {
  background: rgba(0, 0, 0, 0.55);
}

.compare-table tbody tr:hover td:not(.cell-ffm) {
  background: rgba(0, 0, 0, 0.42);
}
.compare-table tbody tr:hover .cell-ffm {
  background: rgba(77, 208, 154, 0.12);
}

.competitor-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  width: 100%;
  text-align: left;
}
.comp-name {
  font-family: var(--f-display-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.comp-tag {
  font-family: var(--f-mono);
  font-size: 9.5px;
  padding: 3px 7px;
  border: 1px solid var(--rule-2);
  color: var(--ink-3);
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: 2px;
}
.ffm-tag {
  background: var(--accent);
  color: var(--paper-ink);
  border-color: transparent;
  font-weight: 700;
}
.danger-tag {
  background: rgba(239, 68, 82, 0.14);
  color: var(--bad);
  border-color: rgba(239, 68, 82, 0.35);
}

/* FFM column — LIGHTER, top accent line */
.col-ffm {
  position: relative;
  background: rgba(77, 208, 154, 0.08) !important;
  border-top: 2px solid var(--accent) !important;
}
.col-ffm .comp-name { color: #ffffff; }
.cell-ffm {
  background: rgba(77, 208, 154, 0.06);
  position: relative;
  box-shadow: inset 1px 0 0 0 rgba(77, 208, 154, 0.12), inset -1px 0 0 0 rgba(77, 208, 154, 0.12);
}

/* Cell glyphs — NO more circles. Clean inline text. */
.check { display: none; }
.g-yes, .g-no, .g-mid {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-display-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.g-yes::before,
.g-no::before,
.g-mid::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.g-yes { color: var(--ink); }
.g-yes::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(77, 208, 154, 0.12); }
.cell-ffm .g-yes { color: #fff; }
.cell-ffm .g-yes::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(77, 208, 154, 0.2); }
.g-no { color: rgba(239, 68, 82, 0.85); }
.g-no::before { background: var(--bad); }
.g-mid { color: var(--warn); font-style: italic; }
.g-mid::before { background: var(--warn); }

/* Text labels inside cells */
.t-text {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.t-mid {
  font-family: var(--f-sans);
  font-style: italic;
  font-size: 13px;
  color: var(--warn);
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.t-na {
  font-family: var(--f-mono);
  color: var(--ink-4);
  font-size: 14px;
}

.cell-note {
  display: block;
  font-family: var(--f-sans);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 5px;
  letter-spacing: 0;
  line-height: 1.4;
}
.cell-note sup a,
.bad-pill sup a,
.ok-pill sup a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--rule-2);
  text-underline-offset: 2px;
}

.ok-pill, .bad-pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 3px;
  font-family: var(--f-display-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.ok-pill {
  background: rgba(77, 208, 154, 0.12);
  color: var(--ok);
  box-shadow: inset 0 0 0 1px rgba(77, 208, 154, 0.28);
}
.cell-ffm .ok-pill {
  background: rgba(77, 208, 154, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(77, 208, 154, 0.5);
}
.ok-pill.ok-dim {
  background: rgba(77, 208, 154, 0.05);
  color: rgba(77, 208, 154, 0.78);
  box-shadow: inset 0 0 0 1px rgba(77, 208, 154, 0.15);
}
.bad-pill {
  background: rgba(239, 68, 82, 0.08);
  color: var(--bad);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 82, 0.25);
}

.stars {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--ink-4);
}
.stars .on { color: var(--accent); }
.stars-fill {
  color: var(--ok);
  text-shadow: 0 0 14px rgba(77, 208, 154, 0.35);
}
.row-rating th {
  color: var(--ink);
  font-family: var(--f-display-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.row-rating td { padding: 20px 16px; }

/* Weakness cards */
.weakness-cards {
  position: relative;
  border-top: 1px solid var(--rule-2);
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.weakness-card {
  display: none;
  padding: 26px 28px;
  font-family: var(--f-sans);
}
.weakness-card[data-active] { display: block; }
.weakness-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.wc-tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 9px;
  background: var(--accent);
  color: var(--paper-ink);
  letter-spacing: 0.1em;
  border-radius: 2px;
}
.weakness-card.weakness-danger .wc-tag { background: var(--bad); color: #fff; }
.weakness-card.weakness-ffm .wc-tag { background: var(--ok); color: var(--paper-ink); }
.wc-rating {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.weakness-card ul { display: flex; flex-direction: column; gap: 10px; }
.weakness-card li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.weakness-card li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.weakness-card.weakness-danger li::before { background: var(--bad); }
.weakness-card.weakness-ffm li::before { background: var(--ok); }
.weakness-card code {
  font-family: var(--f-mono);
  font-size: 12.5px;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--rule-2);
  color: var(--ink);
}
.weakness-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule-2);
}
.weakness-card sup a { color: var(--accent); }
.weakness-card strong { color: var(--ink); font-weight: 500; }

.no-js .weakness-card { display: block; border-bottom: 1px solid var(--rule); }

/* ---------- DISCORD CTA (header) ---------- */
.discord-cta {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--f-display-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  background: #5865f2;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.18), 0 5px 14px -8px rgba(88,101,242,0.6);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.discord-cta:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.22), 0 9px 20px -8px rgba(88,101,242,0.7);
}
.discord-cta .dc-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  background: #5865f2;
  transition: background 160ms ease;
}
.discord-cta:hover .dc-main { background: #6b76f5; }
.discord-cta .dc-icon { width: 15px; height: 15px; flex-shrink: 0; }
.discord-cta .dc-label { line-height: 1; }
.discord-cta .dc-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  background: #0c0b12;
  border-left: 1px solid rgba(255,255,255,0.18);
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.01em;
}
.discord-cta .dc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #43e08b;
  box-shadow: 0 0 0 0 rgba(67,224,139,0.6);
  animation: dc-pulse 1.8s ease-out infinite;
}
@keyframes dc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67,224,139,0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(67,224,139,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,224,139,0); }
}
@media (prefers-reduced-motion: reduce) {
  .discord-cta .dc-dot { animation: none; }
}

/* ---------- BEAM-BORDER DOWNLOAD CTA (variant 03) ---------- */
@property --beam-a { syntax: '<angle>'; initial-value: 0deg; inherits: true; }
@property --fill   { syntax: '<angle>'; initial-value: 0deg; inherits: true; }

.beam-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 7px;
  font-family: var(--f-display-sans);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  isolation: isolate;
  transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1);
}
.beam-cta:hover { transform: translateY(-2px); }
.beam-cta:active { transform: translateY(0); }
.beam-cta > span, .beam-cta .btn-arrow { position: relative; z-index: 4; }
.beam-cta .btn-version {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  padding: 3px 7px; border-radius: 3px;
  background: rgba(77,208,154,0.16); color: var(--accent); letter-spacing: 0.02em;
}
.beam-cta .btn-arrow { color: var(--accent); font-family: var(--f-mono); transition: transform 220ms ease; }
.beam-cta:hover .btn-arrow { transform: translateY(3px); }

.beam-cta .beam-aura {
  position: absolute; inset: -16px; border-radius: 18px;
  background: conic-gradient(from var(--beam-a),
    transparent 0deg 298deg, rgba(77,208,154,0.45) 334deg, rgba(149,240,200,0.85) 350deg, transparent 360deg);
  filter: blur(17px); opacity: 0.5; z-index: 0; pointer-events: none;
  transition: opacity 260ms ease;
}
.beam-cta:hover .beam-aura { opacity: 0.85; }
.beam-cta .beam-core {
  position: absolute; inset: 0; border-radius: 7px;
  background: radial-gradient(130% 150% at 50% 0%, #14110d, #0a0907);
  box-shadow: 0 10px 30px -16px rgba(0,0,0,0.7);
  z-index: 1; pointer-events: none;
}
.beam-cta .beam-ring {
  position: absolute; inset: 0; border-radius: 7px; padding: 1.5px;
  background: rgba(77,208,154,0.15);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  pointer-events: none; z-index: 2;
}
.beam-cta .beam-bloom {
  position: absolute; inset: 0; border-radius: 7px; padding: 2.5px;
  background: conic-gradient(from var(--beam-a),
    transparent 0deg 296deg, var(--accent) 332deg, #ffffff 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  filter: blur(5px); opacity: 0.85; pointer-events: none; z-index: 2;
}
.beam-cta .beam-track {
  position: absolute; inset: 0; border-radius: 7px; padding: 1.5px;
  background: conic-gradient(from var(--beam-a),
    transparent 0deg 290deg, rgba(77,208,154,0.0) 292deg, rgba(77,208,154,0.6) 318deg,
    var(--accent) 342deg, #ffffff 356deg, #eafff5 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  pointer-events: none; z-index: 3;
}
.beam-cta .beam-fill {
  position: absolute; inset: 0; border-radius: 7px; padding: 1.5px;
  background: conic-gradient(from var(--beam-a),
    transparent 0deg,
    transparent calc(360deg - var(--fill, 0deg)),
    var(--accent) calc(360deg - var(--fill, 0deg)),
    var(--accent) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(77,208,154,0.55));
}

/* ---------- CONFETTI ---------- */
.confetti-layer {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0; /* below the button (which gets z-index: 1) */
}
.confetti-bit {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  opacity: 1;
  animation-name: confetti-fly;
  animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  animation-fill-mode: forwards;
  will-change: transform, opacity;
  pointer-events: none;
}
@keyframes confetti-fly {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-layer { display: none; }
}

/* ---------- FEATURES (editorial list, not card grid) ---------- */
.features {
  position: relative;
  z-index: 1;
  padding: 96px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule-2);
}
.feature {
  padding: 36px 0 36px 0;
  display: grid;
  grid-template-columns: 72px 1fr 1.8fr;
  gap: 0 36px;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  transition: background 160ms ease;
}
.feature:last-child { border-bottom: 0; }
.feature:hover { background: rgba(255, 255, 255, 0.014); }

.feature-num {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 500;
  align-self: start;
  padding-top: 8px;
}
.feature h3 {
  font-family: var(--f-display-sans);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0;
  align-self: start;
  padding-top: 4px;
}
.feature p {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
  align-self: start;
  padding-top: 6px;
  letter-spacing: -0.003em;
}
.feature p strong { color: var(--ink); font-weight: 500; }
.feature p code {
  font-family: var(--f-mono);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--ink);
}

/* ---------- LIVE DEMO / BIND VIDEO ---------- */
.demo {
  position: relative;
  z-index: 1;
  padding: 96px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(77, 208, 154, 0.08);
  border: 1px solid rgba(77, 208, 154, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.demo .section-h2 { margin-bottom: 16px; }
.demo .section-sub em {
  font-style: normal;
}
.demo .section-h2 em {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.06em;
  letter-spacing: -0.01em;
}

/* Window-chrome frame matching the hero terminal */
.video-frame {
  margin: 40px 0 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 9, 7, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--rule-2);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.03) inset,
    0 40px 80px -40px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 400ms ease,
              box-shadow 400ms ease;
}
.video-frame.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  border-color: rgba(77, 208, 154, 0.25);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.04) inset,
    0 40px 80px -40px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(77, 208, 154, 0.14),
    0 0 60px -20px rgba(77, 208, 154, 0.25);
}
.video-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.02);
}
.vc-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3) inset;
}
.vc-r { background: #ef4452; }
.vc-y { background: #e8a548; }
.vc-g { background: #4dd09a; }
.vc-title {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.video-body {
  position: relative;
  background: #000;
  line-height: 0;
}
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* How-it-works micro-steps */
.demo-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 28px 0 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--rule);
}
.demo-steps li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: rgba(12, 11, 9, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ds-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(77, 208, 154, 0.1);
  box-shadow: inset 0 0 0 1px rgba(77, 208, 154, 0.3);
}
.ds-text {
  font-family: var(--f-display-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.3;
}
@media (max-width: 720px) {
  .demo { padding: 72px 24px; }
  .demo-steps { grid-template-columns: 1fr; }
}

/* ---------- THEMES SHOWCASE ---------- */
.themes {
  position: relative;
  z-index: 1;
  padding: 96px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.theme-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-2);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 20px;
}
.theme-frame {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  transition: opacity 280ms ease, filter 280ms ease;
}
.theme-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
/* Placeholder texture if image 404s */
.theme-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.018) 0 12px,
    transparent 12px 24px
  );
}
.theme-frame img { position: relative; z-index: 1; }

.theme-tag {
  position: absolute;
  top: 16px; left: 16px;
  padding: 5px 10px;
  background: rgba(12, 11, 9, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--rule-2);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  font-weight: 500;
  border-radius: 2px;
  z-index: 2;
}
.frame-matrix .theme-tag { color: var(--ok); border-color: rgba(77, 208, 154, 0.4); }

.theme-toggle {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  background: rgba(12, 11, 9, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 3px;
  z-index: 5;
}
.theme-toggle button {
  padding: 8px 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  border-radius: 999px;
  transition: all 180ms ease;
  text-transform: uppercase;
}
.theme-toggle button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper-ink);
}

.theme-stage[data-theme="legacy"] .frame-matrix { opacity: 0.3; filter: grayscale(0.6); }
.theme-stage[data-theme="matrix"] .frame-legacy { opacity: 0.3; filter: grayscale(0.6); }

.themes-jab {
  margin-top: 32px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-2);
  max-width: 760px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

/* ---------- RECEIPTS (inverse paper section) ---------- */
.receipts {
  position: relative;
  z-index: 1;
  padding: 96px 40px;
  background: var(--paper);
  color: var(--paper-ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.receipts-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.receipts .section-h2 { color: var(--paper-ink); }
.receipts .section-h2 .prompt { color: var(--accent-deep); }
.receipts .section-sub { color: rgba(22, 20, 15, 0.7); }
.receipts .chapter { color: rgba(22, 20, 15, 0.55); }
.receipts .chapter::before { background: var(--accent-deep); }
.receipts .chapter span { color: var(--accent-deep); }

.receipts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(22, 20, 15, 0.18);
  background: transparent;
}
.receipts-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(22, 20, 15, 0.12);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(22, 20, 15, 0.75);
  font-family: var(--f-sans);
}
.receipts-list li:target { background: rgba(27, 183, 119, 0.18); }
.r-num {
  font-family: var(--f-mono);
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 13px;
}
.r-body strong { color: var(--paper-ink); font-weight: 600; }
.r-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(14, 142, 92, 0.4);
  transition: text-decoration-color 160ms ease;
}
.r-body a:hover { text-decoration-color: var(--accent-deep); }
.r-body code {
  font-family: var(--f-mono);
  background: var(--paper-2);
  border: 1px solid rgba(22, 20, 15, 0.12);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--paper-ink);
}
.receipts-foot {
  margin-top: 28px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 18px;
  color: rgba(22, 20, 15, 0.75);
  letter-spacing: -0.005em;
}
.receipts-foot a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 14px;
}

/* ---------- FAQ ---------- */
.faq {
  position: relative;
  z-index: 1;
  padding: 96px 40px 112px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:last-of-type { border-bottom: 0; }
.faq-item summary {
  cursor: pointer;
  padding: 24px 0;
  font-family: var(--f-display-sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.022em;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: color 160ms ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink-3);
  width: 22px;
  text-align: center;
  line-height: 1;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), color 200ms ease;
}
.faq-item[open] summary::after {
  content: '−';
  color: var(--accent);
}
.faq-item summary:hover { color: var(--accent); }
.faq-body {
  padding: 0 0 28px 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-body strong { color: var(--ink); font-weight: 500; }
.faq-body em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--accent);
  font-size: 1.05em;
}
.faq-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 48px 40px 32px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display-sans);
  font-weight: 500;
  font-size: 14.5px;
}
.footer-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-meta a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.footer-links {
  display: flex;
  gap: 28px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.footer-links a {
  color: var(--ink-3);
  transition: color 160ms ease;
  text-transform: lowercase;
}
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 28px auto 0;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  text-transform: uppercase;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .site-header { padding: 14px 24px; }
  .hero { padding: 64px 24px 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-right { transform: none; }
  .hero-title { font-size: clamp(36px, 8vw, 56px); }
  .pitch-row { grid-template-columns: repeat(2, 1fr); }
  .pitch-cell { padding: 40px 24px; }
  .pitch-cell:nth-child(odd) { padding-left: 24px; }
  .pitch-cell:nth-child(even) { padding-right: 24px; border-right: 0; }
  .pitch-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 56px 1fr; gap: 4px 20px; padding: 28px 0; }
  .feature h3 { grid-column: 2; padding-top: 0; }
  .feature p { grid-column: 2; padding-top: 6px; font-size: 15px; }
  .site-nav { display: none; }
  .compare, .features, .themes, .receipts, .faq { padding: 72px 24px; }
}

@media (max-width: 720px) {
  .site-header { padding: 12px 18px; gap: 12px; }
  .header-cta { padding: 7px 11px; font-size: 11px; }
  .brand-version { display: none; }
  .hero { padding: 48px 18px 56px; }
  .hero-title { font-size: 38px; letter-spacing: -0.03em; }
  .hero-sub { font-size: 15.5px; }
  .btn-primary { padding: 14px 18px; font-size: 14.5px; }
  .pitch-row { grid-template-columns: 1fr; }
  .pitch-cell { padding: 32px 18px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .pitch-cell:last-child { border-bottom: 0; }
  .pitch-num { font-size: 44px; }
  .term-body { font-size: 10.5px; line-height: 14px; padding: 18px 18px 20px; }
  .term-banner { font-size: 9px; line-height: 9px; }

  /* Comparison table → stacked cards on mobile */
  .compare-table { font-size: 13px; }
  .compare-table thead { display: none; }
  .compare-table tbody { display: block; }
  .compare-table tbody tr { display: block; border-bottom: 1px solid var(--rule-2); margin-bottom: 24px; }
  .compare-table tbody th,
  .compare-table tbody td {
    display: block;
    width: 100%;
    border-right: 0;
    padding: 12px 18px;
  }
  .compare-table tbody th {
    background: var(--bg-3);
    border-bottom: 1px solid var(--rule);
  }
  .compare-table tbody td::before {
    content: attr(data-col);
    display: block;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 5px;
  }

  .theme-stage { grid-template-columns: 1fr; }
  .theme-toggle { position: static; transform: none; margin: 16px auto 0; width: max-content; }
  .receipts-list li { grid-template-columns: 56px 1fr; gap: 12px; padding: 20px 0; }
  .faq { padding: 64px 18px 80px; }
}
