/* ==========================================================================
   Base: reset, typography, layout primitives
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: var(--lh-snug); letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }
::selection { background: var(--lav-500); color: var(--navy-950); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 1000; padding: var(--s-2) var(--s-4); background: var(--accent-2); color: var(--navy-950); border-radius: var(--r-pill); font-weight: 800; }
.skip-link:focus { top: var(--s-4); }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - 2 * var(--gutter), var(--container-wide)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(2rem, 5vw, 4rem); }
.flow > * + * { margin-top: var(--flow, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.stack { display: grid; gap: var(--s-4); }
.measure { max-width: var(--measure); }
.center { text-align: center; margin-inline: auto; }

/* Type */
.display { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -.02em; }
.t-3xl { font-size: var(--fs-3xl); } .t-2xl { font-size: var(--fs-2xl); } .t-xl { font-size: var(--fs-xl); }
.t-lg { font-size: var(--fs-lg); } .t-md { font-size: var(--fs-md); } .t-sm { font-size: var(--fs-sm); } .t-xs { font-size: var(--fs-xs); }
.lede { font-size: var(--fs-md); color: var(--text-2); max-width: var(--measure); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.eyebrow::before { content: ""; width: 22px; height: 4px; border-radius: 2px; background: currentColor; }
.grad-text { background: linear-gradient(92deg, var(--lav-400), var(--cyan-400) 55%, var(--pink-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.outline-text { -webkit-text-stroke: 2px var(--lav-400); color: transparent; }

/* Section heads */
.section-head { display: grid; gap: var(--s-3); margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-head--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--s-6); }
.section-head--split .lede { max-width: 52ch; }
@media (max-width: 720px) { .section-head--split { grid-template-columns: 1fr; } }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.paper { background: var(--paper); color: var(--ink); }
hr.rule { border: 0; height: 1px; background: var(--outline); margin: 0; }

/* Safety net: decorative tilts and stickers may poke past the viewport edge; never let them cause sideways scroll. */
html, body { overflow-x: clip; }
/* Spray-paint page transition (js/spray.js). html[data-spray] is set by a head script when the page arrives painted. */
html[data-spray]::before { content: ""; position: fixed; inset: 0; z-index: 600; background: var(--spray-colour, var(--lav-500)); }
.spray { position: fixed; inset: 0; z-index: 600; width: 100%; height: 100%; pointer-events: none; display: none; }
.spray[data-on="true"] { display: block; pointer-events: auto; }
