/* Geist Bold, served from the project (paths are relative to this file) */
@font-face {
  font-family: 'Geist';
  src: url('../../font/Geist/webfonts/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--c-bg);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-red);
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: var(--tracking);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* tracking is em-based, so every element computes it from its own font size */
:where(*) {
  letter-spacing: var(--tracking);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
  font: inherit;
}

ul, ol { list-style: none; }

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

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

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--c-red);
  color: var(--c-bg);
}

:focus-visible {
  outline: 2px solid var(--c-red);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  left: var(--margin);
  top: 0.75rem;
  z-index: calc(var(--z-logo) + 1);
  padding: 0.5rem 0.75rem;
  background: var(--c-red);
  color: var(--c-btn-text);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- type styles ---------- */
.display-xl { font-size: var(--fs-display-xl); line-height: var(--lh-display-xl); }
.display-l { font-size: var(--fs-display-l); line-height: var(--lh-display-l); }
.copy-l { font-size: var(--fs-copy-l); line-height: var(--lh-copy-l); }
.tagline { font-size: var(--fs-tagline); line-height: var(--lh-tagline); }
.heading-s { font-size: var(--fs-heading-s); line-height: var(--lh-heading-s); }
.small { font-size: var(--fs-small); line-height: var(--lh-small); }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- reveal primitives ---------- */

/* SplitText masks: give descenders/ascenders room under tight line heights.
   The split element becomes a grid so the masks' negative margins never collapse. */
/* align-content: start keeps a split element that is taller than its text (e.g. a
   stretched grid item) from stretching its masks, which would let hidden lines show */
.is-split:not([data-single-line]) { display: grid; align-content: start; }
.nav a.is-split { display: inline-grid; }
.line-mask {
  padding-block: 0.08em 0.12em;
  margin-block: -0.08em -0.12em;
  /* -0.06em tracking lets glyphs overhang their advance; without room on the sides
     the mask cuts the last letter of a line. The negative margin keeps text in place. */
  padding-inline: 0.1em;
  margin-inline: -0.1em;
}

/* image reveal: the wrapper is the mask, the inner element carries the lift */
.reveal-img {
  position: relative;
  overflow: hidden;
  background: transparent;
}
.reveal-img__inner {
  position: absolute;
  inset: 0;
}
.reveal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* hide scroll-reveal targets until JS has prepared them, to avoid a flash. The first screen (header, about, figures) is never
   hidden: no intro hold (Hayden, 14 Nov 2026); main.js leaves those out of the scroll reveals. */
.js [data-reveal='text']:not(:where(.intro, .stats) *) { /* :where keeps the weight of `.js .is-split` below winning */
  visibility: hidden;
}
.js .is-split {
  visibility: visible;
}

/* ---------- button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-red);
  color: var(--c-btn-text);
  font-size: var(--fs-heading-s);
  line-height: var(--lh-heading-s);
}
.btn__label {
  position: relative;
  display: block;
  overflow: hidden;
  padding-block: 0.1em;
}
.btn__label::before,
.btn__label::after {
  display: block;
  transition: transform var(--dur-btn) var(--ease-out-expo);
}
.btn__label {
  color: transparent;
}
.btn__label::before {
  content: attr(data-label);
  position: absolute;
  inset: 0.1em 0 auto;
  color: var(--c-btn-text);
}
.btn__label::after {
  content: attr(data-label);
  position: absolute;
  inset: 0.1em 0 auto;
  color: var(--c-btn-text);
  transform: translateY(110%);
}
@media (hover: hover) {
  .btn:hover .btn__label::before { transform: translateY(-110%); }
  .btn:hover .btn__label::after { transform: translateY(0); }
}
/* DialKit replay shows the hover state without a mouse */
.btn.is-hover-preview .btn__label::before { transform: translateY(-110%); }
.btn.is-hover-preview .btn__label::after { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .btn__label::before,
  .btn__label::after { transition: none; }
}
