/* ===========================
   RESET & VARIABLES
=========================== */
:root {
  /* DARK THEME (Default) */
  --bg: #050507;
  --fg: #e0e6ed;
  --card-bg: rgba(20, 20, 25, 0.4);
  --nav-bg: rgba(5, 5, 7, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --intro-bg: rgba(5, 5, 7, 0.95);
  --text-muted: rgba(255, 255, 255, 0.6);
  --grid-line: rgba(255, 255, 255, 0.03);
  
  /* Accent Colors */
  --cyan: #00f0ff;
  --pink: #ff0055;
  --purple: #bc13fe;
  --green: #25d366;
  --yellow: #ffcc00;
  
  --accent: var(--cyan); 
  
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  --card-radius: 16px;
  
  /* Transition for theme switching */
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* LIGHT THEME OVERRIDES */
[data-theme="light"] {
  --bg: #f2f4f8; /* Clinical Light Grey/White */
  --fg: #1a1b1f;  /* Dark text */
  --card-bg: rgba(255, 255, 255, 0.7); /* Frosted Glass White */
  --nav-bg: rgba(242, 244, 248, 0.85);
  --border-color: rgba(0, 0, 0, 0.08);
  --intro-bg: rgba(242, 244, 248, 0.95);
  --text-muted: rgba(0, 0, 0, 0.6);
  --grid-line: rgba(0, 0, 0, 0.04);
  
  /* Darken accents slightly for contrast on white */
  --cyan: #008fa3; 
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); overflow-x: hidden; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === IMMERSIVE BACKGROUNDS === */
.grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 900; opacity: 0.08;
  background: linear-gradient(to bottom, rgba(125,125,125,0) 50%, rgba(0,0,0,0.1) 50%);
  background-size: 100% 4px;
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 899;
  background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.4) 120%);
}

/* === THEME TOGGLE BUTTON === */
#theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--fg);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 15px;
  position: relative; z-index: 20;
}
#theme-toggle:hover {
  background: rgba(125,125,125,0.1);
  transform: rotate(15deg);
}
#theme-toggle svg { width: 20px; height: 20px; }

/* Icon switching logic */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }


/* === NAV & LAYOUT === */
#site-wrapper { opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s ease; }
body.loaded #site-wrapper { opacity: 1; transform: translateY(0); }

/* Z-Index Layering */
.nav, .hero, .section, .footer { position: relative; z-index: 10; }

.nav {
  padding: 15px 5%; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color); background: var(--nav-bg);
  transition: background-color 0.4s ease;
}

.nav-right { display: flex; align-items: center; gap: 20px; }

.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: 1px; }
.logo span { color: var(--accent); }
/* Update in style.css */

.links { display: flex; gap: 25px; align-items: center; }
.links a { text-decoration: none; color: var(--fg); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; transition: color 0.3s; }
.links a:hover { color: var(--accent); }


/* === BUTTONS === */
.btn {
  position: relative; z-index: 20;
  padding: 12px 24px; border-radius: 6px; font-weight: 700; text-transform: uppercase;
  font-size: 0.8rem; letter-spacing: 1px; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 10px; transition: all 0.3s;
  background: var(--fg); color: var(--bg); cursor: pointer;
}
.glow-btn {
  background: linear-gradient(135deg, var(--cyan) 0%, #0099ff 100%);
  color: #000; box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); border: none;
}
.glow-btn:hover { box-shadow: 0 0 25px rgba(0, 240, 255, 0.6); transform: translateY(-2px); }

/* In Light mode, make glow button text white if contrast needs it */
[data-theme="light"] .glow-btn { color: #fff; }

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff; border: none;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.25);
}
.whatsapp-btn:hover { transform: translateY(-2px); }

.ghost {
  border: 1px solid var(--border-color); color: var(--fg); background: transparent;
  position: relative; z-index: 20;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }


/* === HERO === */
.hero { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 120px 5% 80px; gap: 50px; }
.hero-left { position: relative; z-index: 10; }
.hero-right { position: relative; z-index: 5; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; margin-bottom: 20px; background: rgba(0, 240, 255, 0.05);
  text-transform: uppercase; letter-spacing: 1px;
}
.pulse-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7); } 100% { box-shadow: 0 0 0 10px transparent; } }

