/* ============================================================
   HeroCinematic — scroll-pinned stage styling
   ============================================================ */

.hero-cine {
  position: relative;
  height: 240vh;           /* scroll track length */
  background: var(--bg);
}
.cine-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* faint blueprint grid */
.cine-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 100% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 40%, #000 30%, transparent 80%);
}

/* full-bleed looping video */
.cine-render {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  overflow: hidden;
}
.cine-render-ph { position: absolute; inset: 0; border-radius: inherit; }
.cine-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; transform: translateZ(0); will-change: transform; }
.cine-video:not([src]) { display: none; }

/* moving scan highlight → reads as playback */
.cine-scan {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 62%);
  background-size: 280% 100%;
  animation: cine-sweep 4.2s linear infinite;
  mix-blend-mode: screen;
}
@keyframes cine-sweep { 0% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* HUD over the render */
.cine-hud {
  position: absolute; top: 88px; left: 16px; right: 16px; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text); pointer-events: none;
}
.cine-rec { display: inline-flex; align-items: center; gap: 7px; background: color-mix(in srgb, var(--bg) 64%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-2); border-radius: 999px; padding: 5px 11px; }
.cine-rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #3fd07f; box-shadow: 0 0 9px #3fd07f; animation: pulse 2.4s infinite; }
.cine-tc { margin-left: auto; color: var(--accent); background: color-mix(in srgb, var(--bg) 64%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-2); border-radius: 999px; padding: 5px 11px; min-width: 64px; text-align: center; }
.cine-res { color: var(--text-dim); background: color-mix(in srgb, var(--bg) 64%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border-2); border-radius: 999px; padding: 5px 11px; }

/* scrim so overlaid copy stays legible over the moving footage */
.cine-scrim {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background:
    radial-gradient(110% 80% at 50% 46%, color-mix(in srgb, #05080c 60%, transparent) 0%, transparent 62%),
    linear-gradient(to bottom, color-mix(in srgb, #05080c 55%, transparent), transparent 28%, transparent 58%, color-mix(in srgb, #05080c 72%, transparent));
}

/* text beats — stacked, cross-faded by JS */
.cine-copy {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  text-align: center;
  padding: var(--gutter);
  pointer-events: none;
}
.cine-beat {
  grid-area: 1 / 1;
  width: min(100%, 980px);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  will-change: transform, opacity;
}
.cine-beat .eyebrow { justify-content: center; color: rgba(255,255,255,0.85); text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
/* beats B & C start hidden, revealed by scroll (JS sets opacity) */
.cine-beat-b, .cine-beat-c { opacity: 0; }

.cine-title { font-size: clamp(38px, 6.6vw, 92px); line-height: 1.0; letter-spacing: -0.04em; font-weight: 600; color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.4); }
.cine-line { display: block; }
.lang-en .cine-title { letter-spacing: -0.045em; line-height: 1.04; }

.cine-prop {
  font-size: clamp(24px, 3.4vw, 48px); line-height: 1.22; letter-spacing: -0.025em;
  font-weight: 500; max-width: 24ch; text-wrap: balance; color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 20px rgba(0,0,0,0.55);
}

.cine-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cine-actions .btn { pointer-events: auto; }
.cine-stats { display: flex; gap: clamp(26px, 5vw, 64px); margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.cine-stat { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.cine-stat-n { font-size: clamp(26px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,0.5); }
.cine-stat-l { font-size: 12.5px; color: rgba(255,255,255,0.78); white-space: nowrap; line-height: 1.4; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }

/* bottom scrub bar */
.cine-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 6; background: var(--border); }
.cine-progress span { display: block; height: 100%; width: 0%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }

/* scroll cue */
.cine-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; color: rgba(255,255,255,0.7);
  pointer-events: auto;
}
.cine-cue svg { animation: cue-bob 1.8s var(--ease) infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* YouTube iframe embed — cover fill, pointer-events off so scroll works */
.cine-yt-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.cine-yt-iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* 16:9 cover: always wider than the container */
  width: max(100%, 177.78vh);
  height: max(100%, 56.25vw);
  border: none;
  pointer-events: none;
}
.cine-static { position: relative; height: auto; min-height: 100vh; place-items: stretch; }
.cine-static .cine-copy { position: relative; inset: auto; padding-block: clamp(120px, 16vh, 200px) 60px; }
.cine-static .cine-beat { grid-area: auto; margin-bottom: 40px; opacity: 1 !important; transform: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hero-cine { height: 213vh; }
  .cine-render { width: 100vw; height: 100vh; }
  .cine-stats { gap: 20px 28px; }
  .cine-hud { top: 84px; font-size: 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cine-scan, .cine-cue svg, .cine-rec-dot { animation: none; }
}
