/* ============================================
   MIDNIGHT THEME COMPONENT OVERRIDES
   Premium SaaS styling with electric blue accents
   Dark mode only
   ============================================ */

/* ============================================
   HEADER - Midnight Glassmorphic Style
   ============================================ */
.modern-header,
header {
  background: var(--color-header-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--color-header-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.modern-header.scrolled,
header.header-scrolled {
  background: rgba(3, 14, 20, 0.98);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Hide header on scroll down */
header.header-hidden {
  transform: translateY(-100%);
}

/* Navigation links - Midnight style */
.modern-header-nav-link {
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  position: relative;
  padding: 8px 16px;
  transition: color 0.2s ease;
}

.modern-header-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-brand-blue);
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

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

.modern-header-nav-link:hover::after {
  width: calc(100% - 32px);
}

/* Header CTA Button - Electric blue */
.modern-header-cta {
  background: var(--color-accent);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border: none;
  box-shadow: 0 4px 15px var(--color-accent-40);
  transition: all 0.2s ease;
}

.modern-header-cta:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 6px 25px var(--color-accent-50);
  transform: translateY(-1px);
}

/* ============================================
   HERO SECTIONS - Enhanced Midnight Style
   ============================================ */

/* Hero scroll animation base - enable hardware acceleration */
.hero-enhanced {
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.hero-content {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Main hero gradient - deeper, more dramatic */
.hero-enhanced {
  background:
    radial-gradient(ellipse at 30% 20%, var(--color-orb-1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, var(--color-orb-2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(167, 139, 250, 0.03) 0%, transparent 60%),
    linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, var(--color-bg-primary) 100%);
  background-attachment: fixed;
}

/* Hero orbs - Midnight pulsing style with parallax positioning */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  filter: blur(100px);
  opacity: 0.6;
  animation: orb-float-1 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 500px;
  height: 500px;
  top: 50%;
  right: -150px;
  background: radial-gradient(circle, var(--ql-cyan) 0%, transparent 70%);
  filter: blur(100px);
  opacity: 0.5;
  animation: orb-float-2 10s ease-in-out infinite;
}

.hero-orb-3 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: 30%;
  background: radial-gradient(circle, var(--ql-purple) 0%, transparent 70%);
  filter: blur(120px);
  opacity: 0.4;
  animation: orb-float-1 12s ease-in-out infinite reverse;
}

/* Hero grid - subtle tech pattern */
.hero-grid {
  background-image:
    linear-gradient(rgba(4, 108, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 108, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
}

/* Hero title - Space Grotesk with glow */
.hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 0 60px var(--color-accent-30);
}

/* Hero gradient text - Electric blue to cyan */
.hero-title-gradient {
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--ql-cyan) 50%,
    var(--ql-purple) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px var(--color-accent-40));
}

/* Hero badge - Glassmorphic pill */
.hero-badge-enhanced {
  background: var(--color-accent-12);
  border: 1px solid var(--color-accent-30);
  box-shadow:
    0 0 30px var(--color-accent-20),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-badge-enhanced span {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
}

/* Hero CTAs - Midnight button style */
.hero-cta-primary {
  background: var(--color-accent);
  color: #ffffff;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 16px 32px;
  border-radius: 10px;
  box-shadow:
    0 4px 20px var(--color-accent-40),
    0 0 60px var(--color-accent-25);
  border: none;
  position: relative;
  overflow: hidden;
}

.hero-cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.hero-cta-primary:hover::before {
  left: 100%;
}

.hero-cta-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px var(--color-accent-50),
    0 0 80px var(--color-accent-35);
}

.hero-cta-secondary {
  background: var(--color-accent-12);
  color: var(--color-accent-light);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 10px;
  border: 1px solid var(--color-accent-25);
}

.hero-cta-secondary:hover {
  background: var(--color-accent-20);
  border-color: var(--color-accent-40);
  color: #ffffff;
}

/* Trust badges - Subtle glow */
.hero-trust-badge {
  background: var(--color-accent-08);
  border: 1px solid var(--color-accent-20);
  border-radius: 9999px;
  padding: 8px 16px;
}

.hero-trust-badge:hover {
  border-color: var(--color-accent-40);
  box-shadow: 0 0 20px var(--color-accent-15);
}

.hero-trust-badge-icon {
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent-50);
}

/* ============================================
   CARDS - Premium Glassmorphic Style
   ============================================ */