h1 { font-family: var(--font-head); font-size: clamp(2.8rem, 5vw, 4.8rem); line-height: 1.05; margin: 0 0 20px; font-weight: 700; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--purple)); -webkit-background-clip: text; color: transparent; }
.sub { color: var(--text-muted); max-width: 500px; font-size: 1.1rem; margin-bottom: 30px; }

.cta-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; position: relative; z-index: 20; }
.stats { display: flex; gap: 30px; border-top: 1px solid var(--border-color); padding-top: 20px; }
.stat-box b { display: block; font-size: 1.8rem; font-family: var(--font-head); line-height: 1; color: var(--fg); }
.stat-box span { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

/* === HOLO CARD === */
.hero-art { perspective: 1000px; position: relative; }
.holo-card {
  width: 100%; aspect-ratio: 16/10; background: #000; border-radius: 16px;
  border: 1px solid var(--border-color); position: relative; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); transform-style: preserve-3d;
}
.hero-img {
  width: 100%; height: 100%; background: url('hero.png') center/cover no-repeat;
  filter: saturate(1.1) contrast(1.1);
}
.holo-overlay {
  position: absolute; inset: 0; 
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
}
.scan-beam {
  position: absolute; top: 0; left: 0; width: 100%; height: 5px;
  background: var(--cyan); box-shadow: 0 0 15px var(--cyan);
  opacity: 0.5; animation: beamMove 4s ease-in-out infinite; pointer-events: none;
}
@keyframes beamMove { 0%, 100% { top: 10%; opacity: 0; } 50% { top: 90%; opacity: 1; } }

