:root {
  --bg: #f7f4ed;
  --panel: #fffdf8;
  --ink: #121417;
  --soft-ink: #3d4248;
  --muted: #68707a;
  --line: rgba(18, 20, 23, 0.13);
  --fine: rgba(18, 20, 23, 0.055);
  --q1: #16885d;
  --q2: #2167a8;
  --hot: #d43f35;
  --amber: #b7791f;
  --code: #171a1f;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  background:
    linear-gradient(90deg, var(--fine) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(180deg, rgba(22, 136, 93, 0.06), transparent 34rem),
    linear-gradient(180deg, #fbf9f4 0%, var(--bg) 34%, #ece7dd 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0));
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(33, 103, 168, 0.42);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, 4vw);
  background: rgba(247, 244, 237, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wordmark span + span::before {
  content: ".";
  margin-right: 6px;
  color: var(--hot);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.nav a {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 999px;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  color: var(--ink);
  background: rgba(18, 20, 23, 0.075);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: calc(100svh - 66px);
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(320px, 430px);
  justify-content: space-between;
  align-items: center;
  gap: clamp(26px, 4vw, 64px);
  padding: clamp(46px, 7vw, 88px) max(20px, 5vw) clamp(36px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: clamp(28px, 5vw, 76px) max(20px, 5vw);
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(18, 20, 23, 0.08);
  background:
    linear-gradient(90deg, rgba(18, 20, 23, 0.06) 1px, transparent 1px) 0 0 / 96px 100%,
    linear-gradient(180deg, rgba(18, 20, 23, 0.04) 1px, transparent 1px) 0 0 / 100% 96px;
  mask-image: linear-gradient(90deg, #000, rgba(0,0,0,0.5), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  max-width: 720px;
}

.eyebrow,
.metric-label,
.score-top p,
.score-top span,
.proof-grid span,
.system-grid span,
time,
.models-grid span {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--hot);
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10.5ch;
  margin-bottom: 22px;
  font-size: clamp(4rem, 7.8vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 900;
}

h1 span {
  display: block;
}

h2 {
  max-width: 13ch;
  margin-bottom: 0;
  font-size: clamp(3rem, 7.5vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 900;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.25rem, 1.7vw, 1.85rem);
  line-height: 1.03;
  letter-spacing: 0;
  font-weight: 850;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--soft-ink);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.05vw, 2.15rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: var(--panel);
}

.button.secondary {
  border: 1px solid rgba(18, 20, 23, 0.22);
  background: rgba(255,255,255,0.42);
  color: var(--ink);
}

.hero-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 1px;
  background: rgba(18, 20, 23, 0.18);
  border: 1px solid rgba(18, 20, 23, 0.18);
  box-shadow: 0 30px 90px rgba(18, 20, 23, 0.12);
}

.hero-panel div {
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(16px);
}

.hero-panel strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 900;
}

.hero-panel small {
  color: var(--muted);
  line-height: 1.4;
}

.section {
  padding: clamp(70px, 10vw, 142px) max(20px, 5vw);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  align-items: end;
  gap: clamp(24px, 5vw, 84px);
  margin-bottom: clamp(28px, 5vw, 70px);
}

.section-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -8px;
}

.section-head p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.24rem);
  line-height: 1.55;
}

.section-head.compact {
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 0.56fr);
}

.proof-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.proof-grid article,
.system-grid article {
  min-height: 270px;
  padding: clamp(24px, 3.2vw, 38px);
  background: rgba(255, 253, 248, 0.78);
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.proof-grid article:hover,
.system-grid article:hover {
  transform: translateY(-4px);
  background: var(--panel);
  box-shadow: 0 22px 50px rgba(18, 20, 23, 0.08);
}

.proof-grid span,
.system-grid span {
  display: inline-block;
  color: var(--hot);
  margin-bottom: 44px;
}

.proof-grid p,
.system-grid p,
.score-copy,
.timeline p {
  color: var(--muted);
  line-height: 1.52;
}

.proof-grid code,
.system-grid code {
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(18, 20, 23, 0.06);
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.score {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 54px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 20, 23, 0.07);
}

.score::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent);
}

.score.q1 { --accent: var(--q1); }
.score.q2 { --accent: var(--q2); }

.score-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 42px;
}

.score-top p {
  color: var(--muted);
}

.score-top span {
  color: var(--accent);
  text-align: right;
}

.score-main {
  display: flex;
  align-items: baseline;
  gap: 0.12em;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: clamp(5rem, 11vw, 12rem);
  font-weight: 900;
  line-height: 0.76;
}

.score-main em {
  color: var(--soft-ink);
  font-family: var(--serif);
  font-size: 0.2em;
  font-style: normal;
  font-weight: 400;
}

.score-copy {
  max-width: 38rem;
  min-height: 72px;
  font-size: 1.04rem;
}

dl {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
}

dl div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--fine);
}

dt,
dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.86rem;
}

dt {
  color: var(--muted);
}

dd {
  text-align: right;
  font-weight: 600;
}

