/* ==========================================================================
   02-RESET — modern, minimal, opinionated only where it prevents bugs
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Plain, native scrolling. Anchor jumps opt in individually where wanted. */
  scroll-behavior: auto;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
fieldset, legend {
  margin: 0;
  padding: 0;
}

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

/* Headings inherit weight/size from 03-base so a level can be chosen for
   semantics without dragging visual size along with it. */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

/* Prevents CLS when width/height attributes are present, which they always are. */
img { height: auto; }

svg { fill: currentColor; }

/* A CSS declaration beats a presentation attribute, so the rule above was
   silently filling in every stroke-only icon that declares fill="none" —
   outline marks rendered as solid blocks. Honour the author's intent. */
svg[fill="none"] { fill: none; }

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

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

textarea { resize: vertical; }

table {
  border-collapse: collapse;
  width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

address { font-style: normal; }

[hidden] { display: none !important; } /* the only permitted !important — it
   backs a native attribute whose contract is absolute, and losing it to
   specificity is a real accessibility bug. */

:target { scroll-margin-block-start: calc(var(--header-h) + var(--sp-6)); }

/* --------------------------------------------------------------------------
   FOCUS — visible on every interactive element, no exceptions.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--ring-offset);
  border-radius: var(--r-sm);
}

/* Only remove the default ring where :focus-visible is supported, so keyboard
   users never lose focus indication in older engines. */
:focus:not(:focus-visible) { outline: none; }

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

/* --------------------------------------------------------------------------
   GLOBAL REDUCED-MOTION GUARD
   Backstop for anything CSS-driven that slipped a token. motion.js handles
   GSAP, Lenis and the custom cursor separately.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
