/* ═══════════════════════════════════════════════════════════
   SANGHA PARIVAR — cinematic "real-video" flight: space → a
   photographic Earth → a powerful dive → landing on the real
   Google satellite map of the RSS headquarters in Nagpur.
   Scroll drives --p (0→1, linear) and --pz (eased) on .jx-stage.
═══════════════════════════════════════════════════════════ */
.jx { position: relative; background: #03040a; }

/* ── ACT 1: the flight ── */
.jx-flight { position: relative; height: 100vh; }
.jx-js .jx-flight { height: 560vh; }
.jx-stage { --p: 0; --pz: 0; position: sticky; top: 0; height: 100vh; overflow: hidden; background: #03040a; }
.jx-stage > div { position: absolute; inset: 0; }

/* deep space + stars */
.jx-space { background: radial-gradient(circle at 50% 42%, #0a1030 0%, #06081c 55%, #03040a 100%);
  opacity: clamp(0, calc((0.82 - var(--p)) * 4), 1); }
.jx-stars { position: absolute; inset: -10%; background-repeat: no-repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 24% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 38% 28%, #fff, transparent), radial-gradient(1px 1px at 52% 72%, #cfe3ff, transparent),
    radial-gradient(1px 1px at 63% 14%, #fff, transparent), radial-gradient(1.5px 1.5px at 72% 48%, #fff, transparent),
    radial-gradient(1px 1px at 84% 26%, #ffe9c7, transparent), radial-gradient(1.5px 1.5px at 90% 68%, #fff, transparent),
    radial-gradient(1px 1px at 16% 84%, #fff, transparent), radial-gradient(1px 1px at 46% 92%, #fff, transparent),
    radial-gradient(1px 1px at 78% 88%, #cfe3ff, transparent), radial-gradient(1.5px 1.5px at 6% 46%, #fff, transparent);
  animation: jx-tw 4s ease-in-out infinite alternate; }
.jx-stars.s2 { background-image:
    radial-gradient(1px 1px at 30% 40%, #fff, transparent), radial-gradient(1px 1px at 58% 22%, #fff, transparent),
    radial-gradient(1px 1px at 68% 80%, #fff, transparent), radial-gradient(1px 1px at 88% 50%, #fff, transparent),
    radial-gradient(1px 1px at 20% 70%, #fff, transparent), radial-gradient(1px 1px at 42% 58%, #fff, transparent);
  animation-duration: 6s; animation-delay: -2s; opacity: 0.7; }
@keyframes jx-tw { from { opacity: 0.5; } to { opacity: 1; } }

/* the Earth — fades out as the satellite surface zooms in (continuous) */
.jx-globe-wrap { display: flex; align-items: center; justify-content: center;
  opacity: clamp(0, calc((0.8 - var(--p)) * 6), 1); }
.jx-atmo { position: absolute; width: 64vmin; height: 64vmin; border-radius: 50%;
  background: radial-gradient(circle, transparent 58%, rgba(120,185,255,0.5) 69%, rgba(120,185,255,0) 82%); filter: blur(3px);
  opacity: clamp(0, calc((0.7 - var(--p)) * 6), 1); }
.jx-globe { position: relative; width: 52vmin; height: 52vmin; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(circle at 33% 27%, rgba(190,225,255,0.95) 0%, rgba(110,175,230,0.45) 13%, transparent 32%),
    radial-gradient(circle at 50% 50%, #2b7fc4 0%, #1766a6 40%, #0c4175 70%, #06284c 90%, #041d38 100%);
  transform: scale(calc(0.9 + var(--pz) * 26)); transform-origin: 58% 45%;
  box-shadow: 0 0 55px 10px rgba(70,140,220,0.4); will-change: transform; }
.jx-globe::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 36% 30%, transparent 42%, rgba(0,10,30,0.34) 72%, rgba(0,5,20,0.72) 100%); }
/* real continents, painted through the world-landmass mask */
.jx-land { position: absolute; inset: -2%;
  background: linear-gradient(150deg, #86c45f 0%, #529142 28%, #3c7c37 52%, #8c7b46 78%, #6f6537 100%);
  -webkit-mask: url('/img/earth-land.svg') 82% 46% / 232% 232% no-repeat;
          mask: url('/img/earth-land.svg') 82% 46% / 232% 232% no-repeat; opacity: 0.97; }
.jx-clouds { position: absolute; inset: -12%; mix-blend-mode: screen; opacity: 0.82;
  background:
    radial-gradient(ellipse 26% 12% at 28% 36%, rgba(255,255,255,0.85), transparent 70%),
    radial-gradient(ellipse 20% 9% at 60% 26%, rgba(255,255,255,0.72), transparent 70%),
    radial-gradient(ellipse 30% 14% at 72% 60%, rgba(255,255,255,0.6), transparent 70%),
    radial-gradient(ellipse 18% 8% at 44% 70%, rgba(255,255,255,0.6), transparent 70%),
    radial-gradient(ellipse 16% 7% at 20% 60%, rgba(255,255,255,0.5), transparent 70%);
  animation: jx-drift 70s linear infinite; }
@keyframes jx-drift { to { transform: translateX(-6%); } }

/* Nagpur beacon (counter-scaled so it stays a constant size as we dive) */
.jx-beacon { position: absolute; left: 58%; top: 45%; transform-origin: center;
  transform: translate(-50%,-50%) scale(calc(1 / (0.9 + var(--pz) * 26)));
  opacity: clamp(0, min(calc((var(--p) - 0.08) * 5), calc((0.8 - var(--p)) * 6)), 1); }
.jx-beacon-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px 3px rgba(252,196,25,0.9); }
.jx-beacon-ring { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: rgba(247,103,7,0.5); animation: jx-ping 1.6s ease-out infinite; }
@keyframes jx-ping { 0% { box-shadow: 0 0 0 0 rgba(247,103,7,0.6); } 100% { box-shadow: 0 0 0 30px rgba(247,103,7,0); } }

/* speed streaks + atmosphere-entry heat + white-out hand-off */
.jx-streaks { background: repeating-conic-gradient(from 0deg at 58% 50%, transparent 0deg 2.6deg, rgba(255,255,255,0.14) 2.6deg 3deg);
  mix-blend-mode: screen; transform: scale(1.6);
  opacity: clamp(0, min(calc((var(--p) - 0.42) * 6), calc((0.84 - var(--p)) * 6)), 0.8); }
.jx-heat { mix-blend-mode: screen;
  background: radial-gradient(circle at 58% 45%, transparent 30%, rgba(255,120,30,0) 46%, rgba(255,110,25,0.38) 72%, rgba(255,60,0,0.5) 100%);
  opacity: clamp(0, min(calc((var(--p) - 0.5) * 7), calc((0.78 - var(--p)) * 9)), 0.85); }

/* real satellite map: emerges from the globe, keeps zooming, settles on RSS HQ */
.jx-divemap { opacity: clamp(0, calc((var(--p) - 0.58) * 5), 1); overflow: hidden; background: #0c3a66; }
.jx-divemap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; pointer-events: none;
  transform: scale(calc(1 + (1 - var(--p)) * 2.1)); transform-origin: 50% 50%; filter: saturate(1.06) contrast(1.03); will-change: transform; }
.jx-map-badge { position: absolute; left: 20px; bottom: 26px; z-index: 3; display: flex; align-items: flex-start; gap: 12px; max-width: min(92%, 470px);
  background: rgba(11,20,55,0.9); color: #fff; padding: 14px 18px; border-radius: 14px; box-shadow: 0 16px 34px rgba(0,0,0,0.45); backdrop-filter: blur(6px); border-left: 4px solid var(--primary);
  opacity: clamp(0, calc((var(--p) - 0.8) * 7), 1); pointer-events: auto; }
.jx-pindrop { font-size: 1.7rem; line-height: 1; animation: jx-drop 2s ease-in-out infinite; }
@keyframes jx-drop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.jx-map-badge strong { display: block; font-family: var(--font-head); font-size: 1.05rem; line-height: 1.25; }
.jx-map-badge > div > span { display: block; font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }
.jx-map-badge a { display: inline-block; margin-top: 7px; font-size: 0.76rem; font-weight: 700; color: var(--gold); text-decoration: none; }
.jx-map-badge a:hover { text-decoration: underline; }

/* subtle camera shake on atmosphere entry */
.jx-stage.entry .jx-globe-wrap { animation: jx-shake 0.14s steps(2) infinite; }
@keyframes jx-shake { 0% { transform: translate(0,0); } 50% { transform: translate(-2px,2px); } 100% { transform: translate(2px,-1px); } }

/* cockpit HUD */
.jx-cockpit { inset: auto auto auto 0; top: 14px; left: 16px; bottom: auto; right: auto; display: flex; flex-direction: column; gap: 4px;
  font-family: 'Inter', monospace; font-size: 0.72rem; letter-spacing: 1px; color: #cfe3ff;
  opacity: clamp(0, calc((0.8 - var(--p)) * 6), 0.85); pointer-events: none; width: auto; height: auto; }
.jx-cockpit .jx-loc { color: var(--gold); font-weight: 700; }
.jx-cockpit .jx-alt { color: #9fc3ef; }

.jx-scrollhint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  opacity: clamp(0, calc((0.08 - var(--p)) * 14), 0.8); width: auto; height: auto; }
.jx-scrollhint span { display: block; width: 22px; height: 34px; border: 2px solid #fff; border-radius: 12px; position: relative; }
.jx-scrollhint span::after { content: ''; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: jx-wheel 1.4s ease-in-out infinite; }
@keyframes jx-wheel { 0%,100% { top: 6px; opacity: 1; } 60% { top: 16px; opacity: 0.2; } }

.jx-progress { inset: auto 0 0 0; top: auto; height: 4px; background: rgba(255,255,255,0.14); }
.jx-progress i { display: block; height: 100%; width: calc(var(--p) * 100%); background: linear-gradient(90deg, #ff922b, #f76707, #e8356d); }

/* ── ACT 2: the founding ── */
.jx-found { position: relative; background: radial-gradient(circle at 50% -10%, #fff1dd, #ffffff 60%); text-align: center; padding: 80px 20px 78px; }
.jx-found-in { max-width: 680px; }
.jx-found-emblem { width: 90px; height: 90px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 6px #fff, 0 16px 34px rgba(247,103,7,0.28); }
.jx-found-emblem img { width: 100%; height: 100%; object-fit: cover; }
.jx-found-year { font-family: Georgia, serif; font-weight: 800; font-size: clamp(3.4rem, 12vw, 6rem); line-height: 1; color: var(--primary); text-shadow: 0 10px 30px rgba(247,103,7,0.22); }
.jx-found h2 { font-family: var(--font-head); font-size: clamp(1.4rem, 4.5vw, 2.1rem); color: var(--navy); margin: 8px 0 14px; }
.jx-found p { font-size: 1.05rem; line-height: 1.75; color: #3a4066; }

/* ── ACT 3: the parivar grows (chronological timeline) ── */
.jx-grow { background: linear-gradient(#ffffff, #f6f3ee); padding: 10px 0 80px; }
.jx-grow-head { text-align: center; max-width: 680px; margin: 0 auto 34px; }
.jx-grow-head .jx-eyebrow { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--primary-dark); margin-bottom: 6px; }
.jx-grow-head h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--navy); margin: 0 0 8px; }
.jx-grow-head p { color: #3a4066; line-height: 1.7; }

.jx-timeline { position: relative; list-style: none; max-width: 740px; margin: 0 auto; padding-left: 118px; }
.jx-timeline::before { content: ''; position: absolute; left: 118px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--gold), var(--primary) 30%, var(--rose) 75%, var(--navy)); }
.jx-item { position: relative; padding-left: 30px; margin-bottom: 18px; }
.jx-year { position: absolute; left: -118px; top: 4px; width: 92px; text-align: right; font-family: Georgia, serif; font-weight: 700; font-size: 1.5rem; color: var(--primary-dark); }
.jx-dot { position: absolute; left: -8px; top: 9px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 0 0 4px rgba(247,103,7,0.14); z-index: 1; }
.jx-mcard { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); transition: var(--transition); }
.jx-mcard:hover { box-shadow: var(--shadow-hover); transform: translateX(3px); border-color: #f3c9a8; }
.jx-ic { font-size: 1.3rem; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-light); border-radius: 10px; flex-shrink: 0; }
.jx-mtxt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.jx-mtxt strong { font-family: var(--font-head); font-size: 1.04rem; color: var(--navy); line-height: 1.25; }
.jx-mhi { font-size: 0.8rem; color: var(--primary-dark); font-weight: 600; }
.jx-mdesc { font-size: 0.78rem; color: var(--muted); }

.jx-item.is-root .jx-year { color: var(--primary); font-size: 1.9rem; }
.jx-item.is-root .jx-dot { background: var(--primary); border-color: var(--gold); box-shadow: 0 0 0 5px rgba(252,196,25,0.3); width: 18px; height: 18px; left: -9px; }
.jx-item.is-root .jx-mcard { background: linear-gradient(135deg, #fff6ec, #fff); border-color: #f3c9a8; border-left: 4px solid var(--primary); }
.jx-item.is-root .jx-ic { background: var(--grad); }

.jx-grow-foot { text-align: center; margin-top: 34px; font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); }
.jx-grow-foot span { display: block; font-family: 'Inter', sans-serif; font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 1px; }

.jx-js .jx-item { opacity: 0; transform: translateY(26px); transition: opacity 0.55s ease, transform 0.55s ease; }
.jx-item.in { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .jx-map-badge { left: 12px; right: 12px; bottom: 12px; }
  .jx-timeline { padding-left: 62px; }
  .jx-timeline::before { left: 62px; }
  .jx-year { left: -62px; width: 50px; font-size: 1.1rem; }
  .jx-item.is-root .jx-year { font-size: 1.3rem; }
  .jx-mtxt strong { font-size: 0.98rem; }
}

@media (prefers-reduced-motion: reduce) {
  .jx-js .jx-flight { height: 200vh; }
  .jx-stars, .jx-stars.s2, .jx-clouds, .jx-beacon-ring, .jx-pindrop, .jx-scrollhint span::after { animation: none; }
  .jx-stage.entry .jx-globe-wrap { animation: none; }
  .jx-js .jx-item { transition: none; opacity: 1; transform: none; }
}
