/* ============================================
   WEBXCODE — splash.css (v3 - Cinematic)
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@1,900&family=Raleway:wght@300;400;500&display=swap');

#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #030303; /* Deep, almost pure black */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  /* The hyper-drive transition properties */
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), filter 0.8s ease;
}

#splash.hyper-exit {
  opacity: 0;
  transform: scale(1.6); /* Zooms forward */
  filter: blur(12px);    /* Blurs out */
  pointer-events: none;
}

#splash.gone { display: none; }

/* ── Logo Background (Breathing Ken Burns Effect) ── */
.splash-logo-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.splash-logo-bg img {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  padding: 5vw;
  opacity: 0;
  filter: brightness(0.08) drop-shadow(0 0 40px rgba(232,0,13,0.1));
  /* 8-second slow zoom */
  animation: logoBgBreathing 8s ease-out forwards;
  animation-delay: 2.5s; 
}

@keyframes logoBgBreathing {
  0%   { opacity: 0; transform: scale(1.0); }
  15%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1.15); }
}

/* ── Foreground content ── */
.splash-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* "Welcome to" & Terminal Cursor */
.splash-welcome {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 12px;
  text-transform: uppercase;
  color: #aaaaaa;
  opacity: 0;
  min-height: 1.5em;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.terminal-cursor {
  display: inline-block;
  width: 12px;
  height: clamp(1.5rem, 4vw, 2.5rem);
  background-color: #E8000D;
  margin-left: 8px;
  vertical-align: bottom;
  animation: blinkCursor 0.8s steps(2, start) infinite;
}

@keyframes blinkCursor {
  to { visibility: hidden; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* webXcode brand */
.splash-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  opacity: 0;
  text-transform: uppercase;
  font-style: italic;
  animation: fadeInBrand 0.8s ease forwards;
  animation-delay: 2.5s;
}

/* Glossy White Contrast */
.splash-web,
.splash-code {
  color: #FFFFFF;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Volatile Neon Contrast */
.splash-x {
  color: #E8000D;
  font-style: italic;
  display: inline-block;
  text-shadow:
    0 0 10px #E8000D,
    0 0 30px rgba(232,0,13,0.8),
    0 0 60px rgba(232,0,13,0.4);
  animation:
    fadeInBrand  0.8s ease    forwards 2.5s,
    neonFlicker  2.0s ease    forwards 3.5s;
}

@keyframes fadeInBrand {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes neonFlicker {
  0%   { text-shadow: none; color: #222; }
  8%   { text-shadow: 0 0 10px #E8000D, 0 0 30px rgba(232,0,13,0.9); color: #E8000D; }
  14%  { text-shadow: none; color: #111; }
  22%  { text-shadow: 0 0 10px #E8000D, 0 0 30px rgba(232,0,13,0.9); color: #E8000D; }
  28%  { text-shadow: none; color: #222; }
  36%  { text-shadow: 0 0 10px #E8000D, 0 0 30px rgba(232,0,13,0.9); color: #E8000D; }
  44%  { text-shadow: none; color: #111; }
  55%  { text-shadow: 0 0 15px #E8000D, 0 0 40px rgba(232,0,13,0.9); color: #E8000D; }
  100% {
    text-shadow:
      0 0 10px  #E8000D,
      0 0 40px  rgba(232,0,13,0.9),
      0 0 80px  rgba(232,0,13,0.5),
      0 0 120px rgba(232,0,13,0.2);
    color: #E8000D;
  }
}

/* ── Scan line ── */
.splash-scanline {
  position: absolute;
  top: 50%;
  left: -10%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, transparent, #E8000D, #ffffff, #E8000D, transparent);
  box-shadow: 0 0 15px #E8000D, 0 0 40px rgba(232,0,13,0.8);
  animation: scanSweep 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  animation-delay: 5.5s;
  z-index: 3;
}

@keyframes scanSweep {
  0%   { width: 0;    left: -10%; opacity: 1; }
  75%  { width: 150%; left: -10%; opacity: 1; }
  100% { width: 150%; left: -10%; opacity: 0; }
}

/* ── Encrypted char style ── */
.encrypted {
  color: rgba(232,0,13,0.8);
  font-family: monospace;
}
.revealed { color: #ffffff; }

/* ── 1. The Heavy Snap (Update your existing fadeInBrand keyframes) ── */
@keyframes fadeInBrand {
  0% { 
    opacity: 0; 
    transform: translateY(20px) scale(1.05); 
    letter-spacing: 8px; /* Starts wide */
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    letter-spacing: -4px; /* Snaps tight */
  }
}

/* ── 2. The Chromatic Glitch Tear ── */
.glitch-tear {
  animation: rgbSplit 0.15s cubic-bezier(0.25, 46.1, 0.2, -44.6) forwards;
}

@keyframes rgbSplit {
  0%   { text-shadow: none; }
  25%  { text-shadow: -4px 0 #E8000D, 4px 0 #00ffff; transform: skewX(2deg); }
  50%  { text-shadow: 4px 0 #E8000D, -4px 0 #00ffff; transform: skewX(-5deg); }
  75%  { text-shadow: -2px 0 #E8000D, 2px 0 #00ffff; transform: skewX(1deg); }
  100% { text-shadow: none; transform: skewX(0); }
}

/* ── 3. The Boot Log Readout ── */
.splash-readout {
  position: absolute;
  bottom: 20px;
  left: 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: #E8000D;
  opacity: 0.6;
  text-align: left;
  line-height: 1.4;
  z-index: 5;
  pointer-events: none;
  animation: fadeInLog 0.3s ease forwards 0.5s;
  letter-spacing: 1px;
}

@keyframes fadeInLog {
  to { opacity: 0.8; }
}

/* ── 4. Terminal Bypass Instruction ── */
.splash-bypass {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #aaaaaa;
  opacity: 0.5;
  letter-spacing: 2px;
  z-index: 5;
  cursor: pointer;
  animation: pulseBypass 1.5s infinite;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.splash-bypass:hover {
  color: #E8000D;
  opacity: 1;
}

@keyframes pulseBypass {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}