/* ================================================================
   evolution.css — Full-screen cinematic Evolution state
   Warm pastels → darkening greys → near-black → cyberpunk
   ================================================================ */

/* ── Evolution overlay — sits above enterprise, below IDE ── */
#evolution-screen {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5ede0; /* starts warm, JS darkens it */
  transition: background 0s; /* JS controls this manually */
}

/* ── Colour wash layer — pastel that darkens over time ── */
#evo-wash {
  position: absolute;
  inset: 0;
  background: #f5ede0;
  z-index: 0;
  transition: background 1s ease;
}

/* ── Video layers ── */
#evo-video-warm,
#evo-video-digital {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* ── Static noise overlay (end of sequence) ── */
#evo-static {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
  transition: opacity 0.8s ease;
  animation: staticFlicker 0.08s steps(1) infinite;
  pointer-events: none;
}
@keyframes staticFlicker {
  0%   { background-position: 0px 0px; }
  25%  { background-position: -40px 20px; }
  50%  { background-position: 20px -30px; }
  75%  { background-position: -20px 40px; }
  100% { background-position: 10px -10px; }
}

/* ── Vignette — darkens edges throughout ── */
#evo-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0,0,0,0.35) 75%,
    rgba(0,0,0,0.7) 100%
  );
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

/* ── Text content layer ── */
#evo-text {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  pointer-events: none;
}

.evo-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.92);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease, transform 1s ease;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
  max-width: 800px;
  padding: 0 2rem;
}

.evo-line.show {
  opacity: 1;
  transform: translateY(0);
}

.evo-line.digital {
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.85rem, 2vw, 1.2rem);
  font-style: normal;
  font-weight: 400;
  color: rgba(249,115,22,0.9);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(249,115,22,0.4);
}

/* ── Neon line that grows across screen ── */
#evo-neon-line {
  position: absolute;
  bottom: 30%;
  left: 0;
  height: 1px;
  width: 0%;
  z-index: 4;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(249,115,22,0.8) 30%,
    rgba(34,211,238,0.9) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(249,115,22,0.6),
    0 0 20px rgba(249,115,22,0.3),
    0 0 40px rgba(34,211,238,0.2);
  transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ── Progress dots at bottom ── */
#evo-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.evo-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.4s ease, transform 0.4s ease;
}
.evo-dot.active {
  background: rgba(249,115,22,0.8);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(249,115,22,0.5);
}
.evo-dot.done {
  background: rgba(255,255,255,0.5);
}

/* ── Skip button ── */
#evo-skip {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  z-index: 10;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}
#evo-skip:hover {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.35);
}

/* ── Final flash before cyberpunk ── */
#evo-flash {
  position: fixed;
  inset: 0;
  z-index: 9980;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
#evo-flash.show { opacity: 1; }
