/* ============================================
   PROJECT HELIOS - Shared Design System
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* ---- Core Palette ---- */
  --color-navy: #0B1621;
  --color-navy-light: #12243A;
  --color-navy-mid: #1A3050;
  --color-navy-cell: #0D1F35;
  --color-navy-gradient-a: #0B1E38;
  --color-navy-gradient-b: #0A2A3C;
  --color-green: #5de0e6;
  --color-green-dark: #4ac8ce;
  --color-blue: #004aad;
  --color-blue-light: #1a6dd4;
  --color-gold: #C9A84C;
  --color-gold-light: #D4B86A;
  --color-white: #FFFFFF;

  /* ---- Green (Cyan) Opacity Scale ---- */
  --green-0:  rgba(93, 224, 230, 0);
  --green-2:  rgba(93, 224, 230, 0.02);
  --green-3:  rgba(93, 224, 230, 0.03);
  --green-4:  rgba(93, 224, 230, 0.04);
  --green-5:  rgba(93, 224, 230, 0.05);
  --green-6:  rgba(93, 224, 230, 0.06);
  --green-8:  rgba(93, 224, 230, 0.08);
  --green-10: rgba(93, 224, 230, 0.10);
  --green-12: rgba(93, 224, 230, 0.12);
  --green-14: rgba(93, 224, 230, 0.14);
  --green-15: rgba(93, 224, 230, 0.15);
  --green-20: rgba(93, 224, 230, 0.20);
  --green-25: rgba(93, 224, 230, 0.25);
  --green-30: rgba(93, 224, 230, 0.30);
  --green-35: rgba(93, 224, 230, 0.35);
  --green-40: rgba(93, 224, 230, 0.40);
  --green-45: rgba(93, 224, 230, 0.45);

  /* ---- Blue Opacity Scale ---- */
  --blue-3:  rgba(0, 74, 173, 0.03);
  --blue-6:  rgba(0, 74, 173, 0.06);
  --blue-8:  rgba(0, 74, 173, 0.08);
  --blue-10: rgba(0, 74, 173, 0.10);
  --blue-12: rgba(0, 74, 173, 0.12);
  --blue-15: rgba(0, 74, 173, 0.15);
  --blue-20: rgba(0, 74, 173, 0.20);
  --blue-25: rgba(0, 74, 173, 0.25);
  --blue-40: rgba(0, 74, 173, 0.40);
  --blue-45: rgba(0, 74, 173, 0.45);

  /* ---- Gold Opacity Scale ---- */
  --gold-2:  rgba(201, 168, 76, 0.02);
  --gold-4:  rgba(201, 168, 76, 0.04);
  --gold-6:  rgba(201, 168, 76, 0.06);
  --gold-8:  rgba(201, 168, 76, 0.08);
  --gold-10: rgba(201, 168, 76, 0.10);
  --gold-15: rgba(201, 168, 76, 0.15);
  --gold-20: rgba(201, 168, 76, 0.20);
  --gold-30: rgba(201, 168, 76, 0.30);

  /* ---- White Opacity Scale (for dark surfaces) ---- */
  --white-1:  rgba(255, 255, 255, 0.01);
  --white-2:  rgba(255, 255, 255, 0.02);
  --white-3:  rgba(255, 255, 255, 0.03);
  --white-35: rgba(255, 255, 255, 0.035);
  --white-4:  rgba(255, 255, 255, 0.04);
  --white-6:  rgba(255, 255, 255, 0.06);
  --white-8:  rgba(255, 255, 255, 0.08);
  --white-10: rgba(255, 255, 255, 0.10);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-14: rgba(255, 255, 255, 0.14);
  --white-15: rgba(255, 255, 255, 0.15);
  --white-22: rgba(255, 255, 255, 0.22);
  --white-40: rgba(255, 255, 255, 0.40);
  --white-45: rgba(255, 255, 255, 0.45);
  --white-55: rgba(255, 255, 255, 0.55);
  --white-78: rgba(255, 255, 255, 0.78);
  --white-92: rgba(255, 255, 255, 0.92);
  --white-96: rgba(255, 255, 255, 0.96);

  /* ---- Black Opacity Scale (for light surfaces) ---- */
  --black-3:  rgba(0, 0, 0, 0.03);
  --black-4:  rgba(0, 0, 0, 0.04);
  --black-5:  rgba(0, 0, 0, 0.05);
  --black-6:  rgba(0, 0, 0, 0.06);
  --black-8:  rgba(0, 0, 0, 0.08);
  --black-10: rgba(0, 0, 0, 0.10);
  --black-12: rgba(0, 0, 0, 0.12);
  --black-15: rgba(0, 0, 0, 0.15);
  --black-20: rgba(0, 0, 0, 0.20);

  /* ---- Navy Overlay Scale (for deep overlays) ---- */
  --navy-80: rgba(10, 22, 40, 0.80);
  --navy-85: rgba(10, 22, 40, 0.85);
  --navy-92: rgba(10, 22, 40, 0.92);

  /* ---- Neutral Scale ---- */
  --color-gray-50: #F8F9FB;
  --color-gray-100: #EDF0F4;
  --color-gray-200: #D5DBE4;
  --color-gray-300: #B0B9C6;
  --color-gray-400: #7A8694;
  --color-gray-500: #556270;
  --color-gray-600: #3B4654;

  /* ---- Semantic Text ---- */
  --color-text: #1B2636;
  --color-text-secondary: #556270;
  --color-text-light: var(--white-78);
  --color-text-muted: var(--white-45);

  /* ---- Semantic Aliases ---- */
  --color-green-glow: var(--green-8);

  /* Typography */
  --font-heading: 'Clash Display', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', 'SF Mono', monospace;

  /* Font Sizes - Fluid */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --text-sm: clamp(0.82rem, 0.78rem + 0.2vw, 0.9rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.6rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  --text-3xl: clamp(1.9rem, 1.4rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.4rem, 1.8rem + 3vw, 4.2rem);
  --text-5xl: clamp(2.8rem, 2rem + 4vw, 5.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  --space-section: clamp(5rem, 4rem + 5vw, 9rem);

  /* Layout */
  --max-width: 1140px;
  --max-width-narrow: 860px;
  --max-width-wide: 1340px;
  --gutter: clamp(1.5rem, 1rem + 2vw, 3rem);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows — subtler, more natural */
  --shadow-sm: 0 1px 2px var(--black-4), 0 1px 4px var(--black-4);
  --shadow-md: 0 2px 8px var(--black-6), 0 4px 16px var(--black-4);
  --shadow-lg: 0 4px 16px var(--black-6), 0 12px 40px var(--black-6);
  --shadow-xl: 0 8px 24px var(--black-6), 0 20px 60px var(--black-8);
  --shadow-glow-green: 0 0 20px var(--green-12);
  --shadow-glow-blue: 0 0 20px var(--blue-12);

  /* Glass — more subtle */
  --glass-bg: var(--white-4);
  --glass-border: var(--white-8);
  --glass-bg-light: var(--white-92);
  --glass-border-light: var(--black-5);

  /* Transitions — slightly slower, calmer */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;
  --duration-slower: 900ms;
  --duration-glacial: 1200ms;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
}

/* Keyboard focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-green), var(--color-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.font-mono {
  font-family: var(--font-mono);
}

.label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green);
}

.label-light {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.section-dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5 {
  color: var(--color-white);
}

.section-dark p {
  color: var(--color-text-light);
}

.section-gray {
  background: var(--color-gray-50);
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

.flex {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Cards — clean, elevated --- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
  border-color: var(--white-14);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--black-12);
}

.glass-card-light {
  background: var(--color-white);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.glass-card-light:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--black-8);
}

/* --- Stat Counter --- */
.stat-number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1;
  color: var(--color-white);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 400;
}

