/* weftrun.dev — landing. Tokens lifted verbatim from the app (web/src/styles.css)
   so the page and the product are pixel-identical in feel. */

@font-face {
  font-family: "Geist Variable";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono Variable";
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-sans: "Geist Variable", -apple-system, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", ui-monospace, "SF Mono", Menlo, monospace;
  --bg: #ffffff;      --bg-subtle: #fafafa;  --bg-elevated: #ffffff; --bg-hover: #f4f4f5;
  --border: #e4e4e7;  --border-strong: #d4d4d8;
  --fg: #18181b;      --fg-muted: #71717a;   --fg-faint: #a1a1aa;
  --accent: #2563eb;  --accent-fg: #ffffff;
  --good: #16794a;    --good-bg: #ecfdf3;
  --bad: #b42318;     --bad-bg: #fef3f2;
  --warn: #b54708;    --radius: 6px;
  --maxw: 1180px;
  --gap: 104px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --marker: #8b5cf6;
}
:root[data-theme="dark"] {
  --bg: #0a0a0a;      --bg-subtle: #0f0f0f;  --bg-elevated: #161616; --bg-hover: #1c1c1c;
  --border: #262626;  --border-strong: #343434;
  --fg: #ededed;      --fg-muted: #a1a1aa;   --fg-faint: #71717a;
  --accent: #3b82f6;  --accent-fg: #ffffff;
  --good: #4ade80;    --good-bg: #0e2a1c;
  --bad: #f87171;     --bad-bg: #2a1414;     --warn: #f59e0b;
  --marker: #a78bfa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ── header ───────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 140ms var(--ease);
}
header.scrolled { border-bottom-color: var(--border); }
.head-inner { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { font-size: 19px; font-weight: 650; letter-spacing: -0.035em; line-height: 1; }
.brand .run { color: var(--accent); }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint);
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-item { font-size: 14px; font-weight: 450; color: var(--fg-muted); padding: 7px 11px; border-radius: var(--radius); transition: color 120ms; }
.nav-item:hover { color: var(--fg); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); color: var(--fg-muted); cursor: pointer; }
.icon-btn:hover { color: var(--fg); background: var(--bg-hover); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.ghost { border-color: transparent; background: transparent; margin: 0 8px 0 6px; }
.icon-btn.ghost:hover { background: var(--bg-hover); color: var(--fg); }
/* header CTA is a hair smaller; the arrow slides on hover (full character lives
   on .btn-primary below so the hero + header buttons match) */
.btn-primary.cta { padding: 7px 15px; font-size: 13.5px; }
.cta-arrow { display: inline-block; transition: transform 220ms var(--ease); }
.btn-primary:hover .cta-arrow { transform: translateX(4px); }

/* gate panel — scale labels + the two-state rule, so the surface fills its column */
.gate-scale { position: relative; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); margin-top: -6px; }
.gate-scale .g2s { position: absolute; left: 43.5%; transform: translateX(-50%); color: var(--fg-muted); }
.gate-rule { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); margin-top: 2px; }
.gate-rule .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.gate-rule .sw.flat { background: var(--fg-faint); }
.gate-rule .sw.bad { background: var(--bad); }


/* ── buttons ──────────────────────────────────────────────── */
.btn, .btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--fg);
  transition: background 120ms, border-color 120ms, transform 120ms var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }

/* primary CTA, Vercel idiom: flat, high-contrast, monochrome — the foreground
   colour becomes the fill (white-on-black in light, black-on-white in dark). No
   gradient, no glow, no shadow. Hover is a single subtle bg shift. Crisp. */
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}
.btn-primary:hover { background: color-mix(in srgb, var(--fg) 84%, var(--bg)); border-color: color-mix(in srgb, var(--fg) 84%, var(--bg)); }
.btn-primary:active { background: color-mix(in srgb, var(--fg) 72%, var(--bg)); }
.btn-sm { font-size: 13px; padding: 5px 10px; }

