/* =============================================================================
   AIO manifesto theatre — scroll-scrubbed chapters for section#about.
   Shared by / and /he/. Everything is gated behind html.premium-mf, which
   manifesto.js adds only on desktop (>=1024px), without reduced-motion, and
   while the a11y stop-motion toggle is off. Without the class the section
   renders exactly as before (label, quote, paragraph).
   ========================================================================== */

.mf-scroll { display: none; }
.mf-sign {
  margin: 34px auto 0;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(209, 209, 214, 0.62);
}
html[lang="he"] .mf-sign { letter-spacing: 0.08em; text-transform: none; font-size: 14px; }

/* body/html carry overflow-x:hidden, which turns body into a scroll container
   and pins the sticky stage to it instead of the viewport. clip clips the same
   way without creating a scroll container. */
html.premium-mf, html.premium-mf body { overflow-x: clip; }

html.premium-mf section#about {
  /* the sticky stage needs real geometry: this section opts out of the
     page-wide lazy rendering, and loses its top padding so the stage starts
     flush under the header */
  content-visibility: visible !important;
  contain-intrinsic-size: auto none !important;
  padding-top: 0 !important;
}
html.premium-mf section#about > .label { display: none; }
/* the quote stays in the accessibility tree (the stage is aria-hidden) */
html.premium-mf section#about > .manifesto-quote {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0;
}
html.premium-mf .manifesto-body { margin-top: 72px; }

html.premium-mf .mf-scroll {
  display: block;
  position: relative;
  height: 420vh;              /* the scrub length: ~3.2 screens of travel */
  height: 420svh;             /* stable on phones while the URL bar collapses */
  width: 100vw;
  /* logical, not physical: in RTL the box is over-constrained and the browser
     drops margin-left, which pushed the whole stage 200px off-centre on /he/ */
  margin-inline-start: calc(50% - 50vw);
}
html.premium-mf .mf-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--bg-base);
}
html.premium-mf .mf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(0);   /* own compositor layer: the sticky stage never repaints the page */
  display: block;
}
/* vignette so the lattice reads as endless at the edges */
html.premium-mf .mf-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10,10,11,0.9) 0, rgba(10,10,11,0) 18%, rgba(10,10,11,0) 78%, rgba(10,10,11,0.92) 100%),
    linear-gradient(to right, rgba(10,10,11,0.75) 0, rgba(10,10,11,0) 14%, rgba(10,10,11,0) 86%, rgba(10,10,11,0.75) 100%);
}

html.premium-mf .mf-kicker {
  position: absolute;
  top: 112px;
  left: 0; right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease;
}
html.premium-mf .mf-kicker.on { opacity: 1; }

html.premium-mf .mf-titles {
  position: absolute;
  top: 150px;
  left: 0; right: 0;
  z-index: 2;
  pointer-events: none;
}
html.premium-mf .mf-title {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1100px, 90vw);
  transform: translate(-50%, 18px);
  text-align: center;
  text-wrap: balance;         /* one line, or two even lines - never an orphan word */
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.22;
  color: var(--cream);
  opacity: 0;
  will-change: opacity, transform;
  text-shadow: 0 2px 24px rgba(10, 10, 11, 0.85);
}
html[lang="he"].premium-mf .mf-title {
  font-family: var(--font-display-he, 'Heebo', sans-serif);
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.01em;
}
html.premium-mf .mf-title em { font-style: inherit; color: var(--accent); }
html.premium-mf .mf-title .mf-num {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.34em;
  color: rgba(209, 209, 214, 0.55);
  margin-bottom: 14px;
}

/* the scale line: a hairline that grows across the stage in chapter 3 */
html.premium-mf .mf-line {
  /* 20.10.2026: positioned and sized by transform only (translateY + scaleX
     from the scripts), so the per-frame update never triggers layout */
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 100%;
  transform-origin: 50% 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, transparent, rgba(0, 71, 255, 0.9), transparent);
  box-shadow: 0 0 18px rgba(0, 71, 255, 0.55);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  html.premium-mf .mf-title { transition: none; }
}

/* finale line: the quote's closing words under the wordmark */
html.premium-mf .mf-title-end {
  font-size: clamp(20px, 2vw, 28px);
  color: rgba(245, 245, 240, 0.78);
}

/* finale (11.10.2026): One Vision · One Team · One Signature, each phrase kept whole */
html.premium-mf .mf-title-end .mf-ph { white-space: nowrap; }
