/* =========================================================
   MacWispr / f*ckwisprflow — visual-first landing
   Hierarchy, depth, motion. Not a text dump.
   ========================================================= */

:root {
  --cream: #f7f2e8;
  --cream-2: #fffdf8;
  --ink: #14120f;
  --ink-soft: #3a3630;
  --muted: #7a746a;
  --line: rgba(20, 18, 15, 0.08);
  --line-strong: rgba(20, 18, 15, 0.12);
  --accent: #e85d4c;
  --accent-2: #3b6ef5;
  --ok: #1a9a5c;
  --shadow-sm: 0 2px 8px rgba(40, 30, 10, 0.05);
  --shadow: 0 12px 40px rgba(40, 30, 10, 0.09), 0 2px 10px rgba(40, 30, 10, 0.04);
  --shadow-lg: 0 28px 70px rgba(40, 30, 10, 0.14), 0 8px 24px rgba(40, 30, 10, 0.06);
  --radius: 24px;
  --font: "Figtree", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Below-fold sections: skip layout/paint work until near viewport */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* ---------- Living stage background ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff8ea 0%, transparent 55%),
    radial-gradient(800px 500px at 100% 20%, rgba(255, 180, 160, 0.35) 0%, transparent 50%),
    radial-gradient(700px 480px at 0% 60%, rgba(180, 205, 255, 0.3) 0%, transparent 50%),
    var(--cream);
}
.aurora {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 120deg at 50% 40%,
      rgba(255, 200, 140, 0.25),
      rgba(255, 160, 140, 0.18),
      rgba(140, 170, 255, 0.2),
      rgba(255, 220, 170, 0.22),
      rgba(255, 200, 140, 0.25));
  filter: blur(48px);
  opacity: 0.65;
  animation: auroraSpin 36s linear infinite;
  contain: strict;
  transform: translateZ(0);
}
@keyframes auroraSpin {
  to { transform: rotate(360deg) translateZ(0); }
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  transform: translateZ(0);
  contain: layout style;
}
.o1 {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: 8%;
  left: -8%;
  background: #ffc98a;
  opacity: 0.55;
}
.o2 {
  width: min(50vw, 480px);
  height: min(50vw, 480px);
  top: 5%;
  right: -10%;
  background: #ffb0a0;
  opacity: 0.45;
}
.o3 {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  bottom: 15%;
  left: 35%;
  background: #b8ccff;
  opacity: 0.35;
}
.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 18, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 15, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.7;
}
.spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(247, 242, 232, 0.65) 100%);
}
.noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 100;
  background: linear-gradient(90deg, var(--accent), #f0a060, var(--accent-2));
  transform-origin: left;
  pointer-events: none;
}

main, .site-header, .ticker, .site-footer {
  position: relative;
  z-index: 2;
}

/* Glass — solid-enough fill so we can use cheaper blur (or none on weak GPUs) */
.glass {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-sm);
}
.glass-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
/* Blur only when the device can afford it */
@supports (backdrop-filter: blur(1px)) {
  @media (hover: hover) and (pointer: fine) and (min-width: 821px) {
    .glass {
      background: rgba(255, 253, 248, 0.68);
      backdrop-filter: blur(12px) saturate(1.15);
      -webkit-backdrop-filter: blur(12px) saturate(1.15);
    }
    .glass-card {
      background: rgba(255, 253, 248, 0.78);
      backdrop-filter: blur(14px) saturate(1.1);
      -webkit-backdrop-filter: blur(14px) saturate(1.1);
    }
  }
}

