/* RetaFunnel — retafunnel.com
   Plain CSS, no build step. Dark by default, light via prefers-color-scheme. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0a0c0b;
  --bg-2: #0f1211;
  --surface: #141817;
  --surface-2: #1a1f1d;
  --surface-3: #222825;
  --line: rgba(237, 232, 223, 0.10);
  --line-strong: rgba(237, 232, 223, 0.20);
  --ink: #ede8df;
  --ink-2: rgba(237, 232, 223, 0.72);
  --ink-3: rgba(237, 232, 223, 0.48);
  --ink-4: rgba(237, 232, 223, 0.28);
  --accent: #f2a33a;
  --accent-soft: rgba(242, 163, 58, 0.14);
  --accent-ink: #1a1200;
  --teal: #5fd3c4;
  --teal-soft: rgba(95, 211, 196, 0.14);
  --rose: #f0706c;
  --rose-soft: rgba(240, 112, 108, 0.14);
  --green: #7fd68a;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --grid: rgba(237, 232, 223, 0.045);
  --glow: radial-gradient(60% 50% at 70% 20%, rgba(242, 163, 58, 0.14), transparent 70%),
          radial-gradient(40% 40% at 20% 80%, rgba(95, 211, 196, 0.10), transparent 70%);

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.75, 0.2, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f1ea;
    --bg-2: #ebe7de;
    --surface: #fffdf9;
    --surface-2: #f6f3ec;
    --surface-3: #ece8df;
    --line: rgba(21, 24, 26, 0.10);
    --line-strong: rgba(21, 24, 26, 0.22);
    --ink: #15181a;
    --ink-2: rgba(21, 24, 26, 0.74);
    --ink-3: rgba(21, 24, 26, 0.52);
    --ink-4: rgba(21, 24, 26, 0.32);
    --accent: #cf6f05;
    --accent-soft: rgba(207, 111, 5, 0.12);
    --accent-ink: #fff8ec;
    --teal: #0f8f82;
    --teal-soft: rgba(15, 143, 130, 0.12);
    --rose: #c8403f;
    --rose-soft: rgba(200, 64, 63, 0.12);
    --green: #2c8f3c;
    --shadow: 0 30px 70px -30px rgba(21, 24, 26, 0.28), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    --grid: rgba(21, 24, 26, 0.06);
    --glow: radial-gradient(60% 50% at 70% 20%, rgba(207, 111, 5, 0.12), transparent 70%),
            radial-gradient(40% 40% at 20% 80%, rgba(15, 143, 130, 0.10), transparent 70%);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
@media (prefers-color-scheme: light) { body::before { opacity: 0.05; mix-blend-mode: multiply; } }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
i { font-style: normal; }
code, kbd, pre { font-family: var(--font-mono); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.012em; line-height: 1.02; }
.display em { font-style: italic; color: var(--accent); }
.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em; }
.muted { color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); transform: translateY(-1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.brand svg { width: 26px; height: 26px; }
.brand .mark-bg { fill: var(--ink); }
.brand .mark-fg { fill: var(--bg); }
.brand .mark-dot { fill: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .signin { padding: 8px 12px; font-size: 14.5px; color: var(--ink-2); }
.nav-cta .signin:hover { color: var(--ink); }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: transform 0.3s var(--ease), background-color 0.2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), top 0.3s; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links, .nav-cta .signin { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav.open .nav-links a:last-child { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--glow);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 60% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 60% 30%, #000 30%, transparent 100%);
}
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { grid-column: 1 / span 5; min-width: 0; }
.hero-visual { grid-column: 6 / span 7; min-width: 0; }
@media (max-width: 1020px) {
  .hero-copy { grid-column: 1 / -1; max-width: 680px; }
  .hero-visual { grid-column: 1 / -1; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 12px 6px 8px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(42px, 5.4vw, 76px); margin: 22px 0 20px; max-width: 12ch; }
.hero .lede { font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--ink-3); font-family: var(--font-mono); font-size: 12.5px; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }

/* load-in */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise 0.8s var(--ease) both; }
.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.15s; }
.hero-copy > :nth-child(3) { animation-delay: 0.25s; }
.hero-copy > :nth-child(4) { animation-delay: 0.35s; }
.hero-copy > :nth-child(5) { animation-delay: 0.45s; }
.hero-visual { animation: rise 1s var(--ease) 0.3s both; }

