/* ==========================================================================
   MAVI — base.css
   Tokens, reset, typography, layout primitives. Shared by every page.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-alt: #0b1220;
  --surface: #0f1930;
  --border: #1c2c4d;
  --deep: #1b3a8a;
  --accent: #2f6fed;
  --accent-bright: #4fb3ff;
  --fg: #eef2fb;
  --muted: #9aa8c7;

  /* Derived tones — computed from the registered tokens above, never invented hex. */
  --surface-2: color-mix(in oklch, var(--surface) 88%, var(--fg) 12%);
  --border-bright: color-mix(in oklch, var(--border) 62%, var(--fg) 38%);
  --muted-2: color-mix(in oklch, var(--muted) 55%, var(--bg) 45%);

  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --container: 1200px;
  --container-narrow: 780px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);

  --shadow-glow: 0 0 0 1px rgba(79,179,255,.12), 0 20px 60px -20px rgba(47,111,237,.35);
  --shadow-card: 0 1px 0 rgba(255,255,255,.02) inset, 0 12px 40px -24px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(47,111,237,.16), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(79,179,255,.08), transparent 55%);
  background-repeat: no-repeat;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--fg); }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Type scale */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px 2px rgba(79,179,255,.7);
}

h1, .h1 {
  font-size: clamp(2.4rem, 3.4vw + 1.2rem, 4.4rem);
  line-height: 1.05;
}
h2, .h2 {
  font-size: clamp(1.9rem, 2vw + 1.1rem, 3rem);
  line-height: 1.1;
}
h3, .h3 {
  font-size: clamp(1.3rem, .8vw + 1rem, 1.7rem);
  line-height: 1.25;
}
.lede {
  font-size: clamp(1.05rem, .4vw + .95rem, 1.3rem);
  color: var(--muted);
  line-height: 1.6;
}
.mono-tag {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted-2);
  letter-spacing: .04em;
}

/* Layout primitives */
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { position: relative; }
.section {
  padding-block: clamp(64px, 9vw, 128px);
}
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: clamp(40px, 5vw, 72px); }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.center { align-items: center; justify-content: center; }
.gap-xs { gap: 8px; }
.gap-sm { gap: 16px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }

.grid {
  display: grid;
  gap: 24px;
}

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

/* skip link */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 16px; }
