/* ═══════════════════════════════════════════════════════════
   AlphaReaction Design System — globals.css
   Modern Luxury Tech Dark Theme — 3D Parallax Edition
   ═══════════════════════════════════════════════════════════ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --bg-primary: #050816;
  --bg-surface: #0F172A;
  --bg-surface-light: #1E293B;
  --bg-card: rgba(15, 23, 42, 0.6);
  --accent-primary: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-purple: #7C3AED;
  --accent-gold: #F59E0B;
  --accent-green: #10B981;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-color: rgba(148, 163, 184, 0.1);
  --border-glow: rgba(59, 130, 246, 0.3);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1280px;
  --container-padding: 0 clamp(20px, 5vw, 80px);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15);
  --shadow-glow-purple: 0 0 30px rgba(124, 58, 237, 0.15);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 200ms var(--ease-out-expo);
  --transition-base: 400ms var(--ease-out-expo);
  --transition-slow: 600ms var(--ease-out-expo);
  --transition-section: 800ms var(--ease-out-expo);
}

/* ── Light Mode Theme ── */
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-surface: #F1F5F9;
  --bg-surface-light: #E2E8F0;
  --bg-card: rgba(241, 245, 249, 0.7);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-glow: rgba(59, 130, 246, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.1);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.1);
  --shadow-glow-purple: 0 0 30px rgba(124, 58, 237, 0.1);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .glass-card:hover {
  box-shadow: var(--shadow-glow), 0 8px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .social-icon {
  background: rgba(241, 245, 249, 0.8);
}

[data-theme="light"] .gradient-bg {
  opacity: 0.08;
}

[data-theme="light"] .dot-grid-overlay {
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
}

[data-theme="light"] .scanline-overlay {
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(59, 130, 246, 0.004) 2px,
    rgba(59, 130, 246, 0.004) 4px
  );
}

[data-theme="light"] .ambient-glow {
  opacity: 0.06;
}

[data-theme="light"] .btn-ghost {
  color: var(--text-primary);
  border-color: rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] ::selection {
  background: rgba(59, 130, 246, 0.2);
}

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

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

/* Theme transition for smooth switching */
html, body,
.glass-card, .social-icon, .btn-ghost,
h1, h2, h3, h4, p, a, span {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

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

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-cyan); }

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

/* ── Section Base ── */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--section-padding);
  overflow: hidden;
}

.section-short {
  min-height: auto;
  padding: 80px 0;
}

/* ═══════════════════════════════════════════════════════════
   3D PARALLAX SECTION SYSTEM
   GSAP-driven — these are initial states; GSAP animates them.
   ═══════════════════════════════════════════════════════════ */
.parallax-section {
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Parallax Depth Layers */
.parallax-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  will-change: transform;
  transform-style: preserve-3d;
}

.parallax-mid {
  position: relative;
  z-index: 1;
  will-change: transform;
  transform-style: preserve-3d;
}

.parallax-content {
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
}

/* ── Glassmorphism Card (3D tilt-ready) ── */
.glass-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
  transform-style: preserve-3d;
  will-change: transform;
}

.glass-card:hover {
  box-shadow: var(--shadow-glow), 0 20px 60px rgba(0, 0, 0, 0.3);
  border-color: var(--border-glow);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 30px rgba(59, 130, 246, 0.5);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ── Section Title ── */
.section-label {
  display: inline-block;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 640px;
  line-height: 1.8;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Grid System ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── Animated Gradient BG ── */
.gradient-bg {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  animation: floatGradient 8s ease-in-out infinite;
}

.gradient-bg-1 {
  background: var(--accent-primary);
  top: -200px;
  right: -100px;
}

.gradient-bg-2 {
  background: var(--accent-purple);
  bottom: -200px;
  left: -100px;
  animation-delay: -4s;
}

.gradient-bg-3 {
  background: var(--accent-cyan);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}

@keyframes floatGradient {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ── Particle Canvas ── */
.particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Divider ── */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  border-radius: var(--radius-full);
  margin: 16px 0;
}

/* ── Scroll Indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 10;
}

.scroll-indicator span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 3px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.3; top: 16px; }
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan), var(--accent-purple));
  z-index: 9999;
  transition: width 50ms linear;
}

/* ── Stagger Animation ── */
.stagger-item {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

/* ── Counters ── */
.counter-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
}

/* ── Social Icons ── */
.social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-base);
  background: var(--bg-card);
}

.social-icon:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ── Floating Elements ── */
.float-element {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

/* ═══════════════════════════════════════════════════════════
   AMBIENT GLOW & GRID OVERLAY
   ═══════════════════════════════════════════════════════════ */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
  animation: ambientPulse 6s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.08; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.15); }
}

/* Subtle dot grid overlay */
.dot-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Scanline effect for futuristic feel */
.scanline-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(59, 130, 246, 0.008) 2px,
    rgba(59, 130, 246, 0.008) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   SECTION DIVIDER BEAM
   ═══════════════════════════════════════════════════════════ */
.section-beam {
  position: relative;
  height: 1px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--border-color);
  overflow: visible;
}

.section-beam::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -100%;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-cyan), transparent);
  animation: beamSweep 4s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes beamSweep {
  0% { left: -60%; }
  100% { left: 100%; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { min-height: auto; padding: 80px 0; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .section-short { padding: 50px 0; }
  .glass-card { padding: 24px; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
  h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
  .section-subtitle { font-size: 1rem; }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 0 16px;
  }
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section-short { padding: 36px 0; }
  .glass-card { padding: 20px; border-radius: var(--radius-md); }
  .btn { padding: 12px 20px; font-size: 0.85rem; }
  .section-label { font-size: 0.75rem; letter-spacing: 0.1em; }
}

@media (max-width: 425px) {
  .parallax-section {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .parallax-section {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Selection ── */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

