/* ============================================================
   RIVĒ LUME — base.css
   Reset, body defaults, global type baseline.
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0; /* enforce brand rule globally */
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Offset in-page anchor jumps by the height of the fixed site nav
     (96px) so a clicked section lands flush below the nav bar rather
     than scrolling under it. */
  scroll-padding-top: 96px;
  /* In-page anchor jumps glide rather than snap (reduced-motion users
     fall back to an instant jump via the media query below). */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--off-white);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
}

button {
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

/* ---------- Focus states (accessibility) ---------- */
:focus-visible {
  /* Default to a high-contrast ring that reads on the light grounds
     (warm-accent on off-white/cream was ~1.3–1.8:1 — effectively invisible). */
  outline: 2px solid var(--noir);
  outline-offset: 2px;
}
/* On dark grounds the noir ring vanishes — use the warm accent there
   (nav, hero, footer, and any dark/alt section). */
.section--dark :focus-visible,
.section--alt :focus-visible,
.on-dark :focus-visible,
.nav :focus-visible,
.nav-overlay :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--warm-accent);
}

/* Remove default focus on non-keyboard interactions */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--noir);
  color: var(--off-white);
}

/* ---------- Reduced motion ---------- */
@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;
  }
}
