/* ==========================================================================
   Resillio — one film, one scroll
   A single fixed film sits behind the page; its playhead follows the scroll
   and a veil breathes lighter or darker per chapter. Every section is
   transparent over it. Palette sampled from the Resillio logo.
   ========================================================================== */

:root {
  --ink: #04141c;
  --ink-2: #071c26;
  --abyss: #020c11;

  --cyan: #30ccf0;
  --sky: #24b4e4;
  --blue: #0c78b4;
  --teal: #005478;
  --steel: #9c9c9c;

  --text: #f3f7f8;
  --muted: rgba(243, 247, 248, 0.76);
  --faint: rgba(243, 247, 248, 0.54);
  --line: rgba(243, 247, 248, 0.16);

  --f-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* type scale — restrained, one step apart */
  --fs-hero: clamp(2.5rem, 4.9vw, 5.1rem);
  --fs-display: clamp(2.2rem, 4vw, 4.1rem);
  --fs-h2: clamp(1.9rem, 3vw, 3rem);
  --fs-h3: clamp(1.45rem, 2vw, 2rem);
  --fs-lead: clamp(1.06rem, 1.25vw, 1.22rem);

  --sec: clamp(64px, 8vw, 116px);
  --pad: clamp(20px, 4.4vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 72px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
/* width/height attributes only reserve the aspect ratio; never let them fix the rendered height */
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; color: var(--cyan); }
::selection { background: var(--cyan); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 300;
  padding: 10px 16px; background: var(--cyan); color: var(--ink); font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- the film ---------- */
.film { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); pointer-events: none; }
.film__video { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 45%; }
.film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform-origin: 50% 45%; }
.film__veil { position: absolute; inset: 0; background: var(--ink); opacity: .55; will-change: opacity; }
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .footer { position: relative; z-index: 1; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: clamp(16px, 2vw, 26px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.hero__eyebrow::before { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(48,204,240,.18); }

.h-xxl, .h-xl, .h-lg { font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
.h-xxl { font-size: var(--fs-display); line-height: 1; }
.h-xl  { font-size: var(--fs-h2); }
.h-lg  { font-size: var(--fs-h3); line-height: 1.1; }

.lead { font-size: var(--fs-lead); line-height: 1.5; letter-spacing: -0.01em; }
.mini { margin-bottom: 18px; font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: inline-block; will-change: transform; }

/* ---------- buttons & links ---------- */
.btn {
  --bg: transparent; --fg: var(--text); --bd: transparent;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 15px 26px; border-radius: 999px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg);
  font-size: 15px; font-weight: 500; line-height: 1; cursor: pointer;
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
  will-change: transform;
}
.btn i { font-style: normal; display: inline-block; transition: transform .5s var(--ease); }
.btn:hover i { transform: translateX(5px); }
.btn--primary { --bg: var(--cyan); --fg: var(--ink); }
.btn--primary:hover { --bg: #fff; }
.btn--ghost { --bd: rgba(243,247,248,.36); }
.btn--ghost:hover { --bg: rgba(243,247,248,.1); --bd: rgba(243,247,248,.7); }
.btn--nav { padding: 10px 18px; font-size: 14px; --bg: rgba(243,247,248,.1); --bd: rgba(243,247,248,.22); }
.btn--nav:hover { --bg: var(--cyan); --fg: var(--ink); --bd: var(--cyan); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px;
  font-weight: 500; font-size: 15px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.link-arrow i { font-style: normal; transition: transform .5s var(--ease); }
a:hover > .link-arrow, a.link-arrow:hover { background-size: 100% 1px; }
a.link-arrow:hover i { transform: translateX(4px); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--ink);
  transition: opacity .7s var(--ease), visibility .7s;
  animation: loader-out .6s var(--ease) 1.8s forwards; /* lifts even if site.js never runs */
}
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
html:not(.is-loading) .loader, html.no-js .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.loader__bar { width: 120px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; background: var(--cyan); transform-origin: left; animation: load 1.2s var(--ease-io) infinite; }
@keyframes load { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1) translateX(101%); } }

/* ---------- nav ---------- */
/* Full-width bar at the top of the page; once the reader scrolls it gathers into a
   centred floating pill (margin-inline:auto + max-width, so GSAP's intro transform is untouched). */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  margin-inline: auto; max-width: 100%;
  height: var(--nav-h); padding: 0 var(--pad);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  border: 1px solid transparent; border-radius: 0;
  transition: max-width .8s var(--ease), top .8s var(--ease), height .8s var(--ease), padding .8s var(--ease),
    border-radius .8s var(--ease), background-color .5s var(--ease), border-color .5s;
}
.nav.is-scrolled {
  top: 14px; max-width: 820px; height: 60px; padding: 0 8px;
  border-radius: 999px; border-color: var(--line);
  background: rgba(4, 20, 28, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.6);
}
.nav.is-scrolled .nav__links { gap: 28px; }
.nav.is-scrolled .nav__brand { padding-left: 12px; }
.nav.is-scrolled .nav__brand img { width: auto; height: 30px; }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; justify-self: start; }
.nav__brand img { width: auto; height: 34px; }
.nav__links { display: flex; gap: clamp(20px, 2.6vw, 40px); font-size: 14px; }
.nav__links a { position: relative; padding: 6px 0; opacity: .78; transition: opacity .3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { opacity: 1; }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav .btn--nav { justify-self: end; }
.nav__menu { display: none; justify-self: end; align-items: center; gap: 12px; background: none; border: 0; padding: 10px 0; cursor: pointer; font-size: 14px; }
.nav__menu-lines { display: grid; gap: 6px; width: 26px; }
.nav__menu-lines i { display: block; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.nav__menu[aria-expanded="true"] .nav__menu-lines i:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__menu-lines i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90;
  padding: calc(var(--nav-h) + 24px) var(--pad) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ink);
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease-io);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__list li { border-bottom: 1px solid var(--line); overflow: hidden; }
.menu__list a {
  display: flex; align-items: baseline; gap: 16px; padding: 14px 0;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05;
  transform: translateY(100%); transition: transform .8s var(--ease);
}
.menu.is-open .menu__list a { transform: none; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: .05s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: .1s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: .15s; }
.menu.is-open .menu__list li:nth-child(5) a { transition-delay: .2s; }
.menu__list small { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--cyan); }
.menu__foot { display: grid; gap: 8px; color: var(--muted); font-size: 15px; }

