/* ==========================================================================
   Homepage — cinematic + sections
   ========================================================================== */
body { --cine-p: 0; }
.cine { position: relative; height: 820vh; background: #04100b; }
.cine-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #04100b; }
#cineCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cine-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.8) brightness(.7); transition: opacity 1s ease; }
body.cine-ready .cine-poster { opacity: 0; pointer-events: none; }
.cine-pin.no-webgl .cine-poster { opacity: .85; }
.cine-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(2, 8, 5, .75) 100%), linear-gradient(to top, rgba(2, 8, 5, .55), transparent 38%); }

.cine-load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; z-index: 30; background: #04100b; color: var(--rv-amber);
  font: 700 .72rem/1 var(--font-display); letter-spacing: .3em; text-transform: uppercase; transition: opacity .8s ease .2s, visibility 0s 1s; }
.cine-load.done { opacity: 0; visibility: hidden; pointer-events: none; }
.cine-load i { display: block; width: 180px; height: 2px; background: rgba(242, 182, 50, .2); overflow: hidden; }
.cine-load b { display: block; height: 100%; background: var(--rv-amber); transform-origin: 0 50%; transform: scaleX(0); }

/* chapters */
.chap { position: absolute; z-index: 10; max-width: min(34rem, 88vw); opacity: var(--a, 0); transform: translateY(calc((1 - var(--a, 0)) * 26px)); pointer-events: none; will-change: opacity, transform; }
.chap--hero { --a: 1; }
.chap--hero, .chap--l { inset-inline-start: clamp(20px, 5vw, 84px); bottom: clamp(96px, 16vh, 170px); }
.chap--r { inset-inline-end: clamp(20px, 5vw, 84px); bottom: clamp(96px, 16vh, 170px); }
.chap--b { inset-inline-start: 50%; bottom: clamp(96px, 14vh, 150px); transform: translateX(-50%) translateY(calc((1 - var(--a, 0)) * 26px)); text-align: center; max-width: min(40rem, 90vw); }
html[dir="rtl"] .chap--b { transform: translateX(50%) translateY(calc((1 - var(--a, 0)) * 26px)); }
.chap--b .section-kicker { justify-content: center; }
.chap .big { font-size: clamp(2.3rem, 5.6vw, 5.4rem); line-height: .98; margin: 0 0 .35em; color: #fff; max-width: none; text-wrap: balance; }
.chap--b .big { font-size: clamp(2rem, 4.6vw, 4.2rem); }
.chap .lead { font-size: clamp(.92rem, 1.1vw, 1.08rem); color: rgba(232, 228, 220, .78); max-width: 34rem; margin-bottom: 1.6rem; text-shadow: 0 1px 14px rgba(0, 0, 0, .6); }
.chap--b .lead { margin-inline: auto; }
.chap .actions, .cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.chap--b .actions { justify-content: center; }
.chap.on { pointer-events: auto; }

/* demo controls + HUD */
.demo { position: absolute; z-index: 12; inset-inline-end: clamp(16px, 3vw, 48px); bottom: clamp(20px, 4vh, 40px); display: flex; align-items: flex-end; gap: 16px; }
.engine-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; color: #fff; font: 800 .74rem var(--font-display); letter-spacing: .16em; text-transform: uppercase;
  background: rgba(4, 16, 11, .6); border: 1.5px solid rgba(232, 228, 220, .35); border-radius: 999px; cursor: pointer; transition: border-color .3s, background .3s; }
