@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #0088ff;
  --cyan: #00ffff;
  --bg-base: #030712;
  --bg-gradient: radial-gradient(circle at 50% 0%, #081229 0%, #030712 100%);
  --glass-bg: rgba(11, 19, 36, 0.45);
  --glass-border: rgba(0, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --celestial-orb: radial-gradient(circle, #00ffff 0%, rgba(0, 136, 255, 0.2) 40%, transparent 70%);
  --card-bg: #0a0f1c;
}

body.day-mode {
  --bg-base: #f0f7ff;
  --bg-gradient: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #f8fafc 100%);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 136, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 136, 255, 0.15);
  --text-main: #0b0f19;
  --text-muted: #475569;
  --celestial-orb: radial-gradient(circle, #ffb700 0%, rgba(255, 136, 0, 0.3) 40%, transparent 70%);
  --card-bg: rgba(255,255,255,0.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif; background: var(--bg-base); background-image: var(--bg-gradient);
  color: var(--text-main); transition: background 0.8s ease, color 0.5s ease;
  overflow-x: hidden; line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* Celestial Environments (Clouds & Stars) */
.bg-environment { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: var(--celestial-orb); filter: blur(50px);
  transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10; /* This forces the sun to stay in front */
}
body:not(.day-mode) .orb { top: -100px; right: 10%; }
body.day-mode .orb { top: -60px; left: 10%; right: auto; animation: sunSway 10s ease-in-out infinite alternate; }

.stars, .clouds { position: absolute; inset: 0; transition: opacity 1s ease; }
body.day-mode .stars { opacity: 0; }
body:not(.day-mode) .clouds { opacity: 0; }

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite alternate ease-in-out;
}

.shooting-star {
  position: absolute;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, #00ffff, rgba(0, 255, 255, 0.4), transparent);
  filter: drop-shadow(0 0 6px #00ffff);
  transform: rotate(-35deg);
  opacity: 0;
  animation: shoot 8s ease-in-out infinite;
}

/* Moving Clouds */
.cloud { 
  position: absolute; 
  background: rgb(0, 128, 255); 
  border-radius: 100px; 
  filter: blur(75px); 
  opacity: 0.8; 
  pointer-events: none;
  z-index: 5; /* This pushes the clouds behind the sun */
}
.cloud-ltr { animation: driftLtr 100s linear infinite; }
.cloud-rtl { animation: driftRtl 130s linear infinite; }

/* 3D Glass Buttons */
.glass-button { 
  padding: 12px 28px; border-radius: 50px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01)); 
  border: 1px solid rgba(255, 255, 255, 0.15); color: var(--text-main); transition: 0.3s; font-size: 0.95rem;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), 0 4px 15px rgba(0,0,0,0.2); backdrop-filter: blur(12px);
}
.glass-button:hover { border-color: var(--cyan); box-shadow: inset 0 1px 1px rgba(255,255,255,0.25), 0 8px 25px var(--cyan-glow); transform: translateY(-3px); }
.glass-button.primary { 
  background: linear-gradient(180deg, #1a8cff, #0055cc); color: white; border: 1px solid var(--cyan); 
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 4px 15px rgba(0, 136, 255, 0.4); 
}
.glass-button.primary:hover { background: linear-gradient(180deg, #3399ff, #0066ff); box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 8px 25px rgba(0, 255, 255, 0.6); }

/* Hero Badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #020b1a; border: 1px solid #0055cc; color: #00ffff;
  padding: 8px 24px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; letter-spacing: 1.5px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 4px 20px rgba(0, 136, 255, 0.2); margin-bottom: 24px; text-transform: uppercase;
}
.hero-badge svg { fill: #00ffff; width: 16px; height: 16px; }

/* Layout & Panels */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--glass-shadow); transition: all 0.3s; }
.gradient-text { background: linear-gradient(135deg, var(--cyan), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Header & Footer (Equal Spacing) */
header { position: fixed; top: 20px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; padding: 0 20px; }
nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; width: 100%; max-width: 900px; border-radius: 100px; }
.nav-links { display: flex; gap: 24px; list-style: none; font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--cyan); transition: 0.3s; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; }
.logo span { background: linear-gradient(135deg, var(--cyan), var(--primary)); width: 28px; height: 28px; display: flex; justify-content: center; align-items: center; border-radius: 6px; color: #000; box-shadow: inset 0 2px 4px rgba(255,255,255,0.5); }

.theme-toggle { cursor: pointer; background: transparent; border: none; color: var(--text-main); font-size: 1.2rem; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; }
.theme-toggle:hover { background: rgba(255,255,255,0.1); transform: rotate(30deg) scale(1.1); color: var(--cyan); }

footer { display: flex; justify-content: center; padding: 0 20px 20px 20px; margin-top: 60px; }
.footer-inner { width: 100%; max-width: 900px; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; border-radius: 100px; }
.footer-links { display: flex; gap: 15px; font-weight: 600; }
.footer-links a:hover { color: var(--cyan); }

/* Stats Counter */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 80px 0; }
.stat-card { padding: 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; transition: 0.3s; border-bottom: 2px solid rgba(255,255,255,0.05); }
.stat-card:hover { transform: translateY(-5px); border-color: var(--cyan); box-shadow: 0 10px 30px var(--cyan-glow); }
.stat-num { font-size: 3.5rem; font-weight: 900; margin-bottom: 5px; }

/* Custom Home Video Player */
.home-video-wrapper { position: relative; border-radius: 24px; overflow: hidden; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,0.6); border: 1px solid var(--glass-border); width: 100%; max-width: 900px; aspect-ratio: 16/9; margin: 0 auto 80px; cursor: pointer; transition: 0.3s; }
.home-video-wrapper:hover { border-color: var(--cyan); box-shadow: 0 10px 40px var(--cyan-glow); transform: scale(1.02); }
.home-video-wrapper iframe { width: 100%; height: 100%; pointer-events: none; }
.home-video-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0); transition: 0.3s; }
.home-video-wrapper:hover .home-video-overlay { background: rgba(0,0,0,0.2); }
.home-play-btn { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(180deg, rgba(0,136,255,0.8), rgba(0,85,204,0.8)); border: 2px solid #00ffff; color: white; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; padding-left: 8px; backdrop-filter: blur(5px); opacity: 0; transition: 0.3s; transform: scale(0.8); box-shadow: 0 4px 15px rgba(0,255,255,0.4); }
.home-video-wrapper:hover .home-play-btn { opacity: 1; transform: scale(1); }

/* Portfolio Video Cards */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.vid-card { position: relative; border-radius: 16px; overflow: hidden; cursor: pointer; aspect-ratio: 16/9; border: 1px solid var(--glass-border); border-bottom: 2px solid rgba(255,255,255,0.1); transition: 0.3s; box-shadow: var(--glass-shadow); }
.vid-card:hover { border-color: var(--cyan); box-shadow: 0 10px 30px var(--cyan-glow); transform: translateY(-5px); }
.vid-card img { width: 100%; height: 100%; object-fit: cover; }
.vid-play-icon { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.4); font-size: 3rem; color: white; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px); }
.vid-card:hover .vid-play-icon { opacity: 1; }

