/* ============================================================
   MOMO 5 — v3 home system (assets/css/momo.css)
   Apple-grade WHITE/GRAY theme. Loaded LAST (layout.jinja).
   Binding contract: .session-review/v3/DESIGN-SYSTEM-V3.md.
   Rules honoured: no viewport-width units (RTL scrollbar
   overflow), logical
   properties, Arabic letter-spacing:0 / font-style:normal /
   display line-height ≥1.6, LTR number islands (.num),
   word-level splits only, prefers-reduced-motion fallbacks,
   svh units with vh fallback.
   ============================================================ */

/* ── v3 Token sheet (DESIGN-SYSTEM-V3 §1 + §3) ────────────── */
:root {
  /* Backgrounds */
  --bg-base:      #ffffff;
  --bg-alt:       #f5f5f7;
  --bg-elevated:  #ffffff;
  --bg-elevated-on-alt: #ffffff;
  --bg-inverse:   #1d1d1f;

  /* Ink scale (text) */
  --ink-1: #1d1d1f;
  --ink-2: #3a3a3c;
  --ink-3: #6e6e73;
  --ink-4: #86868b;
  --ink-5: #aeaeb2;
  --ink-on-purple: #ffffff;

  /* Purple accent scale (light-bg tuned) */
  --m3-accent:        #7C3AED;
  --m3-accent-hover:  #6D28D9;
  --m3-accent-active: #5B21B6;
  --m3-accent-soft:   #A78BFA;   /* decorative only — never text */
  --m3-accent-tint:   #f3eefd;
  --m3-accent-tint-2: #e9dffb;
  --m3-accent-ring:   rgba(124, 58, 237, 0.35);

  /* Borders & dividers */
  --border-1: #d2d2d7;
  --border-2: #e8e8ed;
  --border-strong: #b9b9bf;
  --divider:  #d2d2d7;

  /* Shadows (Apple ambient: wide, faint, layered) */
  --shadow-1:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 12px rgba(0,0,0,0.05);
  --shadow-2:
    0 2px 4px rgba(0,0,0,0.04),
    0 12px 32px rgba(0,0,0,0.08);
  --shadow-3:
    0 4px 8px rgba(0,0,0,0.04),
    0 24px 64px rgba(0,0,0,0.12);
  --shadow-cta: 0 2px 8px rgba(124,58,237,0.28), 0 8px 24px rgba(124,58,237,0.18);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 980px;

  /* Spacing rhythm (§3) */
  --section-pad-y:    120px;
  --section-pad-y-sm: 72px;
  --chapter-gap:      24px;
  --maxw-content:     980px;
  --maxw-media:       1200px;
  --maxw-page:        1440px;
  --gutter:           24px;
  --gutter-lg:        48px;

  /* Fonts (§2) */
  --momo-font-ar: 'IBM Plex Sans Arabic', 'Inter', system-ui, -apple-system, sans-serif;
  --momo-font-lat: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;

  /* ── Legacy aliases — names kept alive for itsawan-*.css /
     awan-*.css / itsawan-variables.css, repointed at v3 values ── */
  --momo-bg-deep:    var(--bg-base);          /* was navy page bg  */
  --momo-bg:         var(--bg-base);          /* was navy sections */
  --momo-surface:    var(--bg-elevated);      /* was dark cards    */
  --momo-raised:     var(--bg-elevated);      /* was dark raised   */
  --momo-text:       var(--ink-1);            /* was near-white    */
  --momo-text-2:     var(--ink-2);            /* was muted light   */
  --momo-muted:      var(--ink-3);            /* was dim lavender  */
  --momo-accent:     var(--m3-accent);           /* was violet glow   */
  --momo-accent-hi:  var(--m3-accent);           /* was #A78BFA — lavender fails contrast on white, accent purple is the text-safe equivalent */
  --momo-lavender:   var(--m3-accent);           /* highlighted words → poem accent */
  --momo-cta:        var(--m3-accent);
  --momo-success:    #34D399;                 /* stock/secure ticks only */
  --momo-line:       rgba(0, 0, 0, 0.05);     /* hairline on white */
  --momo-border:     var(--border-1);
  --momo-glow:       rgba(124, 58, 237, 0.22);
  --momo-specs-bg:     var(--bg-alt);
  --momo-specs-text:   var(--ink-1);
  --momo-specs-muted:  var(--ink-3);
}

