/* ═══════════════════════════════════════════════════════════════════
   UniQube — landing page
   Author: Sioux 
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────── RESET ─────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.5; }
img, picture, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ─────────── DESIGN TOKENS ─────────── */
:root {
  /* colour */
  --green: #009b4a;
  --green-dim: #007a3a;
  --ink: #000000;
  --ink-2: #2d2d2d;
  --ink-3: #4a4a4a;
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --surface-3: #e7e7e7;
  --line-dark: rgba(255,255,255,0.12);
  --line-light: rgba(0,0,0,0.12);
  --border-on-light: rgba(0,0,0,0.18);
  --desc-on-light: rgba(0,0,0,0.8);
  --muted-on-dark: rgba(255,255,255,0.72);
  --muted-on-green: rgba(255,255,255,0.82);
  --muted-on-light: rgba(0,0,0,0.6);

  /* fluid scale — reference 1440, cap 1920
     100vw / 1440 = ~0.0694. We build clamp(min, Xvw, max)
     Pattern: --fs-N = clamp(min, (N / 1440 * 100)vw, N * (1920/1440))
     AA floor: 16px body. Caps at 1920px viewport. */
  --screen-min: 360;
  --screen-max: 1920;
  --screen-ref: 1440;

  /* type scale */
  --fs-hero:       clamp(32px, 3.5vw, 68px);     /* 50 @ 1440 */
  --fs-display:    clamp(26px, 3.13vw, 60px);    /* 45 @ 1440 */
  --fs-stat-num:   clamp(54px, 6.26vw, 120px);   /* 90 @ 1440 */
  --fs-h2:         clamp(24px, 2.22vw, 44px);    /* 32 @ 1440 */
  --fs-accord:     clamp(18px, 1.74vw, 34px);    /* 25 @ 1440 */
  --fs-card-title: clamp(20px, 2.14vw, 38px);    /* 30.87 @ 1440 */
  --fs-body-lg:    clamp(16px, 1.39vw, 24px);    /* 20 @ 1440 */
  --fs-body:       clamp(16px, 1.25vw, 20px);    /* 18 @ 1440 */
  --fs-small:      clamp(13px, 1.11vw, 18px);    /* 16 @ 1440 (non-content tiny) */
  --fs-eyebrow:    clamp(14px, 1.11vw, 20px);    /* 16 @ 1440 (acceptable: tag text) */

  /* spacing */
  --pad-x:         clamp(20px, 3.33vw, 72px);    /* 48 @ 1440 */
  --pad-y:         clamp(80px, 9.72vw, 200px);   /* 140 @ 1440 */
  --gap-col:       clamp(24px, 2.78vw, 60px);    /* 40 @ 1440 */
  --gap-stack:     clamp(14px, 1.25vw, 24px);    /* 18 @ 1440 */

  /* radius & timing */
  --r-sm: 4px; --r-md: 8px; --r-lg: 18px; --r-xl: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.4, 0, .22, 1);
  --dur-1: .32s; --dur-2: .55s; --dur-3: .9s;

  /* nav */
  --nav-h: clamp(64px, 5vw, 84px);

  /* max content width — fully fluid, no cap */
  --max-w: none;
}

/* ─────────── BASE ─────────── */
html, body { background: var(--bg); color: var(--surface); }
body {
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* When Lenis is running */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* Skip link */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  background: var(--green); color: #fff;
  padding: 10px 14px; border-radius: 4px;
  transform: translateY(-140%); transition: transform .2s;
  font-size: var(--fs-small); font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }

/* ─────────── UTILITIES ─────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-eyebrow);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 400;
  position: relative;
  padding-left: calc(9px + 0.65em); /* space for the absolute indicator */
}

/* Parallelogram indicator — absolutely positioned so it can expand freely */
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;           /* hidden before animation fires */
  height: 0.8em;
  background: var(--green);
  clip-path: polygon(3px 0%, 100% 0%, calc(100% - 3px) 100%, 0% 100%);
  z-index: 1;
  pointer-events: none;
}

/* Indicator expands to cover all the text, left edge follows revealing text, then recomposes */
.eyebrow.is-in::before {
  animation: indicator-wipe 1.8s cubic-bezier(.25, 1, .35, 1) forwards;
}

@keyframes indicator-wipe {
  /* Phase 1 — right edge sweeps rightward, covering the text */
  0%   { left: 0;                  width: 0px; }
  30%  { left: 0;                  width: calc(100% + 20px); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  /* Phase 2 — left edge follows right edge (right stays fixed), revealing text left→right */
  58%  { left: calc(100% + 20px);  width: 0px; }
  /* Phase 3 — snap back origin (invisible), then recompose indicator */
  59%  { left: 0;                  width: 0px; animation-timing-function: cubic-bezier(.25, 1, .35, 1); }
  88%  { left: 0;                  width: 9px; }
  100% { left: 0;                  width: 9px; }
}

/* Light variant (on dark bg) — white indicator, same wipe as regular eyebrows */
.eyebrow--light { color: #ffffff; }
.eyebrow--light::before { background: #ffffff; }
.eyebrow--light.is-in::before { animation: indicator-wipe 1.8s cubic-bezier(.25, 1, .35, 1) forwards; }

/* Override fade-up on eyebrows — they use the wipe instead */
.eyebrow[data-reveal="fade-up"]       { opacity: 1; transform: none; }
.eyebrow[data-reveal="fade-up"].is-in { opacity: 1; transform: none; transition: none; }

/* ─────────── SITE HEADER ─────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: flex-start;
  padding: 26px;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.site-header__back {
  display: flex; align-items: flex-start;
  color: #fff; text-decoration: none;
  transition: color .3s var(--ease);
}
.site-header.on-light .site-header__back { color: var(--ink); }

/* Pill wrapper — collapses to circle on scroll */
.site-header__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition:
    padding   .4s var(--ease),
    gap       .4s var(--ease),
    background .3s var(--ease),
    border-color .3s var(--ease);
}
.site-header.on-light .site-header__pill {
  background: rgba(0,0,0,0.07);
  border-color: rgba(0,0,0,0.18);
}

.site-header__arrow { flex-shrink: 0; }

.site-header__back-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 400; line-height: 1.2;
  letter-spacing: -0.3px; white-space: nowrap;
  max-width: 220px; opacity: 1;
  overflow: hidden;
  transition:
    max-width .4s var(--ease),
    opacity   .25s var(--ease);
}

/* Collapsed state — circle */
.site-header.is-scrolled .site-header__pill {
  padding: 9px;
  gap: 0;
}
.site-header.is-scrolled .site-header__back-text {
  max-width: 0;
  opacity: 0;
}

/* Re-expand text on hover while collapsed */
.site-header.is-scrolled .site-header__back:hover .site-header__pill {
  padding: 9px 14px 9px 10px;
  gap: 10px;
}
.site-header.is-scrolled .site-header__back:hover .site-header__back-text {
  max-width: 220px;
  opacity: 1;
}

.site-header__logo {
  position: absolute; left: 50%; top: 26px; transform: translateX(-50%);
  display: block;
  z-index: 101;
  pointer-events: auto;
}
.site-header__logo img { display: block; width: 153px; height: 77px; }

/* ─────────── LANG SWITCH ─────────── */
.lang-wrapper {
  position: absolute;
  right: 26px; /* allineato al padding del site-header */
  top: 26px;
  z-index: 101;
  display: flex;
  flex-direction: row-reverse; /* globe a destra, opzioni si espandono a sinistra */
  align-items: center;
  gap: 6px;
}

/* Globe — sempre visibile */
.lang-globe {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.95);
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .22s ease, border-color .22s ease;
  cursor: pointer;
}
.lang-globe svg { width: 17px; height: 17px; }

