/* =====================================================================
   RIA — LANDING MOBILE OPTIMIZATION
   Loaded LAST in the landing's CSS cascade so it overrides every
   prior rule on small screens. Fixes the four big mobile issues
   the user has been hitting:

     1. Layout collisions in 3D scenes (text + 3D motif overlap)
     2. Headlines too big at narrow viewports
     3. Scroll budget too long — scenes feel like they hijack
     4. Performance: too many 3D effects + particles on phones

   Two breakpoints used here:
     <900px  → tablet (already partly handled by individual files)
     <700px  → phone (the main target)
     <500px  → small phone (extra tightening)
   ===================================================================== */


/* ── Universal small-screen tightening ───────────────────────────────── */

@media (max-width: 700px) {

  /* Use dynamic viewport height so iOS Safari URL bar doesn't clip
     the sticky scene's bottom progress dots. */
  .scene-3d-track,
  .scroll-scene-track,
  .pipeline-track,
  .verification-track {
    height: 100dvh;
    min-height: 100svh;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* All sticky 3D scenes get a shorter scroll budget on phones — the
     user shouldn't have to scroll 5 viewports for content they can
     read in 3. */
  .scroll-scene { height: 380vh !important; }
  .pipeline-scene { height: 320vh !important; }
  .verification-scene { height: 320vh !important; }
  .scene-3d { height: 320vh !important; }
  .scene-living-db { height: 380vh !important; }
  .scene-methodology { height: 380vh !important; }

  /* Disable expensive backdrop-filters on phone GPUs. */
  .commit-card,
  .pipeline-shape::before,
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Looser perspective so 3D transforms feel less wobbly. */
  .scene-3d-track,
  .scroll-scene-track,
  .pipeline-track {
    perspective: 1000px !important;
  }

  /* The sticky .navbar is ~68px tall, semi-transparent. We need the
     scene's eyebrow AND text-stack to sit BELOW it on mobile,
     otherwise they slide behind the blurred navbar and become
     unreadable. */
  .scene-eyebrow,
  .scroll-eyebrow {
    top: max(80px, calc(env(safe-area-inset-top, 0px) + 76px)) !important;
    font-size: 0.62rem !important;
    padding: 0.35rem 0.7rem !important;
    z-index: 5 !important;
  }
  .scene-progress-dots {
    bottom: max(3vh, env(safe-area-inset-bottom, 0px)) !important;
    z-index: 5 !important;
  }
  .scene-progress-dots .dot { width: 16px; height: 2px; }

  /* Anatomy scene's caption column has its own eyebrow markup. */
  .scroll-panel { padding-top: 80px; }
}


/* ── Hero ────────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .hero {
    padding: 5rem 1rem 3rem !important;
    min-height: auto;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem) !important;
    line-height: 1 !important;
    max-width: 14ch !important;
  }
  .hero p {
    font-size: 0.98rem !important;
    line-height: 1.55;
    max-width: 38ch;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 0.6rem !important;
  }
  .hero-cta-row .btn-lg {
    padding: 0.85rem 1.2rem !important;
    font-size: 0.95rem !important;
    width: 100%;
    justify-content: center;
  }
  /* Magnetic CTA tilts feel weird on phones — disable. */
  .hero .btn-gradient[data-magnetic] {
    transform: none !important;
  }
  .editorial-eyebrow {
    font-size: 0.62rem !important;
    letter-spacing: 0.16em !important;
    padding: 0.3rem 0.65rem !important;
  }
}


/* ── Manifesto scene ─────────────────────────────────────────────────── */