.ui-floater {
  position: absolute; background: rgba(0,0,0,0.8); border: 1px solid var(--border-color);
  padding: 8px 12px; color: var(--accent); font-family: monospace; font-size: 0.75rem;
  backdrop-filter: blur(8px); border-radius: 4px; box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.ui-1 { top: -20px; right: -20px; animation: float 4s ease-in-out infinite; border-color: var(--cyan); }
.ui-2 { bottom: 30px; left: -20px; animation: float 5s ease-in-out infinite reverse; border-color: var(--pink); }
.ui-2 b { color: var(--pink); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* === SECTIONS === */
.section { padding: 80px 5%; max-width: 1300px; margin: 0 auto; position: relative; z-index: 10; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.two-by-two { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

/* === CARDS (Adaptive Theme) === */
.card {
  padding: 30px; background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: var(--card-radius); position: relative; overflow: hidden; 
  transition: transform 0.3s, border-color 0.3s, background 0.3s; backdrop-filter: blur(10px);
}
.card:hover { transform: translateY(-5px); border-color: var(--accent); }

/* Light Theme Card Shadow */
[data-theme="light"] .card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.tech-icon {
  width: 50px; height: 50px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(125,125,125,0.1); position: relative;
}
.tech-icon svg { width: 28px; height: 28px; stroke-width: 2px; }

/* Icon Colors */
.warning { color: var(--yellow); }
.danger { color: var(--pink); }
.alert { color: #ff5500; }
.info { color: var(--cyan); }

.card h3 { font-family: var(--font-head); margin-top: 5px; font-size: 1.4rem; color: var(--fg); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

/* Card Borders/Scanlines */
.scan-line {
  position: absolute; top: -50%; left: 0; width: 100%; height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.2), transparent);
  pointer-events: none; transition: opacity 0.3s; opacity: 0;
}
.card:hover .scan-line { opacity: 1; animation: scanDown 1.5s linear infinite; }
@keyframes scanDown { 0% { top: -50%; } 100% { top: 150%; } }

.card-border {
  position: absolute; inset: 0; padding: 1px; border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.1; transition: opacity 0.3s; pointer-events: none;
}
.card:hover .card-border { opacity: 0.5; }

.tech-deco { position: absolute; top: 20px; right: 20px; font-family: monospace; font-size: 0.7rem; color: var(--text-muted); opacity: 0.5; pointer-events: none; }
.txt-link { color: var(--fg); text-transform: uppercase; font-weight: 700; text-decoration: none; font-size: 0.75rem; margin-top: 20px; display: inline-block; border-bottom: 1px solid var(--border-color); padding-bottom: 2px; }

/* === SOLUTION LISTS === */
.solution-grid { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.solution-text { flex: 1; min-width: 300px; }
.check-list { list-style: none; padding: 0; flex: 1; min-width: 300px; }
.check-list li { margin-bottom: 12px; font-size: 1rem; color: var(--text-muted); }
.chk { color: var(--green); margin-right: 10px; font-weight: bold; }
.wide { width: 100%; grid-column: 1 / -1; }

.mini-list li { color: var(--text-muted); font-size: 0.85rem; padding-left: 15px; position: relative; margin-bottom: 5px; list-style: none; }
.mini-list li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }


/* === STEPS === */
.steps-row { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 40px; gap: 10px; }
.step { text-align: center; flex: 1; position: relative; }
.step-icon {
  width: 40px; height: 40px; background: rgba(125,125,125,0.05); border-radius: 50%;
  margin: 0 auto 15px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: var(--cyan); border: 1px solid var(--border-color);
}
.step-line { height: 1px; flex: 1; background: var(--border-color); margin-top: 20px; }

/* === INTRO === */
#intro-screen { background: var(--intro-bg); }
.intro-logo { color: var(--fg); }
.intro-logo .hollow { -webkit-text-stroke: 1px var(--fg); }

/* === FOOTER === */
.footer { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border-color); margin-top: 80px; position: relative; z-index: 10; }
.center-txt { text-align: center; }

/* === CURSOR (Desktop) === */
.desktop-only { display: block; }
@media (hover: none) and (pointer: coarse) {
  .desktop-only { display: none !important; }
  * { cursor: auto !important; }
}
#cursor { background: var(--accent); }
#cursor-blur { background: radial-gradient(circle, var(--accent), transparent 70%); opacity: 0.15; }

/* === RESPONSIVE === */
@media(max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px; text-align: center; gap: 40px; }
  .hero-left { order: 1; }
  .hero-right { order: 2; margin-bottom: 30px; }
  h1 { font-size: 2.5rem; }
  .cta-row { justify-content: center; }
  .stats { justify-content: center; }
  .steps-row { flex-direction: column; gap: 30px; align-items: center; }
  .step-line { width: 2px; height: 40px; margin: 0; }
  .two-by-two { grid-template-columns: 1fr; }
  .nav { padding: 15px 20px; }
  .logo { font-size: 1.2rem; }
  .mini-list { display: none; } 
  .card { padding: 25px; }
  .links { display: none; } 
}

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }



/* ===========================
   FIX: CINEMATIC INTRO OVERLAY
=========================== */

/* The full-screen overlay */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 99999; /* Must be higher than everything else */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  /* Use theme background so it works in Light Mode too */
  background: var(--bg); 
  
  /* Smooth fade out */
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

/* Hides the intro when the 'loaded' class is added by JS */
body.loaded #intro-screen {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

/* Typography for Intro */
.intro-logo {
  font-family: var(--font-head, sans-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: 2px;
  color: var(--fg);
  line-height: 1;
}

.intro-logo .hollow {
  -webkit-text-stroke: 1px var(--fg);
  color: transparent;
}

/* The expanding line animation */
.intro-line {
  width: 0;
  height: 2px;
  background: var(--grad2, #00f0ff);
  margin: 20px auto;
  animation: growLine 1s ease forwards 0.5s;
}

.intro-tag {
  color: var(--muted);
  font-family: monospace;
  letter-spacing: 2px;
  font-size: 1.1rem;
  margin-top: 10px;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.2s;
}

/* Scroll Hint (Mouse Animation) */
.intro-scroll-hint {
  position: absolute;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2s;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mouse-icon {
  width: 26px;
  height: 40px;
  border: 2px solid var(--muted);
  border-radius: 15px;
  position: relative;
}

.mouse-icon .wheel {
  width: 4px;
  height: 6px;
  background: var(--fg);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

/* Animations */
@keyframes growLine { to { width: 100px; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes scrollWheel { 
  0% { top: 6px; opacity: 1; } 
  100% { top: 20px; opacity: 0; } 
}