.glass-card,
.service-card,
.card,
.standards-ticker-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow:
    0 8px 32px var(--color-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.glass-card:hover,
.service-card:hover,
.card:hover,
.standards-ticker-card:hover {
  border-color: var(--color-accent-30);
  box-shadow:
    0 16px 48px var(--color-card-shadow),
    0 0 40px var(--color-card-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

/* More prominent CTA card hover in service sections */
.service-section .service-cta-card:hover {
  border: 1px solid var(--color-accent-50) !important;
  box-shadow:
    0 16px 48px var(--color-card-shadow),
    0 0 20px var(--color-accent-20),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Service card icon - Midnight accent glow */
.service-card-icon {
  background: var(--color-accent-15);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 0 25px var(--color-accent-10);
}

.service-card-icon svg {
  color: var(--color-accent);
}

/* Service card title - Space Grotesk */
.service-card-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Service card link - Electric blue with arrow */
.service-card-link {
  color: var(--color-accent);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.service-card-link:hover {
  gap: 10px;
}

/* ============================================
   AI STATS SECTION - Premium Dark Style
   ============================================ */
.ai-stats-section {
  background:
    radial-gradient(ellipse at 20% 30%, var(--color-accent-08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
    var(--color-bg-primary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Stats circular progress - Electric blue */
.ai-stat-circle {
  stroke: var(--color-accent);
  filter: drop-shadow(0 0 8px var(--color-accent-50));
}

.ai-stat-circle-bg {
  stroke: var(--color-accent-15);
}

/* Stats number - Bold with glow */
.ai-stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--color-text-primary);
  text-shadow: 0 0 30px var(--color-accent-30);
}

/* ============================================
   AI JOURNEY SECTION - Timeline Style
   ============================================ */
.ai-journey-section {
  background: var(--color-bg-secondary);
}

.journey-phase-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.journey-phase-card:hover {
  border-color: var(--color-accent-30);
  box-shadow: 0 12px 40px var(--color-card-shadow);
}

.journey-phase-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.875rem;
}

.journey-phase-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Journey connector line - Electric blue */
.journey-connector {
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--ql-cyan) 100%);
  box-shadow: 0 0 15px var(--color-accent-40);
}

/* ============================================
   TICKER / MARQUEE - Smooth scroll
   ============================================ */
.ticker-wrapper {
  position: relative;
  overflow: hidden;
}

.ticker-wrapper::before,
.ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.ticker-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-bg-primary) 0%, transparent 100%);
}

.ticker-wrapper::after {
  right: 0;
  background: linear-gradient(90deg, transparent 0%, var(--color-bg-primary) 100%);
}

.ticker-item {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.ticker-item:hover {
  transform: scale(1.05);
}

/* Partner logos - always white background */
.partner-ticker-section .ticker-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.partner-ticker-section .ticker-item:hover {
  border-color: var(--color-accent-30);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ============================================
   CTA SECTION - Dramatic gradient
   ============================================ */
.cta-section {
  background:
    radial-gradient(ellipse at 30% 50%, var(--color-accent-15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 45%),
    linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-10) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ============================================
   FOOTER - Dark premium style
   ============================================ */
footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
}

.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--color-footer-text);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.footer-link {
  color: var(--color-footer-link);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-brand-blue);
}

/* Footer policy links - brand blue hover */
.footer-policy-link {
  color: var(--color-footer-text-secondary);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-policy-link:hover {
  color: var(--color-brand-blue);
}

/* Footer logo */
.footer-logo svg {
  fill: var(--color-footer-text);
}

/* Footer social links */
.footer-social-link {
  color: var(--color-footer-text-secondary);
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  color: var(--color-brand-blue);
  background: var(--color-accent-10);
}

/* ============================================
   FORMS - Clean modern style
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: 10px;
  color: var(--color-input-text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-input-placeholder);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow:
    0 0 0 3px var(--color-accent-20),
    0 0 20px var(--color-accent-10);
  outline: none;
}

/* Form submit button */
.form-submit {
  background: var(--color-accent);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px var(--color-accent-30);
}

.form-submit:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 6px 25px var(--color-accent-40);
  transform: translateY(-1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   CONTACT MODAL - Midnight style
   ============================================ */
.contact-modal-overlay {
  background: rgba(3, 14, 20, 0.85);
  backdrop-filter: blur(8px);
}

.contact-modal-content {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.4),
    0 0 60px var(--color-accent-10);
}

/* ============================================
   BLOG CARDS - Clean card style
   ============================================ */
.blog-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-card:hover {
  border-color: var(--color-accent-30);
  box-shadow: 0 16px 48px var(--color-card-shadow);
  transform: translateY(-4px);
}

.blog-card-image {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-card-content {
  padding: 24px;
}

.blog-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.blog-card-excerpt {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.blog-card-meta {
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
}

/* ============================================
   SECTION HEADINGS - Consistent typography
   ============================================ */
.section-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.section-subheading {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.section-description {
  color: var(--color-text-secondary);
  max-width: 48rem;
  line-height: 1.7;
}

/* ============================================
   ANIMATIONS - Smooth and subtle
   ============================================ */

/* Intersection Observer animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }

/* Button hover effects */
.btn-hover-glow:hover {
  box-shadow: 0 0 30px var(--color-accent-40);
}

/* Link underline animation */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

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

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    padding: 14px 24px;
    width: 100%;
    justify-content: center;
  }

  .service-card {
    padding: 20px;
  }

  .section-heading {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-badge-enhanced {
    padding: 6px 12px;
  }

  .hero-badge-enhanced span {
    font-size: 0.75rem;
  }

  .hero-trust-badge {
    padding: 6px 12px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
/* ============================================
   SCROLL INDICATOR
   ============================================ */
.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text-secondary);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.hero-scroll-indicator:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(5px);
}

.hero-scroll-indicator svg {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ============================================
   FOOTER REVEAL ANIMATION STATES
   ============================================ */
.footer-animate {
  opacity: 0;
  transform: translateY(40px);
}

.footer-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SCROLL REVEAL ANIMATION STATES
   ============================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
}

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

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .stagger-children > *,
  .footer-animate,
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-cta-primary::before {
    display: none;
  }

  .ticker-item:hover {
    transform: none;
  }

  .hero-scroll-indicator svg {
    animation: none;
  }

  .hero-orb {
    animation: none;
  }

  .hero-content {
    transform: none !important;
    opacity: 1 !important;
  }
}
