/* Hallmark · component: base.css · genre: playful · theme: tuned custom (dark-first warm-coral)
 * states: n/a (global reset + typography) · contrast: pass (AA)
 */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip; /* deliberate overflow is allowed; horizontal scroll is not (PRD-02 §5.5) */
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* PRD-02 §5.5 · Honour OS reduced-motion without layout surprises. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-style: normal; /* no italic headers, ever (PRD-02 §5.2) */
  line-height: 1.1;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--text-display); overflow-wrap: anywhere; min-width: 0; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }

p { max-width: 65ch; } /* measure 45–75 chars (PRD-02 §5.2) */
code, kbd, samp, .mono { font-family: var(--font-mono); }

a {
  color: var(--color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

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

::selection { background: var(--color-accent); color: var(--color-paper); }

button {
  font-family: var(--font-body);
}

/* Visually hidden but available to AT/screen readers (used for page headings
 * that are decorative on an immersive surface). */
.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;
}

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