/* ============================================================
   ABROAD STAGE — motion layer
   Cursor, preloader, iris, curtain transitions, waveforms,
   particles, rotating badge, lens stats, film strip,
   viewfinder, world map, line art.
   ============================================================ */

/* ============ CUSTOM CURSOR (fine pointers only) ============ */
@media (pointer: fine) {
  html.cursor-on, html.cursor-on a, html.cursor-on button { cursor: none; }
  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 2000; pointer-events: none;
    border-radius: 50%; transform: translate(-50%, -50%);
  }
  .cursor-dot { width: 6px; height: 6px; background: var(--sand); }
  .cursor-ring {
    width: 34px; height: 34px; border: 1px solid rgba(184, 147, 90, .65);
    transition: width .35s var(--expo), height .35s var(--expo),
                background .3s, border-color .3s;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Jost', sans-serif; font-size: 0; letter-spacing: 1.5px;
    color: var(--deep); text-transform: uppercase; font-weight: 600;
  }
  .cursor-ring.is-link { width: 56px; height: 56px; background: rgba(212, 180, 131, .18); border-color: var(--sand); }
  .cursor-ring.is-play { width: 74px; height: 74px; background: var(--sand); border-color: var(--sand); font-size: 9px; }
  .cursor-ring.is-play::after { content: 'PLAY'; }
}
.cursor-dot, .cursor-ring { display: none; }
html.cursor-on .cursor-dot, html.cursor-on .cursor-ring { display: flex; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--deep);
  display: flex; align-items: center; justify-content: center;
}
.preloader-logo { width: clamp(200px, 26vw, 340px); }
.preloader-logo svg { width: 100%; height: auto; overflow: visible; }
.preloader.done { pointer-events: none; }

/* logo draw state: JS sets stroke-dasharray and animates */
.logo-draw path { fill-opacity: 0; stroke: var(--sand); stroke-width: 2.5; }
.logo-draw.inked path { transition: fill-opacity 1s var(--p2out), stroke-opacity 1.2s var(--p2out); fill-opacity: 1; stroke-opacity: 0; }

/* ============ IRIS REVEAL ============ */
.iris {
  position: fixed; inset: 0; z-index: 2900; pointer-events: none;
  background: var(--deep);
  clip-path: circle(150% at 50% 50%);
}
.iris-blades {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.iris-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(212, 180, 131, .25);
}

/* ============ LENS APERTURE PAGE TRANSITION ============ */
.lens-hole {
  position: fixed; top: 50%; left: 50%; z-index: 2800; pointer-events: none;
  width: 100vmax; height: 100vmax; margin: -50vmax 0 0 -50vmax;
  border-radius: 50%;
  box-shadow: 0 0 0 300vmax #2a0c05, inset 0 0 0 3px rgba(212, 180, 131, .55), inset 0 0 60px 14px rgba(42, 12, 5, .8);
  display: none; will-change: transform;
}

/* ============ HERO REDESIGN ============ */
.hero { perspective: 900px; }
.hero-layer { will-change: transform; }
.hero-logo svg { width: clamp(240px, 30vw, 430px); height: auto; margin: 0 auto; overflow: visible; display: block; }
.hero-float { animation: heroFloat 7s ease-in-out infinite; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* concentric lens rings behind the logo */
.hero-lens { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; }
.hero-lens .ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(212, 180, 131, .12);
}
.hero-lens .ring.dashed { border-style: dashed; animation: ringSpin 60s linear infinite; }
.hero-lens .ring.dashed.rev { animation-direction: reverse; animation-duration: 80s; }
@keyframes ringSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* floating line-art (mic / camera) in hero */
.hero-art {
  position: absolute; z-index: 2; pointer-events: none; opacity: .5;
}
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.hero-art-mic { left: clamp(10px, 7vw, 130px); bottom: 16%; width: clamp(70px, 9vw, 130px); animation: artBob 9s ease-in-out infinite; }
.hero-art-cam { right: clamp(10px, 7vw, 130px); top: 22%; width: clamp(90px, 11vw, 160px); animation: artBob 11s ease-in-out infinite reverse; }
@keyframes artBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
@media (max-width: 720px) { .hero-art { opacity: .25; } }

