/* ============================================================================
   base.css — Reset, document defaults, typography, accessibility primitives
   ----------------------------------------------------------------------------
   Loaded after tokens.css. Sets the dark-green canvas, cream text, fluid
   headings, link/focus styles, and helpers (.eyebrow, .lead, .sr-only).
   ========================================================================== */

/* ---- Modern reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;            /* never allow horizontal scroll */
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
img { font-style: italic; }      /* shows alt nicely if the image is missing */
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* ---- Headings -------------------------------------------------------- */
h1, h2, h3, h4 { line-height: var(--lh-heading); font-weight: 600; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: var(--fs-h1); letter-spacing: .01em; }
h2 { font-family: var(--font-display); font-size: var(--fs-h2); letter-spacing: .01em; }
h3 { font-family: var(--font-serif); font-size: var(--fs-h3); font-weight: 600; }

p { max-width: var(--measure); }

/* ---- Links ----------------------------------------------------------- */
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }

/* ---- Reusable typographic helpers ------------------------------------ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--gold-500);
}

.lead {
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-muted-on-dark);
}
.lead.italic { font-style: italic; }

/* Metallic gold text for premium headings (use sparingly). */
.text-gold {
  background: var(--gold-metallic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Focus visibility (gold rings everywhere) ------------------------ */
:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Selection ------------------------------------------------------- */
::selection { background: rgba(201,162,75,.3); color: var(--cream-100); }

/* ---- Skip link (a11y) ------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 50%;
  top: -4rem;
  transform: translateX(-50%);
  background: var(--green-700);
  color: var(--cream-100);
  padding: .75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  z-index: var(--z-preloader);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---- Screen-reader-only --------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---- Light sections (cream/sand) ------------------------------------ */
.section--light { background: var(--cream-100); color: var(--text-on-light); }
.section--light .lead { color: var(--ink-600); }
.section--sand { background: var(--cream-200); color: var(--text-on-light); }

/* When motion is reduced, neutralise any leftover transition flourish. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
