/* Hallmark · base for 午後小室 · the Floor's decisions, written by hand (scaffold not run) · stamp and critique in dessert.css */

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

html, body { overflow-x: clip; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-md));
  scrollbar-color: var(--color-muted) var(--color-paper-2);
  font-synthesis: none;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font: 400 var(--text-md)/1.6 var(--font-body);
  caret-color: var(--color-accent);
  text-rendering: optimizeLegibility;
}

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

:where(h1, h2, h3) {
  margin: 0;
  font-family: var(--font-display);
  color: var(--color-ink);
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
:where(h1) { font-size: var(--text-display); font-weight: var(--display-weight); line-height: 1.12; letter-spacing: var(--tracking-display); max-width: 20ch; }
:where(h2) { font-size: var(--text-section); font-weight: var(--display-weight); line-height: 1.14; letter-spacing: var(--tracking-display); max-width: 30ch; }
:where(h3) { font-size: var(--text-title); font-weight: var(--serif-small); line-height: 1.3; max-width: 40ch; }
:where(p) { margin: 0; text-wrap: pretty; }
:where(ul, ol, dl, dd, figure, fieldset) { margin: 0; padding: 0; }
:where(fieldset) { border: 0; min-width: 0; }
:where(small, figcaption, th) { font-size: var(--text-sm); }
:where(img) { display: block; max-width: 100%; height: auto; }
:where(a) { color: inherit; }
:where(button, input, textarea, select) { font: inherit; color: inherit; }

.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--color-ink-2); max-width: 26em; }

/* one container, capped and centred */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* focus appears at once, never animated */
:where(a, button, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* a way past the nav */
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); text-decoration: none; }
.skip:focus-visible { top: var(--space-md); }

/* slots: the wash shows only while a photo loads; the atelier treatment on every photo */
[data-slot] { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--color-paper-2), var(--color-paper-3)); }
[data-slot] > img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.08) contrast(0.94) saturate(0.9); outline: 1px solid var(--color-frame); outline-offset: -1px; }

/* a fact the brief did not give */
.fill { padding: 0 0.25em; border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent); border-radius: 3px; color: var(--color-muted); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

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