.chart-card,
.model-panel {
  margin-top: 18px;
  padding: clamp(22px, 3vw, 36px);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.chart-head h3,
.chart-head p {
  margin: 0;
}

.chart-head p {
  color: var(--muted);
}

.throughput-bars {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 4.5rem;
  align-items: center;
  gap: 16px;
}

.bar-row span,
.bar-row strong {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.bar-row span {
  color: var(--muted);
}

.bar-row strong {
  text-align: right;
}

.bar-track {
  height: 28px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(18, 20, 23, 0.075);
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transition: width 1000ms cubic-bezier(0.2, 0.84, 0.2, 1);
}

.visible .bar-fill {
  width: var(--w);
}

.bar-fill.muted { background: #858b93; }
.bar-fill.q1 { background: var(--q1); }
.bar-fill.q2 { background: var(--q2); }

.system-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ladder-track {
  display: grid;
  gap: 10px;
}

.ladder-item {
  width: 0;
  min-width: min(100%, 320px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 15px 18px;
  background: var(--code);
  color: var(--panel);
  border-radius: 5px;
  transition: width 1000ms cubic-bezier(0.2, 0.84, 0.2, 1);
}

.visible .ladder-item {
  width: var(--w);
}

.ladder-item.winner {
  background: var(--q1);
}

.ladder-item.probe {
  background: var(--q2);
}

.ladder-item span,
.ladder-item strong {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.ladder-item strong::after {
  content: " tok/s";
  color: rgba(255,255,255,0.64);
  font-weight: 400;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  overflow-x: auto;
  border-left: 1px solid var(--line);
  scroll-snap-type: x proximity;
}

.timeline article {
  min-height: 330px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.7);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  scroll-snap-align: start;
}

time {
  display: block;
  min-height: 44px;
  color: var(--hot);
  margin-bottom: 34px;
}

.timeline code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--ink);
  background: rgba(18, 20, 23, 0.06);
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px 18px;
  padding: clamp(20px, 3vw, 30px);
  background: rgba(255, 253, 248, 0.8);
}

.steps article > span {
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--panel);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.steps h3,
.steps p,
.steps pre {
  grid-column: 2;
}

.steps h3 {
  margin: 3px 0 4px;
}

.steps p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

pre {
  position: relative;
  margin: 0;
  padding: 17px 58px 17px 18px;
  overflow-x: auto;
  border-radius: 6px;
  background: var(--code);
  color: #f7f4ed;
}

pre code {
  display: block;
  color: inherit;
  white-space: pre;
  line-height: 1.55;
  font-size: 0.86rem;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: transparent;
  color: #f7f4ed;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.copy-btn:hover,
.copy-btn:focus-visible,
.copy-btn.copied {
  background: #f7f4ed;
  color: var(--code);
  border-color: #f7f4ed;
}

.model-panel h3 {
  margin-bottom: 18px;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.models-grid a {
  display: grid;
  gap: 8px;
  min-height: 112px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.86rem, 1.05vw, 1rem);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.models-grid a:hover,
.models-grid a:focus-visible,
.link-row a:hover,
.link-row a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(212, 63, 53, 0.45);
  box-shadow: 0 14px 30px rgba(18, 20, 23, 0.07);
}

.models-grid span {
  color: var(--hot);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-row a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(20px, 5vw) 42px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--hot);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .bar-fill,
  .ladder-item {
    width: var(--w);
  }
}

@media (max-width: 1080px) {
  .hero,
  .section-head,
  .section-head.compact,
  .scoreboard,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-panel {
    max-width: 720px;
  }

  .proof-grid,
  .system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: 36px;
    gap: 26px;
    width: 100%;
  }

  h1 {
    max-width: 9.5ch;
    font-size: clamp(3.05rem, 14vw, 4.45rem);
    line-height: 0.92;
  }

  h2 {
    font-size: clamp(2.75rem, 15vw, 5rem);
  }

  .hero-copy {
    max-width: 100%;
    font-size: clamp(1.25rem, 6vw, 1.72rem);
    line-height: 1.16;
  }

  .button {
    width: 100%;
    max-width: 100%;
  }

  .hero-panel {
    max-width: 100%;
  }

  .proof-grid,
  .system-grid,
  .models-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid article,
  .system-grid article {
    min-height: 0;
  }

  .score-main {
    font-size: clamp(4.5rem, 24vw, 8rem);
  }

  .chart-head {
    align-items: start;
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 6.8rem 1fr 3.7rem;
    gap: 10px;
  }

  .bar-row span,
  .bar-row strong {
    font-size: 0.76rem;
  }

  .ladder-item {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .visible .ladder-item {
    width: 100%;
  }

  .steps article {
    grid-template-columns: 1fr;
  }

  .steps article > span,
  .steps h3,
  .steps p,
  .steps pre {
    grid-column: 1;
  }

  .footer {
    flex-direction: column;
  }
}

/* --- Tables (added for EschaMeetsHiggs) --------------------------------- */

.chart-card table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.86rem;
}

.chart-card table th {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.chart-card table td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--fine);
  color: var(--soft-ink);
}

.chart-card table tbody tr:last-child td {
  border-bottom: 0;
}

.chart-card table th:not(:first-child),
.chart-card table td:not(:first-child) {
  text-align: right;
  padding-right: 0;
  padding-left: 18px;
}

.chart-card table td:first-child {
  color: var(--ink);
}

.chart-card table strong {
  color: var(--q1);
}

.chart-card table + p {
  margin-top: 18px;
}

/* Four-item grids need two columns, not three, or the last row breaks. */
.proof-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .proof-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.chart-card .throughput-bars + p {
  margin-top: 20px;
}
