/* ====================================
   GROWTH HACKING PRIVATE LIMITED
   Premium Core Styles - Huly-Inspired
   ==================================== */

/* CSS CUSTOM PROPERTIES - Premium Design System */
:root {
  /* Typography Scale - Huly-inspired fluid sizing */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', var(--font-base);
  
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --text-5xl: clamp(3rem, 2.5rem + 3vw, 5.5rem);
  
  /* Spacing Scale - Geometric progression */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  
  /* Color System - Dark Premium with Accent */
  --color-dark: #0c0c14;
  --color-dark-elevated: #14141e;
  --color-dark-surface: #1c1c28;
  --color-dark-border: rgba(255, 255, 255, 0.10);
  
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  
  --color-accent: #06b6d4;
  --color-accent-light: #22d3ee;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.85);
  --color-text-tertiary: rgba(255, 255, 255, 0.68);
  
  /* Gradients - Premium Huly-style */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-dark: linear-gradient(180deg, var(--color-dark) 0%, var(--color-dark-elevated) 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22), transparent 70%);
  --gradient-mesh: 
    radial-gradient(at 27% 37%, rgba(99, 102, 241, 0.18) 0px, transparent 50%),
    radial-gradient(at 97% 21%, rgba(139, 92, 246, 0.16) 0px, transparent 50%),
    radial-gradient(at 52% 99%, rgba(6, 182, 212, 0.16) 0px, transparent 50%),
    radial-gradient(at 10% 29%, rgba(99, 102, 241, 0.14) 0px, transparent 50%),
    radial-gradient(at 97% 96%, rgba(6, 182, 212, 0.14) 0px, transparent 50%);
  
  /* Shadows - Layered depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  
  /* Border Radius - Consistent curves */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions - Smooth and premium */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.1, 1);
  
  /* Layout */
  --container-max: 1400px;
  --container-narrow: 1100px;
  --container-text: 800px;
  --header-height: 80px;
}

/* ====================================
   RESET & BASE STYLES
   ==================================== */

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

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

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-dark);
  background-image: 
    radial-gradient(ellipse at 20% 0%, rgba(99,102,241,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(6,182,212,0.05) 0%, transparent 50%);
  overflow-x: hidden;
}

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

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.text-large {
  font-size: var(--text-xl);
  line-height: 1.6;
}

.text-small {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

/* Links */
a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* ====================================
   IMAGE PERFORMANCE & LOADING STATES
   ==================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Prevent layout shift */
  aspect-ratio: attr(width) / attr(height);
}

/* Smooth fade-in for lazy-loaded images */
img[loading="lazy"]:not(.loaded) {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Eager images should be visible immediately — never hidden */
img[loading="eager"],
img:not([loading]) {
  opacity: 1;
}

img[loading="lazy"].loaded,
img.loaded {
  opacity: 1 !important;
}

/* Image error state */
img.load-error {
  opacity: 0.3 !important;
  filter: grayscale(1);
}

/* Placeholder background for image containers — instant LQIP gradient */
.hero-image-wrapper,
.case-card-media,
.blog-card-visual,
.blog-featured-main-visual,
.cs-card-image,
.csd-hero-image-wrapper,
.pillar-hero-visual,
.pillar-service-card-img,
.career-hero-visual {
  background: linear-gradient(135deg, var(--color-dark-elevated) 0%, rgba(99,102,241,0.08) 50%, var(--color-dark-elevated) 100%);
  background-size: 200% 200%;
  animation: imgPlaceholderShimmer 1.5s ease-in-out infinite;
  overflow: hidden;
}

@keyframes imgPlaceholderShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stop shimmer once image loaded */
.hero-image-wrapper:has(img.loaded),
.cs-card-image:has(img.loaded),
.csd-hero-image-wrapper:has(img.loaded),
.pillar-hero-visual:has(img.loaded),
.career-hero-visual:has(img.loaded) {
  animation: none;
  background: var(--color-dark-elevated);
}

/* GPU acceleration for images in scrollable containers */
.cs-card-image img,
.csd-hero-image,
.pillar-service-card-img img,
.hero-image {
  will-change: transform;
  contain: layout style;
}

/* Content-visibility for ALL below-fold sections */
.cs-grid-section,
.cs-cta-section,
.csd-results-banner,
.csd-section,
.csd-testimonial-section,
.csd-cta-section,
.pillar-services-section,
.pillar-process-section,
.pillar-stats-section,
.pillar-cta-section,
.blog-grid-section,
.blog-cta-section,
.career-culture-section,
.career-jobs-section,
.career-cta-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Content visibility optimization for below-fold sections */
.section:not(.hero):not(.stats) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

a:hover {
  color: var(--color-primary);
}

/* Lists */
ul, ol {
  list-style: none;
}

/* ====================================
   LAYOUT SYSTEM
   ==================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-text {
  max-width: var(--container-text);
}

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

.section-sm {
  padding: var(--space-16) 0;
}

.section-lg {
  padding: var(--space-32) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }
  
  .section-lg {
    padding: var(--space-20) 0;
  }
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-8);
}

.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: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Flexbox Utilities */
.flex {
  display: flex;
}

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

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

.flex-col {
  flex-direction: column;
}

.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ====================================
   PREMIUM COMPONENTS
   ==================================== */

/* Glassmorphism Cards */
.glass-card {
  background: rgba(26, 26, 36, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-dark-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: rgba(26, 26, 36, 0.8);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.1);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}

/* Ensure button content is above pseudo-elements */
.btn > span,
.btn > svg,
.btn {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  font-weight: 600;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6), 0 0 40px rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
  position: relative;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text-primary);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* Gradient Text — purple → blue → cyan gradient fill */