/* Pop-up Lightbox */
.lightbox { 
  position: fixed; inset: 0; background: rgba(0,0,0,0.98) !important; 
  backdrop-filter: blur(15px); z-index: 1000; 
  display: flex; justify-content: center; align-items: center; 
  opacity: 0; pointer-events: none; transition: 0.3s ease-out; 
}
.lightbox.active { opacity: 1; pointer-events: auto; }

/* Forces the container to be 100% invisible and screen-sized */
.lightbox-content { 
  width: 100vw !important; height: 100vh !important; max-width: none !important;
  background: transparent !important; 
  border: none !important; 
  box-shadow: none !important; 
  border-radius: 0 !important;
  display: flex; justify-content: center; align-items: center;
  position: relative; transform: scale(0.95); transition: 0.3s ease-out; 
}
.lightbox.active .lightbox-content { transform: scale(1); }

#lightbox-iframe-container { 
  width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; 
}

/* Stretches YouTube edge-to-edge so its own black bars blend into the background */
#lightbox-iframe-container iframe { 
  width: 100vw !important; height: 100vh !important;
  max-width: 100% !important; max-height: 100% !important;
  border: none !important; outline: none !important; background: transparent !important; 
}

/* Detach the close button and lock it to the phone screen */
.lightbox-close { 
  position: fixed !important; 
  top: 20px !important; 
  left: 20px !important; /* Strictly locks it to the top-right */
  width: 45px !important;
  height: 45px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important; 
  font-size: 2.5rem !important; 
  background: rgba(0, 0, 0, 0.85) !important; 
  border-radius: 50% !important;
  border: 1px solid var(--cyan) !important; /* Cyan ring to make it pop */
  cursor: pointer; 
  z-index: 999999 !important; 
  line-height: 1 !important;
  padding-bottom: 4px !important; /* Centers the X perfectly */
}
.lightbox-close:hover { 
  background: var(--cyan) !important;
  color: black !important;
  transform: scale(1.1); 
}

