/* ==========================================================================
   AETHERIS CAIRO — COMPLETE SYSTEM STYLES
   - Fullscreen Video Home Page (Image 3)
   - Shutter Door Parting Mechanism (Image 1 & 2)
   - Classic Light-Theme Subpages (Graphs, Models, Analyzer)
   - Real Liquid Glassy Cards & Capsule Navigation
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: #0b120e;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0f172a;
  transition: background-color 0.4s ease;
  overflow-x: hidden;
}

/* Light Theme Active State (for Graphs, Models, Predictor pages) */
body.light-theme-active {
  background: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.05) 0%, transparent 45%),
    #f8fafc;
}

/* ==========================================================================
   1. DUAL-SHUTTER LOADING & TRANSITION SCREEN (Images 1 & 2)
   ========================================================================== */

#shutter-loader-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: transparent;
  pointer-events: auto;
  overflow: hidden;
}

/* Left & Right Shutter Doors */
.shutter-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50vw + 2px);
  height: 100vh;
  background-color: rgb(221, 223, 214);
  z-index: 10;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  border: none;
  outline: none;
  box-shadow: none;
}

.shutter-door-left {
  left: 0;
}

.shutter-door-right {
  right: 0;
}

/* When opening, doors part horizontally to reveal the page behind with majestic cinematic reveal */
#shutter-loader-wrapper.open .shutter-door {
  transition: transform 1.15s cubic-bezier(0.77, 0, 0.175, 1);
}

#shutter-loader-wrapper.open .shutter-door-left {
  transform: translateX(-100%);
  box-shadow: 15px 0 40px rgba(0, 0, 0, 0.35);
}

#shutter-loader-wrapper.open .shutter-door-right {
  transform: translateX(100%);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.35);
}

/* Central Rotating Logo & Loading Bar */
.shutter-content-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

#shutter-loader-wrapper.open .shutter-content-center {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
}

.shutter-logo-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 70px;
}

.shutter-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  animation: logoSlowSpin 18s linear infinite;
  transform-origin: center center;
}

@keyframes logoSlowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.shutter-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 320px;
}

.shutter-progress-track {
  flex: 1;
  height: 1.5px;
  background-color: rgba(30, 41, 40, 0.18);
  position: relative;
  overflow: hidden;
}

.shutter-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: #2b3536;
  transition: width 0.15s ease-out;
}

.shutter-progress-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2b3536;
  min-width: 36px;
  text-align: right;
}

/* ==========================================================================
   2. FIXED TOP HEADER NAVIGATION (Image 3)
   ========================================================================== */

.fixed-top-header {
  position: fixed;
  top: 22px;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.fixed-top-header .liquid-glass-header-capsule {
  pointer-events: auto;
}

/* ==========================================================================
   3. FULLSCREEN BACKGROUND VIDEO (Home Page Only)
   ========================================================================== */

#home-video-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background-color: #060c09;
  transition: opacity 0.5s ease;
}

body.light-theme-active #home-video-stage {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.light-theme-active #page-home {
  display: none !important;
}

body.light-theme-active .video-audio-floater {
  display: none !important;
}

#local-forest-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

.yt-fullscreen-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  pointer-events: none;
}

.yt-fullscreen-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.video-atmospheric-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(6, 12, 9, 0.25) 0%,
    rgba(4, 9, 7, 0.45) 60%,
    rgba(2, 6, 4, 0.75) 100%
  );
  pointer-events: none;
}

/* ==========================================================================
   4. HOME PAGE VIEW (Image 3)
   ========================================================================== */

#page-home {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.hero-main-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.2rem, 11vw, 9.8rem);
  line-height: 0.88;
  letter-spacing: 0.015em;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.8),
    0 10px 60px rgba(0, 0, 0, 0.5);
  margin-bottom: 34px;
}

/* Audio Floater (Home Page) */
.video-audio-floater {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 20, 16, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   5. CLASSIC LIGHT-THEME SUBPAGES (Graphs, Models, Analyzer)
   ========================================================================== */

.app-page-view {
  display: none;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 110px 24px 80px 24px;
}

.app-page-view.active {
  display: block;
}

.page-header-block {
  margin-bottom: 32px;
}

.page-category-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: 0.015em;
  color: #0f172a;
  line-height: 1;
  margin-top: 4px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 780px;
  line-height: 1.6;
  margin-top: 6px;
}

/* Studio 2-Column Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.slider-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.slider-name {
  font-weight: 700;
  color: #1e293b;
}

.slider-val-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #059669;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4);
  cursor: pointer;
}

/* Benchmark Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.classic-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.classic-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.classic-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: #334155;
}

.classic-table tr:hover td {
  background: rgba(248, 250, 252, 0.7);
}

/* Confidence Bar */
.confidence-bar-track {
  width: 100%;
  height: 7px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #059669, #10b981);
  transition: width 0.3s ease;
}

/* Responsiveness */
@media (max-width: 768px) {
  .liquid-glass-header-capsule {
    gap: 16px;
    padding: 10px 20px;
  }
  .glass-nav-item {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
  .hero-main-title {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }
  .app-page-view {
    padding-top: 130px;
  }
}
