/* ============================================================
   GLOBAL — reset, base typography, layout helpers.
   ============================================================ */

/* ---------- FONTS ----------
   Edu SA Hand, Lato and Roboto Mono are loaded from Google Fonts in index.html.
   To change a font, edit --font-hand / --font-sans / --font-mono in tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;             /* belt and braces: never a sideways scrollbar */
}

h1, h2, h3, p, figure, dl, dd, ol, ul, address { margin: 0; padding: 0; }
ol, ul { list-style: none; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Typographic roles ---------- */
.label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

/* Handwritten lines: personal asides and the invitation wording */
.hand {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: var(--step-hand);
  line-height: 1.35;
}

/* Marker lettering (drawn SVG, see tools/make-lettering.py) */
.lettering {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--accent);
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  left: 0;                       /* keeps the hidden box from ever poking past the right edge */
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Text link ---------- */
.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: var(--hairline);
  text-underline-offset: 0.4em;
  transition: text-underline-offset var(--dur-micro) var(--ease-out);
}
.textlink:hover { text-underline-offset: 0.7em; }

/* ---------- Placeholder content (clearly marked, never invented) ---------- */
.is-placeholder {
  display: inline-block;
  padding: 0.05em 0.5em;
  border: var(--hairline) dashed var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}
.is-placeholder::before { content: "Placeholder — "; }
