/* base: what the Hallmark Floor already decided. Loaded after tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
  scrollbar-color: var(--color-rule) var(--color-ink);
}
body {
  margin: 0;
  background: var(--color-ink);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--color-signal);
}
::selection { background: var(--color-signal); color: var(--color-signal-ink); }

img, video, svg, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { overflow-wrap: break-word; min-width: 0; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
dl, dd { margin: 0; }

/* Floor 26a and 15: an instant, visible ring on everything interactive */
:where(a, button, [tabindex], summary, iframe):focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}
.on-paper :where(a, button, [tabindex]):focus-visible,
.field-yellow :where(a, button, [tabindex]):focus-visible,
.field-pink :where(a, button, [tabindex]):focus-visible,
.field-light :where(a, button, [tabindex]):focus-visible { outline-color: var(--color-focus-paper); }

/* Floor 62: content shows without scripting; the reveal only hides once site.js has armed it */
html.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); }
html.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out);
}

/* Floor 27: every animation and transform transition stops under reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(var(--space-md) * -10);
  z-index: var(--z-modal);
  background: var(--color-signal);
  color: var(--color-signal-ink);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus-visible { top: var(--space-md); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