@media (max-width: 700px) {
  /* Cut the paper count visually — half of them are hidden so the
     wall reads as atmosphere, not as a busy collage. */
  .papers-wall .paper-tile { width: 60px; height: 80px; }
  .papers-wall .paper-tile:nth-child(2),
  .papers-wall .paper-tile:nth-child(7),
  .papers-wall .paper-tile:nth-child(8),
  .papers-wall .paper-tile:nth-child(11),
  .papers-wall .paper-tile:nth-child(12) { display: none; }
  /* Push the surviving tiles further to corners so they don't
     intrude on the centred text. */
  .papers-wall .paper-tile:nth-child(1)  { top: 12%; left: 4%; }
  .papers-wall .paper-tile:nth-child(3)  { top: 4%;  left: 75%; }
  .papers-wall .paper-tile:nth-child(4)  { top: 14%; left: 88%; }
  .papers-wall .paper-tile:nth-child(5)  { top: 78%; left: 2%; }
  .papers-wall .paper-tile:nth-child(6)  { top: 84%; left: 22%; }
  .papers-wall .paper-tile:nth-child(9)  { top: 80%; left: 75%; }
  .papers-wall .paper-tile:nth-child(10) { top: 76%; left: 90%; }

  /* Stronger vignette so the headline reads cleanly. */
  .scene-manifesto .scene-3d-track::before {
    background: radial-gradient(ellipse 70% 40% at 50% 50%,
      rgba(5, 5, 9, 0.98) 0%,
      rgba(5, 5, 9, 0.85) 35%,
      transparent 80%) !important;
  }
}


/* ── Anatomy of a Paper scene (.scroll-scene) ────────────────────────── */

@media (max-width: 900px) {
  .scroll-scene-track {
    grid-template-columns: 1fr !important;
    grid-template-rows: 60% 40% !important;
    gap: 0 !important;
    align-content: stretch !important;
  }
  /* Paper sits in the top half, captions in the bottom half. */
  .scroll-scene-stage {
    height: 100% !important;
    padding-top: 6vh;
  }
  .paper-3d {
    width: clamp(160px, 50vw, 240px) !important;
  }
  .scroll-scene-text {
    height: 100% !important;
    padding-bottom: 8vh;
  }
}

@media (max-width: 700px) {
  .scroll-panel h3 {
    font-size: clamp(1.4rem, 6vw, 1.8rem) !important;
  }
  .scroll-panel p { font-size: 0.92rem !important; line-height: 1.5; }
  .scroll-panel .stat { font-size: 0.78rem !important; }
  .scroll-scene-progress .dot { width: 16px; }
}


/* ── Pipeline scene (PDF → AI → Report) ──────────────────────────────── */

@media (max-width: 700px) {
  .pipeline-shapes {
    gap: 0.85rem !important;
  }
  .pipeline-shape {
    width: 64px !important;
    height: 64px !important;
  }
  .pipeline-shape .label {
    font-size: 0.55rem !important;
    bottom: -1.4rem;
  }
  .pipeline-title {
    font-size: clamp(1.5rem, 7vw, 2rem) !important;
    margin-bottom: 2rem !important;
    max-width: 18ch;
  }
  .pipeline-final .num {
    font-size: clamp(2.4rem, 10vw, 3.4rem) !important;
  }
  .pipeline-final .label { font-size: 0.62rem; letter-spacing: 0.14em; }
}


/* ── Living Database scene ───────────────────────────────────────────── */