/* Clip horizontal overflow instead of viewport-width tricks */
html, body { max-width: 100%; overflow-x: clip; }

body {
  background: var(--bg-base);
  color: var(--ink-1);
  font-family: var(--momo-font-ar);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Arabic script guards (binding §2): never tracked, never italic */
:lang(ar) { letter-spacing: 0 !important; font-style: normal !important; }

/* LTR number islands in RTL prose — every number, price, model no. */
.num {
  unicode-bidi: isolate;
  direction: ltr;
  font-family: var(--momo-font-lat);
  font-variant-numeric: tabular-nums;
  font-style: normal;
  letter-spacing: 0;
}
/* Legacy class alias (v2 markup) */
.momo-num { font-variant-numeric: tabular-nums; font-family: var(--momo-font-lat); unicode-bidi: isolate; }

/* Latin display helper (en runs) — negative tracking is Latin-only */
.m3-lat,
.momo-lat { font-family: var(--momo-font-lat); font-weight: 800; letter-spacing: -.015em; }

/* Screen-reader-only utility (fx DOM contracts use it) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Shared keyboard focus ring */
.btn-primary:focus-visible,
.m3-link:focus-visible,
.m3-playbtn:focus-visible {
  outline: 3px solid var(--m3-accent);
  outline-offset: 2px;
}

/* ============================================================
   TYPOGRAPHY SCALE (§2) — Arabic metrics are the default
   (page is dir=rtl, Arabic-first); Latin via :lang(en).
   ============================================================ */
.m3-eyebrow {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  font-style: normal;
  color: var(--m3-accent);
  margin: 0 0 16px;
}
:lang(en) .m3-eyebrow,
.m3-eyebrow:lang(en) {
  font-family: var(--momo-font-lat);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.43;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.m3-h1, .m3-h2, .m3-h3 {
  color: var(--ink-1);
  font-weight: 700;
  letter-spacing: 0;
  font-style: normal;
  margin: 0;
}
.m3-h1 { font-size: 56px; line-height: 1.65; }          /* hero only, 1 per page */
.m3-h2 { font-size: 42px; line-height: 1.65; margin-block-end: 24px; }
.m3-h3 { font-size: 30px; line-height: 1.62; }
:lang(en) .m3-h1, .m3-h1:lang(en) {
  font-family: var(--momo-font-lat); font-size: 64px; font-weight: 800;
  line-height: 1.05; letter-spacing: -.022em;
}
:lang(en) .m3-h2, .m3-h2:lang(en) {
  font-family: var(--momo-font-lat); font-size: 48px; font-weight: 800;
  line-height: 1.08; letter-spacing: -.018em;
}
:lang(en) .m3-h3, .m3-h3:lang(en) {
  font-family: var(--momo-font-lat); font-size: 32px; font-weight: 800;
  line-height: 1.15; letter-spacing: -.012em;
}

.m3-intro {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0;
  color: var(--ink-3);
  max-width: 640px;
  margin: 0;
}
:lang(en) .m3-intro, .m3-intro:lang(en) {
  font-family: var(--momo-font-lat);
  line-height: 1.47;
  letter-spacing: -.003em;
}

.m3-body-sm { font-size: 15px; line-height: 1.7; color: var(--ink-3); margin: 0; }
:lang(en) .m3-body-sm, .m3-body-sm:lang(en) { line-height: 1.5; }

.m3-caption {
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ink-4);   /* 3.62:1 floor — ≥13px Arabic only */
  margin: 0;
}
:lang(en) .m3-caption, .m3-caption:lang(en) {
  font-size: 12px; line-height: 1.33; letter-spacing: .01em;
}

/* Mobile display scale-down (§2): 36/30/22 Arabic */
@media (max-width: 768px) {
  .m3-h1 { font-size: 36px; }
  .m3-h2 { font-size: 30px; }
  .m3-h3 { font-size: 22px; }
  :lang(en) .m3-h1, .m3-h1:lang(en) { font-size: 40px; }
  :lang(en) .m3-h2, .m3-h2:lang(en) { font-size: 34px; }
  :lang(en) .m3-h3, .m3-h3:lang(en) { font-size: 24px; }
}

/* ============================================================
   COMPONENTS (§5)
   ============================================================ */

/* Primary CTA — filled purple pill, static top shine, no borders */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--r-pill);
  background-color: var(--m3-accent);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.14), transparent 55%);
  color: var(--ink-on-purple);
  font-family: var(--momo-font-ar);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: background-color 180ms ease-out, transform 180ms ease-out, box-shadow 180ms ease-out;
}
.btn-primary:hover { background-color: var(--m3-accent-hover); transform: translateY(-1px); }
.btn-primary:active {
  background-color: var(--m3-accent-active);
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(124,58,237,0.3);
}

