/* ============================================================
   CS GROWTH LAB — PREMIUM DESIGN FOUNDATION v2.0
   Award-winning dark theme overlay — purely additive
   Scoped to prevent Elementor/Astra conflicts
   ============================================================ */

/* ── Google Fonts: Inter ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --csgl-black: #080808;
  --csgl-off-black: #0c0c0e;
  --csgl-charcoal: #111115;
  --csgl-surface: #161619;
  --csgl-surface-2: #1c1c21;
  --csgl-surface-3: #222228;
  --csgl-border: rgba(255,255,255,0.06);
  --csgl-border-light: rgba(255,255,255,0.10);
  --csgl-border-glow: rgba(96,165,250,0.30);
  --csgl-blue: #3b82f6;
  --csgl-blue-light: #60a5fa;
  --csgl-blue-vivid: #2563eb;
  --csgl-blue-glow: rgba(59,130,246,0.12);
  --csgl-blue-glow-strong: rgba(59,130,246,0.25);
  --csgl-white: #ffffff;
  --csgl-white-90: rgba(255,255,255,0.90);
  --csgl-white-70: rgba(255,255,255,0.70);
  --csgl-white-50: rgba(255,255,255,0.50);
  --csgl-white-30: rgba(255,255,255,0.30);
  --csgl-muted: #6b7280;
  --csgl-silver: #9ca3af;
  --csgl-glass: rgba(255,255,255,0.03);
  --csgl-glass-2: rgba(255,255,255,0.05);
  --csgl-glass-border: rgba(255,255,255,0.07);
  --csgl-glass-border-hover: rgba(255,255,255,0.14);
  --csgl-gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --csgl-gradient-glow: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(37,99,235,0.05) 100%);
  --csgl-gradient-dark: linear-gradient(180deg, #080808 0%, #0c0c0e 100%);
  --csgl-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --csgl-ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --csgl-radius: 12px;
  --csgl-radius-lg: 20px;
  --csgl-radius-xl: 28px;
  --csgl-radius-pill: 999px;
  --csgl-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --csgl-shadow-blue: 0 0 40px rgba(59,130,246,0.15), 0 0 80px rgba(59,130,246,0.05);
  --csgl-shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
  --csgl-shadow-card-hover: 0 2px 4px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.4), 0 0 40px rgba(59,130,246,0.08);
}

/* ── Global Dark Base ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--csgl-black) !important;
  background-image: none !important;
  font-family: var(--csgl-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--csgl-black);
}
::-webkit-scrollbar-thumb {
  background: var(--csgl-surface-3);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--csgl-border-glow);
}

/* ── Text Selection ── */
::selection {
  background: rgba(59,130,246,0.30);
  color: var(--csgl-white);
}

/* ── Typography Overrides ── */
body,
body p,
body span,
body div,
body li,
body a,
.elementor-widget-text-editor p,
.elementor-widget-heading .elementor-heading-title {
  font-family: var(--csgl-font) !important;
}

body h1, body h2, body h3, body h4, body h5, body h6,
.elementor-widget-heading .elementor-heading-title,
.elementor-heading-title {
  font-family: var(--csgl-font) !important;
  color: var(--csgl-white) !important;
  letter-spacing: -0.025em;
}

body h1 { font-weight: 900 !important; letter-spacing: -0.04em; }
body h2 { font-weight: 800 !important; }
body h3 { font-weight: 700 !important; }
body h4 { font-weight: 600 !important; }

body p,
body .elementor-widget-text-editor p {
  color: var(--csgl-silver) !important;
  line-height: 1.75 !important;
}