@media (max-width: 700px) {
  .scene-living-db .scene-text-stack {
    top: 130px !important;     /* clears navbar (68px) + eyebrow (~50px) */
    width: calc(100% - 2rem) !important;
  }
  .scene-living-db .scene-headline {
    font-size: clamp(1.5rem, 7vw, 2rem) !important;
  }
  .scene-living-db .scene-body {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    max-width: 36ch !important;
  }
  .scene-living-db .scene-stat { font-size: 0.7rem !important; }

  /* Smaller orb and tighter ring radius for verifiers. */
  .living-db-core {
    width: 150px !important;
    height: 150px !important;
    margin-left: -75px !important;
    margin-top: -75px !important;
    top: 62% !important;
  }
  .living-db-core .core-label { font-size: 0.55rem; }
  .living-db-core .core-label strong { font-size: 0.78rem; }

  .scene-living-db .db-source {
    font-size: 0.55rem !important;
    padding: 0.3rem 0.55rem !important;
    top: 45% !important;
  }
  .scene-living-db .db-source.s-1 { left: 4% !important; }
  .scene-living-db .db-source.s-2 { right: 4% !important; }
  .scene-living-db .db-source::after {
    width: 12vw !important;
  }

  .scene-living-db .db-paper {
    top: 62% !important;
    width: 56px !important;
    height: 78px !important;
    margin-left: -28px !important;
    margin-top: -39px !important;
  }
  .scene-living-db .db-layer {
    font-size: 0.5rem !important;
    padding: 0.25rem 0.45rem !important;
    top: calc(62% - 16px) !important;
  }
  .scene-living-db .db-layer.l-1 { left: 4% !important; transform: none !important; }
  .scene-living-db .db-layer.l-2 { right: 4% !important; transform: none !important; }

  /* Verifier ring shrinks. Hide 2 of the 6 to keep it readable. */
  .scene-living-db .db-verifier {
    width: 30px !important;
    height: 30px !important;
    margin-left: -15px !important;
    margin-top: -15px !important;
    top: 62% !important;
    transform: rotate(var(--angle)) translateX(85px) rotate(calc(-1 * var(--angle))) scale(0.7) !important;
  }
  .scene-living-db[style*="--c-stage: 2"] .db-verifier,
  .scene-living-db[style*="--c-stage:2"]  .db-verifier {
    transform: rotate(var(--angle)) translateX(85px) rotate(calc(-1 * var(--angle))) scale(1) !important;
  }
  .db-verifier svg { width: 14px !important; height: 14px !important; }
  .db-verifier .role { display: none !important; }
  /* Hide the trailing two on phones — too crowded. */
  .scene-living-db .db-verifier.v-5,
  .scene-living-db .db-verifier.v-6 { display: none !important; }

  .scene-living-db .db-loop-arrow {
    width: 220px !important;
    height: 220px !important;
    margin-left: -110px !important;
    margin-top: -110px !important;
    top: 62% !important;
  }
}


/* ── Methodology scene ──────────────────────────────────────────────── */

@media (max-width: 700px) {
  .scene-methodology .scene-text-stack {
    top: 130px !important;     /* clears navbar + eyebrow */
    width: calc(100% - 2rem) !important;
  }
  .scene-methodology .scene-headline {
    font-size: clamp(1.5rem, 7vw, 2rem) !important;
  }
  .scene-methodology .scene-body {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    max-width: 36ch !important;
  }

  /* Pipeline at the bottom of the viewport, vertical layout. */
  .scene-methodology .method-pipeline {
    flex-direction: row !important;       /* keep horizontal but tight */
    gap: 0.4rem !important;
    bottom: 6vh !important;
    top: auto !important;
    width: calc(100% - 2rem);
    justify-content: space-between;
  }
  .scene-methodology .method-pipeline-rail {
    width: auto !important;
    height: 2px !important;
    top: 24px !important;
    left: 30px !important;
    right: 30px !important;
    bottom: auto !important;
  }
  .scene-methodology .method-pipeline-rail::before {
    transform: scaleX(var(--c-progress, 0)) !important;
    transform-origin: left center !important;
    background: linear-gradient(90deg,
      rgba(139,92,246,0.9), rgba(34,211,238,0.9)) !important;
  }
  .scene-methodology .method-step {
    width: auto !important;
    flex: 1 1 0;
    min-width: 0;
  }
  .scene-methodology .method-step .node {
    width: 48px !important;
    height: 48px !important;
  }
  .scene-methodology .method-step .node svg {
    width: 18px !important;
    height: 18px !important;
  }
  .scene-methodology .method-step .label {
    margin-top: 0.4rem !important;
    font-size: 0.55rem !important;
    letter-spacing: 0.08em !important;
  }
  .scene-methodology .method-step .meta {
    font-size: 0.5rem !important;
    margin-top: 0.15rem !important;
  }
}


/* ── Commitments scene ──────────────────────────────────────────────── */

