/* ============================================================================
   CarbonTech Energy Solutions — Website
   "Crude & Culture" canon · Space Grotesk · white-primary ground.
   Compartmentalised: full-viewport panels, one message each, image-led.
   Contrast law: on white → ink/slick text; petri & amber carry text on crude.
   ============================================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Variable.ttf") format("truetype-variations"),
       url("../fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 300 700; font-display: swap; font-style: normal;
}

:root {
  --lab-white: #f7f8f5;
  --crude-black: #101312;
  --slick-deep: #17332c;
  --petri: #4ed18c;
  --petri-dark: #7ed0a8;
  --resin-amber: #d9b25c;
  --amber-deep: #c9973b;
  --ink: #101312;
  --ink-soft: #5a6663;
  --hair: #e2e5df;
  --hair-dark: rgba(247, 248, 245, 0.14);
  --film: linear-gradient(100deg, #35b6a8, #8b7bd8 55%, #c9973b);

  --fs-hero: clamp(2.8rem, 1.4rem + 6.2vw, 7rem);
  --fs-display: clamp(2.1rem, 1.3rem + 3.3vw, 4.4rem);
  --fs-700: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --fs-600: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem);
  --fs-500: clamp(1.08rem, 1rem + 0.4vw, 1.28rem);
  --fs-body: clamp(1.02rem, 0.97rem + 0.28vw, 1.18rem);
  --fs-sm: 0.85rem;
  --fs-xs: 0.72rem;

  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 3rem; --s6: 4rem; --s7: 6rem;
  --wrap: 1240px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scroll-snap-type: y proximity; scroll-padding-top: 0;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; scroll-snap-type: none; } }

body {
  font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 400;
  background: var(--crude-black); color: var(--ink); font-size: var(--fs-body);
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
.skip-link { position: fixed; left: 50%; top: -60px; transform: translateX(-50%); background: var(--crude-black); color: var(--lab-white); padding: 0.6rem 1.1rem; border-radius: 0 0 10px 10px; z-index: 300; transition: top 0.2s; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--petri); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto; }

/* ---- shared type ---------------------------------------------------- */
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--s3); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--amber-deep); }
.eyebrow--onDark { color: var(--petri-dark); }
.eyebrow--onDark::before { background: var(--resin-amber); }
.display { font-size: var(--fs-display); font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; color: var(--slick-deep); }
.display--onDark { color: var(--lab-white); }
.lede { font-size: var(--fs-500); line-height: 1.55; color: var(--ink-soft); max-width: 46ch; margin-top: var(--s4); }
.lede strong { color: var(--slick-deep); font-weight: 600; }
.lede--onDark { color: rgba(247, 248, 245, 0.86); }
.lede--onDark strong { color: #fff; }

/* ---- buttons -------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: var(--fs-sm); padding: 0.9rem 1.6rem; border-radius: 100px; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s; }
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--petri); color: var(--crude-black); }
.btn--solid:hover { background: #5fe09b; }
.btn--line { border-color: rgba(247,248,245,0.5); color: var(--lab-white); }
.btn--line:hover { background: rgba(247,248,245,0.08); border-color: #fff; }
.btn--ghost { border-color: var(--hair); color: var(--ink); }
.btn--lg { padding: 1.1rem 2.1rem; font-size: var(--fs-500); }

/* ---- topbar + nav --------------------------------------------------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; text-align: center; font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247,248,245,0.7); background: var(--crude-black); padding: 0.5rem 1rem; border-bottom: 1px solid var(--hair-dark); transition: transform 0.35s var(--ease); }
.is-scrolled .topbar { transform: translateY(-100%); }
.is-scrolled .nav { top: 0; }
.nav { position: fixed; top: 29px; left: 0; right: 0; z-index: 100; display: flex; align-items: center; gap: var(--s4); padding: 0.25rem clamp(1.2rem, 4vw, 2.6rem); transition: background 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s, top 0.3s; border-bottom: 1px solid transparent; }
.nav--solid { background: rgba(247,248,245,0.85); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--hair); }
/* The master's box is 604 units tall but only 304 of that is ink — the canon
   clear space is baked in (see the endcard note below). So a 32px box drew a
   16px logo. Size the BOX to ~2× the ink height you actually want; a 78px box
   → 39px of visible lockup and 142px of *ink* width (the 162px box width is
   not the measure), clearing the canon's 140px display floor for the depth
   lockup. Never crop the padding to compensate — nav padding is trimmed to
   0.25rem instead, since the master brings its own breathing room. */
.nav__brand { display: block; height: 78px; }
.nav__logo { height: 100%; width: auto; display: block; }
.nav__logo--dark { display: none; }
.nav--solid .nav__logo--light { display: none; }
.nav--solid .nav__logo--dark { display: block; }
.nav__links { margin-left: auto; display: flex; gap: clamp(1rem, 2vw, 2.2rem); }
.nav__links a { font-size: var(--fs-sm); font-weight: 500; color: var(--lab-white); opacity: 0.82; position: relative; padding-block: 4px; transition: opacity 0.2s; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--resin-amber); transition: width 0.28s var(--ease); }
.nav__links a:hover { opacity: 1; } .nav__links a:hover::after { width: 100%; }
.nav--solid .nav__links a { color: var(--slick-deep); opacity: 0.9; }
.nav__cta { margin-left: 0.4rem; }
.nav:not(.nav--solid) .nav__cta { border-color: var(--hair-dark); color: var(--lab-white); }
.nav--solid .nav__cta { color: var(--ink); border-color: var(--hair); }
.nav__menu { display: none; }