/* ── sections / spine ─────────────────────────────────────── */
main { position: relative; }
.spine { position: fixed; top: 0; left: max(24px, calc((100vw - var(--maxw)) / 2 - 8px)); width: 1px; height: 100vh; background: var(--border); z-index: 1; }
.spine-ticks { position: fixed; top: 0; left: max(24px, calc((100vw - var(--maxw)) / 2 - 8px)); z-index: 2; pointer-events: none; }
@media (max-width: 1000px) { .spine, .spine-ticks { display: none; } }

section { padding: var(--gap) 0; position: relative; }
section + section { border-top: 1px solid var(--border); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-faint); margin-bottom: 18px; }
.eyebrow .n { color: var(--accent); }
h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.prose { font-size: 15px; line-height: 1.6; color: var(--fg-muted); max-width: 46ch; }
.prose strong { color: var(--fg); font-weight: 550; }
.prose code, .inline-code { font-family: var(--font-mono); font-size: 0.92em; color: var(--fg); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.fig { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); margin-bottom: 10px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(8px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }

/* ── hero ─────────────────────────────────────────────────── */
.hero { padding-top: 84px; padding-bottom: 80px; }
.hero .stack { padding-bottom: 4px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 53px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; }
.hero .sub { margin-top: 22px; font-size: 17px; line-height: 1.55; color: var(--fg-muted); max-width: 30ch; }
.hero .cta { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .stack { margin-top: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-faint); }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero .sub { max-width: 46ch; } }

/* ── panel / card (lifted from app) ───────────────────────── */
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.panel-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 500; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.panel-body { padding: 16px; }
.verdict-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); padding: 16px; }
.card .label { font-size: 12px; color: var(--fg-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.card .value { font-size: 24px; font-weight: 500; }
.card.verdict-hero .value { font-size: 32px; }
.card .unit { font-size: 14px; color: var(--fg-muted); margin-left: 4px; }
.card .foot { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); margin-top: 8px; }
.card .foot.faint { color: var(--fg-faint); }
.hero-stats { display: flex; gap: 18px; margin-top: 10px; }
.hero-stat { display: flex; flex-direction: column; gap: 1px; }
.hero-stat-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); }
.hero-stat-v { font-family: var(--font-mono); font-size: 14px; }
.hero-stat-u { font-size: 11px; color: var(--fg-muted); margin-left: 2px; }
/* ±σ band under hero value */
.sigma-band { position: relative; height: 4px; margin-top: 10px; }
.sigma-band .track { position: absolute; left: 0; right: 0; top: 1px; height: 1px; background: var(--border); }
.sigma-band .span { position: absolute; top: 0; height: 3px; background: color-mix(in srgb, var(--accent) 45%, transparent); border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: scaleX(0); transform-origin: center; transition: transform 0.5s var(--ease); }

.verdict-meta { margin-top: 16px; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.meta-chip { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-subtle); }
.meta-chip-k { padding: 2px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-faint); border-right: 1px solid var(--border); }
.meta-chip-v { padding: 2px 8px; font-family: var(--font-mono); font-size: 12px; }
.meta-sub { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); }