/* fx-shiny-btn — periodic specular sweep (EFFECTS-SPEC §3).
   The ::after band, keyframes and .shine-run plumbing are single-sourced
   in fx.css; momo.css owns only the button skin (.btn-primary above). */
/* Touch: no hover lift, keep :active press */
@media (hover: none) {
  .btn-primary:hover { transform: none; }
}

/* Secondary text link — naked, chevron mirrored in RTL */
.m3-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--m3-accent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.m3-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.m3-link-chev { display: inline-block; transition: transform 180ms ease-out; }
[dir="rtl"] .m3-link-chev { transform: scaleX(-1); }
.m3-link:hover .m3-link-chev { transform: translateX(3px); }
[dir="rtl"] .m3-link:hover .m3-link-chev { transform: scaleX(-1) translateX(3px); } /* 3px toward reading direction */

/* Price block (§5 — always paired, never price alone) */
.price { display: flex; flex-direction: column; gap: 4px; }
.price-now { color: var(--ink-1); font-size: 30px; font-weight: 700; line-height: 1.62; }
.price-now .num { font-size: 32px; font-weight: 800; }
.price-install { font-size: 15px; line-height: 1.7; color: var(--ink-3); }
.price-list { font-size: 17px; color: var(--ink-4); text-decoration: line-through; }
.price-vat { font-size: 13px; line-height: 1.6; color: var(--ink-4); }

/* Badges / pills */
.m3-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--m3-accent-tint);
  color: var(--m3-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.m3-badge:hover { background: var(--m3-accent-tint-2); }
.m3-badge--dot {
  background: transparent;
  color: var(--ink-2);
  padding-inline: 0;
}
.m3-badge--dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--m3-accent-soft);   /* decorative dot — the one legal lavender use */
  flex: none;
}
.m3-badge--dot:hover { background: transparent; }

/* Cards — two sanctioned variants only, never border + heavy shadow */
.m3-card {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: box-shadow 180ms ease-out;
}
.m3-card:hover { box-shadow: var(--shadow-2); }
.m3-card--hairline {
  background: var(--bg-elevated-on-alt);
  border: 1px solid var(--border-1);
  box-shadow: none;
  padding: 22px 20px;
}
.m3-card--hairline:hover { box-shadow: none; }

/* ============================================================
   MEDIA / VIDEO BLENDING (§4) — kill the rectangle seam
   ============================================================ */
.m3-media {
  position: relative;
  background: transparent;         /* wrapper bg = section bg exactly */
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.m3-media video,
.m3-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;         /* never a black box while loading */
}
.m3-media--vertical { aspect-ratio: 4 / 5; }
.m3-media--wide { aspect-ratio: 16 / 9; }

