/* ═══════════════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg-primary);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-body);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms var(--ease-std);
}
a:hover { color: var(--text-heading); }

code, pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

p { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  color: var(--text-heading);
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: pretty;
}

button { font-family: inherit; cursor: pointer; }

/* ── Section scaffolding ──────────────────────────────────── */
section { position: relative; }

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}

.section-head {
  max-width: 760px;
  margin: 0 0 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 72px;
}
.section-head--split .section-eyebrow { margin: 0 0 12px; }
.section-head--split > div { max-width: 640px; }
.section-head--split > p { max-width: 440px; margin: 0; }
.section-head--center { text-align: center; margin-inline: auto; max-width: 680px; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}
.section-eyebrow--accent { color: var(--accent-data); }

.section-title {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 500;
  color: var(--text-heading);
}
.section-title--sm { font-size: clamp(28px, 3vw, 38px); }
.section-title .muted { color: var(--text-secondary); font-weight: 400; }

.section-sub {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: var(--text-body);
  max-width: 640px;
}
.section-sub a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line-3);
}
.section-sub a:hover { color: var(--text-body); text-decoration-color: var(--accent-purple); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 180ms var(--ease-std);
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.btn--primary:hover { background: #f0f0f0; color: #000; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--line-3);
}
.btn--ghost:hover { background: var(--bg-subtle); border-color: var(--text-secondary); }
.btn--lg { padding: 14px 22px; font-size: 15px; }
.btn span[aria-hidden="true"] { transition: transform 180ms var(--ease-std); }
.btn:hover span[aria-hidden="true"] { transform: translateX(3px); }

/* ── Section dividers (implicit via bg) ──────────────────── */
.bg-alt-1 { background: var(--bg-section-alt-1); }
.bg-alt-2 { background: var(--bg-section-alt-2); }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Motion off (tweak) ─────────────────────────────────── */
[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
