/* ═══════════════════════════════════════════════════════════
   BASE.CSS — CSS Variables, Resets, Typography
   Load FIRST in every HTML file
═══════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  /* Colors */
  --bg: #f4f5f7;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --red: #dc2626;
  --red-light: #fecaca;
  --red-pale: #fef2f2;
  --red-accent: #f87171;
  --blue: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --green: #16a34a;
  --green-pale: #dcfce7;
  --amber: #f59e0b;
  --blue-border: #bfdbfe;
  --placeholder: #9ca3af;
  --scrollbar: #d1d5db;
  --surface-2-alt: #e8eaf0;
  --border: #e5e7eb;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Shadows */
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 10px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 20px 40px rgba(0,0,0,.1);

  /* Misc */
  --ease: cubic-bezier(.22,.7,.2,1);
  --radius: 12px;
  --radius-lg: 18px;
  --max-width: 1200px;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { color: var(--ink-2); }

/* ── Layout Helpers ── */
.container {
  width: min(var(--max-width), 92%);
  margin-inline: auto;
}

.container--wide {
  width: min(1360px, 94%);
  margin-inline: auto;
}

/* ── Utilities ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Tags / Badges ── */
.tag {
  display: inline-block;
  background: var(--blue-pale);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.tag--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Section Spacing ── */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  margin-bottom: var(--space-2xl);
  max-width: 680px;
}

.section__tag {
  margin-bottom: 14px;
}

.section__title {
  margin-bottom: 12px;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Focus Visible — keyboard navigation indicator ── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Remove outline for mouse users (keep only :focus-visible) */
:focus:not(:focus-visible) {
  outline: none;
}
