/* ==========================================================================
   Base - minimal modern reset + element defaults built on tokens.css.
   Foundational only (no components/layout; those arrive in M2).
   Cascade order: tokens.css -> fonts.css -> base.css
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100svh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings - editorial serif, tight and confident */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--color-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
ul,
ol {
  line-height: var(--leading-normal);
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--gold-text);
}

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

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

/* Visible focus for keyboard users (WCAG) */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- Foundational utilities ---- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: var(--measure);
}

/* Eyebrow / small-caps label */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Accessible visually-hidden (kept in the a11y tree) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link - revealed on focus (used by base.njk in M2) */
.skip-link {
  position: absolute;
  left: var(--space-2xs);
  top: -3rem;
  z-index: 100;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: var(--space-2xs);
}