/* ---------- Dashboard stage ---------- */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 0;
}
.panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-title { font-size: 13px; font-weight: 500; letter-spacing: -0.005em; }
.panel-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }

.p-funnel { grid-column: 1 / span 7; grid-row: 1; z-index: 1; min-width: 0; align-self: start; }
.p-segment { grid-column: 8 / span 5; grid-row: 1; z-index: 2; align-self: start; margin-top: 34px; margin-left: 12px; min-width: 0; }
.p-curve { grid-column: 1 / span 12; grid-row: 2; z-index: 3; margin-top: -14px; margin-right: 6%; min-width: 0; }
@media (max-width: 1020px) {
  .p-funnel { grid-column: 1 / span 7; }
  .p-segment { grid-column: 8 / span 5; }
  .p-curve { grid-column: 1 / span 12; margin-right: 0; }
}
@media (max-width: 560px) {
  .stage { display: flex; flex-direction: column; gap: 12px; }
  .p-segment, .p-curve { margin: 0; }
  .p-curve .legend { display: none; }
  .terminal { font-size: 11.5px; }
}
.panel-title { flex: 0 0 auto; white-space: nowrap; }
.panel-sub { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-segment .panel-title { white-space: normal; flex: 1 1 auto; min-width: 0; }
.p-segment .panel-head { align-items: flex-start; }
.seg-count .l { white-space: nowrap; }
.seg-out .to { flex-wrap: wrap; }
.seg-out { flex-wrap: wrap; }

/* funnel bars */
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 48px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-row .name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel-row .pct { font-family: var(--font-mono); text-align: right; color: var(--ink); font-size: 11.5px; }
.bar { position: relative; height: 18px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar i {
  position: absolute; inset: 0 auto 0 0; width: var(--w);
  background: linear-gradient(90deg, var(--teal), color-mix(in srgb, var(--teal) 60%, var(--accent)));
  border-radius: 4px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease);
}
.in .bar i { transform: scaleX(1); }
.funnel-row:nth-child(2) .bar i { transition-delay: 0.1s; }
.funnel-row:nth-child(3) .bar i { transition-delay: 0.2s; }
.funnel-row:nth-child(4) .bar i { transition-delay: 0.3s; }
.funnel-row:nth-child(5) .bar i { transition-delay: 0.4s; }
.funnel-row .drop { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 10px; color: var(--rose); }
.funnel-row.hot .name { color: var(--ink); }
.funnel-row.hot .bar i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--rose))); }

/* segment card */
.seg-rule { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.01em;
  padding: 4px 8px; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--ink-2);
}
.chip b { color: var(--ink); font-weight: 500; }
.chip.op { background: transparent; border-color: transparent; color: var(--ink-4); padding: 4px 2px; }
.seg-out { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.seg-out .to { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.seg-out .to .arrow { color: var(--accent); }
.seg-count { text-align: right; }
.seg-count .n { font-family: var(--font-mono); font-size: 22px; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.seg-count .l { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--green); }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }

/* retention curve */
.curve { width: 100%; height: auto; aspect-ratio: 420 / 170; }
.curve .gridline { stroke: var(--line); stroke-width: 1; }
.curve .axis { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-3); }
.curve .area { fill: url(#curveFill); opacity: 0; transition: opacity 1s ease 1.2s; }
.curve .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .curve .line { animation: draw 2s var(--ease) 0.25s forwards; }
.in .curve .area { opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.curve .marker { opacity: 0; transition: opacity 0.5s ease 1.6s; }
.in .curve .marker { opacity: 1; }
.curve .marker circle { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.curve .marker text { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ink); }
.curve .marker rect { fill: var(--surface-3); stroke: var(--line-strong); }
.curve .cutline { stroke: var(--rose); stroke-dasharray: 3 3; stroke-width: 1; }
.legend { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 2px; background: var(--accent); border-radius: 1px; }
.legend i.alt { background: var(--rose); }

/* event ticker */
.ticker { display: flex; gap: 8px; margin-top: 18px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.ticker .chip { white-space: nowrap; flex: 0 0 auto; }
.ticker .chip::before { content: "•"; color: var(--teal); margin-right: 6px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-bottom: clamp(36px, 5vw, 64px); align-items: end; }
.section-head .label { grid-column: 1 / span 3; }
.section-head .title { grid-column: 4 / span 9; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 60px); max-width: 18ch; }
.section-head .sub { margin-top: 16px; font-size: clamp(16px, 1.2vw, 18px); color: var(--ink-2); max-width: 58ch; }
@media (max-width: 860px) {
  .section-head .label, .section-head .title { grid-column: 1 / -1; }
}
.label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); max-width: 80px; }
.label b { color: var(--accent); font-weight: 500; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { min-width: 0; background: var(--bg); padding: clamp(24px, 3vw, 36px); position: relative; min-height: 300px; display: flex; flex-direction: column; }
.step .num { font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--ink-4); letter-spacing: -0.03em; }
.step h3 { font-size: 22px; letter-spacing: -0.015em; margin: 28px 0 10px; font-weight: 500; }
.step p { color: var(--ink-2); font-size: 15.5px; }
.step .art { margin-top: auto; padding-top: 24px; }
.step .art code { display: block; font-size: 11.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.step .art code .k { color: var(--teal); } .step .art code .s { color: var(--accent); } .step .art code .c { color: var(--ink-4); }
.step:hover { background: var(--surface); }
.step { transition: background-color 0.3s; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } .step { min-height: 0; } }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { min-width: 0; background: var(--bg); padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 12px; transition: background-color 0.3s; min-height: 250px; }
.feature:hover { background: var(--surface); }
.feature .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
.feature .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 17.5px; font-weight: 500; letter-spacing: -0.012em; margin-top: 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.feature .sig { margin-top: auto; padding-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); border-top: 1px dashed var(--line); }
.feature .sig b { color: var(--teal); font-weight: 500; }
.feature.wide { grid-column: span 2; }
@media (max-width: 1100px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature.wide { grid-column: span 2; } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } .feature.wide { grid-column: span 1; } .feature { min-height: 0; } }

