/* ---- base --------------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--text);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.62;   /* serifs carry a little more leading than a grotesque */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- grain -------------------------------------------------------------
   Fixed and pointer-events:none so it never repaints with the scroll.
   Very low opacity: it exists to stop the large flat black fields from
   banding on cheap panels, not as a visible texture. */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- layout ------------------------------------------------------------ */
.shell {
  width: min(100% - (var(--gut) * 2), var(--shell));
  margin-inline: auto;
}
.section { padding-block: var(--sec-y); }

/* --- type -------------------------------------------------------------- */
.display {
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: var(--track-tight);
}

/* Reserve descender room. A serif at 600 with a tight leading clips the
   tail on g/y/p otherwise, and every display line here is set tight. */
.display { padding-bottom: 0.06em; }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--bone-dim);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--bone-soft);
  max-width: var(--measure);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* --- buttons ------------------------------------------------------------
   Sharp corners, matching the page's single radius rule.
   Bone fill for primary so the vermilion stays rationed to hairlines and
   numerals: a full accent-filled button at every CTA would spend the one
   loud colour on the most repeated element on the page. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  white-space: nowrap;
  border-radius: var(--r);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.95em 1.6em;
  transition: background-color var(--dur-1) var(--ease),
              color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease),
              transform var(--dur-1) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--solid {
  background: var(--bone);
  color: var(--void);
}
.btn--solid:hover { background: #fff; }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--bone);
}
.btn--ghost:hover { border-color: var(--bone); }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* --- images ------------------------------------------------------------ */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--raise-2);
}
.ph > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.ph > img.is-loaded { opacity: 1; }

/* --- reveals ------------------------------------------------------------
   Pre-state lives behind .js so a failed script leaves content visible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: var(--d, 0ms);
}

/* Line-masked display reveal. core.js wraps each measured line in .ln and
   each word in .w, so the mask clips on real line boxes rather than on a
   guess at where the text will break. */
.js [data-lines] .ln { display: block; overflow: hidden; }
.js [data-lines] .w {
  display: inline-block;
  transform: translateY(105%);
  transition: transform var(--dur-2) var(--ease);
  transition-delay: var(--ld, 0ms);
}
.js [data-lines].is-in .w { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; }
  .js [data-lines] .w { transform: none; transition: none; }
}

.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;
}
