/* NEUCLIPS — base: reset, type, the mark, nav, footer, motion primitives.
 *
 * NOTE ON CONTAINERS. There is deliberately NO shared `.wrap` class in this
 * stylesheet. Every section defines its own container, because every section is its
 * own architecture (R-COMPONENTREUSE) — and because a shared `.wrap` that sets
 * max-width invites a same-element width-class collision, which has shipped three
 * times. Removing the shared class removes the bug class.
 */

/* ALETHEIA flagged layout shift while the page loads. Anton is a condensed face
   and its fallback is not, so the swap reflowed the largest text on the page.
   This fallback is size-adjusted to Anton's metrics, so the swap moves nothing. */
@font-face {
  font-family: "AntonFallback";
  src: local("Arial Narrow"), local("Helvetica Neue Condensed"), local("Arial");
  size-adjust: 108%;
  ascent-override: 96%;
  descent-override: 22%;
  line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

body {
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

::selection { background: var(--signal); color: var(--base); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--signal); color: var(--base);
  padding: var(--s3) var(--s5); font-weight: 700;
}
.skip:focus { left: var(--s4); top: var(--s4); }

/* ── display type ─────────────────────────────────────────────── */
.d {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.88;
}
.label {
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink-52);
}
.label--signal { color: var(--signal); }

/* ══ THE MARK ═══════════════════════════════════════════════════
   Three horizontal bars, identical thickness, shared left edge,
   lengths 3 / 5 / 2, gaps equal to one bar thickness.
   Rendered as block-level spans — `height` does not apply to inline
   elements, a bug that has shipped three times.                    */
.mark {
  display: inline-flex;
  flex-direction: column;
  gap: var(--mk, 3px);
  width: calc(var(--mk, 3px) * 5);
  vertical-align: middle;
}
.mark i {
  display: block;
  height: var(--mk, 3px);
  background: currentColor;
  transform-origin: left center;
  transition: width var(--d-smooth) var(--spring-smooth);
}
.mark i:nth-child(1) { width: 60%; }
.mark i:nth-child(2) { width: 100%; }
.mark i:nth-child(3) { width: 40%; }

/* Entry: the mark draws itself to 3/5/2 on load. It is the only loader. */
.js .mark--boot i { width: 0; }
.js .mark--boot.is-in i:nth-child(1) { width: 60%;  transition-delay: 60ms; }
.js .mark--boot.is-in i:nth-child(2) { width: 100%; transition-delay: 130ms; }
.js .mark--boot.is-in i:nth-child(3) { width: 40%;  transition-delay: 200ms; }

/* ── nav ──────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6);
  padding: var(--s5) clamp(var(--s5), 4vw, var(--s16));
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: 1px solid var(--ink-06);
  transform: translateY(-100%);
  animation: nav-drop var(--d-snappy) var(--spring-snappy) 0.1s forwards;
}
@keyframes nav-drop { to { transform: translateY(0); } }

.nav__brand {
  display: inline-flex; align-items: center; gap: var(--s3);
  color: var(--signal); text-decoration: none;
  --mk: 3.5px;
}
.nav__brand > span:not(.mark) {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(17px, 1.1vw + 13px, 22px);
  letter-spacing: 0.01em; color: var(--ink);
  transition: color var(--d-fast) var(--ease-snap);
}
.nav__brand:hover > span:not(.mark) { color: var(--signal); }
.nav__brand:hover .mark i:nth-child(1) { width: 100%; }
.nav__brand:hover .mark i:nth-child(3) { width: 100%; }

.nav__links { display: flex; align-items: center; gap: clamp(var(--s4), 2.2vw, var(--s10)); }
.nav__link {
  position: relative;
  font-size: var(--t-label);
  text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600;
  color: var(--ink-70); text-decoration: none;
  padding: var(--s2) 0;
  transition: color var(--d-fast) var(--ease-snap);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  display: block; height: 2px; width: 100%; background: var(--signal);
  transform: scaleX(0); transform-origin: right center;
  transition: transform var(--d-base) var(--ease-snap);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left center; }
.nav__link[aria-current="page"] { color: var(--signal); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta {
  display: inline-block;
  background: var(--signal); color: var(--base);
  font-size: var(--t-label); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  text-decoration: none;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-full);
  transition: background var(--d-fast) var(--ease-snap),
              transform var(--d-snappy) var(--spring-snappy);
}
.nav__cta:hover { background: var(--signal-deep); transform: translateY(-2px); }
.nav__cta:active { transform: translateY(0) scale(0.97); }

@media (max-width: 800px) {
  .nav { padding: var(--s4); }
  .nav__links { gap: var(--s4); }
  .nav__link { font-size: 11.5px; letter-spacing: 0.07em; }
  .nav__cta { display: none; }
}
@media (max-width: 540px) {
  /* the wordmark folds away; the MARK never does — it is the identity */
  .nav__brand > span:not(.mark) { display: none; }
  .nav__brand { --mk: 4.5px; }
}

