/* =========================================================================
   BASE  —  reset, typography defaults, and reusable wireframe primitives
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Lenis smooth-scroll requirements */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.05; }

/* ---- LAYOUT HELPERS ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.grid { display: grid; gap: var(--gutter); }
.stack > * + * { margin-top: 1.1rem; }

/* ---- CAPS LABEL (used for eyebrow / section tags) ---- */
.eyebrow {
  font-size: var(--fs-small);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* STEP 24 — preloader status label: Visitor TT1 BRK mono, scaled to 70% of eyebrow, right-snapped */
.preloader__bottom .eyebrow {
  font-family: "Visitor TT1 BRK", "Courier New", monospace;
  font-size: calc(var(--fs-small) * 0.7);
  text-transform: none;
  letter-spacing: 0.04em;
  transform-origin: 100% 100%;
  color: var(--ink-soft);
}

/* ---- LOREM TEXT LINES: fake paragraph bars are optional; we use real Lorem ---- */
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* =========================================================================
   MEDIA BOX  —  the grey placeholder that stands in for every image/video.
   Swap <div class="box"> for a real <img> during surgery.
   ========================================================================= */
.box {
  position: relative;
  background: var(--box);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}
/* diagonal cross so it reads clearly as a placeholder */
.box::before,
.box::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top right,
      transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px),
      var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to top left,
      transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px),
      var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  opacity: .5;
}
.box::after { content: none; }
.box[data-label]::before { opacity: .35; }
/* optional caption tag on a media box */
.box[data-label] > .box__tag,
.box::after { }
.box__tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); background: rgba(13,15,18,.6);
  padding: 4px 8px; border-radius: 6px;
}
.box--darker { background: var(--box-2); }
.box--darkest { background: var(--box-3); }

/* common aspect ratios */
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-4-3  { aspect-ratio: 4 / 3; }
.ar-1-1  { aspect-ratio: 1 / 1; }
.ar-3-4  { aspect-ratio: 3 / 4; }
.ar-9-16 { aspect-ratio: 9 / 16; }
.ar-tall { aspect-ratio: 2 / 3; }

/* =========================================================================
   BUTTONS  (outlined pill = lo-fi CTA)
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: 0.9em 1.6em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--fs-small);
  letter-spacing: .06em; text-transform: uppercase;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--solid:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost { border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* small circular arrow control (sliders) */
.ctrl {
  width: 48px; height: 48px; border-radius: 999px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast);
}
.ctrl:hover { background: var(--surface); border-color: var(--accent); }
.ctrl svg { width: 18px; height: 18px; stroke: var(--ink); }

/* =========================================================================
   REVEAL  —  base state for scroll-in animations (JS adds .is-in)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
/* stagger children */
.reveal-group > * { opacity: 0; transform: translateY(28px); }
.reveal-group.is-in > * {
  opacity: 1; transform: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
}

/* accessible focus */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* rotate-phone notice (mirrors original landscape hint) */
.rotate-note {
  display: none;
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--bg); color: var(--ink);
  place-items: center; text-align: center; padding: 2rem;
}