/* ---- panels + snap -------------------------------------------------- */
.panel { position: relative; min-height: 100svh; display: flex; align-items: center; scroll-snap-align: start; overflow: hidden; }
.panel > .wrap { position: relative; z-index: 2; width: 100%; }

/* ============================================================================
   HERO — the journey
   ============================================================================ */
.hero { background: var(--crude-black); color: var(--lab-white); isolation: isolate; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.45; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/></svg>"); }
.hero__joy { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; background-size: cover; background-position: center; transition: opacity 1.4s var(--ease); -webkit-mask-image: radial-gradient(circle at 60% 44%, #000 28%, transparent 70%); mask-image: radial-gradient(circle at 60% 44%, #000 28%, transparent 70%); }
.hero__inner { position: relative; z-index: 3; width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto; padding-top: 3rem; }
.hero__inner::before { content: ""; position: absolute; z-index: -1; inset: -3rem -6rem; background: linear-gradient(102deg, rgba(16,19,18,0.8) 0%, rgba(16,19,18,0.5) 44%, rgba(16,19,18,0.1) 68%, transparent 84%); filter: blur(6px); pointer-events: none; }
.hero__kicker { font-size: var(--fs-xs); letter-spacing: 0.34em; text-transform: uppercase; font-weight: 600; color: var(--resin-amber); margin-bottom: var(--s3); }
.hero__line { font-size: var(--fs-hero); font-weight: 500; line-height: 0.98; letter-spacing: -0.035em; min-height: 1.9em; text-wrap: balance; }
.hero__line .g { color: var(--petri); }            /* living spark — the green ring */
.hero__line .au { color: var(--resin-amber); }     /* value / release — the gold the loop delivers */
.hero__line.swapIn { animation: swapIn 0.55s var(--ease); }
@keyframes swapIn { from { opacity: 0.12; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero__dots { display: flex; gap: 8px; margin: var(--s3) 0 var(--s4); }
.hero__dots span { width: 30px; height: 3px; border-radius: 3px; background: rgba(247,248,245,0.2); overflow: hidden; }
.hero__dots span.on { background: var(--petri); }
.hero__lede { font-size: var(--fs-500); max-width: 44ch; color: rgba(247,248,245,0.82); }
.hero__lede strong { color: #fff; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.hero__scroll { position: absolute; z-index: 3; right: clamp(1.2rem, 4vw, 2.6rem); bottom: 1.8rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(247,248,245,0.55); }
.hero__scroll-dot { animation: scrolldot 2s var(--ease) infinite; }
@keyframes scrolldot { 0%,100%{ transform: translateY(0); opacity: 1;} 50%{ transform: translateY(8px); opacity: 0.3;} }

/* ============================================================================
   MEDIA PANEL — full-bleed image + scrim (opportunity, impact)
   ============================================================================ */
.media-panel { color: var(--lab-white); background: var(--crude-black); }
.media-panel::before { content: ""; position: absolute; inset: 0; z-index: 0; background-image: var(--bg); background-size: cover; background-position: center; transform: scale(1.06); animation: kenburns 22s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.05) translate(0,0); } to { transform: scale(1.14) translate(-1.5%, -1.5%); } }
@media (prefers-reduced-motion: reduce) { .media-panel::before { animation: none; transform: scale(1.02); } }
/* solid-ground variant — no photograph, no scrim, one canon token.
   SLICK DEEP is the "process" colour: unmistakably CarbonTech, and lab white
   sits on it at 12.73:1 (AAA). Kill the image layer or kenburns still runs. */
.media-panel--solid { background: var(--slick-deep); }
.media-panel--solid::before { content: none; }
.media-panel__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(16,19,18,0.92) 0%, rgba(16,19,18,0.72) 42%, rgba(16,19,18,0.35) 100%); }
.media-panel__scrim--soft { background: radial-gradient(120% 120% at 50% 60%, rgba(16,19,18,0.55), rgba(16,19,18,0.86)); }
.media-panel__content { position: relative; z-index: 2; padding-block: 8rem 4rem; max-width: 60ch; }
.media-panel__content--center { max-width: 62ch; margin-inline: auto; text-align: center; }
.media-panel__content--center .eyebrow { justify-content: center; }
.media-panel__content--center .lede { margin-inline: auto; }
/* this headline is a full sentence, not a two-word hammer — give it room so it
   sets on two lines instead of four, and pull the display size back a notch */
#impact .media-panel__content { max-width: 78ch; }
#impact .display { font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.06; }
.impact__loopline { margin-top: var(--s5); font-size: var(--fs-sm); letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(247,248,245,0.55); }
.impact__loopline b { font-weight: 500; color: var(--resin-amber); }
.impact__cta { margin-top: var(--s6); }

/* figrow — teaser stats */
.figrow { list-style: none; display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: var(--s6); }
.figrow li { max-width: 15rem; }
.figrow__v { display: block; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--resin-amber); }
.figrow li:nth-child(3n+1) .figrow__v { color: var(--petri-dark); }
.figrow__l { display: block; font-size: var(--fs-sm); color: rgba(247,248,245,0.68); margin-top: 0.7rem; }
/* figrow on light (science) */
.figrow--tri { margin-top: var(--s5); gap: clamp(1.2rem, 3vw, 2.4rem); }
.science .figrow__v { color: var(--slick-deep); }
.science .figrow li:nth-child(3n+1) .figrow__v { color: var(--slick-deep); }
.science .figrow__l { color: var(--ink-soft); }
.science .figrow li { position: relative; padding-top: 1rem; border-top: 2px solid var(--petri); }
.science .figrow li:nth-child(2) { border-top-color: var(--amber-deep); }
.science .figrow li:nth-child(3) { border-top-color: var(--slick-deep); }

/* ============================================================================
   SPLIT — capability panels (image half + content half)
   ============================================================================ */
.split { background: var(--lab-white); display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; overflow: hidden; min-height: 100svh; }
.split__img { position: absolute; inset: 0; background-image: var(--bg); background-size: cover; background-position: center; transform: scale(1.06); animation: kenburns 24s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .split__img { animation: none; transform: scale(1.02); } }
.split__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,19,18,0.12), rgba(16,19,18,0.02)); }
.split__panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 6vw, 6rem); }
.split__panel .lede { max-width: 42ch; }

