/* ============================================================
   activation.css — Mihai select → lock-in transition (snappy ~1.2s).
   Built for the video/still HeroArt. The camera punch + kick are
   driven by GSAP (app.jsx); this file handles the layered effects:
   warm bloom flash, chromatic kick, HUD peel, vignette, office land.
   ============================================================ */

/* ---------- HUD peels off on lock ---------- */
.stage[data-phase="activating"] .plate--cz,
.stage[data-phase="office"] .plate--cz { opacity: 0; transform: translateX(8%); }
.stage[data-phase="activating"] .plate--mihai,
.stage[data-phase="office"] .plate--mihai { opacity: 0; transform: translateY(20px); }
.plate { transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), filter 0.5s var(--ease-out); }

/* CodeZero half recedes; Mihai stays lit and owns the frame */
.stage[data-phase="activating"] .heroart__rail--r,
.stage[data-phase="office"] .heroart__rail--r { opacity: 0; }

/* guarantee the office reveal: fade the hero out and the office in on settle,
   independent of compositor/transition quirks on the data-phase rules */
.stage[data-phase="office"] .heroart { opacity: 0 !important; }
.stage[data-step="settle"] .office,
.stage[data-phase="office"] .office { opacity: 1 !important; transform: scale(1) !important; }
.office { transition: opacity 0.7s var(--ease-out), transform 1s var(--ease-out); }

/* ---------- warm bloom FLASH on lock (repurposed .lens-sweep) ---------- */
.lens-sweep {
  position: absolute; inset: 0; z-index: 12; pointer-events: none; opacity: 0;
  background:
    radial-gradient(40% 55% at 34% 50%, rgb(var(--warm-glow) / calc(0.9 * var(--warmth))) 0%, transparent 60%),
    radial-gradient(120% 120% at 34% 50%, rgba(255,255,255,0.5) 0%, transparent 45%);
  mix-blend-mode: screen;
}

/* ---------- chromatic-aberration kick layer ---------- */
.lockfx {
  position: absolute; inset: 0; z-index: 11; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(255,0,80,0.5), transparent 14%, transparent 86%, rgba(0,200,255,0.5));
  mix-blend-mode: screen;
}

/* ---------- caption beat ---------- */
.caption {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; z-index: 14;
  width: min(88vw, 44rem); text-align: center; pointer-events: none;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-caption); line-height: 1.15; letter-spacing: -0.01em;
  text-wrap: balance; opacity: 0; transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
  transform: translate(-50%, calc(-50% + 14px)); text-shadow: 0 2px 24px rgba(6,5,9,0.8);
}
.caption.is-on { opacity: 1; transform: translate(-50%, -50%); }
.caption .em { color: var(--warm-300); }

/* ---------- vignette closes in on Mihai ---------- */
.stage[data-phase="activating"] .vignette,
.stage[data-phase="office"] .vignette {
  background: radial-gradient(70% 65% at 34% 50%, transparent 22%, rgba(0,0,0,0.86) 100%);
}

/* ---------- office settle controls ---------- */
.office-controls {
  position: absolute; left: 50%; bottom: clamp(2rem, 7vh, 4rem); translate: -50% 0; z-index: 14;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease-out) 0.2s;
}
.stage[data-step="settle"] .office-controls { opacity: 1; pointer-events: auto; }
.scroll-hint { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ink-300); display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.scroll-hint .arrow { width: 1px; height: 28px; background: linear-gradient(var(--ink-300), transparent);
  animation: drift 1.8s var(--ease-inout) infinite; }
@keyframes drift { 0%,100% { transform: translateY(-4px); opacity: 0.4; } 50% { transform: translateY(4px); opacity: 1; } }
.text-btn { background: none; border: none; font-family: var(--font-mono); font-size: 0.64rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-500); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.text-btn:hover { color: var(--ink-100); }

/* ---------- clean exit fade (selector → persona page) ---------- */
.stage{ transition: opacity 0.55s var(--ease-out, ease); }
.stage[data-exit="on"]{ opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .lens-sweep, .lockfx { display: none; }
}
