/* =========================================================
   Base — V3 (dark, dot grid, mono helpers)
   ========================================================= */

body {
  background: var(--ink-900);
  color: var(--text);
  font-size: var(--step-0);
  font-weight: 400;
  letter-spacing: var(--track-normal);
  overflow-x: hidden;

  /* Dot grid background (fixed, subtle) */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(234, 240, 250, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
  background-attachment: fixed;
}

/* Mesh gradient ambient (fixed radial glows) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(26, 99, 191, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 30%, rgba(26, 99, 191, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(26, 99, 191, 0.08), transparent 55%);
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: var(--track-ultra);
  line-height: var(--lh-tight);
  color: #fff;
}

h1 { font-size: var(--step-5); line-height: 0.94; font-weight: 800; }
h2 {
  font-size: var(--step-4);
  line-height: 1.0;
  font-weight: 800;
  letter-spacing: var(--track-ultra);
}
h3 { font-size: var(--step-3); line-height: 1.08; letter-spacing: var(--track-tight); font-weight: 700; }
h4 { font-size: var(--step-2); line-height: 1.18; letter-spacing: var(--track-snug); font-weight: 600; }

p {
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
  max-width: 64ch;
}

/* Gradient brush accent for hero title emphasis */
.brush {
  position: relative;
  display: inline-block;
  color: var(--ice);
  background: linear-gradient(100deg, var(--blue) 0%, #4A9AE8 50%, var(--blue-hi) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: var(--track-xwide);
  text-transform: uppercase;
  color: var(--blue-hi);
  margin-bottom: var(--s-5);
}
.kicker::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--blue-hi);
}

.kicker--ice { color: var(--ice-dim); }
.kicker--ice::before { background: var(--ice-dim); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01", "cv02";
  letter-spacing: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--sm { max-width: var(--container-sm); }

section { padding-block: var(--section-y); }
section.section--sm { padding-block: var(--section-y-sm); }

.section-head { max-width: 58rem; margin-bottom: clamp(3rem, 2rem + 3vw, 5rem); }

.section-head p {
  margin-top: var(--s-5);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 48rem;
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 900ms var(--ease-out-expo),
    transform 900ms var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-reveal-delay="1"] { transition-delay: 80ms; }
.reveal[data-reveal-delay="2"] { transition-delay: 160ms; }
.reveal[data-reveal-delay="3"] { transition-delay: 240ms; }
.reveal[data-reveal-delay="4"] { transition-delay: 320ms; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-modal);
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- Theme variants ---------- */
.theme-paper {
  background: var(--paper);
  color: var(--paper-text);
}
.theme-paper h1, .theme-paper h2, .theme-paper h3, .theme-paper h4 { color: var(--navy); }
.theme-paper p { color: rgba(10, 36, 69, 0.68); }
.theme-paper .marker { color: var(--blue); }