@media (max-width: 960px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav.is-scrolled { top: 10px; max-width: calc(100% - 24px); height: 56px; padding: 0 20px 0 14px; }
  .nav.is-scrolled .nav__brand { padding-left: 0; }
  .nav__links, .nav .btn--nav { display: none; }
  .nav__menu { display: inline-flex; }
}

/* ==========================================================================
   Chapters — all transparent over the film
   ========================================================================== */

/* 01 hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate;
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(4,20,28,.55) 0%, rgba(4,20,28,0) 24%),
    linear-gradient(0deg, rgba(4,20,28,.9) 0%, rgba(4,20,28,.35) 36%, rgba(4,20,28,0) 62%),
    linear-gradient(90deg, rgba(4,20,28,.5) 0%, rgba(4,20,28,0) 55%);
}
.hero__inner {
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding: calc(var(--nav-h) + 40px) var(--pad) clamp(88px, 12vh, 128px);
}
.hero__title { font-size: var(--fs-hero); font-weight: 500; line-height: 1; letter-spacing: -0.035em; margin-bottom: clamp(22px, 3vw, 36px); max-width: 16ch; }
.hero__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hero__lede { max-width: 46ch; font-size: var(--fs-lead); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--max); margin-inline: auto;
  padding: 0 var(--pad) 26px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue i { position: relative; width: 1px; height: 34px; background: var(--line); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--cyan); animation: cue 2.2s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* 02 principle */