/* ============ ROTATING BADGE ============ */
.spin-badge { position: relative; width: 120px; height: 120px; pointer-events: none; }
.spin-badge svg { width: 100%; height: 100%; animation: badgeSpin 18s linear infinite; }
.spin-badge text {
  font-family: 'Jost', sans-serif; font-size: 11.5px; letter-spacing: 3.5px;
  text-transform: uppercase; fill: var(--sepia); font-weight: 500;
}
.spin-badge::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 8px; height: 8px; border-radius: 50%; background: var(--sand);
  transform: translate(-50%, -50%);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes badgeSpin { to { transform: rotate(360deg); } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 180, 131, .5); } 50% { box-shadow: 0 0 0 12px rgba(212, 180, 131, 0); } }
.hero .spin-badge { position: absolute; right: clamp(16px, 5vw, 70px); bottom: clamp(70px, 9vh, 110px); z-index: 3; }
@media (max-width: 720px) { .hero .spin-badge { display: none; } }
.about-badge { position: absolute; top: -60px; right: -20px; z-index: 3; }

/* ============ WAVEFORM DIVIDERS ============ */
.waveform {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 64px; overflow: hidden;
}
.waveform.on-dark-wf { background: var(--deep); }
.waveform span {
  width: 3px; border-radius: 2px; background: var(--sepia); opacity: .55;
  height: 12%;
  animation: wfBar 1.6s ease-in-out infinite alternate;
}
.waveform.on-dark-wf span { background: var(--sand); }
@keyframes wfBar { from { height: 8%; } to { height: var(--wf-h, 70%); } }

/* ============ DUST PARTICLES ============ */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.particles i {
  position: absolute; display: block; border-radius: 50%;
  background: rgba(212, 180, 131, .5);
  animation: dust linear infinite;
}
@keyframes dust {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: var(--p-o, .5); }
  90%  { opacity: var(--p-o, .5); }
  100% { transform: translateY(-110vh) translateX(var(--p-x, 30px)); opacity: 0; }
}

/* ============ LENS-RING STATS ============ */
.stats-row.lens-stats { border-top: 0; padding-top: 0; grid-template-columns: repeat(4, 1fr); }
.lens-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lens-wrap { position: relative; width: clamp(150px, 15vw, 200px); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.lens-wrap .lr {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(184, 147, 90, .55);
  animation: lensSpin 40s linear infinite;
}
.lens-wrap .lr2 {
  position: absolute; inset: 12%; border-radius: 50%;
  border: 1px solid rgba(61, 18, 8, .12);
  animation: lensSpin 55s linear infinite reverse;
}
@keyframes lensSpin { to { transform: rotate(360deg); } }
.lens-wrap .lr2::before, .lens-wrap .lr::before {
  content: ''; position: absolute; top: -3px; left: 50%;
  width: 5px; height: 5px; border-radius: 50%; background: var(--warm);
}
.lens-stat .stat-num { position: relative; z-index: 2; }
.lens-stat .stat-label { margin-top: 14px; max-width: 170px; }
@media (max-width: 860px) { .stats-row.lens-stats { grid-template-columns: repeat(2, 1fr); row-gap: 44px; } }

/* ============ VIEWFINDER (video frames) ============ */
.video-frame.viewfinder::before {
  content: ''; position: absolute; inset: 14px; z-index: 2; pointer-events: none;
  background:
    linear-gradient(var(--sand), var(--sand)) top left / 26px 1.5px,
    linear-gradient(var(--sand), var(--sand)) top left / 1.5px 26px,
    linear-gradient(var(--sand), var(--sand)) top right / 26px 1.5px,
    linear-gradient(var(--sand), var(--sand)) top right / 1.5px 26px,
    linear-gradient(var(--sand), var(--sand)) bottom left / 26px 1.5px,
    linear-gradient(var(--sand), var(--sand)) bottom left / 1.5px 26px,
    linear-gradient(var(--sand), var(--sand)) bottom right / 26px 1.5px,
    linear-gradient(var(--sand), var(--sand)) bottom right / 1.5px 26px;
  background-repeat: no-repeat; opacity: .9;
}
.video-frame.viewfinder::after {
  content: 'REC'; position: absolute; top: 24px; left: 30px; z-index: 2; pointer-events: none;
  font-family: 'Jost', sans-serif; font-size: 10px; letter-spacing: 2.5px; font-weight: 600;
  color: var(--owhite); padding-left: 16px;
}
.video-frame.viewfinder .rec-dot {
  position: absolute; top: 27px; left: 30px; z-index: 2; pointer-events: none;
  width: 8px; height: 8px; border-radius: 50%; background: #e04a3a;
  animation: recBlink 1.4s ease-in-out infinite;
}
@keyframes recBlink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.video-frame.playing::before, .video-frame.playing::after, .video-frame.playing .rec-dot { display: none; }

/* ============ FILM STRIP (home guest reel) ============ */
.film-strip-outer { overflow: hidden; margin-top: clamp(44px, 5vw, 70px); position: relative; }
.film-strip {
  display: flex; gap: 0; width: max-content;
  background: var(--deep);
  padding: 26px 0;
  position: relative;
  animation: filmScroll 36s linear infinite;
}
.film-strip:hover { animation-play-state: paused; }
.film-strip::before, .film-strip::after {
  content: ''; position: absolute; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(rgba(250, 245, 236, .85) 3px, transparent 3.5px);
  background-size: 34px 14px; background-position: center;
}
.film-strip::before { top: 6px; }
.film-strip::after { bottom: 6px; }
@keyframes filmScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.film-cell {
  position: relative; width: clamp(220px, 26vw, 300px); aspect-ratio: 1 / 1;
  margin: 0 10px; overflow: hidden; display: block; text-decoration: none;
  border: 1px solid rgba(212, 180, 131, .25);
}
.film-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--expo); }
.film-cell:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .film-strip { animation: none; } }