@media (max-width: 700px) {
  .scene-commitments .scene-text-stack {
    top: 130px !important;
  }
  .scene-commitments .commit-orbit {
    width: 280px !important;
    height: 280px !important;
  }
  .commit-card {
    width: 130px !important;
    height: 160px !important;
    margin: -80px 0 0 -65px !important;
    padding: 0.85rem !important;
  }
  .commit-card.c-1 { transform: rotateY(0deg)   translateZ(105px) !important; }
  .commit-card.c-2 { transform: rotateY(120deg) translateZ(105px) !important; }
  .commit-card.c-3 { transform: rotateY(240deg) translateZ(105px) !important; }

  /* Active card stage transforms get matching scale. */
  .scene-commitments[style*="--c-stage: 0"] .commit-card.c-1,
  .scene-commitments[style*="--c-stage:0"]  .commit-card.c-1 {
    transform: rotateY(0deg)   translateZ(125px) scale(1.04) !important;
  }
  .scene-commitments[style*="--c-stage: 1"] .commit-card.c-2,
  .scene-commitments[style*="--c-stage:1"]  .commit-card.c-2 {
    transform: rotateY(120deg) translateZ(125px) scale(1.04) !important;
  }
  .scene-commitments[style*="--c-stage: 2"] .commit-card.c-3,
  .scene-commitments[style*="--c-stage:2"]  .commit-card.c-3 {
    transform: rotateY(240deg) translateZ(125px) scale(1.04) !important;
  }

  .commit-card h4 { font-size: 0.95rem !important; }
  .commit-card p  { font-size: 0.74rem !important; line-height: 1.4 !important; }
  .commit-card .icon { width: 28px !important; height: 28px !important; margin-bottom: 0.4rem; }

  .commit-founder {
    bottom: 6vh !important;
    padding: 0.6rem 0.9rem !important;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 2rem);
  }
  .commit-founder .name { font-size: 0.78rem !important; }
  .commit-founder .role { font-size: 0.6rem !important; margin-left: 0 !important; }
}


/* ── Support scene ──────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .scene-support .scene-text-stack {
    top: 130px !important;
  }
  .scene-support .support-stack {
    width: 240px !important;
  }
  .support-coin {
    width: 200px !important;
    height: 30px !important;
    margin-left: -100px !important;
    padding: 0 0.85rem !important;
    font-size: 0.6rem !important;
  }
  .support-coin .label { font-size: 0.6rem !important; }
  .support-coin .value { font-size: 0.62rem !important; }
  .support-coin.s-1 { bottom: 12% !important; }
  .support-coin.s-2 { bottom: 24% !important; transform: translateZ(15px) rotateZ(1deg) !important; }
  .support-coin.s-3 { bottom: 36% !important; transform: translateZ(30px) rotateZ(-1deg) !important; }

  .support-cta-emerge {
    bottom: 6vh !important;
    padding: 0.7rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
}


/* ── Marquee + bento grid + nav ──────────────────────────────────────── */

@media (max-width: 700px) {
  .editorial-marquee { padding: 0.8rem 0 !important; margin: 3rem 0 !important; }
  .editorial-marquee-track { gap: 1.8rem !important; }
  .editorial-marquee-track span { font-size: 0.95rem !important; }

  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .feature-card.col-span-2 { grid-column: span 1 !important; }
  .feature-card { padding: 1.2rem !important; }
  .feature-card h3 { font-size: 1.15rem !important; }
  .feature-card p { font-size: 0.92rem !important; }

  /* Mobile nav drawer */
  .nav-links { display: none; }
  .menu-toggle { display: flex !important; }
}


/* ── Smaller phones (<500px) — extra tightening ──────────────────────── */

@media (max-width: 500px) {
  .hero h1 { font-size: clamp(2.2rem, 12vw, 3rem) !important; }
  .hero p  { font-size: 0.94rem !important; }

  .scene-headline { font-size: 1.45rem !important; }
  .scene-body     { font-size: 0.86rem !important; }

  /* Extra-shrink Living DB on tiny screens. */
  .living-db-core { width: 130px !important; height: 130px !important; margin-left: -65px !important; margin-top: -65px !important; }
  .scene-living-db .db-verifier {
    transform: rotate(var(--angle)) translateX(70px) rotate(calc(-1 * var(--angle))) scale(0.65) !important;
  }
  .scene-living-db[style*="--c-stage: 2"] .db-verifier,
  .scene-living-db[style*="--c-stage:2"]  .db-verifier {
    transform: rotate(var(--angle)) translateX(70px) rotate(calc(-1 * var(--angle))) scale(0.95) !important;
  }
  .scene-living-db .db-loop-arrow {
    width: 180px !important; height: 180px !important;
    margin-left: -90px !important; margin-top: -90px !important;
  }

  /* Methodology: 5 nodes on a 320px viewport is too tight. Drop the
     timing meta line — keep label only. */
  .scene-methodology .method-step .meta { display: none !important; }
  .scene-methodology .method-step .node { width: 40px !important; height: 40px !important; }
  .scene-methodology .method-step .node svg { width: 14px !important; height: 14px !important; }
}


