/* ==========================================================================
   GREEN ENVIRONMENT SOLUTIONS (GES) - MASTER DESIGN SYSTEM
   Theme: Luxury High-Tech Dark / Future Bionic Ecological Protection
   ========================================================================== */

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

:root {
  /* Core Color Palette */
  --bg-dark: #050505;
  --bg-deep: #080808;
  --bg-card: #0E0E0E;
  --bg-card-hover: #151515;
  --bg-glass: rgba(14, 14, 14, 0.72);
  --bg-glass-heavy: rgba(8, 8, 8, 0.88);
  --bg-glass-light: rgba(255, 255, 255, 0.03);

  /* Primary & Accent Greens */
  --primary: #18C964;
  --primary-glow: rgba(24, 201, 100, 0.4);
  --primary-dim: rgba(24, 201, 100, 0.12);
  --accent: #7CFFB2;
  --accent-glow: rgba(124, 255, 178, 0.45);
  --emerald-deep: #0D3E24;
  --neon-cyan: #22E1D2;

  /* Text Colors */
  --text-pure: #FFFFFF;
  --text-main: #F2F2F2;
  --text-muted: #C5C5C5;
  --text-dim: #7E7E7E;
  --text-dark: #121212;

  /* Borders & Glassmorphism */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(24, 201, 100, 0.35);
  --border-glow-bright: rgba(124, 255, 178, 0.6);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 40px rgba(24, 201, 100, 0.22);
  --shadow-glow-intense: 0 0 60px rgba(24, 201, 100, 0.45);

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-arabic: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Layout */
  --max-width: 1400px;
  --max-width-wide: 1600px;
  --header-height: 122px;
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Bright (Light) Theme Variables & Luxury Overrides
   ========================================================================== */
[data-theme="light"],
body.light-theme {
  --bg-dark: #F5F9F6;
  --bg-deep: #EBF3ED;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0FAF3;
  --bg-glass: rgba(255, 255, 255, 0.90);
  --bg-glass-heavy: rgba(255, 255, 255, 0.97);
  --bg-glass-light: rgba(13, 150, 72, 0.04);

  /* Primary & Accent Greens - rich contrast on light */
  --primary: #0D9648;
  --primary-glow: rgba(13, 150, 72, 0.25);
  --primary-dim: rgba(13, 150, 72, 0.12);
  --accent: #056631;
  --accent-glow: rgba(5, 102, 49, 0.25);
  --emerald-deep: #E4F7EC;
  --neon-cyan: #0284C7;

  /* Text Colors */
  --text-pure: #091E12;
  --text-main: #1E293B;
  --text-muted: #475569;
  --text-dim: #64748B;
  --text-dark: #F8FAFC;

  /* Borders & Glassmorphism */
  --border-subtle: rgba(13, 150, 72, 0.12);
  --border-glass: rgba(13, 150, 72, 0.18);
  --border-glow: rgba(13, 150, 72, 0.45);
  --border-glow-bright: rgba(13, 150, 72, 0.75);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.10);
  --shadow-glow: 0 0 35px rgba(13, 150, 72, 0.20);
  --shadow-glow-intense: 0 0 50px rgba(13, 150, 72, 0.35);
}

