/* Base: body, typography primitives, layout helpers */

html, body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.011em;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-loading { overflow: hidden; }

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

/* -------- Display primitives -------- */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

/* Italic serif — the signature accent. Use on a <em class="ital"> or span. */
.ital {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  /* Serif italics render optically a hair smaller — bump up */
  font-size: 1.08em;
  color: var(--bone);
}

/* Section eyebrow — mono label with a hairline and case-file index */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--bone);
  opacity: 0.45;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  font-size: var(--fs-xs);
  text-transform: uppercase;
}

/* Display heading scale */
.h-xl, .h-lg, .h-md {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.h-xl { font-size: var(--fs-3xl); line-height: 0.9; letter-spacing: -0.04em; }
.h-lg { font-size: var(--fs-2xl); line-height: 0.95; letter-spacing: -0.035em; }
.h-md { font-size: var(--fs-xl); line-height: 1.02; letter-spacing: -0.025em; }

/* Lede — large editorial intro paragraph */
.lede {
  font-size: var(--fs-lg);
  line-height: 1.4;
  color: var(--bone-dim);
  max-width: 52ch;
  font-weight: 300;
  letter-spacing: -0.012em;
}
.lede .ital { color: var(--bone); }

.body-text {
  color: var(--bone-dim);
  line-height: 1.6;
  max-width: 60ch;
  font-weight: 300;
  letter-spacing: -0.008em;
  font-size: var(--fs-md);
}
.body-text p + p { margin-top: 1em; }

.body-text .em { color: var(--bone); font-weight: 500; }
.body-text .ital { color: var(--bone); }

/* Small utilities */
.em { color: var(--bone); font-weight: 500; }
.dim { color: var(--muted); }
.signal { color: var(--signal); }

/* -------- Layout -------- */

.shell {
  width: 100%;
  padding-inline: var(--gutter);
  margin-inline: auto;
  max-width: var(--max-w);
}
.shell--wide {
  padding-inline: clamp(1rem, 1.8vw, 1.5rem);
  max-width: none;
}

.section {
  position: relative;
  padding-block: var(--s-10);
}
.section--hero { padding-block: 0; }
.section--tight { padding-block: var(--s-8); }

.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* -------- Reveal primitives -------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-inview { opacity: 1; transform: translateY(0); }

.reveal-mask {
  overflow: hidden;
  display: inline-block;
  line-height: inherit;
  vertical-align: bottom;
}
.reveal-mask > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-cinema);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform;
}
.reveal-mask.is-inview > span { transform: translateY(0); }

.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal img,
.img-reveal video {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.3s var(--ease-cinema), transform 1.6s var(--ease-out);
  transform: scale(1.08);
}
.img-reveal.is-inview img,
.img-reveal.is-inview video {
  clip-path: inset(0 0 0 0);
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-mask > span { transition: none !important; transform: none !important; opacity: 1 !important; }
  .img-reveal img, .img-reveal video { clip-path: inset(0) !important; transform: none !important; transition: none !important; }
}

/* -------- Utility helpers -------- */
.flex { display: flex; }
.grid { display: grid; }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