/* ── Reduced motion respected: skip the clamp tightening for 3D
        transforms because reduced-motion already flattens them ─────── */
@media (prefers-reduced-motion: reduce) {
  .scene-3d, .scroll-scene, .pipeline-scene, .verification-scene { height: auto !important; }
  .scene-3d-track, .scroll-scene-track, .pipeline-track { height: auto !important; min-height: 0 !important; }
}


/* =====================================================================
   MOBILE PASS v2 — performance + complexity reductions
   The 3D enhancement layer (parallax / particles / focus / hologram)
   added cost that phones can't afford. We disable the heaviest pieces
   AGGRESSIVELY here, drop scene budgets further, and simplify the
   busiest scenes (Living DB, Methodology, Commitments) so they read
   on a 375px viewport.
   ===================================================================== */

@media (max-width: 700px) {

  /* ── Prevent horizontal overflow that some 3D transforms cause.
        Use overflow-x: clip (NOT hidden) — `hidden` makes the html/body
        a scroll container, which breaks position:sticky on every
        descendant. `clip` clips overflow without creating a scroll
        container. Chrome 90+/Firefox 109+/Safari 16+. ── */
  html, body { overflow-x: clip; }

  /* ── Lazy-paint off-screen sections — big wins on long landings.
        IMPORTANT: NOT applied to sticky scenes (.scene-3d, .scroll-scene,
        .pipeline-scene) because content-visibility:auto creates a
        containment root that breaks position:sticky on descendants —
        elements end up scrolling out instead of pinning. ── */
  .editorial-marquee, #why-section, #video-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 80vh;
  }

  /* ── Tighter scroll budgets (perf + UX win — was 320-380vh) ── */
  .scroll-scene        { height: 320vh !important; }
  .pipeline-scene      { height: 280vh !important; }
  .verification-scene  { height: 280vh !important; }
  .scene-manifesto     { height: 300vh !important; }
  .scene-living-db     { height: 320vh !important; }
  .scene-methodology   { height: 320vh !important; }
  .scene-commitments   { height: 280vh !important; }
  .scene-support       { height: 260vh !important; }

  /* ── Disable expensive paint effects globally on mobile ── */
  /* 3D enhancement layer (parallax / hologram / scan / focus blur) */
  body[data-parallax="on"] .paper-3d,
  body[data-parallax="on"] .pipeline-shapes,
  body[data-parallax="on"] .commit-orbit,
  body[data-parallax="on"] .support-stack,
  body[data-parallax="on"] .living-db-core {
    /* parallax already gated by hover/pointer media — belt + braces */
    transform: unset !important;
  }
  .is-hologram::before,
  .is-hologram > .hologram-overlay,
  .hologram::before,
  .hologram::after {
    display: none !important;
  }
  /* Particle bursts: keep them — they fire on stage changes, brief & nice.
     Slightly smaller scale so they don't blow past viewport edges. */
  .particle-burst .p {
    width: 5px !important; height: 5px !important;
    margin: -2.5px 0 0 -2.5px !important;
  }
  .particle-burst .p { animation-duration: 0.75s !important; }
  .scene-3d[data-focus="off"],
  .scroll-scene[data-focus="off"],
  .pipeline-scene[data-focus="off"] {
    filter: none !important;       /* no DoF blur on phones */
    opacity: 1 !important;
  }
  /* The cursor spotlight overlays are dead weight on touch screens. */
  .card-hero::after,
  .card-elevated::after,
  .kpi-card::after { display: none !important; }
  /* All filter:drop-shadow effects skip on phone — GPU pain. */
  .paper-3d, .living-db-core { filter: none !important; }

  /* Backdrop-filter is a frame-rate killer; we already turned some off
     in v1 — add the rest. */
  .commit-card,
  .pipeline-shape::before,
  .ria-bell-dropdown,
  .modal-overlay,
  .modal-content,
  .ria-sidebar,
  .ria-cmdk-panel,
  .scene-3d-track,
  .scroll-scene-track,
  .pipeline-track,
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* ── Anatomy paper: smaller paper, tighter spacing ── */
  .paper-3d {
    width: clamp(140px, 44vw, 220px) !important;
  }
  .scroll-scene-stage { padding-top: 90px !important; }
  /* Move captions slightly higher so they don't crash into the paper. */
  .scroll-scene-text { padding-bottom: 0 !important; }

  /* Evidence console: instead of hiding (its desktop right:-6% +
     translateX(18px) puts it off-screen), reposition relative to the
     paper so it sits as a small floating chip below it on phones. */
  .evidence-console {
    right: auto !important;
    left: 50% !important;
    top: auto !important;
    bottom: -8% !important;
    transform: translateX(-50%) translateZ(60px) !important;
    width: min(280px, 84vw) !important;
    padding: 0.55rem 0.7rem !important;
    font-size: 0.74rem;
  }
  .evidence-console .console-row { min-height: 22px !important; font-size: 0.66rem !important; }
  .evidence-console .console-head { font-size: 0.55rem !important; margin-bottom: 0.45rem !important; }

  /* ── Living DB: keep ALL 3D elements visible on phones, just scale
        them down + tighten positioning so they fit at 375px. ── */
  .scene-living-db .db-paper {
    /* Float between the orb and the source pills, smaller scale. */
    width: 46px !important;
    height: 62px !important;
    margin-left: -23px !important;
    margin-top: -31px !important;
  }
  .scene-living-db .db-layer {
    /* Shrink the pills, keep both visible on either side of the paper. */
    font-size: 0.5rem !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 5px !important;
  }
  .scene-living-db .db-layer.l-1 {
    left: 4% !important;
    transform: translateX(0) !important;
  }
  .scene-living-db .db-layer.l-2 {
    right: 4% !important;
    transform: translateX(0) !important;
  }
  .scene-living-db .db-layer .icon {
    width: 12px !important; height: 12px !important;
    font-size: 0.5rem !important;
  }
  .scene-living-db .db-loop-arrow {
    /* Tighter loop ring on phone — keep visible but smaller. */
    width: 200px !important;
    height: 200px !important;
    margin-left: -100px !important;
    margin-top: -100px !important;
  }
  .scene-living-db .db-source {
    /* Source pills sit a bit lower so they hug the orb. */
    top: 50% !important;
    transform: translateY(-50%);
  }
  .scene-living-db .db-source.s-1 { left: 2% !important; }
  .scene-living-db .db-source.s-2 { right: 2% !important; }
  /* Beams shorter so they actually touch the orb on a 375px viewport. */
  .scene-living-db .db-source::after { width: 14vw !important; }

  /* ── Pipeline scene: avoid label overlap when shapes shrink ── */
  .pipeline-shape .label {
    font-size: 0.5rem !important;
    bottom: -1.2rem !important;
    letter-spacing: 0.1em !important;
  }
  .pipeline-shape {
    width: 56px !important;
    height: 56px !important;
  }
}


