/* ============================================================
 * Trophy reset — matches the base that 119 W 57 ships with.
 * Modern-normalize subset + a few opinionated defaults:
 *   - universal margin/padding/box-sizing
 *   - smooth scroll behavior (Lenis takes over on capable devices)
 *   - antialiased text on dark grounds
 *   - block-level media
 *   - inherited font on form controls
 *   - prevent horizontal overflow at body level
 *
 * Reference: prototype-merged.html
 * ============================================================ */

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

/* 10px-rem root system: 62.5% of the browser default 16px = 10px.
   Every Trophy site uses this convention so `1rem = 10px` for clean math
   throughout shared/ and per-site CSS. Sites must not override the root
   font-size; type tokens are pre-scaled with this base in mind. */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Selection styling: bronze accent on parchment. Sites override
   --accent + --bg-base via tokens; selection picks up the result. */
::selection {
  background: var(--accent, #9a6d2e);
  color: var(--bg-base, #f6f3ec);
}

/* Custom scrollbar in the warm-bronze palette (WebKit only — graceful elsewhere). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base, #f6f3ec); }
::-webkit-scrollbar-thumb {
  background: rgba(154, 109, 46, 0.3);
  border: 2px solid var(--bg-base, #f6f3ec);
}
::-webkit-scrollbar-thumb:hover { background: rgba(154, 109, 46, 0.55); }

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

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

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

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

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

/* Respect reduced-motion — disable big motion universally.
   JS modules in shared/js/ also check matchMedia and bail early. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
