/* ============================================================
   base.css — reset, type, layout primitives.
   Layout spacing lives on wrapper classes only, never on element
   selectors (avoids specificity collisions).
   ============================================================ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100dvh;
  background: var(--curtain);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: var(--leading-body);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film-grain overlay — the tactile detail that reads as hand-made */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 140px 140px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---- Type -------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); font-weight: 700; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }

/* italic accent word inside a serif headline */
.i-accent { font-style: italic; font-weight: 500; color: var(--champagne); }

p { max-width: var(--maxw-text); text-wrap: pretty; }

/* Mono utility — eyebrows, prices, dates, captions (the date-stamp detail) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--champagne);
}
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.muted { color: var(--paper-dim); }

/* ---- Layout primitives ------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--curtain-2); }

/* Warm cream editorial section — breaks the all-dark monotony */
.section--light {
  background: var(--paper);
  color: var(--ink);
  background-image:
    radial-gradient(120% 120% at 100% 0%, rgba(183, 147, 90, 0.10), transparent 55%);
}
.section--light .eyebrow { color: var(--champagne-deep); }
.section--light .muted { color: rgba(20, 19, 28, 0.66); }
.section--light .lede { color: rgba(20, 19, 28, 0.9); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid { display: grid; gap: var(--space-5); }

.center-text { text-align: center; }
.measure { max-width: var(--maxw-text); }
.mx-auto { margin-inline: auto; }

/* ---- Accessibility helpers --------------------------------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 10000;
  background: var(--champagne);
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }
