/* Tokens ported from @pensive/design-system (packages/design-system/src/styles.css)
   and the apps/web landing theme (apps/web/src/index.css). Plain CSS, no Tailwind.
   Layout follows a results-first benchmark page: intro, leaderboard, dataset. */

@font-face {
  font-family: "CallunaSansSemiBold";
  src:
    url("/fonts/CallunaSansSemiBold-webfont.woff2") format("woff2"),
    url("/fonts/CallunaSansSemiBold-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Fonts */
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-landing: "Google Sans Flex", sans-serif;
  --font-landing-heading: "CallunaSansSemiBold", sans-serif;

  /* Primary (teal) scale */
  --primary-50: oklch(98.12% 0.02 171.72);
  --primary-100: oklch(95.32% 0.05 169.27);
  --primary-200: oklch(91.24% 0.09 170.02);
  --primary-500: oklch(71.66% 0.14 170.55);
  --primary-700: oklch(54% 0.1 174.96);
  --primary-800: oklch(44.38% 0.08 176.24);
  --primary: var(--primary-700);
  --primary-foreground: oklch(1 0 0);
  --chart-bar: #09816b; /* the blog charts' bar color */

  /* Landing palette */
  --landing-background: #fffdf9;
  --landing-surface: #f8f5f0;
  --landing-row-hover: #f3f1ec;
  --landing-accent: rgba(0, 128, 128, 0.12);
  --landing-divider: rgba(82, 82, 90, 0.2);
  --landing-grid: #e1e0d9;
  --landing-muted: #454140;
  --landing-faint: #6b6a66;
  --landing-ink: #120a0b;
  --landing-header: #2d2d2a;

  --radius: 0.625rem;
  --gutter: clamp(20px, 3vw, 32px);
  --content-width: 960px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { min-width: 320px; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--landing-background);
  color: var(--landing-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-800); }
:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }

/* Header */
.site-header {
  width: min(var(--content-width), 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { margin-right: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand a { color: inherit; text-decoration: none; border-radius: 4px; }
.brand-name { font-family: var(--font-landing-heading); font-size: 22px; line-height: 1; letter-spacing: -0.01em; color: var(--landing-ink); }
.brand-by { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-landing); font-size: 12px; color: var(--landing-faint); }
.brand-by img { display: block; height: 17px; width: auto; }
@media (max-width: 760px) { .brand-by { display: none; } }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 28px);
  font-family: var(--font-landing);
  font-size: 14px;
}
.nav a { color: var(--landing-faint); text-decoration: none; position: relative; }
.nav a:hover { color: var(--landing-header); }
.nav a[aria-current] { color: var(--landing-header); font-weight: 500; }
.nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 1px;
  background: var(--primary);
}

/* Page */
main {
  flex: 1;
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  padding: 34px var(--gutter) clamp(72px, 9vw, 112px);
}
main > section, main > figure { margin: clamp(48px, 6vw, 72px) 0 0; }
main > .intro { margin-top: 0; }

h1, h2 {
  margin: 0;
  font-family: var(--font-landing-heading);
  font-synthesis: none;
  font-weight: normal;
  color: var(--landing-header);
}
h1 { font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -1.5px; }
h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.5px; }

.intro { max-width: 680px; padding-top: 10px; }
.tagline {
  margin: 14px 0 0;
  max-width: 34em;
  font-family: var(--font-landing);
  font-size: 20px;
  line-height: 1.45;
  color: var(--landing-muted);
  text-wrap: pretty;
}
.tagline .keep { white-space: nowrap; }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-landing);
  font-size: 15px;
  color: var(--landing-faint);
}
.stats strong { color: var(--landing-header); font-weight: 600; font-variant-numeric: tabular-nums; }

.fig-note {
  margin: 14px 0 0;
  max-width: 48em;
  font-family: var(--font-landing);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--landing-faint);
}

/* Tables */
.table-scroll { margin-top: 20px; overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-landing);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--landing-header);
}
th, td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--landing-divider);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
thead th {
  padding-top: 0;
  padding-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-faint);
  vertical-align: bottom;
}
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; }
tbody th { font-weight: 400; }

/* Leaderboard */
.leaderboard tbody :is(th, td) { padding-top: 11px; padding-bottom: 11px; font-size: 15px; }
.leaderboard .rank { width: 1%; padding-right: 18px; color: var(--landing-faint); }
.leaderboard .model { width: 1%; }
.leaderboard thead .model { text-indent: 28px; }
.leaderboard .model-logo { display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; }
.leaderboard .model-name { color: var(--landing-header); }
.leaderboard .lab { margin-left: 10px; font-size: 13px; color: var(--landing-faint); }
.leaderboard .score { min-width: 220px; padding-left: 28px; }
.leaderboard td.num { width: 1%; padding-left: 20px; color: var(--landing-muted); }
.leaderboard tbody tr:first-child .model-name { font-weight: 600; }

.score-bar { display: flex; align-items: center; gap: 12px; }
.track { position: relative; flex: 1; height: 16px; }
.track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: var(--chart-bar);
  transform-origin: left;
  animation: grow-bar 0.45s cubic-bezier(0.33, 1, 0.68, 1) calc(var(--row, 0) * 40ms) both;
}
.track b {
  position: absolute;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  border: 1.5px solid var(--landing-header);
  border-width: 0 1.5px;
  animation: show-value 0.25s ease calc(0.25s + var(--row, 0) * 40ms) both;
}
.track b::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1.5px solid var(--landing-header);
  margin-top: -0.75px;
}
.score-value {
  width: 46px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--landing-header);
  animation: show-value 0.25s ease calc(0.2s + var(--row, 0) * 40ms) both;
}
@keyframes grow-bar { from { transform: scaleX(0); } }
@keyframes show-value { from { opacity: 0; } }

/* Footer */
footer {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--landing-divider);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--landing-muted);
  font-size: 0.8125rem;   /* text-copy-13 */
  line-height: 1.125rem;
}
footer a { color: var(--landing-muted); }

/* 404 */
.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}
.lede {
  margin: 0;
  font-family: var(--font-landing);
  font-size: 18px;
  line-height: 1.5;
  color: var(--landing-ink);
}
.cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.cta:hover { background: var(--primary-800); color: var(--primary-foreground); }

@media (max-width: 760px) {
  .site-header { min-height: 64px; gap: 16px; }
  .nav { gap: 16px; font-size: 13px; }
  .tagline { font-size: 17px; }
  h2 { font-size: 26px; }
  .table-scroll { margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
}
@media (max-width: 560px) {
  .leaderboard .lab { display: block; margin: 2px 0 0 24px; font-size: 12px; }
  .leaderboard .model-logo { width: 16px; height: 16px; margin-right: 8px; }
  .leaderboard thead .model { text-indent: 24px; }
  .leaderboard tbody :is(th, td) { font-size: 13.5px; }
  .leaderboard .model { padding-left: 4px; padding-right: 4px; }
  .leaderboard .track { min-width: 48px; }
  .leaderboard .rank { padding-right: 8px; }
  .leaderboard .score { min-width: 0; padding-left: 10px; }
  .leaderboard td.num { padding-left: 10px; }
  .score-value { width: 38px; font-size: 11.5px; }
  .score-bar { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