.stat-unit {
  font-size: 0.5em;
  color: var(--color-green);
  font-weight: 400;
}

/* --- Accent Line — animated width on reveal --- */
.accent-line {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-green), var(--color-blue));
  border-radius: 1px;
  margin-bottom: var(--space-lg);
  transition: width var(--duration-slower) var(--ease-smooth);
}

.visible .accent-line,
.reveal.visible ~ .accent-line,
.section-header.visible .accent-line,
.accent-line.visible {
  width: 48px;
}

.accent-line-gold {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-radius: 1px;
  margin-bottom: var(--space-lg);
  transition: width var(--duration-slower) var(--ease-smooth);
}

.visible .accent-line-gold,
.section-header.visible .accent-line-gold,
.accent-line-gold.visible {
  width: 48px;
}

/* --- Scroll Animations — refined, polished --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-blur {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth),
              filter var(--duration-glacial) var(--ease-smooth);
  will-change: opacity, transform, filter;
}

.reveal-blur.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered delays for children — refined spacing */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 100ms; }
.stagger > *:nth-child(3) { transition-delay: 200ms; }
.stagger > *:nth-child(4) { transition-delay: 300ms; }
.stagger > *:nth-child(5) { transition-delay: 400ms; }
.stagger > *:nth-child(6) { transition-delay: 500ms; }
.stagger > *:nth-child(7) { transition-delay: 600ms; }
.stagger > *:nth-child(8) { transition-delay: 700ms; }