/* tagline chips */
.tagline { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--s5); }
.tagline li { font-size: var(--fs-sm); font-weight: 500; color: var(--slick-deep); padding: 0.5rem 1rem; border: 1px solid var(--hair); border-radius: 100px; background: #fff; }
.tagline li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--petri); margin-right: 0.55rem; vertical-align: middle; }

/* ============================================================================
   SCIENCE
   ============================================================================ */
.science { background: var(--lab-white); display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.science__media { position: relative; overflow: hidden; min-height: 100svh; order: 2; }
.science__img { position: absolute; inset: 0; background-image: var(--bg); background-size: cover; background-position: center; transform: scale(1.06); animation: kenburns 26s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .science__img { animation: none; } }
.science__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,19,18,0.15), transparent); }
.science__panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(2.5rem, 6vw, 6rem); }
.science__more { display: inline-block; margin-top: var(--s5); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.02em; color: var(--slick-deep); border-bottom: 1.5px solid var(--petri); padding-bottom: 3px; transition: gap 0.2s, color 0.2s; }
.science__more:hover { color: var(--amber-deep); border-bottom-color: var(--amber-deep); }

/* ============================================================================
   CTA + FOOTER
   ============================================================================ */
.cta { background: var(--crude-black); color: var(--lab-white); text-align: center; flex-direction: column; justify-content: center; }
.cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--film); opacity: 0.5; }
.cta__wrap { display: grid; place-items: center; padding-block: 6rem 3rem; }
.cta__mark { width: 74px; height: auto; margin-bottom: var(--s4); }
.cta__title { font-size: var(--fs-hero); font-weight: 500; letter-spacing: -0.035em; line-height: 1.06;
  /* background-clip:text crops the ink box — descenders (g, y) need the room */
  padding-bottom: 0.1em; text-wrap: balance; background: linear-gradient(92deg, #fff, var(--petri-dark) 60%, var(--resin-amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta__sub { font-size: var(--fs-500); color: rgba(247,248,245,0.78); margin: var(--s3) auto var(--s5); max-width: 46ch; }
.cta__names { margin-top: var(--s4); font-size: var(--fs-sm); color: var(--petri-dark); letter-spacing: 0.02em; }
.foot { position: relative; z-index: 2; width: min(100% - 2.6rem, var(--wrap)); margin: 0 auto; padding: var(--s4) 0; border-top: 1px solid var(--hair-dark); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.foot__logo { height: 26px; width: auto; opacity: 0.85; }
.foot__meta { font-size: var(--fs-xs); letter-spacing: 0.04em; color: rgba(247,248,245,0.55); }

/* ============================================================================
   REVEAL
   ============================================================================ */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-hero { opacity: 0; animation: heroIn 0.9s var(--ease) forwards; }
.js .hero__kicker.reveal-hero { animation-delay: 0.15s; }
.js .hero__lede.reveal-hero { animation-delay: 0.5s; }
.js .hero__actions.reveal-hero { animation-delay: 0.65s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .js .reveal-hero { animation: none !important; opacity: 1 !important; }
}

/* ============================================================================
   SCROLL-FILM HERO
   ============================================================================ */
.film { position: relative; height: 700vh; background: var(--crude-black); }
.film__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #05070a; isolation: isolate; }
.film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
/* ambient rides above everything in the stage: gold pollen over the opening
   headline, embers over the endcard veil — sparse enough to sparkle, not veil */
.film__ambient { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
/* vignette + a top scrim so the header keeps its footing over the bright
   gold frames mid-film (the adaptive header handles the rest) */
.film__vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,8,0.55), rgba(5,7,8,0.18) 12%, transparent 22%),
              radial-gradient(130% 120% at 50% 42%, transparent 45%, rgba(5,7,8,0.55) 100%); }
.film__grain { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/></svg>"); }

/* beats — TinyWins oversized type over the film */
.beat { position: absolute; z-index: 5; max-width: min(92vw, 1400px); will-change: opacity, transform; pointer-events: none; }
/* a soft shadow of the type itself, so amber-on-fire still reads */
.beat::before { content: ""; position: absolute; inset: -22% -16%; z-index: -1; filter: blur(26px);
  background: radial-gradient(58% 68% at 50% 52%, rgba(5,7,8,0.62), rgba(5,7,8,0.28) 55%, transparent 76%); }
.beat--l { left: clamp(1.2rem, 5vw, 5rem); top: 30%; text-align: left; }
.beat--r { right: clamp(1.2rem, 5vw, 5rem); top: 34%; text-align: right; }
.beat--c { left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.beat--fin { left: clamp(1.2rem, 5vw, 5rem); top: auto; bottom: 16%; transform: none; text-align: left; }
.beat__k { display: block; font-size: clamp(0.9rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: 0.02em; color: rgba(247,248,245,0.82); margin-bottom: 0.1em; text-shadow: 0 1px 6px rgba(5,7,8,0.8), 0 2px 30px rgba(0,0,0,0.7); }
.beat__h { display: block; font-size: clamp(3rem, 13vw, 12rem); font-weight: 700; line-height: 0.86; letter-spacing: -0.045em; text-transform: uppercase;   color: var(--lab-white);
  /* tight halo + broad falloff — the beats sit over gold fire at full bleed */
  text-shadow: 0 0 14px rgba(5,7,8,0.75), 0 6px 34px rgba(5,7,8,0.6), 0 4px 60px rgba(0,0,0,0.55); }
.beat__h--au { color: var(--resin-amber); }
/* .beat__h already sets font-weight 700; the old h1.beat__h rule went with the
   tag change. Screen-reader-only utility for the semantic H1: */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------------------
   Endcard — driven from film.js via the custom properties below.

   Geometry is measured off the master (02_Masters lockup, reproduced untouched):
   its viewBox carries the canon clear space — 25.3% of the box height above the
   ink, which is Wd, the drop width. That space IS the spacing; anything added on
   top of it double-counts and opens the void this replaces. So: the IMG is what
   gets centred (its ink is centred within it), and "WE ARE" hangs off the img's
   top edge — exactly Wd clear of the ink, and no more.

   The collapsing loop lands on the mark's own Reclaim Loop ring, measured at
   cx 23.19% / cy 50.43% of the lockup box, d 24.09% of its width. The film's
   loop becomes the brand's loop — which is the one thing the mark is for.
   --------------------------------------------------------------------------- */
.film__end { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: var(--endIn, 0);
  --endIn: 0; --collapse: 0; --arrive: 0; --kick: 0;
  --lockW: min(84vw, 940px);
  --lockH: calc(var(--lockW) * 604 / 1287);   /* the master's own box ratio */
  --inkNudge: 0.038;                          /* master pads L 11.1% / R 3.5% — centre the ink, not the box */
  --ringCx: 0.2319; --ringCy: 0.5043; --ringD: 0.2409; }
.film__endveil { position: absolute; inset: 0; background: #05070a; opacity: var(--collapse); }
.film__endglow { position: absolute; inset: 0; opacity: calc(0.4 + 0.85 * var(--arrive));
  background: radial-gradient(40% 48% at 50% 50%, rgba(217,178,92,0.34), rgba(217,178,92,0.07) 46%, transparent 72%); }

.film__endmark { position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: var(--lockW); scale: calc(1.07 - 0.07 * var(--arrive)); }
/* second bloom, anchored on the mark — the loop reads as the light source */
.film__endmark::before { content: ""; position: absolute; z-index: -1; border-radius: 50%; aspect-ratio: 1;
  width: calc(2.1 * var(--ringD) * var(--lockW));
  left: calc(var(--ringCx) * var(--lockW) - var(--inkNudge) * var(--lockW));
  bottom: calc(var(--lockH) - var(--ringCy) * var(--lockH));
  translate: -50% 50%; opacity: var(--arrive);
  background: radial-gradient(circle, rgba(217,178,92,0.34), rgba(217,178,92,0.10) 46%, transparent 70%); }
.film__endmark img { display: block; width: 100%; height: auto; opacity: var(--arrive);
  translate: calc(-100% * var(--inkNudge)) 0; }
/* hangs off the img's top edge — the master's clear space is the gap */
/* "WE ARE" belongs to the lockup (proximity = relationship), so it sits half a
   clear-space module above the ink — inside the master's built-in padding, which
   is empty canvas — and is centred on the ink, not the padded box. Half-Wd is
   Ramzi's call (2026-07-22): the full module read as two unrelated elements. */
.film__endkick { position: absolute; left: 0; right: 0;
  bottom: calc(100% - 0.127 * var(--lockH)); text-align: center;
  /* no ink-nudge here: the img carries it, so the box centre IS the ink centre */
  font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 500; text-transform: uppercase;
  color: var(--resin-amber); opacity: var(--kick);
  text-shadow: 0 0 18px rgba(217,178,92,0.5), 0 0 46px rgba(217,178,92,0.3);
  letter-spacing: calc(0.16em + 0.2em * var(--kick)); padding-left: calc(0.16em + 0.2em * var(--kick)); }

.film__endring { position: absolute; border-radius: 50%; aspect-ratio: 1;
  width: calc(var(--ringD) * var(--lockW));
  left: calc(var(--ringCx) * var(--lockW) - var(--inkNudge) * var(--lockW));
  bottom: calc(var(--lockH) - var(--ringCy) * var(--lockH));
  translate: -50% 50%; scale: calc(1 + 5.6 * (1 - var(--collapse)));
  border: 2px solid rgba(238,206,140,0.92); filter: blur(0.6px);
  box-shadow: 0 0 60px 18px rgba(217,178,92,0.5), inset 0 0 70px 10px rgba(217,178,92,0.26);
  opacity: calc(0.9 * (1 - var(--collapse) * var(--collapse))); }

/* chapter readout + cue + seam + loader */
.film__readout { position: absolute; z-index: 6; left: clamp(1.2rem, 4vw, 2.6rem); bottom: 1.8rem; display: flex; align-items: center; gap: 0.9rem; color: rgba(247,248,245,0.7); }
.film__readout span:first-child { font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.film__barwrap { width: clamp(80px, 16vw, 220px); height: 2px; background: rgba(247,248,245,0.2); overflow: hidden; }
.film__bar { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--resin-amber); }
.film__cue { position: absolute; z-index: 6; right: clamp(1.2rem, 4vw, 2.6rem); bottom: 1.8rem; display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(247,248,245,0.6); }
.film__cueline { width: 42px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.film__cueline::after { content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 100%; background: var(--resin-amber); animation: cueSlide 2.2s var(--ease) infinite; }
@keyframes cueSlide { to { left: 110%; } }
.film__seam { position: absolute; z-index: 4; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 55%, var(--crude-black) 100%); }
.film__loader { position: fixed; inset: 0; z-index: 200; background: #05070a; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22vh; transition: opacity 0.6s var(--ease); }
.film__loader.done { opacity: 0; pointer-events: none; }
.film__loaderbar { width: min(40vw, 260px); height: 2px; background: rgba(247,248,245,0.14); position: relative; overflow: hidden; }
.film__loaderbar::after { content: ""; position: absolute; inset: 0; width: var(--w, 0%); }
#filmLoaderBar { display: block; height: 2px; background: var(--resin-amber); width: 0%; }
.film__loader { flex-direction: column; gap: 1rem; }
.film__loader::before { content: "CARBONTECH"; font-size: var(--fs-xs); letter-spacing: 0.4em; color: rgba(247,248,245,0.5); }

/* nav adaptive over film */
.nav.on-light .nav__logo--light { display: none; }
.nav.on-light .nav__logo--dark { display: block; }
.nav.on-light .nav__links a { color: var(--slick-deep); }
.nav.on-light .nav__cta { color: var(--ink); border-color: var(--hair); }
.nav.on-light .nav__menu span { background: var(--slick-deep); }

@media (prefers-reduced-motion: reduce) { .film { height: 100svh; } .film__cueline::after { animation: none; } }

/* The kinetic marquee that used to bridge film → content was removed
   (2026-07-22, Ramzi: distracting) — the film now hands straight to The
   Opportunity via the seam fade. */


/* bolder, more editorial display type on the panels (TinyWins scale) */
.display { font-weight: 600; letter-spacing: -0.03em; }
.split__panel .display, .science__panel .display { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.8rem); }
.media-panel .display { font-size: clamp(2.4rem, 1.3rem + 4.4vw, 5.6rem); font-weight: 700; }
.figrow__v { font-weight: 600; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: inline-flex; margin-left: auto; }
  .nav__brand { height: 62px; }   /* ~31px of ink — the phone's share of the same rule */
  .split, .science { grid-template-columns: 1fr; }
  .split__media, .science__media { min-height: 42vh; order: 0 !important; }
  .split--rev .split__media { order: 0; }
  .panel.split, .panel.science { min-height: 100svh; }
  .split__panel, .science__panel { padding: clamp(2rem, 7vw, 3rem); padding-block: 3rem; }
  .media-panel__content { padding-block: 7rem 3rem; }
  .figrow { gap: 1.5rem 2.5rem; }
}
@media (max-width: 520px) {
  html { scroll-snap-type: none; }
  .hero__line { min-height: 2.6em; }
  .figrow li { max-width: none; flex: 1 1 100%; }
}

/* mobile menu — full-screen overlay (no backdrop-filter: it would trap the fixed panel) */
.nav__menu { flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__menu span { width: 24px; height: 2px; background: var(--lab-white); transition: background 0.3s; }
.nav--solid .nav__menu span { background: var(--slick-deep); }
@media (max-width: 860px) {
  .nav--open { background: var(--lab-white); backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom-color: transparent; }
  .nav--open .nav__links { display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: auto; margin: 0; z-index: 1; padding: 6rem clamp(1.6rem, 6vw, 3rem) 3rem; background: var(--lab-white); }
  .nav--open .nav__brand, .nav--open .nav__menu { position: relative; z-index: 2; }
  .nav--open .nav__logo--light { display: none; } .nav--open .nav__logo--dark { display: block; }
  .nav--open .nav__menu span { background: var(--slick-deep); }
  .nav--open .nav__links a { color: var(--slick-deep); font-size: var(--fs-700); font-weight: 500; padding: 0.75rem 0; border-bottom: 1px solid var(--hair); opacity: 1; }
  .nav--open .nav__links a::after { display: none; }
}