body a {
  color: var(--csgl-white);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* ── Astra Theme Overrides ── */
.ast-page-builder-template .site-content,
.site-content,
#page,
.hfeed {
  background-color: var(--csgl-black) !important;
}

.main-navigation,
.ast-header-break-point .main-header-bar,
.main-header-bar,
#masthead {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ── Elementor Section/Container Dark Override ── */
.elementor-section,
.elementor-container,
.e-con,
.e-con-inner {
  position: relative;
}

.elementor-section.elementor-section-boxed > .elementor-container,
.elementor-section > .elementor-container {
  max-width: 1280px;
}

/* ── Global Section Spacing ── */
.elementor-section {
  padding: 80px 0 !important;
}
@media (max-width: 768px) {
  .elementor-section {
    padding: 60px 0 !important;
  }
}
@media (max-width: 480px) {
  .elementor-section {
    padding: 48px 0 !important;
  }
}

/* ── Glass Card Utility ── */
.csgl-glass-card {
  background: var(--csgl-glass) !important;
  border: 1px solid var(--csgl-glass-border) !important;
  border-radius: var(--csgl-radius) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--csgl-ease) !important;
}
.csgl-glass-card:hover {
  border-color: var(--csgl-glass-border-hover) !important;
  box-shadow: var(--csgl-shadow-card-hover) !important;
  transform: translateY(-2px) !important;
}

/* ── Gradient Text Utility ── */
.csgl-gradient-text {
  background: linear-gradient(135deg, var(--csgl-white) 0%, var(--csgl-blue-light) 50%, var(--csgl-blue) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* ── Animated Border Glow Utility ── */
@keyframes csgl-border-spin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Reveal Animation Base ── */
.csgl-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--csgl-ease), transform 0.7s var(--csgl-ease);
}
.csgl-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.csgl-reveal-delay-1 { transition-delay: 0.1s !important; }
.csgl-reveal-delay-2 { transition-delay: 0.2s !important; }
.csgl-reveal-delay-3 { transition-delay: 0.3s !important; }
.csgl-reveal-delay-4 { transition-delay: 0.4s !important; }
.csgl-reveal-delay-5 { transition-delay: 0.5s !important; }

/* ── Section Label / Eyebrow ── */
.csgl-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--csgl-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--csgl-blue-light) !important;
  padding: 5px 14px;
  background: var(--csgl-blue-glow);
  border: 1px solid rgba(96,165,250,0.20);
  border-radius: var(--csgl-radius-pill);
  margin-bottom: 20px;
}
.csgl-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--csgl-blue-light);
  box-shadow: 0 0 8px var(--csgl-blue-light);
  animation: csgl-pulse-dot 2s infinite;
}
@keyframes csgl-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── Floating Ambient Orbs (Background) ── */
.csgl-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.4;
  animation: csgl-float 8s ease-in-out infinite;
}
.csgl-orb-blue {
  background: radial-gradient(circle, rgba(59,130,246,0.6) 0%, transparent 70%);
}
.csgl-orb-indigo {
  background: radial-gradient(circle, rgba(99,102,241,0.5) 0%, transparent 70%);
}
@keyframes csgl-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ── Page Background Noise Texture ── */
body::before {
  content: '';
  position: fixed;
  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.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
}

/* ── WPForms Global Overrides ── */
.wpforms-container .wpforms-form,
.wpforms-form {
  color: var(--csgl-white) !important;
}

/* ── Site Footer Dark Override ── */
.site-footer,
#colophon,
.footer-widgets,
.ast-footer-overlay {
  background-color: var(--csgl-off-black) !important;
  border-top: 1px solid var(--csgl-border) !important;
}

/* ── Ambient Blue Glow ── */
.csgl-ambient-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Horizontal Divider ── */
.csgl-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--csgl-border-light), transparent);
  margin: 0;
}

/* ── Tag / Badge ── */
.csgl-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--csgl-radius-pill);
  background: rgba(59,130,246,0.15);
  color: var(--csgl-blue-light);
  border: 1px solid rgba(59,130,246,0.25);
}

/* ── Button Base Premium Override ── */
.elementor-button,
.ast-button,
.btn {
  font-family: var(--csgl-font) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  transition: all 0.3s var(--csgl-ease) !important;
}

/* ── Responsive Utility ── */
@media (max-width: 768px) {
  .csgl-hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .csgl-hide-desktop { display: none !important; }
}