/*
  Reveals: ALWAYS visible by default.
  JS only adds .is-pending when motion is ready — never blank if JS fails/slow.
*/
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
html.motion-on .reveal.is-pending {
  opacity: 0;
  transform: translateY(22px);
}
html.motion-on .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Ticker */
.ticker {
  background: var(--ink);
  color: #f5efe0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  gap: 2.5rem;
  padding: 0.5rem 0;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Header */
.site-header {
  width: min(var(--max), calc(100% - 1.25rem));
  margin: 0.65rem auto 0;
  position: sticky;
  top: 0.55rem;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.55rem 0.5rem 0.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}
.brand img { border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
.brand .soft { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 1.2rem; font-size: 0.98rem; font-weight: 600; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  border: 1.5px solid transparent;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn-dark {
  background: var(--ink);
  color: #fffaf0 !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}
.btn-dark:hover { background: #000; box-shadow: 0 14px 36px rgba(0,0,0,0.22); }
.btn-glow {
  box-shadow:
    0 10px 28px rgba(0,0,0,0.16),
    0 0 0 1px rgba(255,255,255,0.06) inset;
}
.btn-ghost {
  background: rgba(255,255,255,0.5);
  color: var(--ink) !important;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: rgba(255,255,255,0.8); }

/* ---------- Hero: split layout ---------- */
.hero {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 3.5rem 0 3.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(58vh, 560px);
  text-align: center;
}
.hero-copy {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.15rem;
  background: rgba(232, 93, 76, 0.1);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 93, 76, 0.15);
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 8vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 1.15rem;
}
h1 .line { display: block; }
.grad-text {
  background: linear-gradient(120deg, var(--ink) 15%, var(--accent) 55%, #f0a060 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 0 auto 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  max-width: 32rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.hero-actions.center { justify-content: center; }
.hero-chips, .mac-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.chip {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
}
.chip.yes {
  color: var(--ok);
  background: rgba(26, 154, 92, 0.1);
  border-color: rgba(26, 154, 92, 0.18);
}
.chip.no {
  color: var(--accent);
  background: rgba(232, 93, 76, 0.1);
  border-color: rgba(232, 93, 76, 0.18);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

/* Sections */
.section {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 3.5rem 0;
}
.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.25rem;
}
.section-head .kicker,
.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 1.15rem;
}

/* Speed board */
.speed-flex { padding-top: 1.5rem; }
.speed-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
  max-width: 820px;
  margin: 0 auto;
}
.speed-card {
  padding: 1.5rem 1.25rem 1.35rem;
  text-align: center;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.speed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.speed-mouth {
  background:
    radial-gradient(260px 120px at 50% 0%, rgba(232, 93, 76, 0.16), transparent 70%),
    rgba(255, 253, 248, 0.8);
  border-color: rgba(232, 93, 76, 0.16);
}
.speed-label {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink-soft);
}
.speed-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0.25rem 0 0.75rem;
  display: block;
}
.speed-num em {
  font-style: italic;
  font-size: 0.38em;
  color: var(--muted);
  margin-left: 0.08em;
}
.speed-num.hot {
  background: linear-gradient(120deg, var(--ink) 10%, var(--accent) 55%, #f0a060 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.speed-num.hot em { color: var(--accent); background: none; -webkit-background-clip: unset; background-clip: unset; }
.speed-ghost,
.speed-live {
  margin: 0 0 auto;
  min-height: 2.6em;
  max-width: 16rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 500;
}
.speed-ghost {
  color: #b5aea2;
  mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
}
.speed-live { color: var(--ink); font-weight: 600; }
.speed-tag {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
}
.speed-tag.win {
  color: var(--ok);
  background: rgba(26, 154, 92, 0.12);
}
.speed-vs {
  display: grid;
  place-items: center;
  padding: 0 0.25rem;
}
.vs-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--accent);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(232, 93, 76, 0.2);
  box-shadow: var(--shadow-sm);
}
.speed-mouth.done {
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(26, 154, 92, 0.12);
}

/* Race */
.race-demo {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 28px;
}
.race-wave-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0 0.85rem;
}
.flow-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 280px);
  height: 72px;
  padding: 0 1.3rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 18, 15, 0.06);
  box-shadow: 0 1px 2px rgba(20,18,15,0.04), 0 12px 32px rgba(40,30,10,0.08);
  transition: box-shadow 0.35s var(--ease);
}
.race-wave-wrap.is-listening .flow-pill {
  box-shadow: 0 1px 2px rgba(20,18,15,0.04), 0 14px 36px rgba(40,30,10,0.12), 0 0 0 4px rgba(59,110,245,0.08);
}
.race-wave-wrap.is-polish .flow-pill {
  box-shadow: 0 1px 2px rgba(20,18,15,0.04), 0 14px 36px rgba(26,154,92,0.12), 0 0 0 4px rgba(26,154,92,0.1);
}
.race-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.7px;
  height: 52px;
  width: 100%;
}
.vd-bar {
  width: 3.3px;
  flex: 0 0 3.3px;
  height: 4px;
  border-radius: 999px;
  background: #1a1a1a;
  transition: height 0.16s cubic-bezier(0.167, 0.167, 0.833, 0.833);
  will-change: height;
}
.race-wave-wrap.is-idle .vd-bar { opacity: 0.55; }
.race-wave-wrap.is-listening .vd-bar,
.race-wave-wrap.is-polish .vd-bar { opacity: 1; }
.race-wave-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.race-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.lane {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.05rem 1.1rem;
  background: rgba(255,255,255,0.55);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.lane-local { background: rgba(255,255,255,0.78); }
.lane-cloud { background: rgba(247, 242, 234, 0.65); }
.lane.won {
  border-color: rgba(26, 154, 92, 0.35);
  box-shadow: 0 0 0 3px rgba(26, 154, 92, 0.1), var(--shadow);
  transform: translateY(-2px);
}
.lane.lagging { border-color: rgba(232, 93, 76, 0.2); }
.lane-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}
.lane-titles { min-width: 0; flex: 1; text-align: left; }
.lane-head img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.wf-logo,
img.wf-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  background: transparent;
  border: none;
  box-shadow: 0 1px 2px rgba(20, 18, 15, 0.08);
}
.lane-head strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.lane-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ok);
}
.lane-tag.dim { color: var(--accent); }
.lane-badge {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.lane-badge.win { background: rgba(26, 154, 92, 0.12); color: var(--ok); }
.lane-badge.lose { background: rgba(232, 93, 76, 0.12); color: var(--accent); }
.lane-status {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}
.lane-status.live { color: var(--accent-2); }
.lane-status.wait { color: var(--accent); }
.lane-status.done { color: var(--ok); }
.lane-text {
  margin: 0;
  flex: 1;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
  min-height: 4.5rem;
}
.lane-cloud .lane-text { color: var(--ink-soft); }
.lane-text .tok.filler {
  color: var(--accent);
  background: rgba(232, 93, 76, 0.1);
  border-radius: 3px;
  text-decoration: line-through;
  text-decoration-color: rgba(232, 93, 76, 0.5);
}
.lane-text .tok.fix {
  color: var(--ok);
  background: rgba(26, 154, 92, 0.1);
  border-radius: 3px;
  font-weight: 700;
  padding: 0 0.1rem;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent-2);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.pending {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}
.pending .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounceDot 1s ease-in-out infinite;
}
.pending .dot:nth-child(2) { animation-delay: 0.15s; }
.pending .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounceDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.race-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.race-caption {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  flex: 1;
  min-width: 10rem;
}
.vd-replay {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.65);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), background 0.15s ease;
}
.vd-replay:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-1px);
}