/* Edge-fade mask: 3% vertical / 2% horizontal — subtle soft edge only */
.video-bleed {
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 3%, #000 97%, transparent 100%),
    linear-gradient(to right,  transparent 0, #000 2%, #000 98%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(to bottom, transparent 0, #000 3%, #000 97%, transparent 100%),
    linear-gradient(to right,  transparent 0, #000 2%, #000 98%, transparent 100%);
          mask-composite: intersect;
}
/* Radial variant — hero device loop */
.video-bleed--radial {
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 50% 50%, #000 75%, transparent 100%);
          mask-image: radial-gradient(ellipse 82% 92% at 50% 50%, #000 75%, transparent 100%);
}

/* Sticky chapters: media pinned, copy column OPAQUE so scrubbed
   text never ghosts over video (§4.5) */
.m3-sticky-media { position: sticky; top: 96px; }
.m3-sticky-copy { background: var(--bg-base); }

/* Tap-to-play affordance on muted video cards */
.m3-playbtn {
  position: absolute;
  inset-block-end: 16px;
  inset-inline-end: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  padding: 0;          /* beat Zid's generic button{padding:8px 24px} — it was
                          collapsing the content box to 0 and flex-shrinking the svg away */
  min-width: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-2);
  cursor: pointer;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}
.m3-playbtn:hover { transform: scale(1.06); }
.m3-playbtn svg { width: 18px; height: 18px; fill: var(--m3-accent); }
.m3-playbtn.is-hidden { opacity: 0; pointer-events: none; }

/* ============================================================
   SECTIONS — m3 class contract
   <section class="m3-sec [m3-sec--alt]"> / .m3-wrap / .m3-wrap--media
   Chapter alternation: odd white, even --bg-alt, HARD edges.
   ============================================================ */
.m3-sec {
  position: relative;
  padding-block: var(--section-pad-y);
  background: var(--bg-base);
}
.m3-sec--alt { background: var(--bg-alt); }
.m3-sec--tight { padding-block: 96px; }

.m3-wrap {
  position: relative;
  z-index: 1;                      /* above fx-glbg / fx-liquid layers */
  width: 100%;
  max-width: var(--maxw-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}
.m3-wrap--media {
  position: relative;
  z-index: 1;                      /* same lift as .m3-wrap — an unpositioned wrap
                                      paints UNDER .fx-glbg/.fx-liquid shader layers */
  max-width: var(--maxw-media);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}
@media (min-width: 901px) {
  .m3-wrap { padding-inline: var(--gutter-lg); }
  .m3-wrap--media { padding-inline: var(--gutter-lg); }
}

/* Centered variant (hero, final CTA) — intro ≤3 lines stays centered */
.m3-sec--center { text-align: center; }
.m3-sec--center .m3-intro { margin-inline: auto; }
.m3-sec--center .m3-ctas { justify-content: center; }
.m3-sec--center .price { align-items: center; }

.m3-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-block-start: 32px;
}

/* Two-column split (video card + copy side) */
.m3-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 900px) {
  .m3-split { grid-template-columns: 1fr; }
}

/* ── 1 · HERO (momo-hero) — copy over glbg shader ────────── */
#momo-hero {
  position: relative;
  isolation: isolate;              /* content above .fx-glbg */
  overflow: clip;
  padding-block: 160px 120px;
  text-align: center;
  background: var(--bg-base);
}
#momo-hero .m3-intro { margin-inline: auto; }
#momo-hero .m3-ctas { justify-content: center; }
#momo-hero .price { align-items: center; margin-block-start: 24px; }

/* ── 2 · STICKY BUY BAR (momo-buybar) ──────────────────────
   Mobile-only: fixed bottom sheet (desktop hidden by the final
   ≥901px rule at the end of this file).
   JS show/hide hook: .is-visible                                  */