.gradient-text {
  position: relative;
  display: inline;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Effects */
.glow {
  position: relative;
}

.glow::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--gradient-primary);
  filter: blur(40px);
  opacity: 0;
  transition: opacity var(--transition-slow);
  z-index: -1;
}

.glow:hover::after {
  opacity: 0.3;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: var(--container-text);
  margin: 0 auto var(--space-16);
}

.section-tag {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary-light);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: var(--space-6);
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.15), 0 0 40px rgba(139, 92, 246, 0.08);
}

/* ====================================
   ANIMATION CLASSES
   ==================================== */

/* Fade In Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  /* CSS-only fallback: ensure content appears even if JS is delayed */
  animation: fadeInFallback 0.6s ease forwards;
  animation-delay: 0.3s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  animation: none; /* JS takes over once intersection observer fires */
}

@keyframes fadeInFallback {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  animation: fadeInLeftFallback 0.6s ease forwards;
  animation-delay: 0.3s;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
  animation: none;
}

@keyframes fadeInLeftFallback {
  to { opacity: 1; transform: translateX(0); }
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  animation: fadeInRightFallback 0.6s ease forwards;
  animation-delay: 0.3s;
}
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
  animation: none;
}

@keyframes fadeInRightFallback {
  to { opacity: 1; transform: translateX(0); }
}

/* Scale Animation */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  animation: scaleInFallback 0.6s ease forwards;
  animation-delay: 0.4s;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
  animation: none;
}

@keyframes scaleInFallback {
  to { opacity: 1; transform: scale(1); }
}
}

/* Stagger Delays */
.stagger-1 { transition-delay: 100ms; animation-delay: 0.4s; }
.stagger-2 { transition-delay: 200ms; animation-delay: 0.5s; }
.stagger-3 { transition-delay: 300ms; animation-delay: 0.6s; }
.stagger-4 { transition-delay: 400ms; animation-delay: 0.7s; }

/* ====================================
   NAVIGATION
   ==================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-dark-border);
  z-index: 1000;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-md);
}

.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-direction: row;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

/* Two-tone logo styling — site-matched palette */
.logo-growth {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-right: 0.22em;
  animation: growthShimmer 4s ease-in-out infinite;
}

@keyframes growthShimmer {
  0%, 100% {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.9;
  }
  50% {
    background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 50%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 1;
  }
}

.logo-hacking {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: hackingShimmer 4s ease-in-out infinite;
  animation-delay: 0.7s;
}