/* Faint curved marquee in living background */
.bg-marquee {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 42%, #000 18%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 42%, #000 18%, transparent 82%);
}
.bg-marquee-svg {
  width: min(140vw, 1600px);
  height: auto;
  min-height: 70vh;
  max-width: none;
  transform: translateY(-4%) scale(1.05);
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}
.bento-card {
  grid-column: span 2;
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 180px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.bento-wide {
  grid-column: span 4;
  grid-row: span 2;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1rem;
  align-items: center;
  min-height: 280px;
  padding: 0;
}
.bento-wide .bento-copy { padding: 1.6rem 0.5rem 1.6rem 1.6rem; }
.bento-wide .bento-visual {
  height: 100%;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(145deg, #fff8ee, #ffe8d8);
}
.bento-wide .bento-visual img {
  position: absolute;
  width: 130%;
  max-width: none;
  right: -8%;
  bottom: -10%;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.bento-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.bento-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.15;
}
.bento-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.45;
}
.bento-mac h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}
.price-big {
  font-family: var(--serif) !important;
  font-weight: 400 !important;
  font-size: clamp(3.5rem, 7vw, 4.5rem) !important;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
  background: linear-gradient(120deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}
.key-row .plus { color: var(--muted); font-weight: 700; }
kbd {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.82em;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-weight: 600;
}

/* VS grid */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  max-width: 720px;
  margin: 0 auto;
}
.vs-col { padding: 1.35rem 1.25rem; }
.vs-col.us {
  background:
    radial-gradient(280px 120px at 50% 0%, rgba(26, 154, 92, 0.12), transparent 70%),
    rgba(255,253,248,0.8);
  border-color: rgba(26, 154, 92, 0.18);
}
.vs-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.vs-head img { border-radius: 8px; }
.vs-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.vs-col li {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.vs-col.us li { color: var(--ink); }
.vs-col.us li strong { color: var(--ok); }

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 900px;
}
.steps li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.2rem;
  transition: transform 0.25s var(--ease);
  min-height: 140px;
}
.steps li:hover { transform: translateY(-3px); }
.step-n {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--muted);
  line-height: 1;
}
.steps strong {
  display: block;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* CTA */
.cta-final { padding-bottom: 4rem; }
.cta-box {
  position: relative;
  text-align: center;
  padding: 3.25rem 1.5rem;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(520px 240px at 50% 0%, rgba(255, 210, 140, 0.55) 0%, transparent 70%),
    rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow-lg);
}
.cta-glow {
  position: absolute;
  width: 60%;
  height: 50%;
  top: -10%;
  left: 20%;
  background: radial-gradient(circle, rgba(255, 170, 120, 0.45), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.cta-box h2 {
  position: relative;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 6.5vw, 4.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.02;
}
.cta-note {
  position: relative;
  max-width: 28rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Footer */
.site-footer {
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 calc(2.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.65rem; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { display: block; letter-spacing: -0.02em; }
.footer-brand span { display: block; color: var(--muted); font-size: 0.85rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-note { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .hero {
    min-height: 0;
    padding: 1.75rem 0 2rem;
  }
  .hero-copy {
    max-width: 100%;
  }
  .bento-wide {
    grid-column: span 6;
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .bento-wide .bento-copy { padding: 1.35rem 1.25rem 0.5rem; }
  .bento-wide .bento-visual {
    min-height: 180px;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .bento-card { grid-column: span 3; }
  .steps { grid-template-columns: 1fr; max-width: 420px; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .race-lanes { grid-template-columns: 1fr; }
  .speed-board {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
  .speed-vs { padding: 0.15rem 0; }
  .vs-ring { width: 48px; height: 48px; font-size: 1.15rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card,
  .bento-wide { grid-column: span 2; }
  .section { padding: 2.5rem 0; }
  .bg-marquee { opacity: 0.42; }
  .orb { filter: blur(50px); opacity: 0.4; }
}

@media (max-width: 520px) {
  .site-header {
    width: min(var(--max), calc(100% - 0.75rem));
    top: 0.4rem;
  }
  .header-inner { padding: 0.4rem 0.4rem 0.4rem 0.65rem; }
  .brand img { width: 28px; height: 28px; }
  .brand-text { font-size: 0.88rem; }
  .btn-sm { min-height: 40px; padding: 0.48rem 0.85rem; font-size: 0.8rem; }

  .hero { width: min(var(--max), calc(100% - 1.1rem)); padding-top: 1.25rem; }
  h1 { font-size: clamp(3rem, 13vw, 3.6rem); }
  .lede { font-size: 1.15rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { min-height: 48px; width: 100%; }

  .section { width: min(var(--max), calc(100% - 1.1rem)); padding: 2rem 0; }
  .section-head { margin-bottom: 1.25rem; }
  .section-head h2 { font-size: clamp(2.15rem, 9vw, 2.8rem); }
  .section-head p { font-size: 1.05rem; }

  .speed-card { min-height: 0; padding: 1.25rem 1rem; }
  .speed-label { font-size: 1.25rem; }
  .speed-num { font-size: clamp(3.4rem, 16vw, 4.2rem); }
  .speed-ghost, .speed-live { font-size: 0.98rem; max-width: 100%; }
  .vs-ring { width: 60px; height: 60px; font-size: 1.4rem; }

  .race-demo { padding: 1rem 0.85rem 0.9rem; border-radius: 20px; }
  .flow-pill { height: 64px; width: 100%; }
  .race-wave { gap: 3.4px; height: 46px; }
  .vd-bar { width: 2.8px; flex-basis: 2.8px; }
  .lane { min-height: 0; padding: 0.9rem; }
  .lane-head strong { font-size: 1rem; }
  .lane-text { min-height: 3.8rem; font-size: 1rem; }
  .race-footer { flex-direction: column; align-items: stretch; }
  .race-caption { text-align: center; min-width: 0; font-size: 0.82rem; }
  .vd-replay { width: 100%; min-height: 44px; }

  .bento { grid-template-columns: 1fr; gap: 0.65rem; }
  .bento-card,
  .bento-wide { grid-column: span 1; min-height: 0; }
  .bg-marquee { opacity: 0.38; }
  .bg-marquee-svg { min-height: 55vh; width: min(160vw, 1400px); }
  .bento-card { padding: 1.15rem 1.05rem; }
  .bento-card:hover,
  .speed-card:hover,
  .steps li:hover { transform: none; }
  .bento-wide .bento-visual { min-height: 160px; }
  .bento-card h3 { font-size: 1.4rem; }
  .bento-card p { font-size: 1rem; }
  .bento-mac h3 { font-size: 1.65rem; }
  .price-big { font-size: 3.4rem !important; }

  .vs-grid { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
  .cta-box { padding: 2rem 1.1rem; border-radius: 20px; }
  .cta-box h2 { font-size: clamp(2.4rem, 10vw, 3rem); }
  .cta-note { font-size: 1.05rem; }
  .steps strong { font-size: 1.15rem; }
  .steps p { font-size: 0.98rem; }
  .vs-col li { font-size: 1rem; }
  .site-footer { width: min(var(--max), calc(100% - 1.1rem)); }
  .ticker { font-size: 0.62rem; }
  .aurora { animation-duration: 40s; }
}

@media (max-width: 360px) {
  .brand .soft { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .aurora,
  .pending .dot { animation: none !important; }
  .vd-bar { transition: none !important; }
  .reveal,
  html.motion-on .reveal.is-pending,
  html.motion-on .reveal.is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .spark { display: none; }
  html { scroll-behavior: auto; }
  .feature:hover,
  .btn:hover,
  .lane.won,
  .bento-card:hover,
  .speed-card:hover,
  .steps li:hover { transform: none; }
  .bg-marquee animate { display: none; }
  .bg-marquee { opacity: 0.32; }
}

/* Low-power / coarse pointer: kill heavy continuous effects */
@media (hover: none), (max-width: 820px) {
  .spark { display: none; }
  .aurora { animation: none; filter: blur(40px); }
  .orb { filter: blur(40px); }
}

@media (hover: none) {
  .btn:hover,
  .bento-card:hover,
  .speed-card:hover,
  .steps li:hover,
  .vd-replay:hover { transform: none; }
}