.m3-buybar {
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-block-start: 1px solid var(--border-2);
  box-shadow: var(--shadow-2);
  padding-block-end: env(safe-area-inset-bottom, 0px);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 280ms ease, visibility 0s linear 280ms;
}
.m3-buybar.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition: transform 280ms ease;
}
.m3-buybar .btn-primary { padding: 12px 22px; font-size: 15px; }
.m3-buybar-price { display: flex; align-items: baseline; gap: 8px; color: var(--ink-1); font-weight: 600; }
.m3-buybar-price .num { font-weight: 800; font-size: 20px; }

/* ── 3 · USES (momo-uses) — vertical video + copy side ───── */
#momo-uses .m3-media--vertical { max-width: 420px; margin-inline: auto; }

/* ── 4 · EYE (momo-eye) — existing transform-only pin hooks,
        recolored to light. Class contract unchanged. ──────── */
.momo-eye { position: relative; height: 300vh; }
@supports (height: 100svh) {
  .momo-eye { height: 300svh; }
}
.momo-eye-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* product rides the top zone … */
  padding-block-start: clamp(64px, 10vh, 110px);
  overflow: clip;
  --eye-p: 0;
  --eye-t: 0;
  --eye-t2: 0;
}
@supports (height: 100svh) {
  .momo-eye-stage { height: 100svh; }
}
.momo-eye-glow {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 90vmin;
  height: 90vmin;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, .20) 0%, rgba(124, 58, 237, .07) 42%, transparent 70%);
  opacity: calc(.25 + .75 * var(--eye-p));
  pointer-events: none;
}
.momo-eye-figure {
  position: relative;
  margin: 0;
  line-height: 0;
  height: 52vh; /* fixed box — no layout work on scroll; bottom stays clear
                   of the caption zone (caption top ≈ 65vh) at full scale */
}
@media (max-width: 900px) { .momo-eye-figure { height: 46vh; } }
@media (max-height: 700px) { .momo-eye-figure { height: 42vh; } }
.momo-eye-figure img {
  height: 100%;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  transform: scale(calc(.43 + .57 * var(--eye-p)));
  transform-origin: 50% 50%;
  will-change: transform;
  filter: drop-shadow(0 24px 60px rgba(29, 29, 31, .12));
}
.momo-eye-caption {
  position: absolute;
  inset-block-end: clamp(40px, 9vh, 96px);
  inset-inline: 0;
  max-width: var(--maxw-content);
  margin-inline: auto;
  text-align: center;
  padding-inline: 24px;
}
.momo-eye-caption h2 {
  font-family: var(--momo-font-ar);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.65; /* Arabic display text: diacritics clip below 1.5 */
  letter-spacing: 0;
  font-style: normal;
  color: var(--ink-1);
  margin-block: 6px 10px;
  margin-inline: 0;
  opacity: var(--eye-t);
  translate: 0 calc((1 - var(--eye-t)) * 18px);
}
.momo-eye-caption p {
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.7;
  color: var(--m3-accent); /* was lavender — fails contrast on white */
  font-weight: 600;
  margin: 0;
  opacity: var(--eye-t2, 1);
  translate: 0 calc((1 - var(--eye-t2, 1)) * 14px);
}

/* ── 5 · GESTURES (momo-gestures) — vertical video + 4 cards ─ */
.m3-gesture-card {
  padding-block: 28px 24px;
  padding-inline: 20px;
  text-align: center;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
}
.m3-gesture-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.m3-gesture-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink-1);
  margin-block: 0 6px;
  margin-inline: 0;
}
.m3-gesture-card p { font-size: 15px; line-height: 1.7; color: var(--ink-3); margin: 0; }
/* Drawn icon chip — ✌️ is inline SVG here, NEVER emoji text */
.m3-gesture-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--m3-accent-tint);
}
.m3-gesture-icon svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--m3-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Inside the split (video + cards), gestures read best as a calm 2×2 grid */
#momo-gestures .m3-cards { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { #momo-gestures .m3-cards { grid-template-columns: 1fr; } }

