/* AI Coding Tool Benchmark — editorial landing page
   Palette & typography follow DESIGN.md (Anthropic / Claude inspiration).
   Substitutes: Source Serif 4 for Anthropic Serif; Inter for Anthropic Sans. */

:root {
  --parchment: #f5f4ed;
  --ivory: #faf9f5;
  --warm-sand: #e8e6dc;
  --border-cream: #f0eee6;
  --border-warm: #e8e6dc;
  --ring-warm: #d1cfc5;

  --near-black: #141413;
  --dark-surface: #30302e;
  --charcoal-warm: #4d4c48;
  --olive-gray: #5e5d59;
  --stone-gray: #87867f;
  --warm-silver: #b0aea5;

  --terracotta: #c96442;
  --coral: #d97757;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1120px;
  --whisper: 0 4px 24px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--near-black);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.60;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  background: rgba(245, 244, 237, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-cream);
  z-index: 10;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.005em;
  color: var(--near-black);
  text-decoration: none;
}
.brand .brand-accent { color: var(--terracotta); }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  color: var(--olive-gray);
  text-decoration: none;
  transition: color 120ms ease;
}
.nav-links a:hover { color: var(--near-black); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: var(--terracotta);
  color: var(--ivory);
  box-shadow: 0 0 0 1px var(--terracotta);
}
.btn-primary:hover {
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral);
}
.btn-ghost {
  background: var(--warm-sand);
  color: var(--charcoal-warm);
  box-shadow: 0 0 0 1px var(--ring-warm);
}
.btn-ghost:hover { background: var(--border-cream); }
.btn-dark {
  background: var(--dark-surface);
  color: var(--ivory);
  box-shadow: 0 0 0 1px var(--dark-surface);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 56px;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-gray);
  margin: 0 0 20px;
}
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.10;
  letter-spacing: -0.015em;
  color: var(--near-black);
  margin: 0 0 24px;
  max-width: 920px;
}
.display em {
  font-style: italic;
  color: var(--terracotta);
}
.lede {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.60;
  color: var(--olive-gray);
  margin: 0 0 36px;
  max-width: 740px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Meta strip ---------- */
.meta-strip {
  padding: 32px 0 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-cream);
  border-bottom: 1px solid var(--border-cream);
  margin-top: 16px;
}
.meta-cell { padding: 28px 20px; border-right: 1px solid var(--border-cream); }
.meta-cell:last-child { border-right: 0; }
.meta-cell .n {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.10;
  color: var(--near-black);
}
.meta-cell .label {
  font-size: 13px;
  color: var(--olive-gray);
  margin-top: 6px;
  line-height: 1.45;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-dark {
  background: var(--near-black);
  color: var(--warm-silver);
}
.section-dark .h2,
.section-dark .h3 { color: var(--ivory); }
.section-dark p { color: var(--warm-silver); }
.section-dark a { color: var(--coral); }
.section-dark a:hover { color: var(--ivory); }

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.20;
  letter-spacing: -0.01em;
  color: var(--near-black);
  margin: 0 0 12px;
  max-width: 820px;
}
.kicker {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.60;
  color: var(--olive-gray);
  max-width: 720px;
  margin: 0 0 48px;
}

/* ---------- Leaderboard ---------- */
.leaderboard {
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--whisper);
}
.lb-row {
  display: grid;
  grid-template-columns: 56px 1.2fr 2fr 1.6fr;
  align-items: center;
  padding: 20px 28px;
  border-top: 1px solid var(--border-cream);
  column-gap: 24px;
}
.lb-row:first-child { border-top: 0; }
.lb-rank {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--stone-gray);
  font-variant-numeric: tabular-nums;
}
.lb-rank.top { color: var(--terracotta); }
.lb-tool {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  color: var(--near-black);
  line-height: 1.10;
}
.lb-tool .sub {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--stone-gray);
  margin-top: 4px;
  line-height: 1.35;
}
.lb-bar {
  position: relative;
  height: 10px;
  background: var(--border-cream);
  border-radius: 999px;
}
.lb-bar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: var(--ring-warm);
}
.lb-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 10px;
  background: var(--terracotta);
  border-radius: 999px;
}
.lb-bar-fill.neg { background: var(--stone-gray); }
.lb-z {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--charcoal-warm);
  font-variant-numeric: tabular-nums;
}
.lb-tasks {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.lb-chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--warm-sand);
  color: var(--charcoal-warm);
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.lb-chip.best { background: var(--terracotta); color: var(--ivory); }
.lb-chip.worst { background: var(--border-cream); color: var(--stone-gray); }