.principle { padding: var(--sec) 0 calc(var(--sec) * .6); }
.principle__text { font-size: clamp(2rem, 3.8vw, 3.8rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.06; max-width: 20ch; }
.principle__text .w { display: inline-block; }
.principle__foot {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  margin-top: clamp(36px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--line);
}
.principle__sub { grid-column: 1 / span 6; font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -.02em; line-height: 1.15; }
.principle__note { grid-column: 8 / span 5; color: var(--muted); max-width: 42ch; }

/* 03 about */
.about { padding-bottom: calc(var(--sec) * .7); }
.about__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: clamp(36px, 5vw, 64px); padding-top: calc(var(--sec) * .5); }
.about__head { grid-column: 1 / span 9; }
.about__head .h-xl { max-width: 22ch; }
.about__figure { grid-column: 1 / span 5; align-self: start; }
/* landscape crop on the building and its reflection, not the empty dusk sky */
.about__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 78%; background: var(--ink-2); }
.about__figure figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; color: var(--faint); }
.about__body { grid-column: 7 / span 6; display: grid; gap: 22px; align-content: start; }
.about__body > p:not(.lead) { color: var(--muted); max-width: 54ch; }
.index-list { border-top: 1px solid var(--line); margin-top: 4px; }
.index-list li { display: grid; grid-template-columns: 44px 1fr; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.index-list span { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); padding-top: 4px; }

.creds { margin-top: calc(var(--sec) * .8); border-block: 1px solid var(--line); }
.creds__list { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding-block: 20px; }
.creds__list li { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.creds__list li::before { content: ""; width: 5px; height: 5px; background: var(--cyan); transform: rotate(45deg); }

/* 04 proof */
.proof__pin { position: relative; padding: var(--sec) 0; }
.proof__title { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; max-width: 24ch; }
.proof__stage { max-width: var(--max); margin: clamp(36px, 5vw, 64px) auto 0; padding-inline: var(--pad); display: grid; gap: clamp(44px, 6vw, 80px); }
.stat { display: grid; gap: 4px; }
.stat__pre { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.8rem); color: var(--muted); }
.stat__num {
  display: flex; align-items: flex-start;
  font-size: clamp(4.5rem, 9vw, 8.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: .85;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 35%, rgba(243,247,248,.6));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__num sup { font-size: .34em; line-height: 1; margin: .1em 0 0 .06em; color: var(--cyan); -webkit-text-fill-color: var(--cyan); }
.stat__label { max-width: 420px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.proof__progress { display: none; }
.proof__progress i { display: block; height: 100%; background: var(--cyan); transform-origin: left; transform: scaleX(0); }

.proof.pinned .proof__pin { height: 100vh; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.proof.pinned .proof__head { position: absolute; top: calc(var(--nav-h) + 32px); left: 0; right: 0; max-width: var(--max); }
.proof.pinned .proof__stage { position: relative; margin: 0 auto; width: 100%; height: 50vh; display: block; }
.proof.pinned .stat { position: absolute; left: var(--pad); right: var(--pad); bottom: 0; opacity: 0; }
.proof.pinned .stat:nth-child(even) { text-align: right; justify-items: end; }
.proof.pinned .stat:nth-child(even) .stat__num { justify-content: flex-end; }
.proof.pinned .proof__progress { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 32px; height: 1px; background: var(--line); }

/* 05 divisions */
.divisions { padding-top: calc(var(--sec) * .6); }
.divisions__head { margin-bottom: clamp(32px, 4vw, 56px); }
.divisions__head .h-xl { max-width: 24ch; }
.divisions__split { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; will-change: clip-path; }
.division { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.division__media { position: absolute; inset: 0; z-index: -1; }
.division__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease); }
.division__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,20,28,.94) 8%, rgba(4,20,28,.35) 55%, rgba(4,20,28,.15)); }
.division:hover .division__media img { transform: scale(1); }
.division__text { padding: clamp(24px, 3.4vw, 52px); max-width: 580px; display: grid; gap: 14px; }
.division__num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.division h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.division p { color: var(--muted); max-width: 46ch; }

