/* ==========================================================================
   BASE — reset, typography defaults, layout primitives, utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

html.ht-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Film grain — sits above the ground, below everything else. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.015em;
  line-height: .94;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 650;
     text-transform: none; letter-spacing: -.01em; line-height: 1.25; }

h4, h5, h6 { margin: 0; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }

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

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

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

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

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

button { background: none; border: 0; cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

/* --------------------------------------------------------------------------
   Browser surfaces
   The parts nobody draws still carry the design. Left alone these ship with
   platform defaults that belong to no system.
   -------------------------------------------------------------------------- */

::selection { background: var(--acid); color: var(--ink); }

html { caret-color: var(--acid); scrollbar-color: var(--line) var(--ink); scrollbar-width: thin; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: var(--panel-3);
  border: 3px solid var(--ink);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--line); }

a:not([class]) { text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-wide { max-width: var(--wrap-wide); }

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(44px, 6vw, 72px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-bottom: var(--s8);
  max-width: 62ch;
}

.section-head .lede { color: var(--muted); font-size: var(--step-1); margin: 0; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

/* Replaces the old .eyebrow. That was a tracked-caps kicker parked above a
   heading, which is the default generated-hero shape; headings now carry
   themselves. This survives only inside dense components, where it is the
   sole label for the value beneath it and not a decorative lead-in. */
.label {
  display: block;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 var(--s2);
}

.accent { color: var(--acid); }
.muted  { color: var(--muted); }
.faint  { color: var(--faint); }

.stack     { display: flex; flex-direction: column; }
.row       { display: flex; align-items: center; }
.gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); } .gap-5 { gap: var(--s5); }
.gap-6 { gap: var(--s6); }
.wrap-flex { flex-wrap: wrap; }

.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;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   One authored moment: card grids arrive in a short stagger. Nothing else
   animates in. An identical fade-and-rise on every section reads as a tic,
   not as motion design.
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Reduced motion — hard off switch
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