/* --- Background Patterns — barely visible --- */
.bg-grid {
  background-image:
    linear-gradient(var(--white-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-2) 1px, transparent 1px);
  background-size: 80px 80px;
}

.bg-dots {
  background-image: radial-gradient(circle, var(--white-35) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --- Section Dividers --- */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-gray-200) 30%, var(--color-gray-200) 70%, transparent 100%);
  pointer-events: none;
}

.section-dark + .section::before,
.section + .section-dark::before,
.section-dark + .section-dark::before {
  background: linear-gradient(90deg, transparent 0%, var(--white-6) 30%, var(--white-6) 70%, transparent 100%);
}

.section-gray + .section::before,
.section + .section-gray::before,
.section-gray + .section-dark::before {
  background: none;
}

/* Body dark-mode default for interactive (no nav, dark bg) */
body.dark-mode {
  background: var(--color-navy);
  color: var(--color-white);
}

/* --- Section Header Pattern --- */
.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header .label {
  margin-bottom: var(--space-sm);
  display: inline-block;
  position: relative;
  padding-bottom: 2px;
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  max-width: 580px;
  font-size: var(--text-base);
  line-height: 1.75;
}

/* --- Shimmer / Shine Effect for Cards --- */
@keyframes cardShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.glass-card-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white-40), transparent);
  pointer-events: none;
  transition: none;
  opacity: 0;
}

.glass-card-light {
  position: relative;
  overflow: hidden;
}

.glass-card-light:hover::before {
  opacity: 1;
  animation: cardShine 0.6s var(--ease-out) forwards;
}

/* --- Fade-up reveal with rotation --- */
.reveal-rotate {
  opacity: 0;
  transform: translateY(24px) rotate(1deg);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-rotate.visible {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* --- 3D & Parallax System --- */

/* Tilt card container — JS adds transform via mousemove */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--duration-normal) var(--ease-out);
  will-change: transform;
}

.tilt-card__inner {
  transform: translateZ(0);
  transition: transform var(--duration-normal) var(--ease-out);
}

.tilt-card:hover .tilt-card__inner {
  transform: translateZ(24px);
}

/* Float animation for 3D objects */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatRotate {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-8px) rotateY(5deg); }
}

.float { animation: floatY 6s var(--ease-in-out) infinite; }
.float-rotate { animation: floatRotate 8s var(--ease-in-out) infinite; }
.float-slow { animation: floatY 10s var(--ease-in-out) infinite; }

/* Perspective containers */
.perspective-sm { perspective: 600px; }
.perspective-md { perspective: 1000px; }
.perspective-lg { perspective: 1600px; }
.preserve-3d { transform-style: preserve-3d; }

/* Parallax depth layers — JS drives transform via scroll */
.parallax-layer { will-change: transform; transition: transform 0.1s linear; }

/* Glow pulse animation */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--green-0); }
  50% { box-shadow: 0 0 24px 4px var(--green-12); }
}

