/* ==========================================================================
   ReasonEval — reasoneval.com
   Design system: dark, calm, technical. Indigo → cyan accent.
   ========================================================================== */

:root {
  --bg: #0b1020;
  --bg-soft: #0e1428;
  --panel: rgba(255, 255, 255, .028);
  --panel-hi: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .055);
  --text: #e6e9f2;
  --muted: #a6b0c6;
  --faint: #75809b;
  --accent: #818cf8;
  --accent-2: #22d3ee;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --grad: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  --radius: 16px;
  --shadow: 0 18px 50px -18px rgba(2, 6, 23, .85);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint blueprint grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

main, header, footer { position: relative; z-index: 1; }

::selection { background: rgba(129, 140, 248, .35); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, .72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .4);
}
.brand small { font-weight: 500; color: var(--faint); font-size: 11px; margin-left: 2px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 8px 13px; border-radius: 9px;
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--text); background: var(--panel-hi); }
.nav-links a.active { color: var(--text); }
.nav-cta {
  margin-left: 8px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: border-color .18s, background .18s;
}
.nav-cta:hover { border-color: rgba(129, 140, 248, .5); background: var(--panel-hi); }
.nav-burger {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 9px;
  width: 40px; height: 36px; cursor: pointer; color: var(--text);
}
.nav-burger svg { margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 11px;
  font-size: 15px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s;
  border: none;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 26px -8px rgba(99, 102, 241, .65);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(34, 211, 238, .55); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: rgba(129, 140, 248, .5); background: var(--panel-hi); }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 9px; }