@keyframes hackingShimmer {
  0%, 100% {
    background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0.9;
  }
  50% {
    background: linear-gradient(135deg, #e879f9 0%, #c084fc 40%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 1;
  }
}

.logo-trademark {
  display: inline-block;
  font-size: 0.48em;
  font-weight: 800;
  color: #c084fc;
  position: relative;
  top: -0.75em;
  margin-left: 0.06em;
  letter-spacing: 0;
  line-height: 1;
  animation: trademarkGlow 2.5s ease-in-out infinite;
  text-shadow:
    0 0 6px rgba(192, 132, 252, 0.9),
    0 0 14px rgba(129, 140, 248, 0.7),
    0 0 28px rgba(99, 102, 241, 0.5);
}

@keyframes trademarkGlow {
  0%, 100% {
    color: #c084fc;
    text-shadow:
      0 0 5px rgba(192, 132, 252, 0.8),
      0 0 12px rgba(129, 140, 248, 0.5),
      0 0 22px rgba(99, 102, 241, 0.3);
    opacity: 0.9;
  }
  33% {
    color: #818cf8;
    text-shadow:
      0 0 8px rgba(129, 140, 248, 1),
      0 0 18px rgba(99, 102, 241, 0.8),
      0 0 35px rgba(192, 132, 252, 0.5),
      0 0 55px rgba(34, 211, 238, 0.25);
    opacity: 1;
  }
  66% {
    color: #22d3ee;
    text-shadow:
      0 0 8px rgba(34, 211, 238, 1),
      0 0 18px rgba(6, 182, 212, 0.8),
      0 0 35px rgba(129, 140, 248, 0.5),
      0 0 55px rgba(99, 102, 241, 0.25);
    opacity: 1;
  }
}

/* Capsule removed - no Digital Growth Partner label */

/* Logo ambient glow — continuous, eye-catching, site-color matched */
.logo::before {
  content: '';
  position: absolute;
  inset: -10px -14px;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(99, 102, 241, 0.25) 0%,
    rgba(192, 132, 252, 0.15) 40%,
    rgba(34, 211, 238, 0.08) 70%,
    transparent 100%
  );
  filter: blur(12px);
  animation: logoAmbient 3s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes logoAmbient {
  0%, 100% {
    opacity: 0.6;
    transform: scale(0.92) translateX(0px);
  }
  33% {
    opacity: 1;
    transform: scale(1.06) translateX(2px);
  }
  66% {
    opacity: 0.75;
    transform: scale(0.98) translateX(-1px);
  }
}

@keyframes logoGlow {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

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

.nav-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-base);
  box-shadow: 0 0 6px rgba(99,102,241,0.3);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-text-primary);
}

.nav-link.active::after {
  width: 100%;
}

/* ====================================
   SERVICES DROPDOWN MENU
   ==================================== */

/* Dropdown wrapper — holds the trigger + panel */
.nav-dropdown {
  position: relative;
}

/* The trigger link inside the dropdown */
.nav-dropdown > .nav-link {
  display: flex;
  align-items: center;
  gap: 0.35em;
  cursor: pointer;
}

/* Chevron icon */
.nav-dropdown .nav-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.nav-dropdown.open .nav-chevron,
.nav-dropdown:hover .nav-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

/* ---- Desktop Dropdown Panel ---- */
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 680px;
  background: rgba(18, 18, 26, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.08);
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 1001;
}

/* Bridge element — prevents gap between trigger and panel */
.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* Show panel on hover (desktop) or open class (mobile/click) */
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Top glow accent line */
.nav-dropdown-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-primary) 30%, var(--color-accent) 70%, transparent 100%);
  opacity: 0.6;
  border-radius: 1px;
}

/* Panel grid — three columns */
.nav-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

/* Individual category card */
.nav-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* Shimmer top-border on hover */
.nav-dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-dropdown-item:hover::before {
  opacity: 1;
}

/* Icon circle */
.nav-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  margin-bottom: var(--space-1);
}

/* Per-category accent colors */
.nav-dropdown-item[data-category="marketing"] .nav-dropdown-icon {
  background: rgba(99, 102, 241, 0.12);
  color: var(--color-primary-light);
}
.nav-dropdown-item[data-category="marketing"]:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

.nav-dropdown-item[data-category="staffing"] .nav-dropdown-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
}
.nav-dropdown-item[data-category="staffing"]:hover {
  border-color: rgba(139, 92, 246, 0.25);
}

.nav-dropdown-item[data-category="technology"] .nav-dropdown-icon {
  background: rgba(6, 182, 212, 0.12);
  color: var(--color-accent-light);
}
.nav-dropdown-item[data-category="technology"]:hover {
  border-color: rgba(6, 182, 212, 0.25);
}

/* Title */
.nav-dropdown-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
}

/* Description */
.nav-dropdown-desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin: 0;
}

/* "View all" footer link */
.nav-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-dark-border);
}

.nav-dropdown-footer a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35em;
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.nav-dropdown-footer a:hover {
  color: var(--color-text-primary);
  gap: 0.6em;
}

.nav-dropdown-footer a .arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.nav-dropdown-footer a:hover .arrow {
  transform: translateX(2px);
}

/* ---- Reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown-panel {
    transition: opacity 0.1s;
    transform: translateX(-50%) translateY(0) !important;
  }
  .nav-dropdown .nav-chevron {
    transition: none;
  }
  .nav-dropdown-item {
    transition: background 0.1s, border-color 0.1s;
  }
  .nav-dropdown-item:hover {
    transform: none;
  }
}

/* ---- Tablet / smaller desktops ---- */
@media (max-width: 1024px) {
  .nav-dropdown-panel {
    width: 560px;
  }
}