@keyframes glowPulseBlue {
  0%, 100% { box-shadow: 0 0 0 0 var(--blue-3); }
  50% { box-shadow: 0 0 24px 4px var(--blue-12); }
}

.glow-green { animation: glowPulse 4s var(--ease-in-out) infinite; }
.glow-blue { animation: glowPulseBlue 4s var(--ease-in-out) infinite; }

/* Scroll-linked progress bar at top */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-green), var(--color-blue));
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
  transition: none;
  will-change: transform;
}

/* Magnetic hover effect — JS drives transform */
.magnetic {
  transition: transform var(--duration-fast) var(--ease-out);
  will-change: transform;
}

/* Number ticker glow on count */
.stat-number.counting {
  text-shadow: 0 0 20px currentColor;
  transition: text-shadow 0.3s ease;
}

.stat-number.counted {
  text-shadow: none;
  transition: text-shadow 0.8s ease;
}

/* Gradient border animation */
@keyframes borderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--color-green), var(--color-blue), var(--color-gold), var(--color-green));
  background-size: 300% 300%;
  animation: borderGradient 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* Horizontal scroll reveal with clip */
.reveal-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--duration-glacial) var(--ease-smooth);
  will-change: clip-path;
}

.reveal-clip.visible {
  clip-path: inset(0 0% 0 0);
}

/* Slide up with spring */
.reveal-spring {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity var(--duration-slow) var(--ease-smooth),
              transform var(--duration-slow) var(--ease-spring);
  will-change: opacity, transform;
}

.reveal-spring.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Count up with perspective tilt */
.reveal-3d {
  opacity: 0;
  transform: perspective(800px) rotateX(8deg) translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-smooth),
              transform var(--duration-slower) var(--ease-smooth);
  will-change: opacity, transform;
}

.reveal-3d.visible {
  opacity: 1;
  transform: perspective(800px) rotateX(0deg) translateY(0);
}

/* Stagger with larger set support */
.stagger > *:nth-child(9) { transition-delay: 800ms; }
.stagger > *:nth-child(10) { transition-delay: 900ms; }
.stagger > *:nth-child(11) { transition-delay: 1000ms; }
.stagger > *:nth-child(12) { transition-delay: 1100ms; }

/* Tag component — shared across both pages */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--white-6);
  color: var(--white-55);
  border: 1px solid var(--white-10);
  letter-spacing: 0.02em;
  transition: all var(--duration-normal) var(--ease-out);
}


/* --- Section Transition Waves --- */
.section-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.section-wave svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.section-wave--top {
  top: -1px;
  bottom: auto;
  transform: rotate(180deg);
}

/* --- Floating Decorative Elements --- */
.floating-dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-dots::before,
.floating-dots::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: floatDot 20s ease-in-out infinite;
}

.floating-dots::before {
  width: 300px;
  height: 300px;
  top: 10%;
  right: -5%;
  background: radial-gradient(circle, var(--green-3) 0%, transparent 70%);
  animation-delay: 0s;
}

.floating-dots::after {
  width: 200px;
  height: 200px;
  bottom: 15%;
  left: -3%;
  background: radial-gradient(circle, var(--blue-3) 0%, transparent 70%);
  animation-delay: -10s;
}

@keyframes floatDot {
  0%, 100% { opacity: 0.4; transform: translate(0, 0) scale(1); }
  25% { opacity: 0.8; transform: translate(15px, -20px) scale(1.1); }
  50% { opacity: 0.5; transform: translate(-10px, -35px) scale(0.95); }
  75% { opacity: 0.9; transform: translate(20px, -15px) scale(1.05); }
}

/* Decorative corner accents for cards */
.corner-accent {
  position: relative;
}

.corner-accent::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 32px;
  height: 32px;
  border-top: 2px solid var(--color-green);
  border-left: 2px solid var(--color-green);
  border-radius: var(--radius-sm) 0 0 0;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
}

.corner-accent:hover::before {
  opacity: 0.5;
}

/* --- Ambient Line Decoration --- */
.ambient-line {
  position: absolute;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-green), transparent);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-line--diagonal {
  transform: rotate(-25deg);
}