/* ── 6 · GALLERY (momo-gallery) — arc carousel ─────────── */
/* Section bg stays --bg-base: specs right after is --alt (alternation §3) */
.fx-arc { position: relative; overflow: clip; }
.fx-arc__stage {
  position: relative;
  height: clamp(420px, 60vh, 620px);
  perspective: 1200px;
  transform-style: preserve-3d;
}
.fx-arc figure {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  /* NO translate here — arc-carousel.js render() writes translate(-50%,-50%)
     into style.transform; a CSS translate composes with it and shifts cards
     off-stage (owner-reported "cards not in the correct place"). */
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-1);
  backface-visibility: hidden;
}
/* no img rule here — fx.css .fx-arc__card img owns fit (contain + padding) */
.fx-arc figcaption {
  padding-block: 10px;
  padding-inline: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ── 7 · SPECS (momo-specs) — hairline cards grid ────────── */
/* Markup: <dl class="m3-cards"> wrapping .m3-card--hairline divs (grid in bridge below) */
.m3-cards .m3-card dt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-3);
  margin-block-end: 6px;
}
.m3-cards .m3-card dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink-1);
}
.m3-cards .m3-card dd .num { font-weight: 800; }
.m3-cards .m3-card dd small { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--m3-accent); }

/* ── 8 · GAME (momo-game) — styles live in the bridge below (.momo-game-*) ── */

/* ── 9 · POEM (momo-poem) — runway + sticky text layers ──── */
.fx-poem {
  position: relative;
  height: 300vh;
  background: var(--bg-base);
}
@supports (height: 100svh) { .fx-poem { height: 300svh; } }
.fx-poem__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: clip;
  display: flex;
  align-items: center;
  justify-content: center;
}
@supports (height: 100svh) { .fx-poem__sticky { height: 100svh; } }
.fx-poem__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;               /* faint on white; JS scrolls .35 → .15 */
  transform: scale(1.15);
  will-change: transform, opacity;
  pointer-events: none;
}
.fx-poem__text {
  position: relative;
  z-index: 2;                  /* above the depth floats (same z would let later-DOM floats cover text) */
  max-width: 720px;
  padding-inline: 24px;
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 500;
  line-height: 1.75;          /* Arabic display-adjacent: keep ≥1.6 */
  letter-spacing: 0;
  font-style: normal;
  color: var(--ink-1);
}
/* Highlighted words — inactive until JS activates per threshold */
.fx-poem__text span {
  color: var(--m3-accent);
  opacity: .25;
  filter: blur(2px);
  transition: opacity 300ms ease, filter 300ms ease, color 240ms ease;
}
.fx-poem__text span.is-on { opacity: 1; filter: blur(0); }
.fx-poem__float {
  position: absolute;
  width: clamp(120px, 18vw, 260px);
  will-change: transform;
  pointer-events: none;
}

/* ── 10 · FINAL CTA (momo-cta) — centered, glbg cta behind ── */
#momo-cta {
  position: relative;
  isolation: isolate;
  overflow: clip;
  text-align: center;
  padding-block: 120px;
  background: var(--bg-base);
}
#momo-cta .m3-intro { margin-inline: auto; }
#momo-cta .m3-ctas { justify-content: center; }
#momo-cta .price { align-items: center; margin-block: 24px 8px; }
#momo-cta .m3-buyrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; margin-block-start: 28px; }
#momo-cta .m3-buyrow span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
#momo-cta .m3-buyrow svg { width: 16px; height: 16px; fill: none; stroke: var(--momo-success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   FX BACKDROP LAYERS — layout + CSS fallbacks only.
   JS owns canvas painting; these are the no-WebGL / pre-init
   gradients so the page never flashes bare white.
   ============================================================ */