/* ---------- Agent / MCP ---------- */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.split > * { min-width: 0; }
.split > .copy { grid-column: 1 / span 5; }
.split > .art { grid-column: 6 / span 7; }
.split.flip > .copy { grid-column: 8 / span 5; order: 2; }
.split.flip > .art { grid-column: 1 / span 7; order: 1; }
@media (max-width: 960px) {
  .split > .copy, .split > .art, .split.flip > .copy, .split.flip > .art { grid-column: 1 / -1; order: 0; }
}
.split h2 { font-size: clamp(32px, 4vw, 52px); }
.split .copy p { margin-top: 18px; color: var(--ink-2); }
.split .copy .label { margin-bottom: 18px; }
.checks { margin-top: 22px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; font-size: 15.5px; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2a33a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); background-size: 10px; background-position: center; background-repeat: no-repeat; }
.checks li b { color: var(--ink); font-weight: 500; }
.checks li code { font-size: 13px; color: var(--teal); }
.stat-row { display: flex; gap: 28px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.stat .n { font-family: var(--font-display); font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.stat .l { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); margin-top: 6px; letter-spacing: 0.02em; }

.terminal {
  background: #0b0d0c; color: #d9d4ca;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
}
@media (prefers-color-scheme: light) { .terminal { border-color: rgba(21,24,26,0.2); } }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.terminal-bar span { margin-left: auto; font-size: 11px; color: rgba(217,212,202,0.45); }
.terminal pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; white-space: pre; }
.terminal .ln { display: block; opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s var(--ease); }
.in .terminal .ln { opacity: 1; transform: none; }
.terminal .pr { color: #f2a33a; }
.terminal .you { color: #ede8df; }
.terminal .dim { color: rgba(217,212,202,0.45); }
.terminal .tool { color: #5fd3c4; }
.terminal .ok { color: #7fd68a; }
.terminal .url { color: #a9b7ff; text-decoration: underline; text-decoration-color: rgba(169,183,255,0.4); }
.terminal .cursor { display: inline-block; width: 7px; height: 13px; background: #f2a33a; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { visibility: hidden; } }
.no-js .terminal .ln { opacity: 1; transform: none; }

/* ---------- Attribution timeline ---------- */
.timeline-card { padding: clamp(18px, 2.5vw, 28px); }
.lead-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.lead-id { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.lead-id .who { font-size: 13.5px; font-weight: 500; }
.lead-id .hash { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.pill { font-family: var(--font-mono); font-size: 11px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.pill.good { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }

.tl { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tl::before { content: ""; position: absolute; left: 10px; right: 10px; top: 9px; height: 1px; background: var(--line-strong); }
.touch { min-width: 0; position: relative; padding-top: 28px; }
.touch::before { content: ""; position: absolute; left: 4px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-3); }
.touch.src::before { border-color: var(--accent); background: var(--accent); }
.touch.end::before { border-color: var(--green); background: var(--green); }
.touch .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.03em; }
.touch .what { font-size: 13.5px; font-weight: 500; margin: 4px 0 2px; }
.touch .det { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.touch .det code { font-size: 11px; color: var(--teal); }
@media (max-width: 720px) {
  .tl { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-left: 22px; }
  .tl::before { left: 9px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .touch { padding-top: 0; }
  .touch::before { left: -22px; top: 4px; }
}
.models { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line-strong); display: grid; gap: 10px; }
.model { display: grid; grid-template-columns: 96px 1fr 72px; align-items: center; gap: 12px; font-size: 12.5px; }
.model .name { color: var(--ink-2); }
.model .val { font-family: var(--font-mono); text-align: right; font-size: 11.5px; }
.split-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; gap: 2px; }
.split-bar i { display: block; height: 100%; width: var(--w); background: var(--surface-3); position: relative; }
.split-bar i.meta { background: var(--accent); }
.split-bar i.goog { background: var(--teal); }
.split-bar i::after { content: attr(data-l); position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 9.5px; color: var(--accent-ink); white-space: nowrap; }
.split-bar i.goog::after { color: #06211e; }
@media (prefers-color-scheme: light) { .split-bar i.goog::after { color: #fff; } }
@media (max-width: 480px) { .model { grid-template-columns: 80px 1fr; } .model .val { display: none; } }

/* ---------- Test mode / privacy ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.duo > div { min-width: 0; background: var(--bg); padding: clamp(24px, 3.2vw, 44px); }
.duo h3 { font-size: clamp(24px, 2.4vw, 32px); margin: 18px 0 12px; font-family: var(--font-display); letter-spacing: -0.012em; }
.duo p { color: var(--ink-2); font-size: 15.5px; }
.duo .checks li { font-size: 14.5px; }
.duo .checks { margin-top: 18px; }
@media (max-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr); } }

.testbox { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.testbox .banner { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.testbox .banner .sw { margin-left: auto; width: 30px; height: 16px; border-radius: 999px; background: var(--accent); position: relative; }
.testbox .banner .sw::after { content: ""; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-ink); }
.testbox table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.testbox td { padding: 8px 12px; border-top: 1px solid var(--line); }
.testbox tr:first-child td { border-top: 0; }
.testbox td:first-child { font-family: var(--font-mono); color: var(--ink-2); font-size: 11.5px; }
.testbox td:last-child { text-align: right; font-family: var(--font-mono); font-size: 11px; }
.testbox .ok { color: var(--green); }
.testbox .miss { color: var(--rose); }

.privbox { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.privbox .kv { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.privbox .k { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.privbox .v { font-size: 14px; margin-top: 4px; font-weight: 500; }
@media (max-width: 420px) { .privbox { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 26px; background: var(--surface); display: flex; flex-direction: column; transition: transform 0.3s var(--ease), border-color 0.3s; }
.plan:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.plan.featured { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(180deg, var(--accent-soft), transparent 40%), var(--surface); }
.plan .tag { position: absolute; top: -11px; left: 24px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 4px 9px; border-radius: 999px; }
.plan .name { font-size: 15px; font-weight: 500; }
.plan .price { font-family: var(--font-display); font-size: 52px; line-height: 1; letter-spacing: -0.02em; margin: 16px 0 4px; }
.plan .price small { font-family: var(--font-body); font-size: 15px; color: var(--ink-3); letter-spacing: 0; }
.plan .cap { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-bottom: 20px; }
.plan ul { display: grid; gap: 9px; margin-bottom: 26px; }
.plan li { font-size: 14.5px; color: var(--ink-2); display: flex; gap: 10px; }
.plan li::before { content: "—"; color: var(--ink-4); }
.plan .btn { margin-top: auto; justify-content: center; }
.pricing-note { margin-top: 20px; font-size: 13.5px; color: var(--ink-3); display: flex; gap: 10px; align-items: flex-start; }
.pricing-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; stroke: var(--teal); fill: none; stroke-width: 1.6; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-size: clamp(17px, 1.4vw, 19px); font-weight: 500; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: transform 0.35s var(--ease), background-color 0.3s; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.faq summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--accent-soft); border-color: var(--accent); }
.faq .a { padding: 0 4px 24px; color: var(--ink-2); font-size: 15.5px; max-width: 68ch; }
.faq .a code { font-size: 13px; color: var(--teal); }

/* ---------- Final CTA ---------- */
.cta { text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 50% 100%, var(--accent-soft), transparent 70%); }
.cta h2 { font-size: clamp(40px, 6vw, 80px); max-width: 16ch; margin: 0 auto; }
.cta p { margin: 20px auto 0; color: var(--ink-2); max-width: 50ch; }
.cta .hero-actions { justify-content: center; }
.cta .wrap { min-width: 0; }
.snippet { display: inline-flex; align-items: center; gap: 12px; margin-top: 32px; padding: 12px 14px 12px 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); max-width: 100%; overflow-x: auto; white-space: nowrap; }
.snippet .t { color: var(--ink-3); } .snippet .a { color: var(--teal); } .snippet .v { color: var(--accent); }
.copy-btn { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.copy-btn:hover { background: var(--surface-3); color: var(--ink); }
.copy-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.copy-btn.done { color: var(--green); border-color: var(--green); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand { margin-bottom: 14px; }
.footer .about { color: var(--ink-3); font-size: 14px; max-width: 34ch; }
.footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; font-weight: 500; }
.footer ul { display: grid; gap: 9px; }
.footer ul a { font-size: 14.5px; color: var(--ink-2); transition: color 0.2s; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer-bottom .made { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .made i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #2f9e5b 33%, #f4f1ea 33% 66%, #d0473f 66%); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Simple pages (privacy, terms, 404) ---------- */
.page { padding: clamp(56px, 8vw, 110px) 0; min-height: 60vh; }
.page .label { margin-bottom: 20px; }
.page h1 { font-size: clamp(38px, 5vw, 64px); max-width: 16ch; }
.page .lede { margin-top: 18px; color: var(--ink-2); max-width: 60ch; font-size: 18px; }
.prose { max-width: 68ch; margin-top: 40px; color: var(--ink-2); }
.prose h2 { font-family: var(--font-body); font-size: 20px; font-weight: 500; color: var(--ink); margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 14px; }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.notice { margin-top: 28px; display: inline-flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); max-width: 60ch; }
.page-404 { text-align: center; }
.page-404 .big { font-family: var(--font-display); font-size: clamp(96px, 22vw, 220px); line-height: 0.9; letter-spacing: -0.04em; color: var(--ink-4); }
.page-404 h1 { margin: 10px auto 0; }
.page-404 .lede { margin-left: auto; margin-right: auto; }
.page-404 .hero-actions { justify-content: center; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal, .hero-copy > *, .hero-visual { opacity: 1; transform: none; }
  .bar i { transform: scaleX(1); }
  .curve .line { stroke-dashoffset: 0; }
  .curve .area, .curve .marker, .terminal .ln { opacity: 1; transform: none; }
  .terminal .cursor { animation: none; }
}

.feature .sig a { color: var(--teal); }
.feature .sig a:hover { text-decoration: underline; }
.checks + .more-link { margin-top: 18px; font-size: 14.5px; }
.more-link a { color: var(--teal); }
.more-link a:hover { text-decoration: underline; }

/* Contact page */
.contact-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:48px;margin-top:40px}
.contact-form{display:grid;gap:18px}
.contact-form label{display:grid;gap:8px;font-size:.92rem;color:var(--muted,#a9a498)}
.contact-form input,.contact-form select,.contact-form textarea{font:inherit;color:inherit;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:12px 14px;outline:none}
.contact-form input:focus,.contact-form select:focus,.contact-form textarea:focus{border-color:#f2a33a}
.contact-form .btn{justify-self:start;margin-top:6px}
.form-hint{font-size:.85rem;color:var(--muted,#a9a498);margin:0}
.contact-side h2{font-size:1.05rem;margin:0 0 10px}
.contact-side h2+ol,.contact-side h2+p{margin:0 0 28px;color:var(--muted,#a9a498);line-height:1.6}
.contact-side ol{padding-left:20px}
@media (prefers-color-scheme: light){.contact-form input,.contact-form select,.contact-form textarea{background:rgba(0,0,0,.03);border-color:rgba(0,0,0,.14)}}
@media (max-width:880px){.contact-grid{grid-template-columns:minmax(0,1fr);gap:32px}}
