/* =====================================================
   CHERENKOV — Design System
   ===================================================== */

:root {
  /* Colors */
  --bg-primary: #f5f5f5;
  --text-dim: #888888;
  --text-muted: #aaaaaa;
  --accent-blue: #2962ff;
  --neon-blue: #5a80e6;

  /* Timings (Match coordinator.js) */
  --t-inc-reveal: 1.2s;
  --t-veil-fade: 4s;
  --t-neon-die: 1.2s;
  --t-nav-reveal: 1.5s;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100dvh;
  font-family: 'Orbitron', 'Arial', sans-serif;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* =====================================================
   LAYOUT & CONTAINERS
   ===================================================== */

#landing-page {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Tier 2: White cover — fades in, stays opaque permanently */
#fade-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-veil-fade) ease;
}

/* Once raised, never drops back — permanently covers Tier 1 */
[data-state="veil_transitioning"] #fade-overlay { opacity: 1; }
[data-state="active"]             #fade-overlay { opacity: 1; }

.wordmark-sub.visible { opacity: 1; }

/* Tier 3: Native Video Layer — maximum fidelity */
.veil-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  pointer-events: none;
}

.veil-video.playing { opacity: 1; }





/* =====================================================
   THREE-TIER Z-INDEX SYSTEM
   Tier 1: Autostereogram patterns (z:1)
   Tier 2: White cover overlay     (z:2) — permanent once raised
   Tier 3: Mosaic canvas           (z:3)
   UI:     Nav / Wordmark          (z:100+)
   ===================================================== */

.background-pattern {
  position: absolute;
  top: -20%; left: -20%;
  width: 140%; height: 140%;
  background-repeat: repeat;
  background-size: 80px 80px;
  animation: backgroundShift 12s ease-in-out infinite,
             patternRotate 40s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.1;
  transition: opacity 2s ease;
  will-change: transform, opacity;
}

.pattern-1 {
  background-image: linear-gradient(45deg,
      rgba(255, 255, 255, 0.1) 25%, rgba(224, 224, 224, 0.1) 25%,
      rgba(41, 98, 255, 0.1) 50%, rgba(41, 98, 255, 0.2) 75%,
      rgba(208, 208, 208, 0.1) 75%);
}

.pattern-2 {
  background-image: linear-gradient(135deg,
      rgba(41, 98, 255, 0.05) 25%, rgba(224, 224, 224, 0.05) 25%,
      rgba(255, 255, 255, 0.05) 50%, rgba(41, 98, 255, 0.1) 75%,
      rgba(208, 208, 208, 0.05) 75%);
  animation-delay: -6s;
}

.pattern-3 {
  background-image: linear-gradient(225deg,
      rgba(208, 208, 208, 0.05) 25%, rgba(41, 98, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.05) 50%, rgba(224, 224, 224, 0.1) 75%,
      rgba(41, 98, 255, 0.05) 75%);
  animation-delay: -3s;
}

.pattern-4 {
  background-image: linear-gradient(315deg,
      rgba(41, 98, 255, 0.03) 25%, rgba(224, 224, 224, 0.03) 25%,
      rgba(255, 255, 255, 0.03) 50%, rgba(41, 98, 255, 0.06) 75%,
      rgba(208, 208, 208, 0.03) 75%);
  animation-delay: -9s;
  background-size: 100px 100px;
}

/* =====================================================
   WORDMARK (TYPOGRAPHY)
   ===================================================== */

.wordmark-container {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wordmark {
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  display: flex;
}

.letter {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.letter.visible { opacity: 1; }


.wordmark-sub {
  font-size: clamp(9px, 1.2vw, 13px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 1.2s ease;
  margin-top: 8px;
}

.wordmark-sub.visible { opacity: 1; }

/* =====================================================
   NAV & LOGO
   ===================================================== */

.top-nav {
  position: absolute;
  top: 40px; left: 40px; right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 150;
  pointer-events: none;
}

.nav-group-left, .nav-group-right {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0;
  pointer-events: auto;
  transition: opacity var(--t-nav-reveal) ease, 
              transform var(--t-nav-reveal) ease, 
              color 0.4s ease,
              letter-spacing 0.4s ease;
  transform: translateY(-5px);
}

.nav-link.revealed { opacity: 1; transform: translateY(0); }
.nav-link:hover { 
  color: #ffffff; 
  text-shadow: 0 0 10px rgba(255,255,255,0.4); 
  letter-spacing: 0.45em;
}

.logo-mark {
  width: clamp(60px, 8vw, 100px);
  height: auto;
  margin-bottom: 12px;
  opacity: 0;
  transition: opacity 0.8s ease;
}



@keyframes backgroundShift {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  25% { opacity: 0.3; transform: scale(1.02); }
  50% { opacity: 0.5; transform: scale(1.03); }
  75% { opacity: 0.3; transform: scale(1.02); }
}


@keyframes patternRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
  .wordmark { font-size: clamp(28px, 9vw, 40px); letter-spacing: 0.15em; }
  .top-nav { top: 25px; left: 20px; right: 20px; }
  .nav-link { font-size: 9px; letter-spacing: 0.2em; }
}