.lb-footnote {
  font-size: 13px;
  color: var(--stone-gray);
  margin: 20px 4px 0;
  line-height: 1.60;
}

/* ---------- Task panels ---------- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.task-card {
  background: var(--ivory);
  border: 1px solid var(--border-cream);
  border-radius: 16px;
  padding: 28px 24px;
}
.task-card .task-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.20;
  margin: 0 0 4px;
  color: var(--near-black);
}
.task-card .task-sub {
  font-size: 13px;
  color: var(--olive-gray);
  margin: 0 0 20px;
  line-height: 1.45;
}
.forest svg { width: 100%; height: auto; display: block; }

/* ---------- Why-trust blocks ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}
.trust-block .h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  line-height: 1.20;
  margin: 0 0 10px;
}
.trust-block p {
  font-size: 16px;
  line-height: 1.70;
  margin: 0;
}

/* ---------- Caveats ---------- */
.caveats {
  max-width: 820px;
}
.caveat-item {
  padding: 24px 0;
  border-top: 1px solid var(--border-cream);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
}
.caveat-item:first-child { border-top: 0; }
.caveat-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--terracotta);
  line-height: 1.20;
  font-variant-numeric: tabular-nums;
}
.caveat-body { font-size: 16px; line-height: 1.70; color: var(--charcoal-warm); }
.caveat-body b { color: var(--near-black); font-weight: 500; }

/* ---------- Verify grid ---------- */
.verify-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  margin-top: 40px;
}
.verify-card {
  border: 1px solid var(--dark-surface);
  border-radius: 12px;
  padding: 24px;
}
.verify-card h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.20;
  margin: 0 0 8px;
  color: var(--ivory);
}
.verify-card p {
  font-size: 15px;
  color: var(--warm-silver);
  margin: 0 0 12px;
  line-height: 1.60;
}
.verify-card code {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--dark-surface);
  color: var(--warm-silver);
  padding: 10px 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.60;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0 64px;
  border-top: 1px solid var(--border-cream);
  color: var(--stone-gray);
  font-size: 13px;
  line-height: 1.60;
}
.footer a { color: var(--olive-gray); text-decoration: none; border-bottom: 1px solid var(--border-warm); }
.footer a:hover { color: var(--near-black); border-bottom-color: var(--ring-warm); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .meta-strip { grid-template-columns: repeat(2, 1fr); }
  .meta-cell { border-right: 0; border-bottom: 1px solid var(--border-cream); }
  .meta-cell:nth-child(2) { border-right: 0; }
  .task-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 40px; }
  .verify-grid { grid-template-columns: 1fr; }
  .lb-row {
    grid-template-columns: 44px 1fr;
    row-gap: 10px;
  }
  .lb-bar-wrap, .lb-tasks { grid-column: 1 / -1; }
  .lb-tasks { justify-content: flex-start; }
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 40px; }
}

/* ---------- Forest plot ---------- */
.forest text { font-family: var(--sans); }
.forest .label { fill: var(--charcoal-warm); font-size: 12px; }
.forest .score { fill: var(--stone-gray); font-size: 10px; font-family: var(--mono); }
.forest .axis { stroke: var(--border-warm); stroke-width: 1; }
.forest .cohort { stroke: var(--stone-gray); stroke-width: 1; stroke-dasharray: 3 3; }
.forest .ci { stroke: var(--ring-warm); stroke-width: 2; stroke-linecap: round; }
.forest .ci.hi { stroke: var(--terracotta); }
.forest .ci.lo { stroke: var(--stone-gray); }
.forest .pt { fill: var(--near-black); }
.forest .pt.hi { fill: var(--terracotta); }
.forest .pt.lo { fill: var(--stone-gray); }