/* Exact FAQ & Contact (From Screenshot) */
.contact-faq-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; margin-bottom: 80px; }
.contact-card { background: var(--card-bg); border-radius: 24px; padding: 40px; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.contact-card h3 { font-size: 1.8rem; margin: 20px 0 10px; }
.contact-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 30px; }
.btn-blue { background: linear-gradient(180deg, #1a8cff, #0055cc); color: white; width: 100%; padding: 15px; border-radius: 12px; font-weight: 600; border: 1px solid #00ffff; box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 4px 10px rgba(0, 136, 255, 0.3); margin-bottom: 15px; cursor: pointer; transition: 0.3s; font-size: 1rem; }
.btn-blue:hover { background: linear-gradient(180deg, #3399ff, #0066ff); box-shadow: 0 0 20px rgba(0,255,255,0.5); transform: translateY(-2px); }
.btn-dark { background: rgba(255,255,255,0.05); color: var(--text-main); width: 100%; padding: 15px; border-radius: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.1); box-shadow: inset 0 2px 4px rgba(255,255,255,0.05); cursor: pointer; transition: 0.3s; font-size: 1rem; }
.btn-dark:hover { background: rgba(255,255,255,0.1); border-color: var(--text-main); transform: translateY(-2px); }

.faq-accordion { display: flex; flex-direction: column; gap: 15px; }
.faq-box { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; overflow: hidden; cursor: pointer; transition: 0.3s; }
.faq-box-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.faq-box-icon { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: 0.3s; }
.faq-box.active .faq-box-icon { background: var(--cyan); color: #000; transform: rotate(45deg); box-shadow: 0 0 10px var(--cyan); }
.faq-box-content { max-height: 0; padding: 0 20px; color: var(--text-muted); font-size: 0.9rem; transition: max-height 0.4s ease, padding 0.4s; }
.faq-box.active .faq-box-content { max-height: 200px; padding: 0 20px 20px; }

/* Services Layout */
.service-step { display: flex; gap: 40px; margin-bottom: 80px; align-items: flex-start; opacity: 0; transform: translateY(40px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.service-step.visible { opacity: 1; transform: translateY(0); }
.step-num { font-size: 5rem; font-weight: 900; color: transparent; -webkit-text-stroke: 1px var(--glass-border); transition: 0.5s; line-height: 0.8; }
body.day-mode .step-num { -webkit-text-stroke: 1px var(--primary); }
.service-step:hover .step-num { color: var(--cyan); -webkit-text-stroke: 0px; text-shadow: 0 0 30px var(--cyan); transform: scale(1.1); }
.service-content { flex: 1; padding: 40px; transition: 0.3s; border-left: 4px solid transparent; border-bottom: 2px solid rgba(255,255,255,0.05); }
.service-step:hover .service-content { border-left-color: var(--cyan); transform: translateX(10px); box-shadow: 0 10px 30px var(--cyan-glow); }

/* Animations */
@keyframes shoot {
  0% { transform: translate(0, 0) rotate(-35deg); opacity: 0; }
  2% { opacity: 1; }
  12% { transform: translate(-700px, 450px) rotate(-35deg); opacity: 0; }
  100% { transform: translate(-700px, 450px) rotate(-35deg); opacity: 0; }
}

@keyframes driftLtr { 0% { transform: translateX(-20vw); } 100% { transform: translateX(120vw); } }
@keyframes driftRtl { 0% { transform: translateX(120vw); } 100% { transform: translateX(-20vw); } }

/* --- Aggressive Pagefind Glass Theme --- */
:root {
  --pagefind-ui-primary: var(--cyan);
  --pagefind-ui-text: var(--text-main);
  --pagefind-ui-background: transparent;
  --pagefind-ui-border: var(--glass-border);
}

/* Force the search input to be glass instead of solid white */
.pagefind-ui__search-input {
  background: rgba(0, 0, 0, 0.4) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5) !important;
}
body.day-mode .pagefind-ui__search-input {
  background: rgba(255, 255, 255, 0.6) !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* Fix invisible text in dark mode */
.pagefind-ui__result-title, 
.pagefind-ui__result-link,
.pagefind-ui__message {
  color: var(--text-main) !important;
  font-weight: 700 !important;
}

/* Soften the excerpt text so it matches your site */
.pagefind-ui__result-excerpt {
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
}

/* Kill the ugly yellow and replace it with a glowing theme highlight */
.pagefind-ui__result mark {
  background: rgba(0, 255, 255, 0.15) !important;
  color: var(--cyan) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2) !important;
}
body.day-mode .pagefind-ui__result mark {
  background: rgba(0, 136, 255, 0.15) !important;
  color: var(--primary) !important;
  box-shadow: none !important;
}

/* Clean up borders, buttons, and spacing */
.pagefind-ui__result {
  border-bottom: 1px solid var(--glass-border) !important;
  padding: 24px 0 !important;
}
.pagefind-ui__search-clear {
  color: var(--cyan) !important;
  background: transparent !important;
}

@media (max-width: 768px) {
  .contact-faq-split, .stats-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .service-step { flex-direction: column; gap: 10px; }
  .service-step:hover .service-content { transform: none; border-left: none; border-top: 4px solid var(--cyan); }
  
  /* Mobile Footer Fixes */
  .footer-inner { 
    flex-direction: column; 
    text-align: center; 
    gap: 16px; 
    border-radius: 24px; /* Changes the pill shape to a nice rounded box on mobile */
    padding: 24px;
  }
  .footer-links { 
    justify-content: center; 
    flex-wrap: wrap; 
  }
}