/* ---------- section scaffolding ---------- */
section { padding: 84px 0; }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: #9aa6fb;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, .28);
  background: rgba(129, 140, 248, .08);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2);
}
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.18; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.13rem; }
.sec-head p { color: var(--muted); margin-top: 14px; font-size: 16.5px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 108px 0 92px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto;
  height: 130%;
  background:
    radial-gradient(46% 42% at 30% 22%, rgba(99, 102, 241, .17), transparent 70%),
    radial-gradient(40% 38% at 74% 12%, rgba(34, 211, 238, .12), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 830px; margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: clamp(2.45rem, 6vw, 4.15rem);
  font-weight: 800;
  margin: 22px 0 20px;
}
.hero .sub { color: var(--muted); font-size: clamp(1.02rem, 1.9vw, 1.22rem); max-width: 640px; margin: 0 auto 34px; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px; color: var(--faint); font-size: 13px;
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center;
}
.hero-meta .dot { opacity: .5; }

/* floating "thought chips" */
.float-chip {
  position: absolute;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(14, 20, 40, .55);
  border-radius: 10px; padding: 8px 13px;
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}
.fc-1 { top: 16%; left: 6%; animation-delay: 0s; }
.fc-2 { top: 36%; right: 5%; animation-delay: -3s; }
.fc-3 { top: 9%; left: 20%; animation-delay: -6s; }
.fc-4 { bottom: 24%; right: 12%; animation-delay: -1.5s; }
.fc-1 b, .fc-2 b, .fc-3 b, .fc-4 b { color: var(--accent-2); font-weight: 500; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- stats ---------- */
.stats { padding: 0 0 16px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg-soft); padding: 26px 24px; }
.stat .n {
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat .n span { color: var(--accent-2); }
.stat .l { color: var(--faint); font-size: 13.5px; margin-top: 4px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .2s, border-color .2s, background .2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(129, 140, 248, .35); background: var(--panel-hi); }
.card .icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 16px;
  color: var(--accent-2);
  background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .18);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tag {
  font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
.card.mini .icon { color: var(--accent); background: rgba(129, 140, 248, .1); border-color: rgba(129, 140, 248, .2); }

/* ---------- table ---------- */
.table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow-x: auto;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 880px; }
thead th {
  text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer; user-select: none;
}
thead th.no-sort { cursor: default; }
thead th:hover { color: var(--muted); }
thead th .arr { font-size: 9px; margin-left: 4px; opacity: .7; }
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(129, 140, 248, .045); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13.8px; }
.model { font-weight: 600; }
.org { color: var(--faint); font-size: 13.5px; }
.rank {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 8px;
  font-family: var(--mono); font-size: 12.5px;
  background: var(--panel-hi); border: 1px solid var(--line-soft);
  color: var(--muted);
}
.rank.r1 { background: rgba(251, 191, 36, .14); border-color: rgba(251, 191, 36, .4); color: #fbbf24; }
.rank.r2 { background: rgba(203, 213, 225, .1); border-color: rgba(203, 213, 225, .3); color: #cbd5e1; }
.rank.r3 { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .35); color: #fb923c; }
.badge {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  border-radius: 6px; padding: 2px 7px; margin-left: 9px; vertical-align: 1px;
}
.badge.open { color: var(--good); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .25); }
.badge.closed { color: var(--faint); background: var(--panel-hi); border: 1px solid var(--line-soft); }
.bar-cell { min-width: 120px; }
.bar {
  height: 6px; border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden; margin-top: 5px;
}
.bar i {
  display: block; height: 100%;
  background: var(--grad); border-radius: 99px;
}
.delta-up { color: var(--good); }
.delta-down { color: var(--bad); }
.lb-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font); font-size: 13.5px; font-weight: 500;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; cursor: pointer;
  transition: all .16s;
}
.chip:hover { color: var(--text); border-color: rgba(129, 140, 248, .4); }
.chip.active {
  color: #fff; border-color: transparent;
  background: var(--grad);
}
.search { position: relative; margin-left: auto; }
.search input {
  font-family: var(--font); font-size: 14px;
  color: var(--text); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px 8px 36px; width: 220px; outline: none;
  transition: border-color .16s;
}
.search input:focus { border-color: rgba(129, 140, 248, .55); }
.search input::placeholder { color: var(--faint); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.lb-note { color: var(--faint); font-size: 13px; margin-top: 14px; }

/* ---------- steps (methods) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num-circle {
  counter-increment: step;
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 15px;
  color: #fff; background: var(--grad);
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .7);
  margin-bottom: 16px;
}
.step .num-circle::before { content: counter(step); }
.step h3 { margin-bottom: 8px; font-size: 1.02rem; }
.step p { color: var(--muted); font-size: 14px; }
.step::after {
  content: ""; position: absolute; top: 26px; left: 54px; right: -20px;
  height: 1px; background: linear-gradient(90deg, rgba(129, 140, 248, .45), rgba(34, 211, 238, .12));
}
.step:last-child::after { display: none; }

/* ---------- formula / code ---------- */
.formula {
  text-align: center;
  font-family: var(--mono); font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  color: var(--text);
  background: var(--panel);
  border: 1px dashed rgba(129, 140, 248, .35);
  border-radius: var(--radius);
  padding: 34px 20px;
  letter-spacing: .01em;
}
.formula b { color: var(--accent-2); font-weight: 500; }
.formula .caption {
  display: block; font-family: var(--font); font-size: 13px;
  color: var(--faint); margin-top: 12px; letter-spacing: 0;
}
.code {
  border: 1px solid var(--line-soft);
  border-radius: 14px; overflow: hidden;
  background: #0a0e1c;
  box-shadow: var(--shadow);
  text-align: left;
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .02);
}
.code-head .d { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.code-head .d:nth-child(1) { background: #f87171; }
.code-head .d:nth-child(2) { background: #fbbf24; }
.code-head .d:nth-child(3) { background: #34d399; }
.code-head .file { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.copy-btn {
  margin-left: auto; background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 7px;
  color: var(--muted); font-family: var(--font);
  font-size: 12px; padding: 4px 10px;
  transition: all .15s;
}
.copy-btn:hover { color: var(--text); border-color: rgba(129, 140, 248, .5); }
.code pre {
  padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  color: #c9d2e8;
}
.c-prompt { color: var(--accent-2); }
.c-cmd { color: #e6e9f2; }
.c-out { color: var(--faint); }
.c-str { color: #a5e8b7; }
.c-kw { color: #c4b5fd; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid rgba(129, 140, 248, .3);
  border-radius: 20px;
  background:
    radial-gradient(60% 120% at 15% 0%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(50% 100% at 90% 100%, rgba(34, 211, 238, .1), transparent 60%),
    var(--bg-soft);
  padding: 54px 48px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 34px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer .brand { margin-bottom: 14px; }
.footer-about { color: var(--faint); font-size: 14px; max-width: 300px; }
.footer h4 {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 15px; font-weight: 600;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a { color: var(--muted); font-size: 14.5px; transition: color .15s; }
.footer li a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 46px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--faint); font-size: 13px;
}

/* ---------- 404 ---------- */
.p404 { text-align: center; padding: 130px 24px; }
.p404 .code-big {
  font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.p404 h1 { font-size: 1.5rem; margin: 10px 0 14px; }
.p404 p { color: var(--muted); margin-bottom: 30px; }

/* ---------- page hero (subpages) ---------- */
.page-hero { padding: 88px 0 30px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; margin: 16px 0 14px; }
.page-hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 1.06rem; }

/* ---------- reveal animation ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .float-chip { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2)::after { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 40px 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float-chip { display: none; }
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: rgba(11, 16, 32, .97);
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 18px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-burger { display: block; }
}
@media (max-width: 620px) {
  section { padding: 60px 0; }
  .cards, .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .hero { padding: 72px 0 64px; }
}