/* ── Small phones (<500px) — extra simplification ────────────────────── */

@media (max-width: 500px) {

  /* Commitments: keep the 3D orbit on small phones too — user wants
     the same animation experience. Just tighter radius + smaller cards. */
  .scene-commitments .commit-orbit {
    width: 240px !important;
    height: 240px !important;
    aspect-ratio: 1 !important;
  }
  .scene-commitments .commit-card {
    width: 130px !important;
    height: 160px !important;
    margin: -80px 0 0 -65px !important;
    padding: 0.85rem !important;
  }
  .scene-commitments .commit-card.c-1 { transform: rotateY(0deg)   translateZ(95px) !important; }
  .scene-commitments .commit-card.c-2 { transform: rotateY(120deg) translateZ(95px) !important; }
  .scene-commitments .commit-card.c-3 { transform: rotateY(240deg) translateZ(95px) !important; }
  /* Active-card stage transforms match the radius. */
  .scene-commitments[style*="--c-stage: 0"] .commit-card.c-1,
  .scene-commitments[style*="--c-stage:0"]  .commit-card.c-1 {
    transform: rotateY(0deg)   translateZ(115px) scale(1.04) !important;
  }
  .scene-commitments[style*="--c-stage: 1"] .commit-card.c-2,
  .scene-commitments[style*="--c-stage:1"]  .commit-card.c-2 {
    transform: rotateY(120deg) translateZ(115px) scale(1.04) !important;
  }
  .scene-commitments[style*="--c-stage: 2"] .commit-card.c-3,
  .scene-commitments[style*="--c-stage:2"]  .commit-card.c-3 {
    transform: rotateY(240deg) translateZ(115px) scale(1.04) !important;
  }
  .scene-commitments .commit-card .icon {
    width: 28px !important; height: 28px !important;
    margin-bottom: 0.4rem !important;
  }
  .scene-commitments .commit-card h4 { font-size: 0.95rem !important; margin-bottom: 0.3rem !important; }
  .scene-commitments .commit-card p  { font-size: 0.74rem !important; line-height: 1.4 !important; }

  /* Methodology: keep the 5-node horizontal pipeline on small phones
     too. Five 36px nodes + 4 gaps of ~8px = 212px fits in 343 of
     usable width. Labels stay below each node, timing meta hidden. */
  .scene-methodology .method-pipeline {
    flex-direction: row !important;
    gap: 0.4rem !important;
    bottom: 6vh !important;
    top: auto !important;
    width: 92vw !important;
    max-width: 380px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }
  .scene-methodology .method-pipeline-rail {
    width: auto !important;
    height: 2px !important;
    top: 20px !important;
    left: 22px !important;
    right: 22px !important;
    bottom: auto !important;
    margin: 0 !important;
  }
  .scene-methodology .method-pipeline-rail::before {
    transform: scaleX(var(--c-progress, 0)) !important;
    transform-origin: left center !important;
    background: linear-gradient(90deg,
      rgba(139,92,246,0.9), rgba(34,211,238,0.9)) !important;
  }
  .scene-methodology .method-step {
    flex: 1 1 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    width: auto !important;
    gap: 0.35rem !important;
    text-align: center !important;
    position: relative;
    min-width: 0;
  }
  .scene-methodology .method-step .node {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }
  .scene-methodology .method-step .node svg {
    width: 16px !important;
    height: 16px !important;
  }
  .scene-methodology .method-step .label {
    margin: 0 !important;
    font-size: 0.52rem !important;
    text-align: center !important;
    letter-spacing: 0.04em !important;
    color: var(--text-secondary);
  }
  .scene-methodology .method-step .meta {
    display: none !important;  /* meta line drops on tiny screens */
  }

  /* Hero: even tighter typography on really small phones. */
  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.6rem) !important;
    line-height: 1 !important;
  }
  .hero p { font-size: 0.9rem !important; max-width: 32ch; }
  .hero-cta-row .btn-lg { font-size: 0.9rem !important; }

  /* Scene headlines tighter — narrower viewports. */
  .scene-headline   { font-size: 1.35rem !important; max-width: 22ch; }
  .scene-body       { font-size: 0.85rem !important; max-width: 32ch; }
  .scene-stat       { font-size: 0.66rem !important; padding: 0.3rem 0.7rem !important; }

  /* Hide eyebrow micro-decoration that crashes on tiny widths. */
  .editorial-eyebrow::before { width: 5px; height: 5px; }
  .editorial-eyebrow         { font-size: 0.58rem !important; padding: 0.25rem 0.6rem !important; }
}


/* ── Tablet sweet-spot (701-899px): some easing of the >700px rules ── */
@media (min-width: 701px) and (max-width: 899px) {
  .scroll-scene       { height: 540vh !important; }
  .scene-living-db    { height: 360vh !important; }
  .scene-methodology  { height: 360vh !important; }
}