/* --- Enhanced Badge / Chip Component --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--duration-normal) var(--ease-out);
}

.chip--green {
  background: var(--green-8);
  border: 1px solid var(--green-20);
  color: var(--color-green);
}

.chip--green:hover {
  background: var(--green-14);
  border-color: var(--green-35);
  transform: translateY(-1px);
}

.chip--gold {
  background: var(--gold-8);
  border: 1px solid var(--gold-20);
  color: var(--color-gold);
}

.chip--blue {
  background: var(--blue-8);
  border: 1px solid var(--blue-20);
  color: var(--color-blue);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: chipPulse 2s ease-in-out infinite;
}

@keyframes chipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Animated Underline Effect --- */
.underline-reveal {
  position: relative;
  display: inline;
}

.underline-reveal::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-green), var(--color-blue));
  border-radius: 1px;
  transition: width var(--duration-slower) var(--ease-smooth);
}

.underline-reveal.visible::after,
.visible .underline-reveal::after {
  width: 100%;
}

/* --- Divider with Icon --- */
.divider-icon {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: var(--space-3xl) 0;
}

.divider-icon::before,
.divider-icon::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gray-200), transparent);
}

.divider-icon__symbol {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  color: var(--color-green);
  flex-shrink: 0;
}

.section-dark .divider-icon::before,
.section-dark .divider-icon::after {
  background: linear-gradient(90deg, transparent, var(--white-6), transparent);
}

.section-dark .divider-icon__symbol {
  background: var(--white-4);
  border-color: var(--white-8);
}

/* --- Animated Number Highlight --- */
.num-highlight {
  position: relative;
  display: inline-block;
}

.num-highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -4px;
  right: -4px;
  height: 40%;
  background: var(--green-10);
  border-radius: 2px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slower) var(--ease-smooth);
}

.visible .num-highlight::after,
.num-highlight.visible::after {
  transform: scaleX(1);
}

/* --- Subtle Pattern Overlays --- */
.bg-noise {
  position: relative;
}

.bg-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
  pointer-events: none;
  opacity: 1;
  z-index: 0;
}

/* --- Animated Gradient Border --- */
@keyframes shimmerBorder {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.shimmer-border {
  position: relative;
}

.shimmer-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, transparent, var(--green-30), transparent, var(--blue-20), transparent);
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.shimmer-border:hover::before {
  opacity: 1;
  animation: shimmerBorder 2s linear infinite;
}

/* --- Progress Ring Component --- */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring__svg {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 1.5s var(--ease-out);
  stroke-linecap: round;
}

.progress-ring__value {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-lg);
}

/* --- Vertical Timeline Connector --- */
.timeline-connector {
  position: relative;
  padding-left: 28px;
}

.timeline-connector::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-green), var(--green-10));
}

.timeline-connector__dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-green);
  z-index: 1;
}

.timeline-connector__dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-green);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.timeline-connector__dot.active::after {
  opacity: 1;
}

/* --- Tooltip --- */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-2 { gap: var(--space-lg); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-3xl) 0;
  }
  .glass-card, .glass-card-light {
    padding: var(--space-xl);
  }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .glass-card, .glass-card-light {
    padding: var(--space-lg);
  }
}

/* ============================================
   3D GLOBE VISUALIZATION
   ============================================ */
.globe-container {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0E1E30 0%, var(--color-navy) 70%);
  border: 1px solid var(--white-8);
  cursor: grab;
  position: relative;
}
.globe-container:active { cursor: grabbing; }