/* Dynamic Aurora Mesh Background in Light Mode */
[data-theme="light"] body {
  background-color: #F5F9F6;
  background-image: 
    radial-gradient(at 10% 10%, rgba(13, 150, 72, 0.12) 0px, transparent 40%),
    radial-gradient(at 90% 15%, rgba(124, 255, 178, 0.25) 0px, transparent 45%),
    radial-gradient(at 50% 45%, rgba(230, 248, 235, 0.9) 0px, transparent 60%),
    radial-gradient(at 15% 80%, rgba(13, 150, 72, 0.10) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(46, 204, 113, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #F5F9F6;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(13, 150, 72, 0.25);
  border: 2px solid #F5F9F6;
}

/* Theme Toggle Button icon states */
.theme-toggle-btn {
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn .theme-icon-sun {
  display: block;
  color: #FFD166;
}

.theme-toggle-btn .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .theme-icon-moon {
  display: block;
  color: #0D9648;
}

/* Specific Light Theme Component Refinements */
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(13, 150, 72, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .hero-section {
  background: radial-gradient(circle at 60% 30%, rgba(13, 150, 72, 0.10) 0%, transparent 65%);
}

[data-theme="light"] .stats-section {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(13, 150, 72, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .timeline-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 248, 244, 0.95) 100%);
  border-color: rgba(13, 150, 72, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .timeline-year {
  background: #EAF7EE;
  color: #0D9648;
  border-color: rgba(13, 150, 72, 0.35);
}

[data-theme="light"] .timeline-year.active {
  background: #0D9648;
  color: #FFFFFF;
}

[data-theme="light"] .value-item {
  background: #FFFFFF;
  border-color: rgba(13, 150, 72, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tech-step-item {
  background: #FFFFFF;
  border-color: rgba(13, 150, 72, 0.12);
}

[data-theme="light"] .tech-step-item.active {
  background: #F0FDF4;
  border-color: #0D9648;
}

[data-theme="light"] .tech-interactive-box {
  background: linear-gradient(145deg, #FFFFFF 0%, #F0F7F2 100%);
}

[data-theme="light"] .telemetry-item {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(13, 150, 72, 0.15);
}

[data-theme="light"] .product-card,
[data-theme="light"] .scenario-card,
[data-theme="light"] .story-card,
[data-theme="light"] .cert-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .spec-card,
[data-theme="light"] .calc-card,
[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(13, 150, 72, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06), 0 0 30px rgba(13, 150, 72, 0.06);
}

[data-theme="light"] .results-inner-card,
[data-theme="light"] .calc-results-panel {
  background: #FFFFFF;
  border-color: rgba(13, 150, 72, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .inquiry-form-wrap,
[data-theme="light"] .modal-container {
  background: #FFFFFF;
  border-color: rgba(13, 150, 72, 0.2);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
  background-color: #FFFFFF;
  border-color: rgba(13, 150, 72, 0.28);
  color: #0F172A;
}

[data-theme="light"] .form-select,
[data-theme="light"] select {
  background-color: #FFFFFF;
  background-repeat: no-repeat !important;
  background-position: right 1.25rem center !important;
  background-size: 16px 16px !important;
  border-color: rgba(13, 150, 72, 0.28);
  color: #0F172A;
}

[data-theme="light"] .brand-logo img {
  filter: drop-shadow(0 2px 8px rgba(13, 150, 72, 0.35));
}

[data-theme="light"] .ambient-fog {
  opacity: 0.15;
}

[data-theme="light"] .mega-menu {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(13, 150, 72, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .gradient-text,
[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, #0D9648 0%, #056631 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="light"] .gradient-silver {
  background: linear-gradient(180deg, #1E293B 0%, #64748B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="light"] .floating-hud-badge,
[data-theme="light"] .hud-badge {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(13, 150, 72, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(13, 150, 72, 0.12);
}

[data-theme="light"] .hero-display-card,
[data-theme="light"] .product-display-stage {
  background: linear-gradient(150deg, #FFFFFF 0%, #F0F7F2 100%);
  border-color: rgba(13, 150, 72, 0.2);
}

/* ==========================================================================
   CSS Reset & Base Styling
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Selection */
::selection {
  background: var(--primary);
  color: #000000;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-pure);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

.section,
section,
.about-section,
.technology-section,
.products-section,
.comparison-section,
.scenarios-section,
.stories-section,
.main-gallery-section,
.certs-section,
.calculator-section,
.downloads-section,
.contact-section {
  padding: 4.25rem 0 4.75rem 0;
  position: relative;
  z-index: 2;
  scroll-margin-top: 130px;
}

.section-lg {
  padding: 5.5rem 0 6rem 0;
  position: relative;
  z-index: 2;
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.gap-6 { gap: 3rem; }
.gap-8 { gap: 4rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Gradient Texts */
.gradient-text, .text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--primary) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gradient-green {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gradient-silver {
  background: linear-gradient(180deg, #FFFFFF 0%, #A0A0A0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.glass-pill, .section-pill, .badge-glow {
  background: rgba(24, 201, 100, 0.08);
  border: 1px solid rgba(24, 201, 100, 0.28);
  backdrop-filter: blur(12px);
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 16px rgba(24, 201, 100, 0.12);
  width: fit-content;
}

.glass-pill::before, .section-pill::before, .badge-glow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Section Header Structure */
.section-header {
  margin-bottom: 2.8rem;
  position: relative;
  z-index: 3;
}

.section-header.text-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-pure);
  text-align: inherit;
  width: 100%;
}

.section-desc {
  font-size: 1.12rem;
  max-width: 780px;
  color: var(--text-muted);
  line-height: 1.75;
  text-align: inherit;
}

.section-header.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header.text-center .section-pill {
  margin-left: auto;
  margin-right: auto;
}

.section-desc-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Custom Live Background Canvas Wrapper */
#canvas-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#bg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ambient-fog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(24, 201, 100, 0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s ease;
}

/* Custom Interactive Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s;
  box-shadow: 0 0 16px var(--primary);
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(124, 255, 178, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s cubic-bezier(0.2, 1, 0.3, 1), width 0.25s, height 0.25s, border-color 0.25s, background-color 0.25s;
}

.cursor-hover .custom-cursor {
  width: 16px;
  height: 16px;
  background: var(--accent);
}

.cursor-hover .cursor-follower {
  width: 64px;
  height: 64px;
  border-color: var(--primary);
  background: rgba(24, 201, 100, 0.1);
  backdrop-filter: blur(2px);
}

.mobile-only {
  display: none !important;
}

@media (max-width: 992px) {
  .custom-cursor, .cursor-follower {
    display: none !important;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
}