/* Hover solo su dispositivi con puntatore (desktop) */
@media (hover: hover) {
  .lang-wrapper:hover .lang-globe {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.55);
  }
  .lang-wrapper:hover .lang-options {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Options — invisibili di default */
.lang-options {
  display: flex;
  align-items: center;
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
/* Visibili quando JS aggiunge .is-open (click — desktop e mobile) */
.lang-wrapper.is-open .lang-options {
  opacity: 1;
  pointer-events: auto;
}

/* Sliding pill via ::before + CSS custom properties */
.lang-options::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  border-radius: 100px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width:   var(--pill-w, 38px);
  height:  var(--pill-h, 38px);
  transform: translateX(var(--pill-x, 0px));
  opacity: var(--pill-show, 0);
  transition: transform 300ms cubic-bezier(.22,1,.36,1),
              width     300ms cubic-bezier(.22,1,.36,1),
              opacity   200ms ease;
}

/* Cerchio perfetto: width = height, testo centrato, padding azzerato */
.lang-opt {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  transition: color 250ms ease;
}
.lang-opt:hover,
.lang-opt--current { color: #fff; }

/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  height: 260vh; /* scroll distance. Updated by JS if videos load */
  background: var(--bg);
}
.hero__sticky {
  position: sticky; top: 0;
  height: 100svh; width: 100%; overflow: hidden;
  background: #000;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__video--loop  { opacity: 1; transition: opacity 0.2s linear; will-change: opacity; }
.hero__video--scrub { opacity: 0; transition: opacity 0.2s linear; will-change: contents, opacity; }
.hero.is-scrubbing .hero__video--loop  { opacity: 0; }
.hero.is-scrubbing .hero__video--scrub { opacity: 1; }
.hero__video--mobile { display: none; }

/* Entrance curtain — black overlay that fades out on page load */
.hero__curtain {
  position: absolute; inset: 0; z-index: 8;
  background: #000;
  pointer-events: none;
}

.hero__overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
}

.hero__content {
  position: absolute; left: 0; right: 0; bottom: 11vh;
  padding: 0 var(--pad-x);
  text-align: center;
  z-index: 3;
}
.hero__eyebrow {
  display: block;
  font-size: var(--fs-h2);
  color: var(--green);
  margin-bottom: clamp(10px, 1.1vw, 18px);
  letter-spacing: -0.02em;
}
.hero__title {
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 24ch;
  margin: 0 auto;
  color: #fff;
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute; left: 50%; bottom: 0px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,.7);
  font-size: var(--fs-small);
  letter-spacing: .2em; text-transform: uppercase;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.hero__scroll-hint.is-visible { opacity: 1; }
.hero__scroll-hint.is-hidden  { opacity: 0; pointer-events: none; }
@media (min-width: 901px) {
  .hero__scroll-hint { font-size: 13px; letter-spacing: .18em; }
  .stats--2 { background: none !important; margin-top: -140px !important; }
}
.hero__scroll-line {
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, rgba(255,255,255,.8), transparent);
  animation: hero-pulse 1.8s ease-in-out infinite;
}
@keyframes hero-pulse {
  0%, 100% { opacity: .5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(.5); }
}

/* ─────────── VIDEO TOGGLE (a11y pause button) ─────────── */
.video-toggle {
  position: absolute; right: clamp(14px, 1.5vw, 22px); bottom: clamp(14px, 1.5vw, 22px);
  z-index: 6;
}
/* Hero loop-pause button: fixed, fades out immediately on scroll */
.video-toggle--hero-ctrl {
  position: fixed;
  right: clamp(14px, 1.5vw, 22px);
  bottom: clamp(14px, 1.5vw, 22px);
  z-index: 50;
  transition: background .2s, transform .2s, border-color .2s, opacity .25s var(--ease);
}
.video-toggle--hero-ctrl.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.video-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s, border-color .2s;
}
.video-toggle:hover { background: rgba(0,0,0,.8); border-color: rgba(255,255,255,.45); transform: scale(1.05); }
.video-toggle__icon { position: absolute; display: inline-block; }
.video-toggle__icon--pause {
  width: 10px; height: 12px;
  border-left: 2px solid #fff; border-right: 2px solid #fff;
}
.video-toggle__icon--play {
  width: 0; height: 0; opacity: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-left: 9px solid #fff; margin-left: 2px;
}
.video-toggle[aria-pressed="true"] .video-toggle__icon--pause { opacity: 0; }
.video-toggle[aria-pressed="true"] .video-toggle__icon--play { opacity: 1; }
.video-toggle--replay { right: calc(clamp(14px, 1.5vw, 22px) + 46px); }
.video-toggle__icon--replay {
  position: static;
  width: 15px; height: 15px;
  display: block;
}

/* ─────────── INTRO HEADLINE ─────────── */
mark { background: none; color: inherit; }

.intro {
  background: #f0efef;
  padding: clamp(90px, 10vw, 180px) var(--pad-x) clamp(80px, 7vw, 140px);
}
.intro__headline {
  font-size: clamp(24px, 2.78vw, 40px);
  line-height: 1.125;
  max-width: 48vw;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: -0.02em;
}


/* ─────────── STATS ─────────── */
.stats {
  background: #f0efef;
  color: var(--ink);
  padding: 0;    /* padding is on the cards themselves */
  position: relative;
}
.stats:not(.stats--dark-on-light):not(.stats--2) {
  padding-top: clamp(80px, 8.33vw, 160px);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  position: relative;
  --stat-off2: clamp(30px, 4.17vw, 60px);
  --stat-off3: clamp(70px, 9.03vw, 130px);
}
/* Staircase height — only for standalone stats sections (not dark-on-light inside next-level) */
.stats:not(.stats--dark-on-light) .stats__grid {
  height: clamp(420px, 44vw, 640px);
}
/* Cards fill height minus their stagger offset — with align-items:end, all bottom edges align */
.stats:not(.stats--dark-on-light) .stats__grid .stat:nth-child(1) { height: 100%; }
.stats:not(.stats--dark-on-light) .stats__grid .stat:nth-child(2) { height: calc(100% - var(--stat-off2)); }
.stats:not(.stats--dark-on-light) .stats__grid .stat:nth-child(3) { height: calc(100% - var(--stat-off3)); }
.stat {
  padding: clamp(40px, 4vw, 72px) var(--pad-x) clamp(40px, 4.5vw, 72px);
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(32px, 4vw, 64px);
}
.stat__top {
  display: flex; flex-direction: column;
  gap: clamp(20px, 2.5vw, 40px);
}

/* top border */
.stat::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: 0; height: 1px; background: var(--border-on-light);
}

/* right border on cards 1 and 2 (shared with left border of next card) */
.stats__grid .stat:nth-child(1),
.stats__grid .stat:nth-child(2) {
  border-right: 1px solid var(--border-on-light);
}

/* vertical left separators for cards 2 and 3 (remove — using border-right above instead) */
.stats__grid .stat:nth-child(2)::before { display: none; }
.stats__grid .stat:nth-child(3)::before { display: none; }

.stat__label {
  display: block;
  font-size: var(--fs-eyebrow); text-transform: uppercase;
  letter-spacing: -0.01em; color: var(--ink); font-weight: 400;
}
.stat__number {
  display: flex; align-items: baseline; gap: clamp(4px, .4vw, 8px);
  font-size: var(--fs-stat-num);
  line-height: 1; letter-spacing: -0.03em;
  color: var(--ink-2); font-weight: 400;
}
.stat__unit { color: var(--green); }
.stat__placeholder { color: var(--ink-2); }
.stat__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.35;
  color: var(--desc-on-light);
  opacity: 0.8;
  margin-top: auto;
}

.stats--dark-on-light {
  background: var(--surface);
  padding: clamp(40px, 5vw, 80px) 0 var(--pad-y);
}
.stats--2 {
  background-color: #ffffff;
  transition: background-color 0.7s ease-in-out;
  position: relative;
  z-index: 3;
  margin-top: calc(-1 * clamp(70px, 9.03vw, 130px));
}

/* Each card carries its own background — section has none */
.stats--2 .stat {
  background-color: #ffffff;
  transition:
    background-color 0.7s ease-in-out,
    color            0.7s ease-in-out,
    border-color     0.7s ease-in-out;
}
.stats--2 .stat::after {
  transition: background-color 0.7s ease-in-out;
}
.stats--2 .stat__label,
.stats--2 .stat__number,
.stats--2 .stat__placeholder {
  transition: color 0.7s ease-in-out;
}
.stats--2 .stat__desc {
  transition: color 0.7s ease-in-out;
}

