/* Reset + browser surfaces. Nothing here ships a browser default. */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Warm vignette + film grain sit under everything, above nothing. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90rem 60rem at 72% -14%, rgba(201, 138, 69, 0.16), transparent 62%),
    radial-gradient(60rem 48rem at 6% 108%, rgba(91, 107, 79, 0.13), transparent 66%);
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: var(--grain);
  background-size: 180px 180px;
}

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

/* Sprite icons inherit these through <use>; per-shape fills still win. */
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
img, video { height: auto; }

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

button { background: none; border: 0; }

a {
  color: inherit;
  text-decoration-color: var(--line-copper);
  text-underline-offset: 0.22em;
  text-decoration-thickness: from-font;
}

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

/* ── Browser surfaces, themed ── */
::selection {
  background: var(--copper-500);
  color: var(--ink-1000);
}

::placeholder {
  color: var(--cream-400);
  opacity: 1;
}

:root { scrollbar-color: var(--ink-600) var(--ink-1000); scrollbar-width: thin; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ink-1000); }
::-webkit-scrollbar-thumb {
  background: var(--ink-600);
  border: 3px solid var(--ink-1000);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--copper-700); }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--copper-400);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

:where(input, textarea) { caret-color: var(--copper-400); }

/* Numerals in anything comparative line up. */
table, .tabular, .price, td, th { font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: 10000;
  padding: 0.7rem 1.1rem;
  background: var(--copper-400);
  color: var(--ink-1000);
  font-weight: 600;
  border-radius: var(--r-md);
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease-out-expo);
}
.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@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;
  }
}
