/* ==========================================================================
   BASE — resets, typography, utilities
   ========================================================================== */

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll when JS is available */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--color-body);
  background: var(--color-white);
  overflow-x: hidden;
  overflow-wrap: break-word;
  min-height: 100vh;
}

body.no-scroll { overflow: hidden; height: 100vh; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img { color: transparent; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button { cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---- Focus states (accessible, visible) ---- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible, button:focus-visible {
  outline-offset: 4px;
}

/* ---- Skip link ---- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10000;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast) var(--ease-out-expo);
}

.skip-link:focus {
  top: 16px;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3.5rem, 3rem + 3vw, 7rem);
}

.section--surface { background: var(--color-surface); }
.section--dark { background: var(--color-dark); color: rgba(255,255,255,0.85); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--color-white); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }

.grid { display: grid; gap: var(--space-32); }

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

/* ---- Eyebrow label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-16);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-primary);
  display: inline-block;
}

.section--dark .eyebrow,
.on-dark .eyebrow { color: var(--color-accent-light); }
.section--dark .eyebrow::before,
.on-dark .eyebrow::before { background: var(--color-accent-light); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--color-body);
  line-height: 1.6;
}

.text-muted { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }

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

/* ---- Selection ---- */
::selection { background: var(--color-primary); color: var(--color-white); }