/* Dark state — scoped only to stats--2, no global cascade */
html.theme-dark .stats--2 { background-color: #0a0a0a; }
html.theme-dark .stats--2 .stat            { background-color: #0a0a0a; border-color: rgba(255,255,255,0.18); }
html.theme-dark .stats--2 .stat::after     { background-color: rgba(255,255,255,0.18); }
html.theme-dark .stats--2 .stat__label     { color: #f5f5f5; }
html.theme-dark .stats--2 .stat__number    { color: #e0e0e0; }
html.theme-dark .stats--2 .stat__desc      { color: rgba(255,255,255,0.8); }

/* ─────────── MARKETS ─────────── */
.markets {
  background: var(--green);
  color: #fff;
  position: relative;
  height: 400vh;       /* 4 items × 100vh scroll distance */
}
.markets__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 55fr 45fr;
  overflow: hidden;
}
.markets__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(40px, 5vw, 80px) clamp(60px, 6.94vw, 120px) clamp(40px, 5vw, 80px) var(--pad-x);
  overflow: hidden;
}
.markets__left .eyebrow { display: block; width: fit-content; }
.markets__title {
  font-size: var(--fs-display);
  line-height: 1.06;
  margin: clamp(12px, 1.5vw, 24px) 0 0;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.markets__left .accordion {
  max-width: 900px;
  margin-top: auto;
}

/* accordion */
.accordion__item {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,.22);
}
.accordion__head {
  width: 100%;
  display: grid;
  grid-template-columns: clamp(36px, 3.5vw, 60px) 1fr auto;
  align-items: center;
  gap: clamp(10px, 1vw, 20px);
  padding: clamp(12px, 1.2vw, 20px) 0;
  text-align: left;
  cursor: pointer;
  transition: opacity .3s var(--ease);
}
.accordion__head:hover { opacity: .8; }
.accordion__num {
  font-size: var(--fs-small);
  color: rgba(255,255,255,.7);
  letter-spacing: -0.02em;
}
.accordion__label {
  font-size: var(--fs-accord);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.accordion__icon {
  position: relative; width: 14px; height: 14px;
  transition: transform .4s var(--ease);
}
.accordion__icon::before,
.accordion__icon::after {
  content: ""; position: absolute; background: #fff;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.accordion__icon::before { left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; }
.accordion__icon::after  { top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -.5px; }
.accordion__item.is-open .accordion__icon::after { transform: rotate(90deg); opacity: 0; }

/* Scroll progress bar above each accordion head (top border of item) */
.accordion__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}
.accordion__progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.9);
  transition: width 0.05s linear;
}

.accordion__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease);
}
.accordion__body-inner {
  overflow: hidden;
  min-height: 0;
  padding-left: calc(clamp(36px, 3.5vw, 60px) + clamp(10px, 1vw, 20px));
}
.accordion__item.is-open .accordion__body { grid-template-rows: 1fr; }
.accordion__eyebrow {
  display: block;
  font-size: var(--fs-body);
  color: rgba(255,255,255,.92);
  margin: clamp(4px, .5vw, 8px) 0 clamp(10px, 1vw, 16px);
  letter-spacing: -0.02em;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s .15s var(--ease), transform .5s .15s var(--ease);
}
.accordion__body p {
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--muted-on-green);
  max-width: 48ch;
  padding-bottom: clamp(14px, 1.5vw, 24px);
  opacity: 0; transform: translateY(12px);
  transition: opacity .55s .2s var(--ease), transform .55s .2s var(--ease);
}
.accordion__item.is-open .accordion__eyebrow,
.accordion__item.is-open .accordion__body p { opacity: 1; transform: translateY(0); }

/* Right image — full bleed to edge, no radius */
.markets__right {
  position: relative;
  overflow: hidden;
}
.markets__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

/* ─────────── OVERVIEW ─────────── */
.overview {
  background: #f0efef;
  color: var(--ink);
  padding: var(--pad-y) 0 clamp(40px, 4vw, 64px);
  overflow: hidden;
}
.overview__head {
  max-width: 48vw;
  margin: 0;
  padding: 0 var(--pad-x);
}
.overview__head .eyebrow { color: var(--ink); }
.overview__title {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: clamp(18px, 2vw, 36px) 0 clamp(22px, 2vw, 36px);
  font-weight: 400;
  color: var(--ink);
}
.overview__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.45;
  color: var(--muted-on-light);
  max-width: 60ch;
}

.overview__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0efef;
  margin: clamp(40px, 5vw, 80px) 0 0;
}
.overview__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  /* transitions handled by GSAP */
}
.overview__video.is-active { opacity: 1; }
.overview__stage {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}

.overview__mask {
  position: absolute; top: 0; bottom: 0;
  width: clamp(40px, 6vw, 96px);
  pointer-events: none;
  z-index: 2;
}
.overview__mask--l { left: 0; background: linear-gradient(to right, rgba(240,239,239,.9), rgba(240,239,239,0)); }
.overview__mask--r { display: none; }

.overview__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: -56px;
  border-top: 1px solid rgba(0,0,0,0.12);
}
.overview__tab {
  background: transparent;
  padding: clamp(16px, 1.7vw, 28px) clamp(20px, 1.8vw, 32px);
  text-align: left;
  position: relative;
  transition: color .25s var(--ease);
  color: rgba(0,0,0,0.45);
}
.overview__tab:hover { background: transparent; color: rgba(0,0,0,0.45); }
.overview__tab:hover .overview__tab-name { color: var(--green); }
.overview__tab.is-active { color: var(--ink); background: transparent; }
.overview__tab-name {
  display: block;
  font-size: var(--fs-card-title);
  letter-spacing: -0.02em;
  transition: color .25s var(--ease);
  margin-bottom: clamp(10px, 1vw, 18px);
  font-weight: 400;
}
.overview__tab-desc {
  display: block;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--muted-on-light);
  max-width: 38ch;
}
.overview__tab.is-active .overview__tab-desc { color: var(--ink-2); }
.overview__tab-progress {
  position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--green);
}
/* duration set via JS — class just enables the animation */
.overview__tab-progress.is-running { animation: tabProgress var(--tab-dur, 4s) linear forwards; }
@keyframes tabProgress { to { width: 100%; } }

/* Tab name word animation — gray → green (stays green) */
.overview__tab-name .word { color: inherit; }
.overview__tab-name .word.is-in { animation: tab-word-green 1.1s var(--ease) forwards; }
@keyframes tab-word-green {
  0%   { color: rgba(0,0,0,0.18); }
  40%  { color: var(--green); }
  100% { color: var(--green); }
}

/* Mobile content slot — hidden on desktop */
.overview__mobile-content { display: none; }
.overview__mobile-name {
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: clamp(8px, 1.5vw, 14px);
}
.overview__mobile-desc {
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--muted-on-light);
}

/* ─────────── PERFORMANCE ─────────── */
.perf {
  background: var(--surface);
  color: var(--ink);
  padding: calc(var(--pad-y) * 1.4) 0 clamp(70px, 8.5vw, 140px);
  position: relative;
  z-index: 2;
}
.perf__head {
  max-width: 48vw;
  margin: 0 0 clamp(40px, 5vw, 80px);
  padding: 0 var(--pad-x);
}
.perf__title {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin: clamp(18px, 2vw, 36px) 0 clamp(20px, 2vw, 32px);
  font-weight: 400;
}
.perf__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.45;
  color: var(--muted-on-light);
  max-width: 60ch;
}

.bento {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 1.2vw, 24px);
}
.bento__card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 437/470;
  cursor: pointer;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  isolation: isolate;
  grid-column: span 2;
  transform: translateZ(0); /* GPU layer — sharpens border-radius edges */
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.bento__card--wide { grid-column: span 3; aspect-ratio: 662/600; }
/* Temporarily 2 small cards → each spans half the row, same height as wide cards */
.bento__card:not(.bento__card--wide) { grid-column: span 3; aspect-ratio: 662/600; }

.bento__card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.10); }
.bento__media { position: absolute; inset: 0; }
.bento__media img,
.bento__media video {
  display: block;
  width: 100%; height: 100%; object-fit: cover;
}
.bento__media img {
  transition: transform 2s cubic-bezier(0.4, 0, 0.2, 1), filter .5s var(--ease), opacity .5s var(--ease);
}
.bento__card:hover .bento__media img { transform: scale(1.04); }

