/* ==========================================================================
   Reset + base typography + accessibility primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis owns smooth scrolling; native smooth would fight it */
}

html.no-js-scroll { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  /* The flowy-bg layer paints the actual visible background; this is just
     the base colour showing through before/behind it (and for print/no-css-bg cases). */
  background: var(--surface-bg);
  color: var(--surface-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Vision is the site's one deep-dark chapter — flip the surface tokens for
   its whole subtree so every component that reads them (cards, borders,
   muted text) adapts without page-specific overrides scattered everywhere. */
body[data-page="vision"] {
  background: var(--surface-bg-dark);
  color: var(--surface-text-dark);
  --surface-bg: var(--surface-bg-dark);
  --surface-text: var(--surface-text-dark);
  --surface-text-strong: var(--surface-text-dark-strong);
  --surface-muted: var(--c-steel-grey);
  --surface-border: var(--surface-border-dark);
  --surface-card-bg: rgba(184, 188, 194, 0.06);
  --accent-label: var(--c-ice-blue);
}

/* Lenis applies transform to this wrapper; keep it a plain block */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

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

.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button {
  cursor: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-tight);
  line-height: 1.05;
}

p { margin: 0; }

.eyebrow, .label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* ---- Focus & keyboard accessibility ---- */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--c-ice-blue);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--sp-4);
  z-index: 1000;
  background: var(--c-ice-blue);
  color: var(--c-charcoal);
  padding: var(--sp-3) var(--sp-5);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  border-radius: 2px;
  transition: top var(--dur-fast) var(--ease-out-soft);
}

.skip-link:focus { top: var(--sp-4); }

::selection {
  background: var(--c-ice-blue);
  color: var(--c-charcoal);
}

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

/* ---- Reduced motion: kill everything non-essential ---- */
@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;
  }
}