html[dir="rtl"] .engine-btn { letter-spacing: 0; font-size: .9rem; }
.engine-btn:hover { border-color: var(--rv-amber); }
.engine-btn .dot { width: 10px; height: 10px; border-radius: 50%; background: #c1272d; box-shadow: 0 0 0 0 rgba(193, 39, 45, .6); }
.engine-btn.on { border-color: #7fe07a; background: rgba(20, 60, 30, .55); }
.engine-btn.on .dot { background: #7fe07a; animation: pulseDot 1.2s ease-out infinite; }
@keyframes pulseDot { to { box-shadow: 0 0 0 10px rgba(127, 224, 122, 0); } }
.hud { position: absolute; inset-inline-end: 0; bottom: calc(100% + 12px); margin: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 4px 18px; padding: 10px 14px; border-inline-start: 1.5px solid rgba(242, 182, 50, .5); opacity: 0; transform: translateX(10px); transition: opacity .6s, transform .6s var(--rv-ease); }
body.engine-on .hud { opacity: 1; transform: none; }
.hud div { display: flex; flex-direction: column-reverse; }
.hud dt { font: 700 .62rem var(--font-display); letter-spacing: .2em; color: rgba(232, 228, 220, .5); text-transform: uppercase; }
.hud dd { margin: 0; font: 700 1.5rem/1.1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; min-width: 3.4ch; }
.hud small { grid-column: 1 / -1; font-size: .62rem; color: rgba(232, 228, 220, .4); letter-spacing: .06em; }

/* rail + progress */
.rail { position: absolute; z-index: 14; inset-inline-end: clamp(12px, 2vw, 30px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.rail-dot { width: 18px; height: 18px; padding: 0; background: none; border: 0; position: relative; cursor: pointer; }
.rail-dot::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(232, 228, 220, .35); transition: inset .3s var(--rv-ease), background .3s; }
.rail-dot.on::before { inset: 3px; background: var(--rv-amber); }
.rail-dot:hover::before { background: #fff; }
.cine-bar { position: absolute; z-index: 14; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(232, 228, 220, .08); }
.cine-bar i { display: block; height: 100%; background: var(--rv-amber); transform-origin: 0 50%; transform: scaleX(0); }
html[dir="rtl"] .cine-bar i { transform-origin: 100% 50%; }
.scroll-cue { position: absolute; z-index: 12; left: 50%; bottom: 22px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 700 .62rem var(--font-display); letter-spacing: .3em; text-transform: uppercase; color: rgba(232, 228, 220, .6); pointer-events: none; }
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--rv-amber), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.cine-fade-out { position: absolute; inset-inline: 0; bottom: 0; height: 34vh; z-index: 13; pointer-events: none; opacity: 0; background: linear-gradient(to bottom, transparent, #04100b); }

/* projected 3D annotations */
.note { position: absolute; left: 0; top: 0; z-index: 11; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.note i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--rv-amber); box-shadow: 0 0 0 4px rgba(242, 182, 50, .25); }
.note span { position: absolute; left: 0; top: -70px; white-space: nowrap; padding: 6px 12px; font: 700 .7rem var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(4, 16, 11, .78); border: 1px solid rgba(242, 182, 50, .55); }
.note::after { content: ""; position: absolute; left: 0; top: -40px; width: 1px; height: 40px; background: rgba(242, 182, 50, .75); }
html[dir="rtl"] .note span { direction: rtl; letter-spacing: 0; }

/* marquee */
.marquee { overflow: hidden; background: var(--rv-amber); color: #071a12; padding: 18px 0; position: relative; z-index: 2; }
.marquee-track { display: flex; width: max-content; gap: 34px; animation: mq 38s linear infinite; font: 800 clamp(1.1rem, 2.2vw, 1.7rem) var(--font-display); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.marquee-track b { opacity: .5; font-size: .7em; align-self: center; }
@keyframes mq { to { transform: translateX(-50%); } }

/* three worlds: sticky recede stack */
.worlds { position: relative; background: #04100b; }
.world { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #04100b; }
.world-in { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(20px, 5vw, 80px); padding: 0 clamp(20px, 6vw, 110px); transform-origin: 50% 40%; will-change: transform;
  background: radial-gradient(90% 70% at 25% 50%, #0b2a1c, #04100b); }
.world:nth-child(2) .world-in { background: radial-gradient(90% 70% at 25% 50%, #2a1c07, #0a0803); }
.world:nth-child(3) .world-in { background: radial-gradient(90% 70% at 25% 50%, #10251d, #04100b); }
.world-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; }
.world-media { position: relative; aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; overflow: hidden; clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 44px 100%, 0 calc(100% - 44px)); }
.world-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s var(--rv-ease); }
.world:hover .world-media img { transform: scale(1.02); }
.world-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(4, 16, 11, .35), transparent 50%); }
.world-num { position: absolute; inset-inline-end: clamp(20px, 5vw, 80px); top: clamp(60px, 12vh, 120px); font: 800 clamp(6rem, 18vw, 16rem)/.8 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px rgba(232, 228, 220, .12); pointer-events: none; }
.world-copy { position: relative; z-index: 2; max-width: 30rem; }
.world-copy h2 { font-size: clamp(2rem, 4vw, 3.6rem); color: #fff; max-width: 12ch; }
.world-copy p:not(.section-kicker) { color: rgba(232, 228, 220, .75); margin-bottom: 1.6rem; }
.world-copy .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* range grid */
.range { position: relative; overflow: hidden; }
.range-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 5vw, 56px); }
.range-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.6vw, 22px); perspective: 1100px; }
.cat { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--rv-line); border-radius: 4px; background: #0a2216;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--rv-ease), border-color .4s, opacity .9s var(--rv-ease); transform-style: preserve-3d; }
.cat.reveal { transform: translateY(34px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.cat.reveal.in-view { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.75); transition: transform .9s var(--rv-ease), filter .5s; }
.cat:hover { border-color: var(--rv-amber); }
.cat:hover img { transform: scale(1.08); filter: saturate(1.05) brightness(.95); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 16, 11, .92), transparent 55%), radial-gradient(60% 60% at var(--mx, 50%) var(--my, 50%), rgba(242, 182, 50, .22), transparent); pointer-events: none; }
.cat-n { position: absolute; z-index: 2; inset: 14px 16px auto auto; font: 700 .72rem var(--font-display); letter-spacing: .18em; color: var(--rv-amber); }
html[dir="rtl"] .cat-n { inset: 14px auto auto 16px; }
.cat-t { position: absolute; z-index: 2; inset: auto 18px 16px; font: 700 clamp(1.05rem, 1.7vw, 1.45rem) var(--font-display); color: #fff; letter-spacing: -.01em; }
.cat-t::after { content: " →"; color: var(--rv-amber); opacity: 0; transition: opacity .3s; }
.cat:hover .cat-t::after { opacity: 1; }
html[dir="rtl"] .cat-t::after { content: " ←"; }

/* numbers */
.numbers h2 { max-width: 20ch; margin-bottom: clamp(30px, 5vw, 60px); }
.num-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rv-line); margin-bottom: 2.4rem; }
.num { padding: 2rem 1.2rem 0 1.2rem; display: flex; flex-direction: column; gap: 6px; border-inline-end: 1px solid var(--rv-line); }
.num:first-child { padding-inline-start: 0; } .num:last-child { border-inline-end: 0; }
.num b { font: 800 clamp(2.6rem, 6.4vw, 5.6rem)/1 var(--font-display); color: var(--rv-amber); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.num span { font: 600 .74rem var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: rgba(232, 228, 220, .6); }
html[dir="rtl"] .num span { letter-spacing: 0; font-size: .95rem; }
.numbers-copy { max-width: 46rem; font-size: 1.05rem; }

/* why / branches / cta refinements */
.why-grid { margin-top: 2.4rem; }
.why-card { padding: 1.8rem; }
.why-card h3 { font-size: 1.15rem; color: #fff; }
.branches-grid { margin-top: 2.4rem; }
.branch-card { padding: 1.8rem; position: relative; overflow: hidden; }
.b-n { position: absolute; inset-inline-end: 16px; bottom: -6px; font: 800 4.4rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px rgba(232, 228, 220, .14); }
.cta { text-align: center; position: relative; overflow: hidden; background: radial-gradient(70% 90% at 50% 100%, rgba(242, 182, 50, .16), transparent), #04100b; }
.cta-in { max-width: 46rem; display: flex; flex-direction: column; align-items: center; }
.cta h2 { max-width: 14ch; text-wrap: balance; }
.cta .actions { justify-content: center; margin-top: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .range-grid { grid-template-columns: repeat(2, 1fr); }
  .num-row { grid-template-columns: repeat(2, 1fr); }
  .num:nth-child(2) { border-inline-end: 0; } .num:nth-child(n+3) { border-top: 1px solid var(--rv-line); margin-top: 1.2rem; }
  .num:nth-child(3) { padding-inline-start: 0; }
  .world-in { grid-template-columns: 1fr; align-content: center; gap: 22px; padding-top: 70px; }
  .world-media { max-height: 32vh; aspect-ratio: 16 / 9; }
  .world-copy h2 { max-width: none; }
}
@media (max-width: 720px) {
  .cine { height: 700vh; }
  .chap, .chap--hero, .chap--l, .chap--r, .chap--b { inset-inline: 20px; bottom: 88px; max-width: none; transform: translateY(calc((1 - var(--a, 0)) * 26px)); text-align: start; }
  .chap--b .section-kicker { justify-content: flex-start; } .chap--b .lead { margin-inline: 0; } .chap--b .actions { justify-content: flex-start; }
  .chap .big { font-size: clamp(2.1rem, 10vw, 3rem); }
  .chap .lead { font-size: .9rem; margin-bottom: 1rem; }
  .chap::before { content: ""; position: absolute; inset: -60px -20px -30px; z-index: -1; background: linear-gradient(to top, rgba(2, 8, 5, .92) 55%, transparent); }
  .demo { inset-inline: 16px auto; top: 84px; bottom: auto; flex-direction: column; align-items: flex-start; }
  .engine-btn { padding: 11px 16px; font-size: .66rem; }
  .rail { display: none; }
  .note span { font-size: .6rem; padding: 4px 8px; }
  .hud dd { font-size: 1.1rem; }
  .range-grid { gap: 8px; }
  .cat-t { font-size: .92rem; inset: auto 12px 12px; }
  .cat-n { display: none; }
  .btn { padding: 14px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; } .scroll-cue i { animation: none; } .chap { transform: none !important; }
}

/* keep floating widgets out of the cinematic */
body.in-cine .social-fab, body.in-cine .back-to-top { opacity: 0; pointer-events: none; transform: scale(.8); }
.social-fab, .back-to-top { transition: opacity .4s, transform .4s var(--rv-ease); }
.demo { inset-inline-end: auto; inset-inline-start: 50%; translate: -50% 0; }
html[dir="rtl"] .demo { translate: 50% 0; }
.hud { inset-inline-end: auto; inset-inline-start: 50%; translate: -50% 0; border: 0; border-block-start: 0; text-align: center; }
html[dir="rtl"] .hud { translate: 50% 0; }
.hud { grid-template-columns: repeat(3, auto); justify-content: center; }
.hud small { text-align: center; }
.scroll-cue { left: auto; inset-inline-start: clamp(20px, 5vw, 84px); translate: 0 0; flex-direction: row; gap: 12px; bottom: 26px; }
.scroll-cue i { width: 34px; height: 1px; background: linear-gradient(to right, var(--rv-amber), transparent); transform-origin: 0 50%; animation: cueX 1.8s ease-in-out infinite; }
@keyframes cueX { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
.note.flip span { left: auto; right: 0; }
.chap--r { max-width: min(26rem, 88vw); }
@media (max-width: 720px) { .demo { inset-inline-start: 16px; translate: 0 0; top: 84px; } .hud { position: static; translate: 0 0; } .scroll-cue { display: none; } }
.note.down span { top: 28px; }
.note.down::after { top: 0; height: 28px; }
.chap--end .big { font-size: clamp(1.8rem, 3.8vw, 3.4rem); }
.num b { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .num b { text-align: right; }
.num b { font-family: 'Manrope', var(--font-body); font-weight: 800; letter-spacing: -.045em; font-size: clamp(2.8rem, 6.2vw, 5.4rem); line-height: 1; font-feature-settings: "tnum" 1, "lnum" 1; }
html[dir="rtl"] .num b { font-family: var(--font-arabic); letter-spacing: 0; }

/* side-pointing annotation labels (keep clear of the headline and other labels) */
.note.right span, .note.left span { top: -15px; }
.note.right span { left: 30px; }
.note.left span { left: auto; right: 30px; }
.note.right::after, .note.left::after { top: 0; height: 1px; width: 30px; }
.note.right::after { left: 0; }
.note.left::after { left: auto; right: 0; }
.note.flip.right span, .note.flip.left span { left: auto; right: auto; }
.note.flip.right span { left: 30px; }
.note.flip.left span { right: 30px; }

/* RTL on phones: the desktop RTL transforms (higher specificity) pushed the engine button and centred chapters off-screen */
@media (max-width: 720px) {
  html[dir="rtl"] .demo { translate: 0 0; }
  html[dir="rtl"] .chap, html[dir="rtl"] .chap--b { transform: translateY(calc((1 - var(--a, 0)) * 26px)); }
  html[dir="rtl"] .hud { translate: 0 0; }
}
