/* =============================================================================
   AIO manifesto theatre, mobile edition (2026-10-04, v1).
   Phones and portrait tablets (<1024px). Real looping video inside the
   windows; the scroll drives only the choreography, with GPU transforms and
   opacity. Everything lives under html.premium-mf-m, which manifesto-m.js
   adds together with html.premium-mf (so the stage / titles / line styles in
   manifesto.css apply). Without the class the section is the static text.
   ========================================================================== */
.mm { display: none; }

html.premium-mf-m .mf-canvas { display: none; }
html.premium-mf-m .mm {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* chapter 1: the blueprint grid */
html.premium-mf-m .mm-grid {
  position: absolute;
  inset: -25%;
  background-image:
    linear-gradient(rgba(0, 71, 255, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 255, 0.42) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center;
  will-change: transform, opacity;
}

/* arched windows (the radius is set per element by the script: 45% of width) */
html.premium-mf-m .mm-win {
  position: absolute;
  left: 50%;
  top: 0;
  width: 200px;
  height: 356px;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%);
  transform-origin: center;
  background: #0A0A0B;
  box-shadow: inset 0 0 0 1px rgba(245, 245, 240, 0.28);
  outline: 1px solid rgba(245, 245, 240, 0.1);
  outline-offset: 5px;
  will-change: transform, opacity;
}
html.premium-mf-m .mm-win video,
html.premium-mf-m .mm-lat video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0A0A0B;
}
html.premium-mf-m .mm-win video { will-change: filter; }

/* chapter 3: one video carries the whole 3x3 lattice (arches baked in) */
html.premium-mf-m .mm-lat {
  position: absolute;
  left: 50%;
  top: 236px;
  width: 300px;
  aspect-ratio: 834 / 1464;
  opacity: 0;
  transform: translateX(-50%);
  transform-origin: top center;
  will-change: transform, opacity;
}
html.premium-mf-m .mm-lat video { width: 100%; height: auto; background: transparent; }
html.premium-mf-m .mm-bezels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
html.premium-mf-m .mm-bezels .bz {
  fill: none;
  stroke: rgba(245, 245, 240, 0.32);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
/* a short blue light runs round each arch on its own clock (pathLength=100) */
html.premium-mf-m .mm-bezels .sw {
  fill: none;
  stroke: rgba(0, 71, 255, 0.95);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 14 100;
  vector-effect: non-scaling-stroke;
  animation: mmSweep 7s linear infinite;
  animation-play-state: paused;   /* runs only while the lattice shows (.sweep-on, 20.10.2026) */
}
html.premium-mf-m .mm-lat.sweep-on .mm-bezels .sw { animation-play-state: running; }
@keyframes mmSweep { from { stroke-dashoffset: 114; } to { stroke-dashoffset: 0; } }
/* per-cell reveal: black overlays that lift one by one as the lattice forms */
html.premium-mf-m .mm-cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.44% 1.44%;
  pointer-events: none;
}
html.premium-mf-m .mm-cell { background: #0A0A0B; opacity: 1; will-change: opacity; }

/* finale: the wordmark opens out of the line, the founder window in front */
html.premium-mf-m .mm-mark {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  font-family: Zodiak, 'Frank Ruhl Libre', Georgia, serif;
  font-weight: 400;
  font-size: 120px;
  line-height: 1;
  letter-spacing: 0;
  line-height: 0;
  direction: ltr;
  color: var(--cream);
  text-shadow: 0 0 36px rgba(0, 71, 255, 0.55);
  white-space: nowrap;
  opacity: 0;
  clip-path: inset(50% 0 50% 0);
  will-change: clip-path, opacity, transform;
}
html.premium-mf-m .mm-oshri { clip-path: inset(0 50% 0 50%); will-change: clip-path, transform, opacity; }

/* titles on the mobile stage */
html.premium-mf-m .mf-kicker { top: 76px; font-size: 11px; letter-spacing: 5px; }
html.premium-mf-m .mf-titles { top: 112px; }
html.premium-mf-m .mf-title {
  width: calc(100vw - 32px);
  font-size: clamp(24px, 6.6vw, 32px);
  line-height: 1.18;
}
html.premium-mf-m .mf-title .mf-num { margin-bottom: 10px; }
html.premium-mf-m .mf-title-end { font-size: clamp(17px, 4.6vw, 22px); }
html.premium-mf-m .mf-stage::after {
  background:
    linear-gradient(to bottom, rgba(10,10,11,0.9) 0, rgba(10,10,11,0) 14%, rgba(10,10,11,0) 91%, rgba(10,10,11,0.92) 100%);
}

/* finale (11.10.2026): phrases kept whole; on a phone one phrase per line, no separators */
html.premium-mf-m .mf-title-end .mf-ph { white-space: nowrap; display: block; }
html.premium-mf-m .mf-title-end .mf-dot { display: none; }

/* brand 2026: the original wordmark, as wide as the old tracked text */
html.premium-mf-m .mm-mark .aio-wm { display: block; width: 2.34em; height: auto; }

/* 22.10.2026: no scale line on phones (Oshri: the blue line across the lattice felt unrelated) */
html.premium-mf-m .mf-line { display: none; }
