/* ============================================================
   EVERIART — Base
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--navy-base);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Visible keyboard focus — quality floor, never removed.
   Parchment, not Gunmetal: against Authority Navy the old ring measured
   2.2:1, under the 3:1 floor a focus indicator has to clear. There is no
   light ground left for Gunmetal to be read against. */
:focus-visible {
  outline: 2px solid var(--parchment);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Type roles --- */
.display {
  font-family: var(--serif);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 400;
  margin: 0;
}

h1, .h1 {
  font-family: var(--serif);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tr-h1);
  font-weight: 400;
  margin: 0;
}

h2, .h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tr-h2);
  font-weight: 400;
  margin: 0;
}

h3, .h3 {
  font-family: var(--sans);
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: var(--tr-h3);
  font-weight: 500;
  margin: 0;
}

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.meta {
  font-family: var(--sans);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  letter-spacing: var(--tr-meta);
  color: var(--stone);
  font-weight: 500;
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  letter-spacing: var(--tr-lede);
  max-width: 46ch;
}

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

.section { padding-block: var(--section-y); }

/* The raised ground. The base is Authority Navy on <body>, so a section only
   declares a background when it wants to sit a step above it. */
.section--dark {
  background: var(--navy);
  color: var(--parchment);
}
.on-dark .meta { color: rgba(244, 241, 222, 0.6); }

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reveal visibility is armed only after the observer initializes.
   A failed module leaves the default, readable page intact. */
.motion-ready .reveal { opacity: 0; }
.motion-ready .reveal.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .motion-ready .reveal { opacity: 1; transform: none !important; }
}