/* badges / pills / deltas */
.badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 12px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-subtle); color: var(--fg-muted); }
.badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }
.pill.new { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.delta { font-family: var(--font-mono); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.delta.flat { color: var(--fg-faint); }

/* layout helpers for split sections */
.split { display: grid; grid-template-columns: 0.8fr 1.1fr; gap: 48px; align-items: center; }
.split.rev { grid-template-columns: 1.1fr 0.8fr; }
@media (max-width: 880px) { .split, .split.rev { grid-template-columns: 1fr; gap: 28px; } }

/* terminal */
.term { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; background: #0a0a0a; color: #ededed; border: 1px solid #262626; border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; }
.term .muted { color: #71717a; }
.term .ok { color: #4ade80; }
.term .caret { display: inline-block; width: 8px; height: 15px; background: #4ade80; vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* leak table (lifted) */
.leak-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.leak-table thead th { font-size: 12px; font-weight: 500; color: var(--fg-muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.leak-table thead th.r, .leak-table td.r { text-align: right; }
.leak-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.leak-table td.mono, .leak-table td.r { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.leak-table tbody tr { cursor: pointer; transition: background 100ms; }
.leak-table tbody tr:hover, .leak-table tbody tr.active { background: var(--bg-hover); }
.leak-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.leak-table .screen { font-weight: 500; }
.dod.bad { color: var(--bad); } .dod.warn { color: var(--warn); } .dod.flat { color: var(--fg-muted); } .dod.good { color: var(--good); }

/* gate slider */
.gate { display: grid; gap: 14px; }
.gate-readout { display: flex; align-items: baseline; gap: 12px; }
.gate-readout .v { font-family: var(--font-mono); font-size: 28px; font-weight: 500; }
.noise-bar { position: relative; height: 6px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
.noise-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--fg-faint); transition: width 120ms var(--ease), background 0ms; }
.noise-bar .floor { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--fg-muted); }
.noise-bar .floor::after { content: "2σ"; position: absolute; top: -16px; left: -7px; font-family: var(--font-mono); font-size: 9px; color: var(--fg-faint); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); cursor: grab; }

/* timeline svg */
.timeline-wrap { width: 100%; }
.timeline-wrap svg { width: 100%; height: auto; display: block; }
.tl-axis { stroke: var(--border); stroke-width: 1; }
.tl-tick { font-family: var(--font-mono); font-size: 10px; fill: var(--fg-faint); }
.tl-ram { fill: none; stroke: var(--accent); stroke-width: 1.7; }
.tl-cpu { fill: none; stroke: var(--fg-muted); stroke-width: 1.2; stroke-dasharray: 3 3; }
.tl-marker { stroke: var(--marker); stroke-width: 1; stroke-dasharray: 2 3; }
.tl-marker-label { font-family: var(--font-mono); font-size: 10px; fill: var(--marker); }
.tl-band { fill: var(--accent); fill-opacity: 0.1; transition: opacity 120ms; }
.tl-legend { font-family: var(--font-mono); font-size: 11px; fill: var(--fg-faint); }

/* five-runs widget */
.runs-wrap { display: grid; gap: 12px; }
.runs-svg { width: 100%; height: 84px; }
.run-dot { fill: var(--accent); transition: cy 200ms var(--ease), opacity 200ms; }
.run-median { stroke: var(--accent); stroke-width: 1.5; transition: x1 200ms var(--ease), x2 200ms var(--ease); }
.run-band { stroke: var(--border-strong); stroke-width: 1; }

/* compare grid */
.cmp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 720px) { .cmp-grid, .verdict-cards { grid-template-columns: 1fr; } }
.cmp-pair { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmp-base { font-family: var(--font-mono); color: var(--fg-faint); }
.cmp-arrow { color: var(--fg-faint); }
.cmp-banner { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border)); border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 7%, transparent); color: var(--warn); margin-top: 12px; }

details.legend { margin-top: 14px; font-size: 13px; }
details.legend summary { cursor: pointer; color: var(--fg-muted); font-family: var(--font-mono); font-size: 12px; }
.measure-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 12px; font-size: 12px; }
.measure-grid dt { font-family: var(--font-mono); color: var(--fg); }
.measure-grid dd { color: var(--fg-muted); }


/* pricing */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; margin: 0 auto; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price { padding: 22px; }
.price h3 { font-size: 14px; font-weight: 600; }
.price .amt { font-family: var(--font-mono); font-size: 30px; font-weight: 500; margin: 8px 0 4px; }
.price ul { list-style: none; margin: 14px 0 18px; display: grid; gap: 7px; font-size: 13px; color: var(--fg-muted); }
.price li::before { content: "✓ "; color: var(--good); font-family: var(--font-mono); }
.closing { text-align: center; margin-top: 28px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-faint); }

/* footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; justify-content: space-between; }
.foot-col { display: grid; gap: 8px; }
.foot-col a { font-size: 14px; color: var(--fg-muted); }
.foot-col a:hover { color: var(--fg); }
.foot-col .h { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-faint); margin-bottom: 2px; }
.foot-micro { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); margin-top: 28px; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