/* 06 capabilities */
.caps { padding-top: var(--sec); }
.caps__intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
.caps__intro .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.caps__intro .h-xl { grid-column: 1 / span 7; max-width: 20ch; }
.caps__lede { grid-column: 8 / span 5; align-self: end; color: var(--muted); }

.caps__pin { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) calc(var(--sec) * .6); position: relative; }
.caps__visuals, .caps__rail { display: none; }
.caps__list { display: grid; gap: clamp(56px, 7vw, 96px); }
.cap { display: grid; gap: 14px; }
.cap__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 8px; background: var(--ink-2); }
.cap__num { font-family: var(--f-serif); font-style: italic; font-size: 1.4rem; color: var(--cyan); }
.cap h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; max-width: 22ch; }
.cap > p { font-size: var(--fs-lead); color: var(--muted); max-width: 48ch; line-height: 1.5; }
.cap ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; margin-top: 8px; border-top: 1px solid var(--line); }
.cap li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

.caps.pinned .caps__pin {
  height: 100vh; padding-top: calc(var(--nav-h) + 16px); padding-bottom: 32px;
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 5vw, 96px); align-items: center;
}
.caps.pinned .caps__visuals { display: block; position: relative; height: min(72vh, 720px); overflow: hidden; background: var(--ink); }
.caps.pinned .caps__visuals img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(100% 0 0 0); transform: scale(1.16);
  transition: clip-path 1.2s var(--ease-io), transform 1.8s var(--ease);
}
.caps.pinned .caps__visuals img.is-active { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 1; }
.caps.pinned .caps__visuals img.is-prev { clip-path: inset(0 0 0 0); transform: scale(1.04); z-index: 0; }
.caps__counter { position: absolute; z-index: 3; left: 18px; bottom: 16px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; }
.caps__counter b { font-weight: 500; }
.caps.pinned .caps__list { position: relative; height: min(72vh, 720px); display: block; }
.caps.pinned .cap { position: absolute; inset: 0; align-content: center; opacity: 0; visibility: hidden; transform: translateY(36px); transition: opacity .7s var(--ease), transform 1s var(--ease), visibility .7s; }
.caps.pinned .cap.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .12s; }
.caps.pinned .cap.is-prev { transform: translateY(-36px); }
.caps.pinned .cap__img { display: none; }
.caps.pinned .caps__rail { display: block; position: absolute; right: var(--pad); top: calc(var(--nav-h) + 16px); bottom: 32px; width: 1px; background: var(--line); }
.caps__rail i { display: block; width: 100%; height: 100%; background: var(--cyan); transform-origin: top; transform: scaleY(0); }