/* ── the button, used across sections ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s3);
  background: var(--signal); color: var(--base);
  font-weight: 700; font-size: var(--t-sm);
  text-transform: uppercase; letter-spacing: 0.13em;
  text-decoration: none;
  padding: var(--s4) var(--s8);
  border: 0; border-radius: var(--r-full); cursor: pointer;
  transition: background var(--d-fast) var(--ease-snap),
              transform var(--d-snappy) var(--spring-snappy),
              box-shadow var(--d-base) var(--ease-snap);
}
.btn:hover {
  background: var(--signal-deep); transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(255, 212, 0, 0.16);
}
.btn:active { transform: translateY(-1px) scale(0.975); }
.btn i { display: block; transition: transform var(--d-base) var(--spring-snappy); }
.btn:hover i { transform: translateX(4px); }

.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-30);
}
.btn--ghost:hover {
  background: transparent; color: var(--signal);
  box-shadow: inset 0 0 0 1px var(--signal), 0 12px 28px rgba(255, 212, 0, 0.08);
}

/* ── footer ───────────────────────────────────────────────────── */
.ft { position: relative; border-top: 1px solid var(--ink-12); overflow: hidden; }
.ft__grid {
  max-width: 1360px; margin: 0 auto;
  padding: var(--s24) clamp(var(--s5), 4vw, var(--s16)) var(--s16);
  display: grid; gap: var(--s12);
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.ft__say { max-width: 30ch; }
.ft__say .mark { --mk: 6px; color: var(--signal); margin-bottom: var(--s5); }
.ft__say p { color: var(--ink-52); font-size: var(--t-sm); line-height: 1.7; }
.ft__col h3 {
  font-size: var(--t-label); text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-30); font-weight: 600; margin-bottom: var(--s5);
}
.ft__col li + li { margin-top: var(--s3); }
.ft__col a {
  position: relative; color: var(--ink-70); text-decoration: none;
  font-size: var(--t-sm);
  transition: color var(--d-fast) var(--ease-snap);
}
.ft__col a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  display: block; height: 1px; width: 100%; background: var(--signal);
  transform: scaleX(0); transform-origin: right center;
  transition: transform var(--d-base) var(--ease-snap);
}
.ft__col a:hover { color: var(--ink); }
.ft__col a:hover::after { transform: scaleX(1); transform-origin: left center; }

/* the mark at architectural scale, cropped by the bottom edge */
.ft__crop {
  position: relative;
  max-width: 1360px; margin: 0 auto;
  padding: 0 clamp(var(--s5), 4vw, var(--s16));
  height: clamp(50px, 7vw, 104px);
  overflow: hidden;
}
.ft__crop .mark {
  --mk: clamp(18px, 2.8vw, 36px);
  color: var(--ink-12);
  position: absolute; left: clamp(var(--s5), 4vw, var(--s16)); top: 0;
}
.ft__base {
  max-width: 1360px; margin: 0 auto;
  padding: var(--s5) clamp(var(--s5), 4vw, var(--s16)) var(--s10);
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  font-size: var(--t-label); color: var(--ink-30);
  text-transform: uppercase; letter-spacing: 0.14em;
}
@media (max-width: 860px) {
  .ft__grid { grid-template-columns: 1fr 1fr; gap: var(--s10); }
  .ft__say { grid-column: 1 / -1; }
}

/* ── reveals — OPT-IN. Content is visible unless JS says otherwise.
   A failed script must never blank the page.                       */