/* Hover video overlays thumb — only on cards that have both */
.bento__thumb { position: absolute; inset: 0; z-index: 1; }
.bento__hover-video {
  position: absolute; inset: 0; z-index: 2; opacity: 0;
  transition: opacity 0.7s ease-out; /* slow fade-out on leave */
}
.bento__card:hover .bento__hover-video {
  opacity: 1;
  transition: opacity 0.3s ease-in; /* faster fade-in on enter */
}
.bento__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.12) 100%);
  z-index: 3; pointer-events: none;
}
.bento__title {
  position: absolute; left: clamp(18px, 1.5vw, 28px); top: clamp(18px, 1.5vw, 28px);
  font-size: var(--fs-card-title);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 400;
  z-index: 2;
  max-width: 70%;
}
.bento__plus {
  position: absolute; left: clamp(18px, 1.5vw, 28px); bottom: clamp(18px, 1.5vw, 28px);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease), background .3s var(--ease);
  z-index: 2;
}
.bento__plus:hover { transform: scale(1.08) rotate(45deg); background: var(--ink); }
.bento__plus-icon {
  position: relative; width: 12px; height: 12px;
}
.bento__plus-icon::before,
.bento__plus-icon::after {
  content: ""; position: absolute; background: #fff;
}
.bento__plus-icon::before { left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; }
.bento__plus-icon::after  { top: 0; bottom: 0; left: 50%; width: 1.5px; margin-left: -.75px; }

/* ─────────── SCROLL-STORY (long scroll video) ─────────── */
/* ─────────── STORY INTRO ─────────── */
.story-intro {
  background: var(--surface);
  padding: clamp(80px, 8.33vw, 160px) var(--pad-x) clamp(24px, 2.5vw, 48px);
  text-align: center;
}
.story-intro__inner {
  max-width: 900px;
  margin: 0 auto;
}
.story-intro__title {
  font-size: var(--fs-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
}

.scroll-story {
  position: relative;
  height: 700vh; /* scroll distance, tuned by JS */
  background: #e8e8e6;
  margin-bottom: 0;
  z-index: 1;
}
.scroll-story__sticky {
  position: sticky; top: 0;
  height: 100svh; width: 100%;
  overflow: hidden;
  background: #e8e8e6;
  contain: layout style paint;
}
.scroll-story__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: contents;
}
.scroll-story__video--m { display: none; }

.scroll-story__vignette { display: none; }
.scroll-story__captions {
  position: absolute; right: var(--pad-x); top: 50%;
  transform: translateY(-50%);
  width: min(520px, 40vw);
  min-height: 280px; /* prevents container collapse on caption exit */
  pointer-events: none;
}
.scroll-caption {
  position: absolute; left: 0; right: 0; top: 0;
  width: 100%;
  opacity: 0; transform: translateY(16px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  will-change: opacity, transform;
}
.scroll-caption.is-active { opacity: 1; transform: translateY(0); }
.scroll-caption.is-exit { opacity: 0; transform: translateY(-12px); transition-duration: .55s; }
.scroll-caption__title {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: rgba(0,0,0,0.18);
  margin-bottom: clamp(14px, 1.2vw, 22px);
  max-width: 18ch;
}
.scroll-caption--multi .scroll-caption__title {
  font-size: clamp(22px, 2vw, 36px);
  margin-bottom: clamp(14px, 1.2vw, 22px);
  max-width: 30ch;
}
.scroll-caption__body {
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--ink-2);
  display: block;
  max-width: 40ch;
}
.scroll-caption__line { display: block; margin-bottom: 6px; color: var(--ink-2); }

.scroll-story__progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: rgba(0,0,0,.1);
  z-index: 4;
}
.scroll-story__progress span {
  display: block; height: 100%; width: 0;
  background: var(--green);
}

/* ─────────── NEXT LEVEL ─────────── */
.next-level {
  background: var(--surface);
  color: var(--ink);
  padding: clamp(130px, 13vw, 220px) 0 0;
  position: relative;
  z-index: 2;
}
.next-level__head {
  max-width: 48vw;
  margin: 0 0 clamp(40px, 4vw, 72px);
  padding: 0 var(--pad-x);
}
.next-level__title {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: clamp(18px, 2vw, 36px) 0 clamp(20px, 2vw, 32px);
  font-weight: 400;
}
.next-level__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.45;
  color: var(--muted-on-light);
  max-width: 60ch;
}
.next-level__video-wrap {
  position: relative;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.next-level__video-wrap.is-ready { opacity: 1; }
.next-level__video-wrap .video-toggle { bottom: 164px; }
.next-level__video {
  width: 100%;
  aspect-ratio: 1440 / 939;
  object-fit: cover;
  border-radius: 0;
  display: block;
  background: #000;
}
.next-level__video--m { display: none; }

/* ─────────── FOOTER ─────────── */
.footer { display: none !important; }
.footer-hidden {
  background: var(--bg);
  color: rgba(255,255,255,.8);
  padding: clamp(60px, 6vw, 100px) var(--pad-x) clamp(24px, 2vw, 40px);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: clamp(30px, 3vw, 48px);
}
.footer__brand {
  font-size: var(--fs-hero);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}
.footer__brand span { color: var(--green); }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(24px, 3vw, 48px);
  padding-top: clamp(24px, 2vw, 40px);
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__h {
  display: block;
  text-transform: uppercase;
  font-size: var(--fs-small);
  color: rgba(255,255,255,.5);
  margin-bottom: 10px;
  letter-spacing: .06em;
}
.footer__cols a {
  display: block;
  font-size: var(--fs-body);
  color: #fff;
}
.footer__cols a:hover { color: var(--green); }
.footer__copy {
  font-size: var(--fs-small);
  color: rgba(255,255,255,.5);
  padding-top: clamp(20px, 2vw, 40px);
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ─────────── MODAL ─────────── */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: none;
  align-items: center; justify-content: center;
}
.modal.is-open { display: flex; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .3s var(--ease);
  cursor: pointer;
}
.modal.is-open .modal__backdrop { opacity: 1; }

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - clamp(20px, 4vw, 80px)));
  height: min(840px, 90dvh);
  background: var(--bg-2);
  color: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;           /* clips border-radius; stage scrolls */
  opacity: 0; transform: scale(.96) translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.modal.is-open .modal__dialog { opacity: 1; transform: scale(1) translateY(0); }