/* 07 interlude — the film, unveiled */
.interlude__frame { min-height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.interlude__text { padding: 0 var(--pad); font-size: clamp(1.5rem, 2.8vw, 2.8rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.12; text-shadow: 0 2px 24px rgba(4,20,28,.6); }
.interlude__text > * { display: block; }

/* 08 solutions */
.sols { position: relative; }
.sols__pin { position: relative; overflow: hidden; }
.sols__track { display: grid; gap: clamp(56px, 7vw, 96px); padding: var(--sec) var(--pad); max-width: var(--max); margin: 0 auto; }
.sol--intro { max-width: 720px; }
.sols__lede { color: var(--muted); font-size: var(--fs-lead); max-width: 46ch; margin-top: 22px; }
.sols__hint { display: none; }
.sol:not(.sol--intro) { display: grid; gap: 24px; }
.sol__media { overflow: hidden; background: var(--ink); }
.sol__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.sol__text { display: grid; gap: 14px; align-content: start; }
.sol__num { font-family: var(--f-serif); font-style: italic; font-size: clamp(2.4rem, 3.6vw, 3.6rem); line-height: .9; color: var(--cyan); }
.sol h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; max-width: 20ch; }
.sol__text > p { color: var(--muted); max-width: 48ch; }
.sol ul { border-top: 1px solid var(--line); margin-top: 4px; }
.sol li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sols__progress { display: none; }
.sols__progress i { display: block; height: 100%; background: var(--cyan); transform-origin: left; transform: scaleX(0); }

.sols.pinned .sols__pin { height: 100vh; }
.sols.pinned .sols__track { display: flex; gap: 0; height: 100%; width: max-content; max-width: none; padding: 0; margin: 0; will-change: transform; }
.sols.pinned .sol { flex: 0 0 auto; height: 100%; }
.sols.pinned .sol--intro {
  width: min(56vw, 820px); padding: calc(var(--nav-h) + 32px) var(--pad) 72px;
  display: flex; flex-direction: column; justify-content: center; max-width: none;
}
.sols.pinned .sols__hint { display: inline-flex; gap: 10px; margin-top: 40px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sols.pinned .sols__hint i { font-style: normal; color: var(--cyan); }
.sols.pinned .sol:not(.sol--intro) {
  width: min(84vw, 1180px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 64px);
  align-items: center; padding: calc(var(--nav-h) + 20px) clamp(24px, 3.4vw, 60px) 60px;
  border-left: 1px solid var(--line);
}
.sols.pinned .sol__media { height: min(68vh, 700px); }
.sols.pinned .sol__media img { height: 100%; aspect-ratio: auto; transform: scale(1.14); will-change: transform; }
.sols.pinned .sols__progress { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 26px; height: 1px; background: var(--line); }

/* 09 government */
.gov { padding: var(--sec) 0 calc(var(--sec) * .7); }
.gov__top .h-xxl { max-width: 18ch; }
.gov__figure { margin: clamp(32px, 4vw, 56px) 0; height: min(60vh, 620px); overflow: hidden; background: var(--ink); }
.gov__figure img { width: 100%; height: 124%; object-fit: cover; margin-top: -12%; will-change: transform; }
.gov__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.gov__lead { grid-column: 1 / span 5; }
.gov__list { grid-column: 7 / span 6; border-top: 1px solid var(--line); }
.gov__list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.gov__list dt { font-weight: 600; letter-spacing: -.01em; }
.gov__list dd { color: var(--muted); font-size: 15.5px; }
.gov__badges { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: clamp(40px, 5vw, 64px); }
.gov__badges li { padding: 20px 20px 20px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.gov__badges li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.gov__badges b { font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; color: var(--cyan); }
.gov__badges span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.gov__cta { margin-top: clamp(32px, 4vw, 48px); }

/* 10 stack */
.stack { padding: calc(var(--sec) * .6) 0 calc(var(--sec) * .7); border-top: 1px solid var(--line); }
.stack__title { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; max-width: 34ch; }
.marquee {
  margin: clamp(32px, 4vw, 56px) 0; display: grid; gap: 6px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__row { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee__row--rev { animation-direction: reverse; animation-duration: 70s; }
.marquee__row span { padding-right: .6em; white-space: nowrap; font-size: clamp(1.8rem, 3.6vw, 3.6rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.marquee__row span::after { content: "/"; padding-left: .6em; font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--cyan); }
.marquee__row--rev span { color: transparent; -webkit-text-stroke: 1px var(--text); }
.marquee:hover .marquee__row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.stack__lists { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.stack__lists ul { display: flex; flex-wrap: wrap; gap: 8px 0; }
.stack__lists li { font-size: 14.5px; color: var(--muted); }
.stack__lists li:not(:last-child)::after { content: "·"; padding: 0 12px; color: var(--steel); }

/* 11 work */
.work { position: relative; }
.work__pin { position: relative; overflow: hidden; isolation: isolate; }
.work__pin::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,20,28,.9) 0%, rgba(4,20,28,.62) 48%, rgba(4,20,28,.3) 100%); }
.work__inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding-top: var(--sec); padding-bottom: calc(var(--sec) * .8); }
.work__head { grid-column: 1 / span 6; }
.work__head .h-xl { max-width: 16ch; }
.work__sub { margin-top: 18px; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.25rem, 1.8vw, 1.7rem); color: var(--muted); }
.steps { grid-column: 8 / span 5; display: grid; border-top: 1px solid var(--line); align-self: end; }
.step { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.step__num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--cyan); }
.step h3 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.step p { color: var(--muted); max-width: 44ch; }
.work__rail { display: none; }
.work__rail i { display: block; height: 100%; background: var(--cyan); transform-origin: left; transform: scaleX(0); }

.work.pinned .work__pin { height: 100vh; }
.work.pinned .work__inner { height: 100%; align-items: center; padding-top: var(--nav-h); padding-bottom: 0; }
.work.pinned .steps { position: relative; height: 40vh; border-top: 0; align-self: center; }
.work.pinned .step { position: absolute; inset: 0; align-content: center; border-bottom: 0; opacity: 0; visibility: hidden; transform: translateY(36px); transition: opacity .7s var(--ease), transform 1s var(--ease), visibility .7s; }
.work.pinned .step.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: .1s; }
.work.pinned .step.is-prev { transform: translateY(-36px); }
.work.pinned .step__num { font-family: var(--f-serif); font-style: italic; font-size: clamp(3rem, 5vw, 4.8rem); letter-spacing: -.03em; line-height: .9; }
.work.pinned .work__rail { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 32px; height: 1px; background: var(--line); }