/* ============ WORLD MAP SECTION ============ */
.map-section { position: relative; overflow: hidden; }
.map-wrap { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.map-wrap svg.world { width: 100%; height: auto; display: block; }
.map-wrap svg.world path { fill: rgba(212, 180, 131, .13); stroke: rgba(212, 180, 131, .06); stroke-width: .5; transition: fill .4s; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.map-arc { fill: none; stroke: var(--sand); stroke-width: 1.3; opacity: .75; }
.map-arc.soft { stroke: var(--sepia); stroke-width: 1; opacity: .4; }
.map-dot { fill: var(--sand); }
.map-hub { fill: var(--light); }
.map-pulse { fill: none; stroke: var(--sand); stroke-width: 1; transform-origin: center; }
.map-label {
  font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; fill: var(--sand); font-weight: 500;
}
.map-credit { margin-top: 12px; font-size: 9px; color: rgba(242, 232, 213, .22); text-align: right; letter-spacing: .5px; }

/* ============ LINE ART (draw on scroll) ============ */
.line-art { pointer-events: none; }
.line-art svg { width: 100%; height: auto; overflow: visible; }
.line-art path, .line-art circle, .line-art line, .line-art rect, .line-art ellipse {
  fill: none; stroke: var(--sepia); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.on-dark .line-art path, .on-dark .line-art circle, .on-dark .line-art line, .on-dark .line-art rect, .on-dark .line-art ellipse,
.line-art.on-gold path, .line-art.on-gold circle, .line-art.on-gold line, .line-art.on-gold rect, .line-art.on-gold ellipse {
  stroke: var(--sand);
}
.page-hero .line-art {
  position: absolute; right: clamp(16px, 8vw, 120px); top: 50%;
  transform: translateY(-42%);
  width: clamp(110px, 15vw, 220px); opacity: .5; z-index: 1;
  animation: artBob 10s ease-in-out infinite;
}
@media (max-width: 820px) { .page-hero .line-art { opacity: .2; } }
.mission-art { position: absolute; right: clamp(10px, 5vw, 80px); top: 40px; width: clamp(90px, 11vw, 160px); opacity: .65; }
@media (max-width: 900px) { .mission-art { display: none; } }

/* ============ PINNED MISSION ============ */
.mission-section { position: relative; }
.mission-quote .mw { opacity: .13; display: inline-block; transition: opacity .3s; }

/* ============ MINI EPISODE CARDS (home, latest three) ============ */
.mini-eps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
  margin-top: clamp(36px, 4vw, 56px);
}
@media (max-width: 700px) { .mini-eps { grid-template-columns: 1fr; } }
.mini-ep .video-frame { border-radius: 12px; box-shadow: 0 14px 36px rgba(61, 18, 8, .13); }
.mini-ep .play-btn { width: 54px; height: 54px; }
.mini-ep h4 {
  margin-top: 16px; font-family: 'Cormorant Garamond', serif;
  font-size: 21px; font-weight: 500; color: var(--deep); line-height: 1.2;
}
.mini-ep .ep-meta { margin-top: 6px; margin-bottom: 0; }

/* ============ MICRO MOTION EXTRAS ============ */
.plat-pill, .btn { will-change: transform; }
.magnetic { display: inline-block; will-change: transform; }
.ep-num { display: inline-block; }

/* soft grain over dark sections */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .hero-float, .hero-art, .spin-badge svg, .waveform span, .particles i,
  .lens-wrap .lr, .lens-wrap .lr2, .hero-lens .ring.dashed { animation: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
