/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

/* Body */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-transform: none;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 500; }
.display { font-size: var(--fs-display); line-height: 1.05; letter-spacing: -0.01em; }

/* Labels */
.label {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* Links */
a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 200ms ease;
}
a:hover,
a:active,
a.is-active {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

/* Layout containers */
.wrap {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* Sections — whitespace as gallery walls */
.section {
  padding-block: var(--space-7);
}
.section--surface {
  background: var(--surface);
}

/* Reading column for editorial text */
.reading {
  max-width: var(--container-reading);
  margin-inline: auto;
}

/* Full-bleed breakout */
.bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* Cross-page fade — subtle baseline only */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  a { transition: none; }
}

/* Nav + unhandled page headers fade-in — matches story__header animation.
   Gated behind .reveal-enabled so nothing is hidden when JS is off.
   header[data-reveal] elements are excluded — they use the scroll-reveal system. */
@keyframes navIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

html.reveal-enabled .nav,
html.reveal-enabled header:not([data-reveal]) {
  opacity: 0;
  animation: navIn 900ms cubic-bezier(.22, .61, .36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  html.reveal-enabled .nav,
  html.reveal-enabled header:not([data-reveal]) {
    opacity: 1;
    animation: none;
  }
}

/* ── Mobile tap targets (44 px minimum) ──── */
@media (max-width: 760px) {
  .nav__links a,
  .footer__links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
