:root {
  --bg: #0f1112;
  --panel: #171a1b;
  --panel-2: #1e2223;
  --ink: #f4efe6;
  --muted: #c4bdb0;
  --soft: #8f9894;
  --line: rgba(244, 239, 230, 0.12);
  --coral: #ec6a48;
  --teal: #5cc5b4;
  --gold: #e9c25a;
  --slate: #9fb0c4;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --wrap: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p a, li a, figcaption a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: rgba(236, 106, 72, 0.4); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(rgba(15, 17, 18, 0.9), rgba(15, 17, 18, 0.55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font: 700 1.05rem/1 var(--display); letter-spacing: 0.06em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 14px var(--coral); }
.nav-links { display: flex; gap: clamp(10px, 2.2vw, 26px); font-size: 0.92rem; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav-links .opt { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: clamp(640px, 100svh, 1000px); display: grid; align-items: end; overflow: hidden; background: #000; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.94; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 17, 18, 0.5) 0%, rgba(15, 17, 18, 0) 24%, rgba(15, 17, 18, 0.12) 60%, var(--bg) 100%),
    radial-gradient(105% 90% at 0% 85%, rgba(15, 17, 18, 0.8) 0%, rgba(15, 17, 18, 0) 64%);
}
.hero-copy { position: relative; width: min(var(--wrap), 100% - 32px); margin: 0 auto; padding: 120px 0 clamp(48px, 9vh, 96px); }
.hero-copy .eyebrow, .hero-copy h1, .subtitle, .author, .wipe-hint { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.5); }
.eyebrow { margin: 0 0 14px; font: 700 0.76rem/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.hero h1 { margin: 0; font: 700 clamp(2.5rem, 7vw, 5.8rem)/0.98 var(--display); letter-spacing: -0.03em; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--coral); }
.subtitle { margin: 22px 0 0; max-width: 62ch; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted); }
.author { margin: 18px 0 0; font: 500 1rem/1.4 var(--sans); color: var(--ink); }
.author span { color: var(--soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 16px;
  border-radius: 10px; border: 1px solid var(--line); text-decoration: none;
  font: 650 0.95rem/1 var(--sans); color: var(--ink); background: rgba(244, 239, 230, 0.08);
  transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}
.button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.button:hover { background: rgba(244, 239, 230, 0.16); transform: translateY(-1px); }
.button.primary { background: var(--gold); color: #1a1508; border-color: transparent; }
.button.primary:hover { background: #f3d27a; }
.wipe-hint { margin-top: 26px; display: flex; gap: 18px; font: 500 0.78rem/1.3 var(--mono); color: var(--soft); letter-spacing: 0.04em; }
.wipe-hint b { color: var(--muted); font-weight: 600; }

/* ---------- layout ---------- */
.section { width: min(var(--wrap), 100% - 32px); margin: 0 auto; padding: clamp(56px, 9vw, 110px) 0 0; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font: 700 clamp(1.8rem, 3.6vw, 2.9rem)/1.08 var(--display); letter-spacing: -0.02em; }
.section-heading p { color: var(--muted); margin: 14px 0 0; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--ink); max-width: 66ch; }

/* ---------- key numbers ---------- */
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.key { background: var(--panel); padding: 22px 22px 20px; }
.key b { display: block; font: 700 clamp(1.7rem, 3vw, 2.4rem)/1.05 var(--display); letter-spacing: -0.02em; }
.key b.c { color: var(--coral); } .key b.t { color: var(--teal); } .key b.g { color: var(--gold); }
.key span { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 860px) { .keys { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .keys { grid-template-columns: 1fr; } }

/* ---------- video cards ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.video-card, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.video-card.feature { grid-column: 1 / -1; }
.video-copy { padding: 16px 20px 20px; }
.video-copy h3, .card h3 { margin: 0; font: 650 1.1rem/1.3 var(--display); }
.video-copy p, .card p { margin: 8px 0 0; font-size: 0.94rem; color: var(--muted); }
.tag { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 999px; font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(92, 197, 180, 0.14); color: var(--teal); }
.tag.c { background: rgba(236, 106, 72, 0.15); color: var(--coral); }
.tag.g { background: rgba(233, 194, 90, 0.15); color: var(--gold); }
@media (max-width: 800px) { .video-grid { grid-template-columns: 1fr; } }

/* ---------- compare slider ---------- */
.compare-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.compare { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; box-shadow: var(--shadow); touch-action: pan-y; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .top { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .bar { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--ink); box-shadow: 0 0 14px rgba(244, 239, 230, 0.7); pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(15, 17, 18, 0.75); border: 2px solid var(--ink); display: grid; place-items: center; font: 700 0.85rem/1 var(--mono); pointer-events: none; }
.compare .lab { position: absolute; top: 12px; padding: 4px 9px; border-radius: 6px; background: rgba(15, 17, 18, 0.7); font: 600 0.72rem/1.4 var(--mono); letter-spacing: 0.04em; }
.compare .lab.l { left: 12px; } .compare .lab.r { right: 12px; color: var(--gold); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tabs button { min-height: 40px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font: 600 0.85rem/1 var(--sans); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
@media (max-width: 860px) { .compare-wrap { grid-template-columns: 1fr; } }

/* ---------- method ---------- */
.method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { padding: 22px; }
.card .num { font: 700 0.78rem/1 var(--mono); color: var(--coral); letter-spacing: 0.1em; }
.card h3 { margin-top: 10px; font-size: 1.22rem; }
.card figure { margin: 16px -22px -22px; border-top: 1px solid var(--line); background: #fff; }
.card figure.dark { background: var(--panel-2); padding: 14px 18px; }
.card figure img { width: 100%; }
.eq { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); font: 500 1.05rem/1.4 var(--mono); color: var(--gold); text-align: center; }
@media (max-width: 980px) { .method { grid-template-columns: 1fr; } }

.pipeline { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; counter-reset: st; }
.pipeline li { position: relative; padding: 16px 16px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.pipeline li::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--soft); font-size: 0.9rem; z-index: 1; }
.pipeline li:last-child::after { content: none; }
.pipeline .where { font: 600 0.68rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.pipeline .where.npu { color: var(--gold); }
.pipeline strong { display: block; margin-top: 6px; font: 650 0.98rem/1.25 var(--display); }
.pipeline span.t { display: block; margin-top: 6px; font: 500 0.8rem/1.3 var(--mono); color: var(--muted); }
@media (max-width: 980px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipeline li::after { content: none; } }

/* ---------- results ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.chart-head h3 { margin: 0; font: 650 1.1rem/1.3 var(--display); }
#chart { width: 100%; height: auto; }
#chart text { fill: var(--muted); font: 12px var(--sans); }
#chart .grid { stroke: rgba(244, 239, 230, 0.08); }
#chart .axis { stroke: rgba(244, 239, 230, 0.3); }
#chart .ref { stroke: var(--soft); stroke-dasharray: 5 5; }
#chart .reflab { fill: var(--soft); font-size: 11px; }
#chart .pt { fill: var(--slate); }
#chart .pt.ours { fill: var(--coral); filter: drop-shadow(0 0 8px rgba(236, 106, 72, 0.8)); }
#chart .lab { fill: var(--ink); font-size: 12px; font-weight: 600; }
#chart .lab.ours { fill: var(--coral); font-weight: 700; }
.tip { min-height: 1.6em; margin: 6px 0 0; font: 500 0.85rem/1.5 var(--mono); color: var(--muted); }
.table-scroll { overflow-x: auto; margin-top: 22px; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); background: var(--panel-2); }
td.n, th.n { text-align: right; font-family: var(--mono); }
tr.ours td { color: var(--coral); font-weight: 650; }
tr.sep td { font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); background: var(--panel-2); }
tbody tr:last-child td { border-bottom: 0; }
.figure { margin: 22px 0 0; }
.figure img { width: 100%; border-radius: 12px; background: #fff; }
.figure figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.budget { display: grid; gap: 10px; margin-top: 8px; }
.brow { display: grid; grid-template-columns: minmax(150px, 0.9fr) 2fr auto; gap: 14px; align-items: center; font-size: 0.92rem; }
.brow .track { height: 12px; border-radius: 99px; background: rgba(244, 239, 230, 0.07); overflow: hidden; }
.brow .fill { height: 100%; border-radius: 99px; background: var(--slate); }
.brow.ours .fill { background: var(--coral); } .brow.own .fill { background: var(--teal); } .brow.pi .fill { background: var(--gold); }
.brow .v { font: 600 0.9rem/1 var(--mono); min-width: 4.6em; text-align: right; }
@media (max-width: 560px) { .brow { grid-template-columns: 1fr auto; } .brow .track { grid-column: 1 / -1; order: 3; } }

.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; padding: 0; list-style: none; }
.limits li { padding-left: 18px; position: relative; color: var(--muted); }
.limits li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 7px; border-radius: 2px; background: var(--gold); }
.limits b { color: var(--ink); }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } }

.resources { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.res { display: block; padding: 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.res:hover { border-color: rgba(244, 239, 230, 0.35); transform: translateY(-2px); }
.res b { display: block; font: 650 1rem/1.3 var(--display); }
.res span { display: block; margin-top: 6px; font-size: 0.84rem; color: var(--muted); }
@media (max-width: 980px) { .resources { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bib { position: relative; }
.bib pre { margin: 0; padding: 20px; overflow-x: auto; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font: 500 0.85rem/1.6 var(--mono); color: var(--muted); }
.copy { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: 600 0.8rem/1 var(--sans); cursor: pointer; }

footer { width: min(var(--wrap), 100% - 32px); margin: 90px auto 0; padding: 26px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 0.86rem; color: var(--soft); }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button, .res { transition: none; } }

.hero-copy .eyebrow { display: inline-block; padding: 6px 11px; border-radius: 8px; background: rgba(15, 17, 18, 0.62); backdrop-filter: blur(6px); }
