/* ==========================================================================
   RESET — modern baseline. No opinions beyond removing browser defaults.
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;          /* Lenis owns smooth scrolling [SPEC §1] */
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;             /* [SPEC §8] no horizontal scroll, any width */
}

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

img { height: auto; }

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

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

p,
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

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

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset {
  border: 0;
  padding: 0;
}

legend { padding: 0; }

:target { scroll-margin-block: 5ex; }

/* Class-based display rules outrank the UA's [hidden] rule, so restate it at
   a specificity that wins. The attribute is repeated to raise specificity to
   0,2,0 without reaching for !important. Without this, `hidden` silently
   stops working on anything that also carries a layout class. */
[hidden][hidden] { display: none; }

/* Keyboard focus only — never suppress it entirely. [SPEC §10] */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Reduced motion: kill anything CSS-driven. The JS modules opt out separately. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms;
    animation-iteration-count: 1;
    transition-duration: .01ms;
    scroll-behavior: auto;
  }
}
