/* ==========================================
   THEME PALETTES (CSS Variables Engine)
   ========================================== */
:root {
  --bg-base: #ffffff;
  --blob-1: #0055ff;
  --blob-2: #0033cc;
  --blob-3: #3377ff;
  --slab-border: rgba(100, 100, 100, 0.4); 
}

html[data-theme="2"] {
  --bg-base: #050505;
  --blob-1: #ff0033;
  --blob-2: #990011;
  --blob-3: #ff3333;
  --slab-border: rgba(255, 255, 255, 0.3);
}

html[data-theme="3"] {
  --bg-base: #39ff14; 
  --blob-1: #ff0000;  
  --blob-2: #ffffff;  
  --blob-3: #0022ff;  
  --slab-border: rgba(255, 255, 255, 0.6);
}

body, html {
  margin: 0; padding: 0;
  width: 100%; height: 100vh;
  background-color: var(--bg-base);
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  display: flex; justify-content: center; align-items: center;
  transition: background-color 0.5s ease;
}

/* ==========================================
   DYNAMIC SHIFTING BACKGROUND ENGINE
   ========================================== */
.background-engine {
  position: absolute; width: 100%; height: 100%;
  top: 0; left: 0; overflow: hidden; z-index: 1;
}

.moving-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform;
}

.blob-a { background: var(--blob-1); width: 50vw; height: 50vw; top: -10%; left: -10%; animation: floatA 12s infinite alternate ease-in-out; }
.blob-b { background: var(--blob-2); width: 45vw; height: 45vw; bottom: -5%; right: -5%; animation: floatB 15s infinite alternate ease-in-out; }
.blob-c { background: var(--blob-3); width: 40vw; height: 40vw; top: 30%; left: 30%; animation: floatC 10s infinite alternate ease-in-out; }

@keyframes floatA { 0% { transform: translate(0, 0) scale(0.8); } 100% { transform: translate(30vw, 20vh) scale(1.2); } }
@keyframes floatB { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-25vw, -15vh) scale(1.3); } }
@keyframes floatC { 0% { transform: translate(0, 0) scale(0.9); } 100% { transform: translate(-15vw, 25vh) scale(1.1); } }

.master-installation {
  position: relative; z-index: 2; display: flex;
  justify-content: center; align-items: center;
  width: 100%; height: 100%;
}

/* ==========================================
   STAGE 1: 3-Second Majestic Monolith Descent
   ========================================== */
.monolith-drop-wrapper {
  position: relative; z-index: 10; opacity: 0;
  animation: dropMonolith 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropMonolith {
  0% { transform: translateY(-100vh) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.monolith-slab {
  position: relative; width: 320px; height: 480px; border-radius: 20px;
  background: transparent; border: 3px solid var(--slab-border); overflow: hidden;
}

.sandwiched-logo-wrapper {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  padding: 20px; box-sizing: border-box; z-index: 2;
  display: flex; justify-content: center; align-items: center;
  filter: drop-shadow(0px 12px 20px rgba(0, 0, 0, 0.7));
}

.sandwiched-logo-wrapper img { width: 100%; height: 100%; object-fit: contain; transform: translateZ(0); }

.floating-monolith { animation: monolithDrift 8s infinite alternate ease-in-out; }

@keyframes monolithDrift {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-12px); }
}

/* ==========================================
   STAGE 2: 7-Dish Wide-Roaming Ecosystem
   ========================================== */
.orbit-ecosystem {
  position: absolute; width: 580px; height: 580px; pointer-events: none;
}

.dish-wrapper {
  position: absolute; opacity: 0; pointer-events: none;
  display: flex; justify-content: center; align-items: center;
  animation: igniteDish 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes igniteDish { 0% { opacity: 0; transform: scale(0.4); } 100% { opacity: 1; transform: scale(1); } }

/* 7 distinct starting anchor points */
.wrapper-set1 { top: 10%; left: 0%;      animation-delay: 3.0s; }
.wrapper-set2 { top: 15%; right: 5%;     animation-delay: 3.2s; }
.wrapper-set3 { top: 45%; left: -15%;    animation-delay: 3.4s; }
.wrapper-set4 { bottom: 15%; right: -5%; animation-delay: 3.6s; }
.wrapper-set5 { bottom: 5%; left: 10%;   animation-delay: 3.8s; }
.wrapper-set6 { top: 40%; right: -10%;   animation-delay: 4.0s; }
.wrapper-contact { bottom: -10%; right: 35%; animation-delay: 4.2s; }

.dish-motion { display: flex; justify-content: center; align-items: center; will-change: transform; }

.drift-1 { animation: wideOrbit1 25s infinite alternate ease-in-out; }
.drift-2 { animation: wideOrbit2 28s infinite alternate ease-in-out; }
.drift-3 { animation: wideOrbit3 22s infinite alternate ease-in-out; }
.drift-4 { animation: wideOrbit4 31s infinite alternate ease-in-out; }
.drift-5 { animation: wideOrbit5 26s infinite alternate ease-in-out; }
.drift-6 { animation: wideOrbit6 29s infinite alternate ease-in-out; }
.drift-7 { animation: wideOrbit7 24s infinite alternate ease-in-out; } /* Contact Dish Orbit */

/* Sweeping paths */
@keyframes wideOrbit1 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(80px, -110px) rotate(5deg); } 66% { transform: translate(-30px, 70px) rotate(-2deg); } 100% { transform: translate(-100px, -20px) rotate(4deg); } }
@keyframes wideOrbit2 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(-120px, 80px) rotate(-5deg); } 66% { transform: translate(-40px, -100px) rotate(3deg); } 100% { transform: translate(90px, 40px) rotate(-4deg); } }
@keyframes wideOrbit3 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(110px, 90px) rotate(4deg); } 66% { transform: translate(-80px, 130px) rotate(-3deg); } 100% { transform: translate(60px, -80px) rotate(2deg); } }
@keyframes wideOrbit4 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(-100px, -140px) rotate(-4deg); } 66% { transform: translate(120px, 60px) rotate(5deg); } 100% { transform: translate(-50px, 110px) rotate(-2deg); } }
@keyframes wideOrbit5 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(140px, -60px) rotate(3deg); } 66% { transform: translate(-90px, -120px) rotate(-5deg); } 100% { transform: translate(50px, 90px) rotate(2deg); } }
@keyframes wideOrbit6 { 0% { transform: translate(0px, 0px) rotate(0deg); } 33% { transform: translate(-70px, 150px) rotate(-3deg); } 66% { transform: translate(130px, -80px) rotate(4deg); } 100% { transform: translate(-110px, -50px) rotate(-2deg); } }
@keyframes wideOrbit7 { 0% { transform: translate(0px, 0px); } 50% { transform: translate(60px, -40px); } 100% { transform: translate(-60px, -80px); } }