.fx-glbg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fx-glbg[data-variant="hero"] {
  background: linear-gradient(180deg, #ffffff 0%, #f3f0ff 55%, #ede9fe 100%);
}
.fx-glbg[data-variant="cta"] {
  background: linear-gradient(180deg, #ffffff 0%, #f3f0ff 45%, #ede9fe 100%);
}
.fx-glbg canvas { display: block; width: 100%; height: 100%; }

.fx-liquid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, #ede9fe 0%, #ffffff 60%);
}
.fx-liquid canvas { display: block; width: 100%; height: 100%; }

/* Vapour text — canvas container only; JS owns particles */
.fx-vapour { position: relative; min-height: 1.6em; }
.fx-vapour canvas { display: block; width: 100%; height: auto; max-height: 480px; }

/* ============================================================
   SCROLL-MORPH HERO RUNWAY (fx-morph) — direct child of <main>.
   JS writes transform + clip-path per frame; CSS owns rest state.
   ============================================================ */
.fx-morph { position: relative; height: 220vh; background: var(--bg-base); }
@supports (height: 100svh) { .fx-morph { height: 220svh; } }
.fx-morph__sticky {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
}
@supports (height: 100svh) { .fx-morph__sticky { height: 100svh; } }
.fx-morph__card {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-base);
  box-shadow: var(--shadow-3);
  transform: translateY(4vh) scale(.62);
  transform: translateY(4svh) scale(.62);
  clip-path: inset(6% 14% 6% 14% round var(--r-lg));
  will-change: transform, clip-path;
}
.fx-morph__card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
@media (max-width: 900px) {
  .fx-morph { height: 180vh; }
  @supports (height: 100svh) { .fx-morph { height: 180svh; } }
}

/* ============================================================
   LEGACY v2 CHROME — kept alive, recolored (markup migration
   is owned by other agents; these prevent dark-on-dark renders
   if any v2 class survives a deploy).
   ============================================================ */
.momo-gridlines {
  position: fixed;
  inset-block: 0;
  inset-inline: 0;
  z-index: 1;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.momo-gridlines span { border-inline-start: 1px solid var(--momo-line); }
.momo-gridlines span:last-child { border-inline-end: 1px solid var(--momo-line); }

/* ============================================================
   RESPONSIVE — mobile pads + runway trims
   ============================================================ */
@media (max-width: 900px) {
  .m3-sec { padding-block: var(--section-pad-y-sm); }
  .m3-sec--tight { padding-block: 64px; }
  #momo-hero { padding-block: 96px 64px; }
  #momo-cta { padding-block: 96px; }
  .momo-eye { height: 220vh; }
  @supports (height: 100svh) { .momo-eye { height: 220svh; } }
  .fx-poem { height: 240vh; }
  @supports (height: 100svh) { .fx-poem { height: 240svh; } }
}

/* ============================================================
   REDUCED MOTION — pins off, static fallbacks, no sweeps
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Buy bar: appear/disappear without slide */
  .m3-buybar,
  .m3-buybar.is-visible { transition: none; }

  /* Buttons/cards: state change without motion */
  .btn-primary, .m3-card, .m3-gesture-card, .m3-link-chev, .m3-playbtn { transition: none; }
  .btn-primary:hover, .m3-gesture-card:hover { transform: none; }

  /* Scroll-morph hero: static full-bleed card, poster only */
  .fx-morph { height: auto; }
  .fx-morph__sticky { position: relative; height: auto; padding-block: var(--section-pad-y-sm); }
  .fx-morph__card {
    position: relative;
    transform: none;
    clip-path: none;
    border-radius: var(--r-lg);
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-2);
    will-change: auto;
  }

  /* Eye pin: fully revealed static composition */
  .momo-eye { height: auto; }
  .momo-eye-stage { position: relative; height: auto; min-height: 0; padding-block: 88px; --eye-p: 1; --eye-t: 1; --eye-t2: 1; }
  .momo-eye-caption { position: relative; inset: auto; margin-block-start: 28px; }
  .momo-eye-caption h2, .momo-eye-caption p { opacity: 1; translate: none; }
  .momo-eye-figure img { transform: none; will-change: auto; }

  /* Arc carousel: static horizontal scroll-snap strip */
  .fx-arc__stage {
    perspective: none;
    transform-style: flat;
    height: auto;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-block: 8px;
    scrollbar-width: none;
  }
  .fx-arc__stage::-webkit-scrollbar { display: none; }
  .fx-arc figure {
    position: relative;
    inset: auto;
    transform: none !important;
    opacity: 1 !important;
    flex: 0 0 min(72%, 320px);
    scroll-snap-align: center;
  }

  /* Poem: full text visible, purple spans, static composition */
  .fx-poem { height: auto; }
  .fx-poem__sticky { position: relative; height: auto; padding-block: 88px; }
  .fx-poem__bg { opacity: .15; transform: none; will-change: auto; }
  .fx-poem__text span { opacity: 1; filter: none; transition: none; }
  .fx-poem__float { display: none; }

  /* Game overlay: hide without fade */
  .momo-game-overlay { transition: none; }
}

