/* ============================================================
   Span AI - shared design system
   Light, editorial, research-forward. Two typefaces, calm palette,
   accent used sparingly. No glow, no mono-as-decoration, no HUD.
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #FBFAF8;   /* warm off-white base */
  --bg-alt:    #FFFFFF;   /* clean white sections */
  --bg-tint:   #F4F1EC;   /* subtle warm block */
  --bg-deep:   #14161A;   /* rare dark section / footer */

  /* ink */
  --ink:   #17191E;       /* headings + strong text */
  --ink-2: #4C525B;       /* body */
  --ink-3: #838A93;       /* muted labels, captions */

  /* lines */
  --line:   #E7E3DC;
  --line-2: #D8D3CA;

  /* accent, deep plum, evolved from the old fuchsia, low saturation */
  --accent:      #8E2C63;
  --accent-ink:  #6F2049;
  --accent-tint: #F5EAF0;

  /* type */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1120px;
  --radius: 10px;
  --pad-section: clamp(72px, 9vw, 132px);
}

/* ---- reset / base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
::selection { background: var(--accent-tint); color: var(--ink); }

/* ---- typography ---- */
h1, h2, h3 { color: var(--ink); font-weight: 400; margin: 0; }
.display {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 420;
}
h2, .h2 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 440;
}
h3, .h3 {
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead {
  font-size: clamp(1.12rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.measure { max-width: 62ch; }
.measure-narrow { max-width: 52ch; }
.muted { color: var(--ink-3); }
.ink { color: var(--ink); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---- layout ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 840px; margin: 0 auto; padding: 0 28px; }
.section { padding: var(--pad-section) 0; }
.section-sm { padding: clamp(48px, 6vw, 80px) 0; }
.bg-alt  { background: var(--bg-alt); }
.bg-tint { background: var(--bg-tint); }
.divider-top { border-top: 1px solid var(--line); }

.grid { display: grid; gap: clamp(28px, 4vw, 56px); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-split { grid-template-columns: 0.95fr 1.05fr; align-items: center; }
.grid-lede  { grid-template-columns: 1fr 1.15fr; align-items: start; }

@media (max-width: 860px) {
  .cols-2, .cols-3, .grid-split, .grid-lede { grid-template-columns: 1fr; }
}

/* ---- header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,248,0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  padding: 15px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand svg { display: block; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand-name .sub { color: var(--ink-3); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  padding: 4px 0; position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px;
  height: 2px; background: var(--accent);
}
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--ink); }

@media (max-width: 820px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--line);
    padding: 12px 28px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a.active::after { display: none; }
  .nav-links a { width: 100%; padding: 10px 0; font-size: 16px; }
  .nav-toggle { display: inline-flex; }
  .nav .nav-cta .btn { display: none; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-arrow::after { content: "→"; font-weight: 500; }
.link-arrow { font-weight: 600; }
.link-arrow::after { content: " →"; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---- cards ---- */
.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 36px);
}
.card-tint { background: var(--bg-tint); border-color: var(--line); }
.card h3 { margin-bottom: 10px; }
a.card { color: inherit; transition: border-color .18s ease, transform .18s ease; }
a.card:hover { border-color: var(--line-2); }

/* ---- stats ---- */
.stat-num {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1;
  color: var(--ink); letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.9rem; color: var(--ink-3); margin-top: 10px;
  letter-spacing: 0.01em;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.stat-row > div { padding: clamp(24px, 3vw, 34px); border-right: 1px solid var(--line); }
.stat-row > div:last-child { border-right: 0; }
@media (max-width: 720px){ .stat-row { grid-template-columns: 1fr; }
  .stat-row > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-row > div:last-child { border-bottom: 0; } }

/* ---- misc ---- */
.kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); }
.figure img { display: block; width: 100%; }
.figure figcaption { padding: 14px 18px; font-size: 0.86rem; color: var(--ink-3); border-top: 1px solid var(--line); }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: var(--accent-tint); border-radius: 999px; padding: 4px 12px; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.list-clean li:last-child { border-bottom: 0; }
.list-clean .n { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; min-width: 1.6em; }

/* data table */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { font-weight: 600; color: var(--ink); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.table td { color: var(--ink-2); }
.table .num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }

/* ---- footer ---- */
.site-footer { background: var(--bg-deep); color: #C7CBD1; }
.site-footer a { color: #C7CBD1; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 60px 28px 28px;
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
}
.footer-col h4 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #7C838D; margin: 0 0 14px; }
.footer-col a { display: block; font-size: 0.95rem; padding: 5px 0; }
.footer-brand { max-width: 30ch; }
.footer-brand p { color: #9AA1AA; font-size: 0.95rem; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom div { max-width: var(--maxw); margin: 0 auto; padding: 20px 28px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.82rem; color: #7C838D; }

/* ---- reveal (subtle, optional) ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); }
.hero .display { max-width: 18ch; }
.eyebrow-row { margin-bottom: 26px; }
.mt-s { margin-top: 22px; } .mt-m { margin-top: 40px; } .mt-l { margin-top: 64px; }
.mb-m { margin-bottom: 40px; } .mb-l { margin-bottom: 64px; }
