/* ═══════════════════════════════════════════
   scenes.css — Scene-specific layouts & animations
   Each scene has unique visual treatment.
   ═══════════════════════════════════════════ */

/* ── Scene 01: Hero ── */
.scene-hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.scene-hero__glow {
  position: absolute; width: 400px; height: 400px;
  border-radius: 50%; filter: blur(120px);
  background: radial-gradient(circle, rgba(167,139,250,0.12) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.scene-hero__content {
  position: relative; z-index: 1; text-align: center;
  max-width: 780px; padding: 2rem;
}
.scene-hero__scanline {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--vi);
  transform: scaleX(0); transform-origin: center;
  opacity: 0.6;
  pointer-events: none;
}
.scene-hero .hero-text { opacity: 0; }
.scene-hero .terminal { opacity: 0; }
.scene-hero .btn { opacity: 0; }
.scene-hero.is-loaded .scene-hero__scanline {
  animation: scanline-expand 0.8s 0.3s var(--ease-out) forwards;
}
.scene-hero.is-loaded .hero-text {
  animation: text-reveal 0.6s 0.8s var(--ease-out) forwards;
}
.scene-hero.is-loaded .terminal {
  animation: text-reveal 0.5s 1.4s var(--ease-out) forwards;
}
.scene-hero.is-loaded .btn {
  animation: text-reveal 0.4s 1.8s var(--ease-out) forwards;
}

@keyframes scanline-expand {
  0% { transform: scaleX(0); opacity: 0.8; }
  60% { transform: scaleX(1); opacity: 0.6; }
  100% { transform: scaleX(0); opacity: 0; }
}

@keyframes text-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Scene 03: Problem ── */
.scene-problem { position: relative; }
.scene-problem__watermark {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: clamp(8rem, 20vw, 16rem);
  font-weight: 700; color: var(--ink-4); opacity: 0.15;
  line-height: 1; pointer-events: none;
  user-select: none;
}

/* ── Scene 04: Agitation ── */
.scene-agitation { text-align: right; }
.scene-agitation__gap {
  position: absolute; bottom: 0; left: 0;
  height: 1px; background: var(--vi);
  width: 0;
  transition: none;
}

/* ── Scene 05: Solution (scroll-coupled terminal) ── */
.scene-solution__terminal {
  position: relative;
  overflow: hidden;
}
.scene-solution__terminal .line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.scene-solution__terminal .line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scene 06: Showcase (sticky scroll gallery) ── */
.scene-showcase {
  position: relative;
}
.scene-showcase__sticky {
  position: sticky; top: 0;
  height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.scene-showcase__track {
  position: relative; width: 100%; max-width: 900px;
  padding-inline: clamp(20px, 4vw, 48px);
}
.scene-showcase__item {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; max-width: 860px;
  opacity: 0; transition: opacity 0.4s var(--ease-out);
}
.scene-showcase__item.is-active { opacity: 1; }
.scene-showcase__frame {
  border: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
}
.scene-showcase__frame-header {
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
}
.scene-showcase__frame-dots {
  display: flex; gap: 5px;
}
.scene-showcase__frame-dot {
  width: 8px; height: 8px; background: var(--bg-3);
}
.scene-showcase__frame-title {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: var(--ink-4); margin-left: auto;
}
.scene-showcase__frame-body {
  aspect-ratio: 16/9; background: var(--bg-code);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--ink-4);
}
.scene-showcase__caption {
  margin-top: 1rem;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--ink-3);
}
.scene-showcase__label {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--vi); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.scene-showcase__progress {
  position: absolute; right: clamp(20px, 4vw, 48px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
}
.scene-showcase__dot {
  width: 2px; height: 24px; background: var(--ink-4);
  transition: background var(--dur-med), height var(--dur-med);
}
.scene-showcase__dot.is-active { background: var(--vi); height: 40px; }

/* ── Scene 08: Architecture (tree diagram) ── */
.scene-arch__tree {
  display: flex; flex-direction: column; gap: 0;
  position: relative; padding-left: 2rem;
}
.scene-arch__node {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
}
.scene-arch__node::before {
  content: ''; position: absolute; left: -2rem; top: 50%;
  width: 1.5rem; height: 1px; background: var(--line);
}
.scene-arch__line {
  position: absolute; left: -2rem; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.scene-arch__name {
  font-family: var(--font-mono); font-size: var(--fs-sm);
  color: var(--ink);
}
.scene-arch__role {
  font-size: var(--fs-xs); color: var(--ink-3);
}
.scene-arch__root {
  font-family: var(--font-display); font-size: var(--fs-h3);
  font-weight: 600; margin-bottom: 1.5rem;
  padding-left: 0;
}
.scene-arch__root::before { display: none; }

/* ── Scene 09: Safety grid ── */
.scene-safety__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.scene-safety__cell {
  background: var(--bg); padding: 1.5rem;
}
.scene-safety__label {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--vi); text-transform: uppercase; letter-spacing: 0.06em;
}
.scene-safety__desc {
  color: var(--ink-2); font-size: var(--fs-sm); margin-top: 0.375rem;
}

@media (max-width: 500px) {
  .scene-safety__grid { grid-template-columns: 1fr; }
}

/* ── Scene 11: Final CTA ── */
.scene-final {
  min-height: 80vh; display: flex; align-items: center;
  justify-content: center; text-align: center;
}

/* ── Footer ── */
.footer {
  padding: 2rem 0;
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-4);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem;
}
.footer .vi-mark { color: var(--vi); }
