:root {
  /* Master Brand Variables */
  --brand-color: #00BAFF; 
  --bg-dark: #111111;
  --bg-light: #ffffff;
  --text-light: #ffffff;
  --text-dark: #000000;
  --main-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --section-padding: 80px 20px;
  --header-height: 80px; /* Added missing variable */
}

/* --- Global Resets --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--main-font);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  text-align: center;
  overflow-x: hidden; /* Prevents unwanted horizontal scroll during animations */
}

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

p {
  max-width: 800px;
  margin: 0 auto 20px auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Module Styles --- */
.module {
  padding: var(--section-padding);
  position: relative;
}

.module.dark { background-color: var(--bg-dark); color: var(--text-light); }
.module.brand { background-color: var(--brand-color); color: var(--text-dark); }
.module.light { background-color: var(--bg-light); color: var(--text-dark); }

/* --- Master Button --- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--brand-color);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: transform 0.3s ease;
}
.btn:hover { transform: scale(1.05); }

/* --- Sticky Header --- */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 186, 255, 0.2);
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.nav-links a:hover { color: var(--brand-color); }

/* --- Hero & Video Styles --- */
.hero-module { padding-top: var(--header-height); }

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  animation: panVertical 20s ease-in-out infinite, fadeLoop 20s ease-in-out infinite;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

/* --- Logo SVG Base & Animations --- */
#logo-svg path, #logo-svg polygon, #logo-svg rect {
  fill: rgba(43, 170, 226, 0); 
  stroke: #2baae2;
  stroke-width: 1.5px;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: fill 1s ease-in-out 2.5s;
}

#logo-svg .st0 { animation: drawLogo 3s ease-in-out forwards; }
#logo-svg.finished .st0 { fill: #2baae2 !important; stroke-width: 0; }
#logo-svg.finished path, 
#logo-svg.finished polygon, 
#logo-svg.finished rect {
  fill: #2baae2; /* No !important here */
  stroke-width: 0;
  transition: fill 1s ease-in-out;
}

#logo-svg:hover { animation: idleGlitch 0.5s ease-in-out; }

/* Trigger Classes */
.pixel-trigger { animation: pixelReveal 1.2s steps(10) forwards; }
.scan-trigger { animation: scanGlitch 0.6s cubic-bezier(0.77, 0, 0.175, 1) forwards; }

/* --- Scroll Reveal Framework --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyframes --- */
@keyframes drawLogo { to { stroke-dashoffset: 0; } }

@keyframes panVertical {
  0%, 100% { object-position: 50% 50%; }
  50% { object-position: 50% 0%; }
}

@keyframes fadeLoop {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

@keyframes pixelReveal {
  0% { filter: blur(20px) contrast(20); opacity: 0; transform: scale(0.9); }
  50% { filter: blur(5px) contrast(10); opacity: 0.8; }
  100% { filter: blur(0px) contrast(1); opacity: 1; transform: scale(1); }
}

@keyframes scanGlitch {
  0% { clip-path: inset(0 0 100% 0); filter: hue-rotate(0deg); }
  20% { clip-path: inset(20% 0 50% 0); transform: translateX(-5px); }
  40% { clip-path: inset(10% 0 80% 0); transform: translateX(5px); }
  60% { clip-path: inset(50% 0 10% 0); filter: hue-rotate(180deg); }
  100% { clip-path: inset(0 0 0 0); filter: hue-rotate(0deg); transform: translateX(0); }
}

@keyframes idleGlitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
  40% { transform: translate(2px, -2px); filter: hue-rotate(0deg); }
}

@keyframes lightRefresh {
  0% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.5); transform: scale(1.02); }
  100% { filter: brightness(1); transform: scale(1); }
}

.light-trigger {
  animation: lightRefresh 0.8s ease-out;
}

/* Responsive Header */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .main-header { justify-content: center; }
}