.why { padding: var(--sec) 0; }
.why__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.why__head { grid-column: 1 / span 5; }
.why__list { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.why__list > div { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.why__list dt { display: grid; gap: 12px; margin-bottom: 8px; font-size: 1.15rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.why__list dt span { font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--cyan); letter-spacing: .12em; }
.why__list dd { color: var(--muted); font-size: 15.5px; }
.quote { margin-top: calc(var(--sec) * .9); }
.quote blockquote p { max-width: 34ch; font-family: var(--f-serif); font-size: clamp(1.5rem, 2.6vw, 2.6rem); line-height: 1.16; text-wrap: balance; }
.quote figcaption { margin-top: 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* 12 finale + contact */
.finale { position: relative; min-height: 88vh; display: flex; align-items: flex-end; isolation: isolate; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(4,20,28,.92) 0%, rgba(4,20,28,.3) 50%, rgba(4,20,28,0) 100%); }
.finale__inner { padding-top: calc(var(--nav-h) + 48px); padding-bottom: calc(var(--sec) * .8); }
.finale__title { font-size: var(--fs-hero); font-weight: 500; letter-spacing: -.035em; line-height: 1; margin-bottom: clamp(20px, 2.6vw, 32px); }
.finale__lede { max-width: 50ch; color: var(--muted); font-size: var(--fs-lead); margin-bottom: 30px; }
.finale__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.contact { padding: calc(var(--sec) * .8) 0; }
.contact__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.contact__info { grid-column: 1 / span 5; display: grid; gap: 20px; align-content: start; }
.contact__info > p { color: var(--muted); max-width: 46ch; }
.contact__dl { border-top: 1px solid var(--line); margin-top: 8px; }
.contact__dl > div { display: grid; grid-template-columns: 130px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact__dl dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }
.contact__dl a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.contact__dl a:hover { background-size: 100% 1px; }

.form { grid-column: 7 / span 6; display: grid; gap: 20px; }
.form__title { font-size: clamp(1.3rem, 1.7vw, 1.6rem); font-weight: 500; letter-spacing: -.02em; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0 12px; border: 0; border-bottom: 1px solid rgba(243,247,248,.32); border-radius: 0;
  background: transparent; color: var(--text); font-size: 16px; transition: border-color .4s var(--ease);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option, .field select optgroup { color: #06141c; background: #fff; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: rgba(243,247,248,.6); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cyan); box-shadow: 0 1px 0 0 var(--cyan); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-bottom-color: #ff8a7a; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 6px; }
.form__note { font-size: 14px; color: var(--faint); max-width: 38ch; }
.form__note.is-error { color: #ffb0a4; }

.next { margin-top: calc(var(--sec) * .8); }
.next__list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.next__list li { padding: 22px 22px 0 0; display: grid; gap: 8px; align-content: start; color: var(--muted); font-size: 15px; }
.next__list li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.next__list span { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); letter-spacing: .12em; }
.next__list b { color: var(--text); font-weight: 500; font-size: 1.08rem; letter-spacing: -.01em; }

/* footer */
.footer { padding-top: calc(var(--sec) * .8); background: linear-gradient(180deg, rgba(2,12,17,.4), rgba(2,12,17,.85) 30%); }
.footer__grid { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr); gap: 36px; padding-bottom: 48px; }
.footer__brand p { margin-top: 18px; max-width: 34ch; color: var(--faint); font-size: 14.5px; }
.footer__col { display: grid; gap: 10px; align-content: start; font-size: 14.5px; }
.footer__col a, .footer__col span { width: fit-content; color: var(--muted); }
.footer__col a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.footer__col a:hover { color: var(--text); background-size: 100% 1px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--faint); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .gov__badges { grid-template-columns: repeat(3, 1fr); }
  .gov__badges li:nth-child(4) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .principle__foot, .about__grid, .caps__intro, .gov__grid, .work__inner, .why__grid, .contact__grid { grid-template-columns: 1fr; }
  .principle__sub, .principle__note, .about__head, .about__figure, .about__body, .caps__intro .h-xl, .caps__lede,
  .gov__lead, .gov__list, .work__head, .steps, .why__head, .why__list, .contact__info, .form { grid-column: 1 / -1; }
  .about__figure { max-width: 520px; }
  .divisions__split { grid-template-columns: 1fr; }
  .division { min-height: 70vh; min-height: 70svh; }
  .stack__lists { grid-template-columns: 1fr; gap: 28px; }
  .next__list { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .next__list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .gov__figure { height: 50vh; }
  .steps { margin-top: 28px; }
  .why__list { margin-top: 24px; }
  .interlude__frame { min-height: 70vh; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; --sec: 60px; }
  .hero__inner { padding-bottom: 96px; }
  .hero__title { font-size: clamp(2.2rem, 10vw, 3rem); }
  .finale__title { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero__caption { display: none; }
  .principle__text { font-size: clamp(1.9rem, 8.4vw, 2.5rem); }
  .cap ul, .form__row, .why__list { grid-template-columns: 1fr; }
  .gov__list > div { grid-template-columns: 1fr; gap: 6px; }
  .gov__badges { grid-template-columns: 1fr 1fr; }
  .gov__badges li, .gov__badges li + li { padding: 18px 14px 18px 0; border-left: 0; }
  .gov__badges li:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .creds__list { justify-content: flex-start; }
  .stat__num { font-size: clamp(4.2rem, 24vw, 6.5rem); }
  .next__list { grid-template-columns: 1fr; }
  .next__list li, .next__list li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .contact__dl > div { grid-template-columns: 1fr; gap: 4px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; }
  .finale__actions .btn { flex: 1 1 100%; justify-content: center; }
  .marquee__row span { font-size: clamp(1.7rem, 8vw, 2.4rem); }
}

/* ==========================================================================
   Reduced motion — no pinning (JS skips it), no loops, no scrubbing
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__row { animation: none !important; flex-wrap: wrap; width: auto; }
  .marquee__row span:nth-child(n+7) { display: none; }
  .division__media img { transform: none; }
  .scroll-cue i::after { display: none; }
}