.modal__close {
  position: absolute; right: 18px; top: 18px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: #000;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.modal__close:hover { background: #222; transform: rotate(90deg); }
.modal__close span {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 1.5px; background: #fff;
  margin: -0.75px 0 0 -8px;
}
.modal__close span:first-child { transform: rotate(45deg); }
.modal__close span:last-child { transform: rotate(-45deg); }

.modal__stage {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Image panel — full width, fixed aspect ratio — shown first (above text) */
.modal__panel-r {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  order: -1;
  overflow: hidden;
}
.modal__media {
  width: 100%; height: 100%;
}
.modal__media img,
.modal__media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Text/nav panel */
.modal__panel-l {
  background: var(--bg-2);
  color: #fff;
  padding: clamp(32px, 3.5vw, 56px) clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.5vw, 40px);
  flex: 1;
}
.modal__counter {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.modal__panel-l__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: clamp(16px, 1.5vw, 24px);
}
.modal__title {
  font-size: clamp(18px, 1.67vw, 28px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
}
.modal__body {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: rgba(255,255,255,0.6);
}

/* Nav row in left panel */
.modal__nav-row {
  display: flex;
  gap: 10px;
}
.modal__nav {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
}
.modal__nav:hover { background: rgba(255,255,255,0.22); }
.modal__nav span {
  width: 8px; height: 8px;
  border-top: 2px solid rgba(255,255,255,0.8);
  border-right: 2px solid rgba(255,255,255,0.8);
}
.modal__nav--prev span { transform: rotate(-135deg); }
.modal__nav--next span { transform: rotate(45deg); }

.modal__media {
  width: 100%; height: 100%;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.modal__media img, .modal__media video {
  width: 100%; height: 100%; object-fit: cover;
}


/* ─────────── REVEAL BASE STATES ─────────── */

@keyframes word-in-light {
  0%   { color: rgba(0,0,0,0.18); }
  30%  { color: var(--green); }
  100% { color: var(--ink-2); }
}
@keyframes word-in-green {
  0%   { color: rgba(0,0,0,0.18); }
  30%  { color: var(--green); }
  100% { color: var(--green); }
}
@keyframes word-in-dark {
  0%   { color: rgba(255,255,255,0.2); }
  35%  { color: var(--green); }
  100% { color: #fff; }
}
@keyframes word-in-dark-green {
  0%   { color: rgba(255,255,255,0.2); }
  35%  { color: var(--green); }
  100% { color: var(--green); }
}

[data-reveal="fade-up"] { opacity: 0; transform: translateY(28px); }
[data-reveal="fade-up"].is-in { opacity: 1; transform: translateY(0); transition: opacity .8s var(--ease), transform .8s var(--ease); }

[data-reveal="words"] {
  /* prevent the pre-reveal overflow from stealing space */
}
[data-reveal="words"] .word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 1.15s var(--ease) calc(var(--i, 0) * 55ms),
    opacity   0.9s var(--ease) calc(var(--i, 0) * 55ms);
}
[data-reveal="words"].is-in .word { transform: translateY(0); opacity: 1; }

/* ─── GREEN-TO-BLACK: word-by-word color reveal (Terminal Industries style) ─── */
[data-reveal="green-to-black"] .word {
  display: inline-block;
  color: rgba(0,0,0,0.18);
}
[data-reveal="green-to-black"] .word + .word { margin-left: 0; } /* spacing from space char */
[data-reveal="green-to-black"] .word.is-in {
  animation: word-in-light 0.85s var(--ease) forwards;
}

/* Light-bg titles resolve to dark */
.intro__headline .word         { color: rgba(0,0,0,0.18); }
.intro__headline .word.is-in   { animation: word-in-light 0.85s var(--ease) forwards; color: var(--ink-2); }
.intro__headline .word--green.is-in { animation: word-in-green 0.85s var(--ease) forwards; color: var(--green); }

.overview__title .word         { color: rgba(0,0,0,0.18); }
.overview__title .word.is-in   { animation: word-in-light 0.85s var(--ease) forwards; color: var(--ink-2); }

.perf__title .word             { color: rgba(0,0,0,0.18); }
.perf__title .word.is-in       { animation: word-in-light 0.85s var(--ease) forwards; color: var(--ink-2); }

.next-level__title .word       { color: rgba(0,0,0,0.18); }
.next-level__title .word.is-in { animation: word-in-light 0.85s var(--ease) forwards; color: var(--ink-2); }

/* Dark-bg titles resolve to white (scroll-story captions) */
/* Scroll-story captions on light video — animated to dark */
.scroll-caption__title .word       { color: rgba(0,0,0,0.18); }
.scroll-caption__title .word.is-in { animation: word-in-light 0.85s var(--ease) forwards; }

/* CTA section — dark bg, title animates to white */
.cta-section [data-reveal="green-to-black"] .word             { color: rgba(255,255,255,0.2); }
.cta-section [data-reveal="green-to-black"] .word.is-in       { animation: word-in-dark 0.85s var(--ease) forwards; }
.cta-section [data-reveal="green-to-black"] .word--green.is-in { animation: word-in-dark-green 0.85s var(--ease) forwards; }

/* Counter base */
.stat__num { tabular-nums: 1; font-variant-numeric: tabular-nums; }

/* ─────────── INTERVIEW ─────────── */
.interview {
  background: var(--surface);
  color: var(--ink);
  padding: 0 var(--pad-x) clamp(120px, 14vw, 240px);
  position: relative;
  z-index: 3;
}
.interview__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 5vw, 100px);
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.interview__label {
  font-size: var(--fs-h2);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: clamp(16px, 1.5vw, 28px);
}
.interview__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.45;
  color: var(--muted-on-light);
  max-width: 40ch;
}
.interview__video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.interview__thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.interview__video-wrap:hover .interview__thumb { transform: scale(1.03); }
.interview__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background .3s;
}
.interview__video-wrap:hover .interview__play { background: rgba(0,0,0,0.45); }
.interview__play-btn {
  width: clamp(56px, 5.5vw, 80px); height: clamp(56px, 5.5vw, 80px);
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease), background .3s;
}
.interview__video-wrap:hover .interview__play-btn { transform: scale(1.08); background: #fff; }
.interview__play-btn svg { fill: var(--ink); margin-left: 4px; }

/* ─────────── CTA SECTION (Bring the PCS) ─────────── */
.cta-section {
  position: relative;
  background-color: #ffffff;
  color: #000;
  overflow: hidden;
  transition: background-color 0.7s ease-in-out, color 0.7s ease-in-out;
}
html.theme-dark .cta-section {
  background-color: #0a0a0a;
  color: #fff;
}
.cta-section__grid {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  /* Faint base grid lines — background-size set by JS */
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.07) 1px, transparent 1px);
  /* Vertical lines fade to transparent at the bottom; last horizontal line disappears */
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 97%);
  mask-image: linear-gradient(to bottom, black 75%, transparent 97%);
}
html.theme-dark .cta-section__grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
}
/* Green line glow — radial mask reveals it near cursor, spanning multiple cells */
.cta-section__grid::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--green) 1px, transparent 1px),
    linear-gradient(to bottom, var(--green) 1px, transparent 1px);
  background-size: inherit;
  -webkit-mask-image: radial-gradient(circle 200px at var(--cx, -999px) var(--cy, -999px), black 0%, transparent 100%);
  mask-image: radial-gradient(circle 200px at var(--cx, -999px) var(--cy, -999px), black 0%, transparent 100%);
}

/* ── Cell base — no borders (grid lines from background-image above) ── */
.cta__cell {
  position: relative;
}

/* Mouse-tracking radial fill on the hovered cell */
.cta__cell::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    circle 120px at var(--mx, 50%) var(--my, 50%),
    rgba(0,155,74,0.1) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.cta__cell.is-hovered::before { opacity: 1; }

/* Corner crosses — "+" markers centered on grid line intersections, Terminal Industries style */
.cta__cross {
  position: absolute;
  width: 12px; height: 12px;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
  z-index: 2;
}
.cta__cross--tl { top: -6px;    left: -6px; }
.cta__cross--tr { top: -6px;    right: -6px; }
.cta__cross--bl { bottom: -6px; left: -6px; }
.cta__cross--br { bottom: -6px; right: -6px; }
.cta__cross::before,
.cta__cross::after {
  content: '';
  position: absolute;
  background: var(--green);
}
.cta__cross::before {
  width: 100%; height: 1px;
  top: 50%; left: 0;
  transform: translateY(-50%);
}
.cta__cross::after {
  width: 1px; height: 100%;
  left: 50%; top: 0;
  transform: translateX(-50%);
}
.cta__cell.is-hovered .cta__cross { opacity: 1; }

.cta-section__body {
  position: relative;
  padding: clamp(160px, 18vw, 280px) var(--pad-x) clamp(140px, 15vw, 240px);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.cta-section__title {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: clamp(24px, 2vw, 40px);
  color: #000;
  transition: color 0.7s ease-in-out;
}
html.theme-dark .cta-section__title { color: #fff; }
.cta-section__title .text-green { color: var(--green); }
.cta-section__desc {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  color: rgba(0,0,0,0.6);
  max-width: 55ch;
  margin: 0 auto clamp(32px, 3vw, 52px);
  transition: color 0.7s ease-in-out;
}
html.theme-dark .cta-section__desc { color: rgba(255,255,255,0.7); }
/* Parallelogram button — matches Figma design (aspect 13:38 angled sides) */
.cta-section__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 44px;
  background: var(--green);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--fs-body-lg);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  /* slant = height(~50px) × 13/38 ≈ 17px */
  clip-path: polygon(17px 0%, 100% 0%, calc(100% - 17px) 100%, 0% 100%);
  transition: background .25s var(--ease), opacity .25s;
}
.cta-section__btn:hover { background: var(--green-dim); }
.cta-section__btn:active { opacity: .85; }

