/* ─── Base styles ────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 479px) {
  html { font-size: 15px; }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography roles */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 { font-size: clamp(36px, 5.5vw, 64px); }
h2 { font-size: clamp(28px, 4.5vw, 44px); }
h3 { font-size: clamp(22px, 3.5vw, 30px); }
h4 { font-size: clamp(18px, 2.8vw, 22px); }

p { line-height: 1.7; color: var(--text-secondary); }
p + p { margin-top: var(--s-4); }

a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--s-3);
}

/* Scroll reveal */
.js-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.js-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js-reveal { opacity: 1; transform: none; }
}

/* Global dark overrides for legacy inline light styles */
[style*="background: #f9f9f9"],
[style*="background:#f9f9f9"],
[style*="background-color: #f9f9f9"],
[style*="background-color:#f9f9f9"],
[style*="background: #ffffff"],
[style*="background:#ffffff"],
[style*="background: #fff"],
[style*="background:#fff"],
[style*="background-color: #ffffff"],
[style*="background-color:#ffffff"],
[style*="background-color: #fff"],
[style*="background-color:#fff"],
[style*="background: white"],
[style*="background:white"],
[style*="background-color: white"],
[style*="background-color:white"],
[style*="background: #f0f5fb"],
[style*="background:#f0f5fb"],
[style*="background: #fff5f3"],
[style*="background:#fff5f3"] {
  background: #0b0f15 !important;
}

[style*="background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%)"],
[style*="background:linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%)"],
[style*="background: linear-gradient(135deg, #f0f5fb 0%, #ffffff 100%)"],
[style*="background:linear-gradient(135deg, #f0f5fb 0%, #ffffff 100%)"] {
  background: linear-gradient(135deg, #040608 0%, #0b0f15 100%) !important;
}

[style*="border: 1px solid #e0e0e0"],
[style*="border:1px solid #e0e0e0"],
[style*="border-top: 1px solid #e0e0e0"],
[style*="border-top:1px solid #e0e0e0"],
[style*="border-left: 4px solid #123A5E"],
[style*="border-left:4px solid #123A5E"] {
  border-color: var(--border) !important;
}

[style*="color: #123A5E"],
[style*="color:#123A5E"],
[style*="color: #4A4A4A"],
[style*="color:#4A4A4A"],
[style*="color: #6B6B6B"],
[style*="color:#6B6B6B"] {
  color: var(--text-primary) !important;
}

[style*="color: #7f1d1d"],
[style*="color:#7f1d1d"],
[style*="color: #991b1b"],
[style*="color:#991b1b"] {
  color: #fca5a5 !important;
}
