/* ---------- Tokens ---------- */
:root {
  --bg: #f6f6f3;
  --panel: #ffffff;
  --text: #16181c;
  --muted: #5b6068;
  --line: #e4e4df;
  --accent: #3b5bdb;
  --accent-text: #ffffff;
  --accent-soft: rgba(59, 91, 219, 0.10);
  --shadow: 0 1px 2px rgba(16, 18, 24, 0.05), 0 12px 32px -12px rgba(16, 18, 24, 0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --maxw: 1000px;
}

:root[data-theme="dark"] {
  --bg: #0e0f13;
  --panel: #16181e;
  --text: #e9eaee;
  --muted: #9aa0aa;
  --line: #262932;
  --accent: #8ea1ff;
  --accent-text: #0e0f13;
  --accent-soft: rgba(142, 161, 255, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f13;
    --panel: #16181e;
    --text: #e9eaee;
    --muted: #9aa0aa;
    --line: #262932;
    --accent: #8ea1ff;
    --accent-text: #0e0f13;
    --accent-soft: rgba(142, 161, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--panel);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 64px);
}
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 720;
}
.lead {
  max-width: 60ch;
  margin: 0 0 30px;
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  color: var(--muted);
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s, opacity .15s, background .15s;
}
.btn:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--accent); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.fact {
  background: var(--panel);
  padding: 18px 20px;
}
.fact dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 88px) 0; }
.section.alt {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { margin-bottom: 36px; }
.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.15;
}
h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  font-weight: 650;
}
.prose { max-width: 68ch; }
.prose p { margin: 0 0 18px; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  transition: border-color .15s, transform .15s;
}
.section.alt .card { background: var(--bg); }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tags {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  font-size: 13.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid transparent;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 0 0 30px 28px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.section.alt .timeline li::before { background: var(--panel); }
.timeline p { margin: 0; color: var(--muted); max-width: 66ch; }

/* ---------- Approach ---------- */
.approach {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.appr {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}
.appr p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Contact ---------- */
.contact-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 48px);
  box-shadow: var(--shadow);
}
.contact-lead {
  max-width: 56ch;
  color: var(--muted);
  margin: 0 0 26px;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 1.02rem;
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .label {
  width: 120px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .cards, .approach { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand-text { display: none; }
  .contact-list li { flex-direction: column; gap: 4px; }
  .contact-list .label { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .cta, .theme-toggle, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .section.alt { background: #fff; }
}