/* ─────────── CONTACT MODAL ─────────── */
.contact-modal {
  position: fixed; inset: 0; z-index: 600;
  display: none;
  align-items: center; justify-content: center;
}
.contact-modal.is-open { display: flex; }

.contact-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: none; cursor: pointer;
  opacity: 0; transition: opacity .35s var(--ease);
}
.contact-modal.is-open .contact-modal__backdrop { opacity: 1; }

.contact-modal__dialog {
  position: relative;
  width: min(640px, calc(100vw - clamp(20px, 4vw, 80px)));
  height: min(820px, 90dvh);
  min-height: 320px;
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  opacity: 0; transform: scale(.96) translateY(16px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
/* Remove transform on open — transform creates stacking context that blocks iOS scroll */
.contact-modal.is-open .contact-modal__dialog { opacity: 1; transform: none; }

.contact-modal__close {
  position: absolute; right: 18px; top: 18px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.07);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  border: none; cursor: pointer;
}
.contact-modal__close:hover { background: rgba(0,0,0,.14); transform: rotate(90deg); }
.contact-modal__close span {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 1.5px; background: var(--ink);
  margin: -0.75px 0 0 -8px;
}
.contact-modal__close span:first-child { transform: rotate(45deg); }
.contact-modal__close span:last-child  { transform: rotate(-45deg); }

.contact-modal__body {
  flex: 1 1 0;       /* basis 0 — lets browser compute height from container, not content */
  min-height: 0;
  padding: clamp(36px, 5vw, 56px) clamp(28px, 4vw, 56px);
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  color: var(--ink);
}

/* Custom scrollbar — thin green line */
.contact-modal__body::-webkit-scrollbar { width: 4px; }
.contact-modal__body::-webkit-scrollbar-track { background: transparent; }
.contact-modal__body::-webkit-scrollbar-thumb { background: var(--green); border-radius: 4px; }
.contact-modal__body::-webkit-scrollbar-thumb:hover { background: var(--green-dim); }
.contact-modal__body { scrollbar-width: thin; scrollbar-color: var(--green) transparent; }

.contact-modal__eyebrow {
  font-size: var(--fs-small);
  color: var(--green);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.contact-modal__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: clamp(24px, 3vw, 36px);
}

/* ── HubSpot form overrides — AA accessible, white surface ── */
#hs-contact-form .hs-form { display: flex; flex-direction: column; gap: 0; color: var(--ink); }
#hs-contact-form fieldset {
  border: none; padding: 0; margin: 0 0 24px; max-width: 100% !important;
  display: flex; flex-direction: column; gap: 16px;
}
/* Side-by-side for 2-column HubSpot fieldsets */
#hs-contact-form fieldset.form-columns-2 {
  flex-direction: row; gap: 12px;
}
#hs-contact-form fieldset.form-columns-2 .hs-form-field { flex: 1; min-width: 0; }
#hs-contact-form .hs-form-field { display: flex; flex-direction: column; gap: 6px; }
#hs-contact-form .hs-form-field > label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); font-family: inherit; font-weight: 500;
}
/* Legend/description text — force dark color */
#hs-contact-form legend,
#hs-contact-form .hs-field-desc,
#hs-contact-form .field.hs-form-field > label { color: var(--ink-2); }

/* text inputs */
#hs-contact-form input[type="text"],
#hs-contact-form input[type="email"],
#hs-contact-form input[type="tel"],
#hs-contact-form input[type="number"],
#hs-contact-form textarea,
#hs-contact-form select {
  width: 100%; box-sizing: border-box;
  background: #fff;
  border: 1.5px solid #b0b0b0; /* 3.5:1 on white — AA for UI components */
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: inherit; font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
#hs-contact-form input::placeholder,
#hs-contact-form textarea::placeholder { color: #767676; } /* 4.5:1 on white */
#hs-contact-form input[type="text"]:focus,
#hs-contact-form input[type="email"]:focus,
#hs-contact-form input[type="tel"]:focus,
#hs-contact-form input[type="number"]:focus,
#hs-contact-form textarea:focus,
#hs-contact-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,155,74,0.18);
}
#hs-contact-form .hs-form-field.error input,
#hs-contact-form .hs-form-field.error textarea,
#hs-contact-form .hs-form-field.error select { border-color: #c0392b; }
#hs-contact-form textarea { resize: vertical; min-height: 96px; }

/* errors */
#hs-contact-form .hs-error-msgs { list-style: none; padding: 0; margin: 0 !important; display: flex; flex-direction: column; gap: 2px; }
#hs-contact-form .hs-error-msg { font-size: 12px; color: #c0392b !important; }

/* checkboxes & radio */
#hs-contact-form .inputs-list {
  list-style: none; padding: 0; margin: 10px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
#hs-contact-form .inputs-list li { display: flex; align-items: flex-start; }
#hs-contact-form .inputs-list label {
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer; font-size: 14px; line-height: 1.45;
  color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 400;
}
#hs-contact-form .inputs-list input[type="checkbox"],
#hs-contact-form .inputs-list input[type="radio"] {
  flex-shrink: 0; margin: 2px 0 0;
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid #767676; border-radius: 4px;
  background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
#hs-contact-form .inputs-list input[type="radio"] { border-radius: 50%; }
#hs-contact-form .inputs-list input[type="checkbox"]:checked,
#hs-contact-form .inputs-list input[type="radio"]:checked {
  background: var(--green); border-color: var(--green);
}
#hs-contact-form .inputs-list input[type="checkbox"]:checked::after {
  content: ''; position: absolute;
  left: 6px; top: 2px;
  width: 6px; height: 11px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}
#hs-contact-form .inputs-list input[type="radio"]:checked::after {
  content: ''; position: absolute;
  left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
#hs-contact-form .inputs-list input:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}

/* submit — stile cta-section__btn */
#hs-contact-form .hs-button,
#hs-contact-form input[type="submit"] {
  margin-top: 16px;
  width: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--fs-body-lg);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
  padding: 13px 44px;
  border: none;
  clip-path: polygon(17px 0%, 100% 0%, calc(100% - 17px) 100%, 0% 100%);
  cursor: pointer;
  transition: background .25s var(--ease), opacity .25s;
}
#hs-contact-form .hs-button:hover,
#hs-contact-form input[type="submit"]:hover { background: var(--green-dim); }
#hs-contact-form .hs-button:active,
#hs-contact-form input[type="submit"]:active { opacity: .85; }
#hs-contact-form .hs-button:focus-visible,
#hs-contact-form input[type="submit"]:focus-visible {
  outline: 2px solid var(--green); outline-offset: 3px;
}

/* success message */
#hs-contact-form .submitted-message {
  font-size: 16px; color: var(--ink); text-align: center; padding: 32px 0;
}

/* legal consent */
#hs-contact-form .legal-consent-container {
  font-size: 12px; color: #4a4a4a; line-height: 1.55; margin-top: 16px;
}
#hs-contact-form .legal-consent-container a { color: var(--green); text-decoration: underline; }
#hs-contact-form .legal-consent-container .hs-form-booleancheckbox-display > span {
  display: block; margin-left: 0; margin-top: 2px;
}
#hs-contact-form .hs-dependent-field { margin-top: 12px; }
#hs-contact-form .hs-form-iframe { border: none !important; }