/* ── v3 INTEGRATION BRIDGE — styles for the exact markup classes shipped in sections/ ── */

/* Buy bar: markup is a flat flex row (no .m3-buybar-inner wrapper) */
.m3-buybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}
.m3-buybar > * { flex-shrink: 0; }
.m3-buybar-name {
  font-family: var(--momo-font-lat, "Inter", system-ui, sans-serif);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  white-space: nowrap;
}
.m3-buybar-price small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.5;
}
.m3-buybar-btn { padding: 12px 22px; font-size: 15px; }
@media (max-width: 560px) {
  .m3-buybar { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .m3-buybar-name { display: none; }
}

/* Card grids (specs <dl class="m3-cards">, gestures) */
.m3-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
}
@media (max-width: 1100px) { .m3-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .m3-cards { grid-template-columns: 1fr; } }

/* Game teaser card (sections/momo-game.jinja uses .momo-game-* names) */
.momo-game-teaser {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow-2);
  cursor: pointer;
}
.momo-game-teaser video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
.momo-game-overlay {
  /* Owner request 2026-09-20: text lives BELOW the video card in normal
     flow — the teaser video stays completely clear. */
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: center;
  padding: 20px 24px 4px;
  background: none;
  transition: opacity 350ms ease, visibility 0s linear 350ms;
}
/* .momo-game-play removed 2026-09-21 (owner: no floating play button) */
.momo-game-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.momo-game-overlay .m3-h2 { margin: 0; }
.momo-game-overlay .m3-intro { max-width: 460px; margin: 0; }
.momo-game-fine {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.momo-game-teaser .momo-game-frame { position: absolute; inset: 0; z-index: 3; background: var(--bg-alt); }
.momo-game-teaser .momo-game-frame iframe { width: 100%; height: 100%; border: 0; }
/* [hidden] loses to any display:flex/block author rule — re-assert it where JS toggles it */
.momo-game-frame[hidden],
.momo-game-fallback[hidden],
.momo-game-post[hidden] { display: none !important; }
.momo-game-teaser .momo-game-fallback {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 32px; color: var(--ink-2); background: var(--bg-alt);
}
.momo-game-post {
  margin: 28px auto 0;
  max-width: var(--maxw-content);
  text-align: center;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* Final CTA campaign discount line */
.momo-cta-campaign {
  display: inline-block;
  margin: 18px 0 0;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--m3-accent-tint);
  color: var(--m3-accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .momo-game-overlay { transition: none; }
  .m3-buybar { transition: none; }
}

/* ── v3 decision: buy bar is MOBILE-ONLY ───────────────────
   Desktop keeps the header CTA + a buy link after every chapter
   (Apple pattern). Without this, the fixed bar duplicates the
   header on ≥901px. Appended last so it beats the bridge flex
   rule above at equal specificity. */
@media (min-width: 901px) {
  .m3-buybar { display: none !important; }
}