.globe-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Globe HTML labels */
.globe-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--navy-92);
  border: 1px solid var(--white-10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: var(--text-xs);
  color: var(--color-white);
  white-space: nowrap;
  text-align: center;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.globe-label strong {
  display: block;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.globe-label small {
  display: block;
  color: var(--color-green);
  font-size: 0.85em;
  font-weight: 400;
  margin-top: 2px;
}
.globe-label--origin {
  background: var(--green-20);
  border-color: var(--green-30);
}
.globe-label--origin strong {
  color: var(--color-green);
}
.globe-label--origin small {
  color: var(--white-78);
}

/* Globe hint */
.globe-hint {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--white-45);
  pointer-events: none;
  opacity: 0.7;
  animation: fadeHint 4s ease-out forwards;
}
@keyframes fadeHint {
  0%, 60% { opacity: 0.7; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .globe-container { height: 380px; }
  .globe-label { font-size: 10px; padding: 4px 8px; }
}

/* ============================================
   3D SOLAR MODULE VISUALIZATION
   ============================================ */
.module-container {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--green-3) 100%);
  position: relative;
}
.module-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Module layer labels */
.module-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.module-label__line {
  width: 32px;
  height: 1px;
  background: var(--color-green);
  opacity: 0.5;
}
.module-label__text {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--white-92);
  border: 1px solid var(--color-gray-100);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  white-space: nowrap;
}
.module-label__text strong {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.module-label__text small {
  display: block;
  color: var(--color-text-secondary);
  font-size: 10px;
  margin-top: 1px;
}

@media (max-width: 768px) {
  .module-container { height: 380px; }
  .module-label__text { font-size: 10px; }
  .module-label__line { width: 20px; }
}

/* ============================================
   ESG COMPLIANCE BADGES (HTML/CSS)
   ============================================ */
.esg-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}

.esg-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  min-width: 260px;
  max-width: 320px;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #F0F2F5 0%, #E2E6EC 100%);
  border: 1px solid var(--color-gray-200);
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}
.esg-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Metallic circular seal */
.esg-badge__seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 0deg, #C8CDD6, #E8ECF0, #A8B0BC, #D0D5DC, #B0B8C4, #E0E4EA, #C8CDD6);
  box-shadow: 0 2px 12px var(--black-10), inset 0 1px 0 var(--white-55);
}
.esg-badge__seal::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, #D8DCE4, #F0F2F5, #C0C6D0, #E8ECF0, #D0D4DC, #F5F6F8, #D8DCE4);
  box-shadow: inset 0 2px 6px var(--black-8);
}
.esg-badge__seal::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--color-navy);
  opacity: 0.7;
}

.esg-badge__seal-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  color: var(--color-navy);
}

.esg-badge__seal-text {
  position: absolute;
  z-index: 1;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-navy);
}
.esg-badge__seal-text--top {
  top: 14px;
}
.esg-badge__seal-text--bottom {
  bottom: 14px;
}

/* Verified / Certified label */
.esg-badge__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.esg-badge__status--green {
  background: var(--green-10);
  color: var(--color-green-dark);
  border: 1px solid var(--green-20);
}
.esg-badge__status--blue {
  background: var(--blue-10);
  color: var(--color-blue);
  border: 1px solid var(--blue-20);
}

.esg-badge__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

.esg-badge__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Shine sweep on hover */
.esg-badge__seal {
  overflow: hidden;
}
.esg-badge:hover .esg-badge__seal::before {
  animation: sealShine 1.2s ease forwards;
}
@keyframes sealShine {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Footer note */
.esg-badges__note {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-style: italic;
}

@media (max-width: 600px) {
  .esg-badges { flex-direction: column; align-items: center; }
  .esg-badge { min-width: 240px; }
}

/* ============================================
   PREMIUM ANIMATION ENGINE CSS
   ============================================ */

/* --- Loading Overlay --- */
.helios-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.helios-loader__bar {
  width: 120px;
  height: 2px;
  background: var(--color-green);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
}

/* --- Section Sweep Transition --- */
.section-sweep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-green), transparent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  z-index: 1;
}

/* --- Cursor Glow (dark sections only) --- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-6) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
.cursor-glow.active {
  opacity: 1;
}

/* --- Word split overflow --- */
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.05em;
}
.word__inner {
  display: inline-block;
  will-change: transform;
}

/* --- Smooth scroll body --- */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* --- GSAP Overrides: disable CSS transitions when GSAP controls --- */
.gsap-reveal-active .reveal,
.gsap-reveal-active .reveal-left,
.gsap-reveal-active .reveal-right,
.gsap-reveal-active .reveal-scale,
.gsap-reveal-active .reveal-blur {
  transition: none !important;
}

@media (pointer: coarse) {
  .cursor-glow { display: none; }
}