/* ─────────── RESOURCES ─────────── */
.resources {
  position: relative;
  background: var(--bg);
  padding: 0 var(--pad-x) 0;
  border-top: 0;
}
.resources__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1400px;
  margin: 0 auto;
  gap: clamp(20px, 2vw, 32px);
  padding-top: clamp(60px, 6vw, 100px);
  padding-bottom: clamp(60px, 6vw, 100px);
}
.resources__card {
  background: var(--green);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.2vw, 36px);
  display: flex; flex-direction: column;
  min-height: clamp(320px, 30vw, 460px);
}
.resources__card-title {
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: auto;
}
.resources__list {
  list-style: none;
  margin-top: clamp(32px, 4vw, 60px);
  border-top: 1px solid rgba(255,255,255,0.25);
}
.resources__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(12px, 1.2vw, 18px) 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  font-size: var(--fs-body);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color .25s var(--ease), padding-left .3s var(--ease);
  letter-spacing: -0.01em;
}
.resources__item:hover {
  color: #fff;
  padding-left: 10px;
}
.resources__item-icon {
  width: 14px; height: 14px; flex-shrink: 0;
  opacity: 0.7;
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.resources__item:hover .resources__item-icon {
  transform: translateY(4px);
  opacity: 1;
}
.resources__img {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: clamp(320px, 30vw, 460px);
  background: var(--green);
}
.resources__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ─────────── SITE FOOTER ─────────── */
.site-footer {
  background: var(--bg);
  color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.site-footer__top {
  display: flex; justify-content: center; align-items: center;
  padding: clamp(20px, 2vw, 36px) var(--pad-x);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer__back {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-body);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color .2s;
}
.site-footer__back:hover { color: #fff; }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(16px, 1.5vw, 24px) var(--pad-x);
  max-width: var(--max-w); margin: 0 auto;
  font-size: var(--fs-small);
}
.site-footer__links { display: flex; gap: 24px; }
.site-footer__links a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color .2s; }
.site-footer__links a:hover { color: #fff; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 960px) {
  .intro__headline,
  .overview__head,
  .perf__head,
  .next-level__head { max-width: 100%; }

  .markets {
    height: auto;
  }
  .markets__sticky {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
  }
  .markets__left {
    padding: clamp(60px, 8vw, 100px) var(--pad-x);
  }
  .markets__right { height: clamp(320px, 70vw, 520px); }
  .stats__grid { grid-template-columns: 1fr; }
  .stats__grid .stat:nth-child(2),
  .stats__grid .stat:nth-child(3) { padding-top: clamp(40px, 6vw, 60px); }
  .stats__grid .stat:nth-child(2)::after,
  .stats__grid .stat:nth-child(3)::after { top: 0; }
  .stats__grid .stat:nth-child(n+2)::before { display: none; }

  .overview__tabs { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__card--wide { grid-column: span 2; aspect-ratio: 16/10; }
  .bento__card { grid-column: span 1; }
  /* Override regola desktop span 3 — mantiene 2 card affiancate */
  .bento__card:not(.bento__card--wide) { grid-column: span 1; aspect-ratio: 4/5; }

  .modal__dialog { width: calc(100vw - 24px); }

  .scroll-story__captions {
    top: auto; bottom: 220px; right: 0; left: 0;
    transform: none;
    padding: 0 var(--pad-x) 0;
    width: 100%;
    min-height: 0;
    height: auto;
  }

  .interview__inner { grid-template-columns: 1fr; }
  .resources__inner { grid-template-columns: 1fr; }

  /* Markets: double gap between title and accordion */
  .markets__title { margin-bottom: clamp(48px, 8vw, 80px); }
  .markets__left .accordion { margin-top: 0; }

  /* Accordion: taller items (line thickness is now globally 1px) */
  .accordion__head { padding: clamp(18px, 2.2vw, 28px) 0; }

  /* Overview: hide inactive tab descriptions on tablet — active tab shows desc */
  .overview__tab-desc { display: none; }
  .overview__tab.is-active .overview__tab-desc { display: block; }
  /* (600px block replaces tabs entirely with thin bars + mobile content area) */

  /* Scroll-story captions: padded sides, bottom-anchored, no height-jump */
  .scroll-caption { left: var(--pad-x); right: var(--pad-x); width: auto; transform: translateY(10px); }
  .scroll-caption.is-active { transform: translateY(0); }
  .scroll-caption.is-exit { transform: translateY(-10px); }
  /* 4 titoli nel multi: riduci margin per non tagliare l'ultimo */
  .scroll-caption--multi .scroll-caption__title { font-size: clamp(19px, 5vw, 28px); margin-bottom: 10px; }
}

@media (max-width: 600px) {
  /* Slightly larger display titles on mobile (was 26px min) */
  :root { --fs-display: clamp(30px, 8vw, 40px); }

  /* Form: stack columns vertically on mobile */
  #hs-contact-form fieldset.form-columns-2 { flex-direction: column; }
  #hs-contact-form fieldset.form-columns-2 .hs-form-field { flex: none; width: 100%; }

  .hero { height: 220vh; }
  .scroll-story { height: 600vh; }
  .hero__sticky { height: 100lvh; }
  .scroll-story__sticky { height: 100lvh; }
  .hero__video { display: none; }
  .hero__video--mobile { display: block; }
  .scroll-story__video--d { display: none; }
  .scroll-story__video--m { display: block; }
  .next-level__video--d { display: none; }
  .next-level__video--m { display: block; aspect-ratio: 790 / 1200; }
  .next-level__video-wrap .video-toggle { bottom: clamp(16px, 4vw, 28px); }
  .next-level__video-wrap .video-toggle--replay { right: calc(clamp(14px, 4vw, 28px) + 36px); }
  .bento { grid-template-columns: 1fr; }
  .bento__card, .bento__card--wide { grid-column: span 1; aspect-ratio: 3 / 3.5; }
  /* Override regola desktop span 3 su mobile a colonna singola */
  .bento__card:not(.bento__card--wide) { grid-column: span 1; aspect-ratio: 3 / 3.5; }
  .bento__title { line-height: 1.1; }
  .bento__hover-video { opacity: 1; transition: none; }
  .modal__media img { aspect-ratio: 5 / 4; height: auto; width: 100%; object-fit: cover; }
  .interview__inner { grid-template-columns: 1fr; }
  .cta-section__title { font-size: clamp(30px, 9.5vw, 52px); }

  /* ── CTA grid: mobile overrides ── */
  .cta-section { margin-top: clamp(48px, 14vw, 80px); }
  /* Fade all 4 edges: top, bottom, left, right */
  .cta-section__grid {
    transform: translateZ(0); /* stable GPU layer — prevents grid lines drifting on glow repaints */
    background-image:
      linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, black 5%, black 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, black 5%, black 80%, transparent 100%);
    mask-composite: intersect;
  }
  /* Green glow lines: slightly less saturated on mobile */
  .cta-section__grid::before {
    background-image:
      linear-gradient(to right, rgba(0,155,74,0.5) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(0,155,74,0.5) 1px, transparent 1px);
  }
  /* No + crosses on mobile */
  .cta__cross { display: none; }
  /* CTA cells: hide radial fill on mobile, keep only the grid glow lines */
  .cta__cell::before { display: none; }

  /* ── Hero ── */
  .hero__title { font-size: clamp(26px, 8vw, 40px); line-height: 1.08; }
  /* scroll-hint a 100px: linea visibile sopra le barre; gap titolo→scroll ridotto */
  .hero__content { bottom: calc(10vh + 100px); }
  .hero__scroll-hint { bottom: 100px; }
  .hero__scroll-line { height: 28px; }
  /* Video controls: button 28px, icons proportionally smaller inside */
  .video-toggle { width: 28px; height: 28px; }
  .video-toggle__icon--pause { width: 8px; height: 10px; }
  .video-toggle__icon--play {
    border-top-width: 5px; border-bottom-width: 5px; border-left-width: 7px;
  }
  .video-toggle__icon--replay { width: 12px; height: 12px; }

  /* ── Logo ── */
  .site-header__logo img { width: 120px; height: auto; }
  /* Logo sits below the banner */
  .site-header__logo { top: calc(44px + 18px); }
  .lang-wrapper { top: calc(44px + 18px); right: clamp(14px, 1.5vw, 22px); gap: 4px; }
  .lang-globe { width: 30px; height: 30px; }
  .lang-globe svg { width: 13px; height: 13px; }
  .lang-opt { width: 30px; height: 30px; font-size: 10px; letter-spacing: .1em; }

  /* ── Header banner: reappear fixed on scroll-up ── */
  .site-header.is-sticky {
    position: fixed;
    left: 16%; width: 68%; right: auto;
    top: 0;
  }

  /* ── Header → banner attached to top, scrolls with page (not fixed) ── */
  .site-header {
    position: absolute;   /* scrolls away like the logo */
    top: 0;
    left: 16%;
    width: 68%;
    right: auto;
    height: auto;
    padding: 10px 20px;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.12);
    border-top: none;                  /* flush with screen top edge */
    border-radius: 0 0 12px 12px;     /* only bottom corners rounded */
  }
  /* Link auto-width, centered */
  .site-header__back {
    width: auto; height: auto;
    justify-content: center;
    align-items: center;
    color: #fff;
  }
  /* Pill flat — background is on the banner itself */
  .site-header__pill {
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border-radius: 0;
    gap: 8px;
    width: auto;
    justify-content: center;
  }
  .site-header__back-text {
    font-size: 13px;
    max-width: none;
    opacity: 1;
    white-space: nowrap;
  }
  /* Single line with double-space separator — nowrap keeps everything on one line */
  .site-header__back-text { white-space: nowrap; }
  /* Cancel is-scrolled & on-light states — banner always dark */
  .site-header.is-scrolled .site-header__pill,
  .site-header.on-light .site-header__pill { background: transparent; border: none; padding: 0; gap: 8px; }
  .site-header.is-scrolled .site-header__back-text,
  .site-header.on-light .site-header__back { color: #fff; max-width: none; opacity: 1; }
  .site-header.on-light { background: rgba(0,0,0,0.75); border-color: rgba(255,255,255,0.12); }

  /* ── Markets: full image (no crop) ── */
  .markets { padding-bottom: 0; }
  .markets__right { width: 82%; margin-left: auto; height: auto; }
  .markets__img {
    position: relative; inset: auto;
    width: 100%; height: auto;
    object-fit: contain; object-position: center top;
  }

  /* ── Stats: cancel staircase, use staggered widths 80/90/100% ── */
  .stats:not(.stats--dark-on-light) .stats__grid { height: auto; }
  .stats__grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    grid-template-columns: none;
  }
  .stats__grid .stat:nth-child(1) { height: auto !important; width: 80%; border-right: 1px solid var(--border-on-light); }
  .stats__grid .stat:nth-child(2) { height: auto !important; width: 90%; border-right: 1px solid var(--border-on-light); }
  .stats__grid .stat:nth-child(3) { height: auto !important; width: 100%; border-right: none; }
  .stat { padding: 40px var(--pad-x); gap: 40px; }
  .stat__top { gap: 6px; }
  /* Force 40px top on cards 2+3 (overrides 768px clamp override) — all cards and modules */
  .stats__grid .stat:nth-child(2),
  .stats__grid .stat:nth-child(3) { padding-top: 40px; }
  /* stats--2 dark right borders */
  html.theme-dark .stats--2 .stats__grid .stat:nth-child(1),
  html.theme-dark .stats--2 .stats__grid .stat:nth-child(2) { border-right-color: rgba(255,255,255,0.18); }
  /* stats--2: no extra margin on mobile */
  .stats--2 { margin-top: 0; }

  /* ── Overview: azak.co style — image edge-to-edge, thin bar indicators, text below ── */
  .overview__media { aspect-ratio: 3/2; margin-top: clamp(28px, 5vw, 48px); }
  .overview__stage { padding: 0; }
  /* Three thin bar indicators replacing the full tabs */
  .overview__tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 16px var(--pad-x);
    border-top: none;
    margin-top: -20px;
    background: transparent;
  }
  .overview__tab {
    height: 2px;
    min-height: 0;
    padding: 0;
    background: rgba(0,0,0,0.12);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    color: transparent;
  }
  .overview__tab:hover { background: rgba(0,0,0,0.2); }
  .overview__tab.is-active { background: rgba(0,0,0,0.15); }
  .overview__tab-name,
  .overview__tab-desc { display: none; }
  /* Progress fill — green, matches desktop style */
  .overview__tab-progress {
    position: absolute;
    top: 0; left: 0;
    height: 100%; width: 0;
    background: var(--green);
    border-radius: 2px;
  }
  /* Mobile content text area */
  .overview__mobile-content {
    display: block;
    padding: clamp(22px, 5vw, 36px) var(--pad-x) clamp(28px, 6vw, 48px);
    background: #f0efef;
  }

  /* ── Overview mobile name: follow desktop tab-name style ── */
  .overview__mobile-name {
    font-weight: 400;
    font-size: var(--fs-card-title);
  }

  /* ── Story-intro (lorem ipsum after interview): slightly larger ── */
  .story-intro__title { font-size: clamp(28px, 7.5vw, 46px); }

  /* ── Next Level: same top gap as Overview ── */
  .next-level { padding-top: var(--pad-y); }

  /* ── Performance: same top gap as Overview ── */
  .perf { padding-top: var(--pad-y); }
  /* ── Interview: reduce gap from perf section above ── */
  .interview { margin-top: calc(-1 * clamp(28px, 7vw, 52px)); }

  /* ── CTA section: always dark, 90vh tall, centered vertically ── */
  .cta-section {
    background-color: #0a0a0a;
    color: #fff;
    overflow: hidden;
    min-height: 90svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .cta-section__body {
    padding-top: clamp(60px, 14vw, 100px);
    padding-bottom: clamp(60px, 12vw, 80px);
  }
  /* On mobile the scrub animation can't progress naturally — start words fully white */
  .cta-section [data-reveal="green-to-black"] .word { color: #fff; }
  .cta-section [data-reveal="green-to-black"] .word.is-in { animation: none; }

  /* ── Footer: center and stack links ── */
  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .site-footer__links {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}

/* ─────────── LOADER ─────────── */
#loader {
  position: fixed; inset: 0; z-index: 8000;
  background: #000;
  pointer-events: all;
}

/* Logo: no CSS transform so GSAP can animate freely */
.loader__logo {
  position: absolute;
  left: calc(50% - 76.5px);  /* (153 / 2) */
  top: calc(50% - 130px);    /* 77px logo + 53px gap above the bar */
  width: 153px;
  height: 77px;
}
.loader__logo-svg {
  display: block;
  width: 153px; height: 77px;
}

/* Bar: full width, sits at exactly the vertical midpoint */
.loader__bar-track {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.16);
  overflow: visible;
}
.loader__bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: #00A343;
  transition: width 0.07s linear;
}
/* Percentage sits above the bar, centered on the fill's right edge */
.loader__percent {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  transform: translateX(50%);
  font-size: 11px; font-weight: 500; line-height: 1;
  color: #00A343;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.loader__percent.is-visible { opacity: 1; }

/* Wipe: full-screen green for exit — starts fully hidden (grows top→bottom) */
.loader__wipe {
  position: absolute; inset: 0;
  background: #00A343;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  z-index: 1;
}

/* Mobile: match the real logo size/position */
@media (max-width: 600px) {
  .loader__logo {
    width: 120px;
    height: 60px;
    left: calc(50% - 60px);  /* (120 / 2) */
    top: calc(50% - 108px);  /* 60px logo + 48px gap */
  }
  .loader__logo-svg { width: 120px; height: 60px; }
}

/* ─────────── REDUCED MOTION ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__video--loop { opacity: 1; }
  .hero__video--scrub { opacity: 0; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-reveal="green-to-black"] .word { color: inherit !important; }
  .hero__scroll-line { animation: none; }
  /* keep videos paused by default for accessibility */
  video[autoplay] { /* still autoplay, but no visual trickery */ }
}

/* ─────────── PRINT ─────────── */
@media print {
  .site-header, .hero__scroll-hint, .video-toggle, .modal, .lang-wrapper { display: none !important; }
  body { background: #fff; color: #000; }
  section { page-break-inside: avoid; }
}

/* ════════════════════════════════════════════════════════════════
   OVERVIEW MOBILE SWIPE
   ─────────────────────────────────────────────────────────────────
   On mobile, the user can swipe horizontally on the overview image to
   change layer (Power Module / PCS / Power Unit). We keep the desktop
   crossfade effect: the swipe triggers the SAME tab.click() that
   desktop uses, so the visual is opacity-based, not horizontal scroll.
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .overview__media {
    /* Let vertical page scroll work; the JS handler will intercept
       horizontal swipes and translate them to tab clicks. */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
  }
  .overview__media:active { cursor: grabbing; }

  /* Image itself must NOT capture the drag — let the container handle it. */
  .overview__media .overview__video {
    -webkit-user-drag: none;
    pointer-events: none;
  }
}