/* ---- Mobile: convert to expandable accordion ---- */
@media (max-width: 768px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: var(--space-3) 0;
  }

  .nav-dropdown .nav-chevron {
    margin-left: auto;
  }

  .nav-dropdown-panel {
    position: static;
    width: 100%;
    transform: none;
    background: rgba(18, 18, 26, 0.6);
    border: none;
    border-left: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: var(--space-2) 0 var(--space-2) var(--space-4);
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: max-height var(--transition-smooth), padding var(--transition-smooth);
  }

  .nav-dropdown-panel::before,
  .nav-dropdown-panel::after {
    display: none;
  }

  /* On mobile, only open via JS click (.open), NOT hover */
  .nav-dropdown:hover .nav-dropdown-panel {
    max-height: 0;
    padding: 0 0 0 var(--space-4);
  }

  .nav-dropdown.open .nav-dropdown-panel {
    max-height: 600px;
    padding: var(--space-3) 0 var(--space-3) var(--space-4);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .nav-dropdown-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .nav-dropdown-item {
    padding: var(--space-3) var(--space-4);
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }

  .nav-dropdown-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    margin-bottom: 0;
  }

  .nav-dropdown-title {
    font-size: var(--text-sm);
  }

  .nav-dropdown-desc {
    display: none;
  }

  .nav-dropdown-footer {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
  }
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all var(--transition-base);
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-8);
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: none;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

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

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Divider */
.divider {
  height: 1px;
  background: var(--color-dark-border);
  margin: var(--space-16) 0;
}

/* ====================================
   FOOTER (shared across all pages)
   ==================================== */

.footer {
  background: var(--color-dark);
  padding: var(--space-20) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.15) 20%,
    rgba(6, 182, 212, 0.15) 50%,
    rgba(99, 102, 241, 0.15) 80%,
    transparent 100%
  );
  z-index: 2;
}

.footer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  right: 0;
  height: 200%;
  background: 
    radial-gradient(ellipse at 30% 0%, rgba(99, 102, 241, 0.08), transparent 50%),
    radial-gradient(ellipse at 70% 0%, rgba(6, 182, 212, 0.06), transparent 50%);
  animation: footerLightDrift 18s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
}

@keyframes footerLightDrift {
  0%, 100% { transform: translateY(0) scaleX(1); opacity: 0.5; }
  50% { transform: translateY(-20px) scaleX(1.1); opacity: 0.8; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
}

.footer-logo::before {
  content: '';
  position: absolute;
  inset: -12px -18px;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(99, 102, 241, 0.3) 0%,
    rgba(192, 132, 252, 0.18) 40%,
    rgba(34, 211, 238, 0.08) 70%,
    transparent 100%
  );
  filter: blur(14px);
  animation: footerLogoGlow 3s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes footerLogoGlow {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.footer-slogan {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-primary-light);
  font-style: italic;
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.footer-description {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.footer-section-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-brand-inline {
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  display: inline;
}

.footer-tm-inline {
  font-size: 0.72em;
  font-weight: 800;
  color: #c084fc;
  position: relative;
  top: -0.45em;
  margin-left: 0.02em;
  display: inline-block;
  animation: footerTmGlow 3s ease-in-out infinite;
  text-shadow:
    0 0 5px rgba(192, 132, 252, 0.9),
    0 0 12px rgba(129, 140, 248, 0.6),
    0 0 24px rgba(99, 102, 241, 0.4);
}

@keyframes footerTmGlow {
  0%, 100% {
    color: #c084fc;
    text-shadow: 0 0 4px rgba(192,132,252,0.8), 0 0 10px rgba(129,140,248,0.5), 0 0 20px rgba(99,102,241,0.3);
  }
  50% {
    color: #22d3ee;
    text-shadow: 0 0 8px rgba(34,211,238,1), 0 0 18px rgba(6,182,212,0.8), 0 0 34px rgba(129,140,248,0.5);
  }
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  position: relative;
  z-index: 1;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.25) 30%, rgba(192,132,252,0.35) 50%, rgba(34,211,238,0.25) 70%, transparent 100%);
  animation: footerLineGlow 4s ease-in-out infinite;
}

@keyframes footerLineGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.social-link:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(99,102,241,0.6), 0 0 40px rgba(99,102,241,0.2);
  color: var(--color-text-primary);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* Stagger 5 & 6 */
.stagger-5 { transition-delay: 500ms; }
.stagger-6 { transition-delay: 600ms; }