.js [data-r] { opacity: 0; transform: translateY(22px); }
.js [data-r].is-in { opacity: 1; transform: none; }
.js [data-r] {
  transition: opacity var(--d-smooth) var(--spring-smooth),
              transform var(--d-smooth) var(--spring-smooth);
}
.js [data-r="blur"] { filter: blur(9px); }
.js [data-r="blur"].is-in { filter: blur(0); }
.js [data-r="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); }
.js [data-r="wipe"].is-in { clip-path: inset(0 0 0 0); }
.js [data-r="rule"] { opacity: 1; transform: scaleX(0); transform-origin: center; }
.js [data-r="rule"].is-in { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-r] { opacity: 1; transform: none; filter: none; clip-path: none; }
  .nav { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   PASS 2 — ATMOSPHERE
   awwwards-hero-section Phase 3 calls for atmosphere as a first-class
   layer. v1 shipped flat colour fields. This is that layer.
   ═══════════════════════════════════════════════════════════════════ */

/* Film grain over the entire document. Fixed, so it does not scroll with
   content — it behaves like grain in the emulsion, not like a texture
   glued to the page. */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 9999; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 5.6s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(-2%, -3%); }
  33%  { transform: translate(3%, -1%); }
  50%  { transform: translate(-1%, 2%); }
  66%  { transform: translate(2%, 3%); }
  83%  { transform: translate(-3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════════════════════════════════════════════════════════
   PASS 2 — THE DAY REGISTER
   Any section given `.day` flips the whole tonal system. Every token a
   section reads is re-pointed, so a section does not need to know which
   register it is in — it just uses --base / --ink / --surface.
   ═══════════════════════════════════════════════════════════════════ */
.day {
  --base:      var(--day);
  --surface:   var(--day-2);
  --surface-2: #E1DBD1;
  --ink:       var(--day-ink);
  --ink-70:    var(--day-70);
  --ink-52:    var(--day-52);
  --ink-30:    var(--day-30);
  --ink-12:    var(--day-12);
  --ink-06:    var(--day-06);
  background: var(--day);
  color: var(--day-ink);
  position: relative;
}
/* On paper, signal yellow is 1.27:1 and can never be type. It can only be
   a FILL that dark type sits on. This is the whole accent rule for DAY. */
.day .label--signal { color: var(--day-ink); }
.day .label--signal::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 22px; height: 7px; margin-right: 0.7em;
  background: var(--signal);
}
.day .btn { background: var(--signal); color: var(--day-ink); }
.day .btn:hover { background: var(--signal-deep); box-shadow: 0 12px 28px rgba(20,18,15,0.14); }
.day .btn--ghost { background: transparent; color: var(--day-ink); box-shadow: inset 0 0 0 1px var(--day-30); }
.day .btn--ghost:hover { color: var(--day-ink); box-shadow: inset 0 0 0 2px var(--day-ink); }
.day ::selection { background: var(--day-ink); color: var(--day); }

/* the seam between registers is a deliberate hard edge, never a fade */
.day + :not(.day), :not(.day) + .day { border-top: 0; }

/* ═══════════════════════════════════════════════════════════════════
   PASS 2 — MOTION, to the Coverage Mandate
   Personality: PHYSICAL. Everything below is spring-driven.
   ═══════════════════════════════════════════════════════════════════ */

/* ── masked word reveal — each word rises out of its own box ───── */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.w > i {
  display: inline-block; font-style: inherit;
  transform: translateY(105%);
}
.js .wr.is-in .w > i {
  transform: translateY(0);
  transition: transform 0.82s var(--spring-smooth);
}
.js .wr:not(.is-in) .w > i { transform: translateY(105%); }
/* without JS the words are never wrapped, so nothing can hide */

/* ── line-by-line body reveal ──────────────────────────────────── */
.js [data-r="lines"] > * { opacity: 0; transform: translateY(14px); }
.js [data-r="lines"].is-in > * {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--spring-smooth), transform 0.7s var(--spring-smooth);
}
.js [data-r="lines"].is-in > *:nth-child(2) { transition-delay: 90ms; }
.js [data-r="lines"].is-in > *:nth-child(3) { transition-delay: 180ms; }
.js [data-r="lines"].is-in > *:nth-child(4) { transition-delay: 270ms; }

/* ── clip-path wipe on images ──────────────────────────────────── */
.js [data-r="img"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
.js [data-r="img"].is-in {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--spring-smooth);
}

/* ── parallax: driven by a scroll-set custom property ──────────── */
.px { will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }

/* ── pressure depth: buttons compress and gain an inner shadow ─── */
.btn { position: relative; overflow: hidden; }
.btn:active {
  transform: translateY(-1px) scale(0.972);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.22);
}
.btn .rip {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transform: scale(0); pointer-events: none;
  animation: rip 0.62s var(--spring-smooth) forwards;
}
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }

/* ── 3D tilt, applied by JS to [data-tilt] ─────────────────────── */
[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* ── ambient float for decorative elements ─────────────────────── */
@keyframes float-a { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes float-b { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ── nav condenses on scroll + carries a read-progress rule ────── */
.nav { transition: padding var(--d-smooth) var(--spring-smooth), background var(--d-base) var(--ease-snap); }
.nav.is-stuck { padding-top: var(--s3); padding-bottom: var(--s3); background: rgba(10,10,10,0.9); }
.nav__prog {
  position: absolute; left: 0; bottom: -1px;
  display: block; height: 2px; width: 100%;
  background: var(--signal);
  transform: scaleX(var(--prog, 0)); transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .js .wr .w > i { transform: none !important; }
  .js [data-r="lines"] > *,
  .js [data-r="img"] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .px { transform: none !important; }
}

/* per-page footer lead — closes the one real R-COMPONENTREUSE violation */
.ft__lead {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(19px, 1.9vw, 28px); line-height: 1;
  margin-bottom: var(--s4); color: var(--ink);
}

/* ═══ PASS 4 — footer rebalance ═══════════════════════════════════
   `.ft__crop` is gone: three 12%-opacity bars read as broken rectangles
   rather than as a cropped mark. It was flagged as a glitch twice. */
.ft__grid {
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  padding-bottom: var(--s10);
}
.ft__say .mark { --mk: 5px; }
.ft__base {
  border-top: 1px solid var(--ink-06);
  padding-top: var(--s6);
  align-items: center;
}
.ft__base .mark { --mk: 3px; color: var(--ink-30); }

/* WCAG 2.5.8: 24px minimum target on EVERY pointer. Declared before the
   coarse-pointer block so the 44px rule below wins on touch. */
.ft__col a { display: inline-flex; align-items: center; min-height: 24px; }

/* ═══ TOUCH TARGETS ═══════════════════════════════════════════════
   Nav links, the wordmark and every footer link were 20-30px tall: fine for a
   cursor, under the 44px guideline for a finger. On coarse pointers they gain
   real height without changing the desktop rhythm, using padding so the visual
   position of the text does not move. */
@media (pointer: coarse) {
  .nav__link {
    min-height: 44px;
    display: inline-flex; align-items: center;
    padding-block: 0;
  }
  .nav__link::after { bottom: 8px; }
  .nav__brand { min-height: 44px; display: inline-flex; align-items: center; }
  /* NOT `.nav__cta { display: inline-flex }` — that resurrected the button on
     phones, where the 800px rule hides it, and it overflowed the viewport.
     Only give it height where it is actually shown. */
  @media (min-width: 801px) {
    .nav__cta { min-height: 44px; display: inline-flex; align-items: center; }
  }
  .ft__col a,
  .nf__routes a,
  .routes__go,
  .fork__go {
    min-height: 44px;
    display: inline-flex; align-items: center;
  }
  .ft__col li + li { margin-top: 0; }
  .ft__base { gap: var(--s3); }
  /* the marquee is decorative and paused-on-hover only; no touch affordance needed */
  .mq__row { pointer-events: none; }
}

/* iOS: never zoom the page when a field is focused. 16px is the threshold. */
@media (max-width: 900px) {
  .vfield input, .vfield textarea, .vfield select { font-size: 16px; }
}

/* respect the notch / home indicator on phones */
@supports (padding: max(0px)) {
  .nav { padding-left: max(var(--s4), env(safe-area-inset-left));
         padding-right: max(var(--s4), env(safe-area-inset-right)); }
  .ft__base { padding-bottom: max(var(--s10), env(safe-area-inset-bottom)); }
}

