/* ==========================================================================
   AMINO — RESET + TYPOGRAPHIC BASE
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;           /* Lenis owns scrolling. Never CSS-smooth. */
  background: var(--ink);
}

body {
  font-family: var(--font-display);
  font-size: var(--t-body);
  font-weight: var(--w-book);
  line-height: var(--lh-body);
  letter-spacing: var(--tr-body);
  color: var(--paper);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  letter-spacing: inherit;
}

button { cursor: pointer; }

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

ul, ol { list-style: none; }

/* --- HEADINGS -------------------------------------------------------------
   Weight never exceeds 500. Scale carries the hierarchy.                    */

h1, h2, h3, h4 {
  font-weight: var(--w-medium);
  line-height: var(--lh-head);
  letter-spacing: var(--tr-head);
  text-wrap: balance;
}

.t-mega {
  font-size: var(--t-mega);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-mega);
  font-weight: var(--w-medium);
  text-wrap: nowrap;
}

.t-giant {
  font-size: var(--t-giant);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: var(--w-medium);
}

.t-display {
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: var(--w-medium);
}

.t-h2 { font-size: var(--t-h2); }
.t-h3 { font-size: var(--t-h3); letter-spacing: var(--tr-head); }
.t-h4 { font-size: var(--t-h4); letter-spacing: var(--tr-head); }

.t-lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--fg-mute);
  letter-spacing: -0.014em;
  text-wrap: pretty;
}

/* Measured line length caps. Body copy past ~75 characters per line loses the
   reader's place on the return sweep; .t-body was running to 81ch inside the
   wide service columns. */
.t-body {
  font-size: var(--t-body);
  color: var(--fg-mute);
  text-wrap: pretty;
  /* 52ch, not 68ch: Geist's `ch` unit is the width of "0" (~0.66em), well
     above the ~0.5em average of running lowercase text, so 68ch was letting
     lines reach ~88 characters. 52ch lands at ~70 real characters. */
  max-width: 52ch;
}

.t-small { font-size: var(--t-small); color: var(--fg-mute); }

/* THE two-tone move. One sentence, one size, two greys. */
.dim   { color: var(--fg-ghost); }
.mute  { color: var(--fg-mute); }
.ember { color: var(--ember); }

/* Mono eyebrow label — the only place tracking opens up */
.label {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: var(--w-book);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.label--ember { color: var(--ember-fg); }

/* The leading dot was removed site-wide on request — it read as a stray
   artifact next to form and section labels rather than as punctuation.
   .label--bare is kept as a no-op so existing markup stays valid. */
.label--bare::before { display: none; }

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

/* --- FOCUS ---------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--ember);
  color: #FFF;
}

/* --- A11Y ----------------------------------------------------------------- */

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

.skip {
  position: fixed;
  top: var(--s-4);
  left: var(--s-4);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--ember);
  color: #FFF;
  border-radius: var(--r-pill);
  font-size: var(--t-small);
  transform: translateY(-160%);
  transition: transform var(--d-fast) var(--e-out);
}
.skip:focus { transform: none; }

/* --- SCROLLBAR ------------------------------------------------------------ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: #2E2E2C;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ember); }

/* --- REDUCED MOTION -------------------------------------------------------
   Honour the preference properly: kill transforms/opacity animation, keep
   all content visible. GSAP is disabled in JS via gsap.matchMedia().       */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cursor, .grain { display: none !important; }
}