/* ==========================================
   LAYER 3: Orbit Dish Styling
   ========================================== */
.orbit-dish {
  position: relative; overflow: hidden; pointer-events: auto;
  display: flex; justify-content: center; align-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); box-sizing: border-box; text-decoration: none;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.orbit-dish img.set-thumbnail {
  width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; z-index: 1;
}

.orbit-dish::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%; z-index: 2; pointer-events: none; 
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4), inset 3px 3px 6px rgba(255,255,255,0.3), inset -2px -2px 6px rgba(0,0,0,0.15);
}

.contact-trigger {
  backdrop-filter: blur(20px) saturate(130%); -webkit-backdrop-filter: blur(20px) saturate(130%);
  background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.25));
}

.contact-trigger::after {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7), inset 0 0 20px 10px rgba(255,255,255,0.4), inset 5px 5px 12px rgba(255,255,255,0.9), inset -6px -6px 15px rgba(0,0,0,0.4);
}

.orbit-dish:hover { transform: scale(1.15); box-shadow: 0 25px 45px rgba(0,0,0,0.35); }
.orbit-dish:hover::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), inset 4px 4px 8px rgba(255,255,255,0.5), inset -3px -3px 8px rgba(0,0,0,0.3); }
.contact-trigger:hover::after { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.9), inset 0 0 25px 12px rgba(255,255,255,0.6), inset 6px 6px 15px #ffffff, inset -6px -6px 15px rgba(0,0,0,0.5); }

.dish-lg { width: 125px; height: 125px; }
.dish-md { width: 110px; height: 110px; }
.dish-sm { width: 95px; height: 95px; }

/* ==========================================
   LAYER 4: Frosted Glass Modal Window
   ========================================== */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  z-index: 1000; display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px; padding: 40px; width: 90%; max-width: 400px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  position: relative; transform: translateY(-50px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.close-modal {
  position: absolute; top: 15px; right: 20px;
  background: none; border: none; color: #fff; font-size: 28px;
  cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
}

.close-modal:hover { opacity: 1; }

.modal-content h2 {
  margin: 0 0 25px 0; color: #fff; font-weight: 800; letter-spacing: 2px; text-align: center;
}

.modal-content form { display: flex; flex-direction: column; gap: 15px; }

.modal-content input, .modal-content textarea {
  width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 15px; border-radius: 8px; color: #fff; font-family: inherit; font-size: 1rem;
  box-sizing: border-box; outline: none; transition: border 0.3s, background 0.3s;
}

.modal-content input::placeholder, .modal-content textarea::placeholder { color: rgba(255, 255, 255, 0.6); }
.modal-content input:focus, .modal-content textarea:focus { border-color: #fff; background: rgba(255, 255, 255, 0.15); }

.modal-content textarea { resize: none; }

.submit-btn {
  background: #fff; color: #000; border: none; padding: 15px; border-radius: 8px;
  font-weight: 800; font-family: inherit; font-size: 1rem; letter-spacing: 1px;
  cursor: pointer; transition: background 0.3s, transform 0.2s; margin-top: 10px;
}

.submit-btn:hover { background: #e0e0e0; transform: translateY(-2px); }

/* Debug trigger button */
.theme-roller-btn {
  position: absolute; bottom: 20px; z-index: 100;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff; padding: 8px 16px; border-radius: 20px;
  cursor: pointer; font-size: 0.8rem; backdrop-filter: blur(10px);
  text-transform: uppercase; letter-spacing: 1px;
}