/* ========== BASE ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; }

/* Prevent any section from causing horizontal overflow */
section, main, footer { overflow-x: clip; }

/* ========== SCROLL ANIMATIONS ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* Stagger children */
.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; }

/* ========== GRADIENT TEXT ========== */
.gradient-text {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dark .gradient-text {
  background: linear-gradient(135deg, #A855F7, #F472B6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== HERO ANIMATIONS ========== */
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
@keyframes float-slow { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-slow 7s ease-in-out infinite 0.8s; }
.float-3 { animation: float-slow 8s ease-in-out infinite 1.5s; }

@keyframes wave-move { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.hero-wave { animation: wave-move 20s linear infinite; }
@keyframes wave-move-reverse { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.hero-wave-reverse { animation: wave-move-reverse 25s linear infinite; }

@keyframes blob { 0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } 50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; } }
.blob { animation: blob 8s ease-in-out infinite; }

/* ========== PAGE HEADER ANIMATION ========== */
@keyframes page-header-in { 
  0% { opacity: 0; transform: translateY(-20px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.page-header-anim { animation: page-header-in 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes page-header-line {
  0% { width: 0; }
  100% { width: 80px; }
}
.page-header-line { animation: page-header-line 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards; width: 0; }

/* ========== FAQ ========== */
.faq-answer { 
  display: grid; 
  grid-template-rows: 0fr; 
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease; 
  opacity: 0;
}
.faq-answer > div { overflow: hidden; }
.faq-answer.open { grid-template-rows: 1fr; opacity: 1; }
.faq-icon { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.faq-icon.open { transform: rotate(45deg); }

/* ========== MOBILE MENU TRANSITION ========== */
/* (moved to NAVBAR RESPONSIVE section) */

/* ========== NAVBAR GLASSMORPHISM ========== */
.nav-glass {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(231, 227, 220, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.dark .nav-glass {
  background: rgba(22, 26, 34, 0.7);
  border: 1px solid rgba(42, 49, 64, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ========== NAVBAR RESPONSIVE (100% pure CSS — zero Tailwind dependency) ========== */
.navbar-wrap {
  position: fixed; z-index: 50;
  top: 0.75rem; left: 0.75rem; right: 0.75rem;
}
.navbar-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}
.navbar-logo {
  display: flex; align-items: center; cursor: pointer; flex-shrink: 0;
}
.navbar-logo-img { height: 1.75rem; }
.navbar-logo-light { display: block; }
.navbar-logo-dark { display: none; }
.dark .navbar-logo-light { display: none; }
.dark .navbar-logo-dark { display: block; }

/* Nav links */
.navbar-links { display: none; align-items: center; gap: 1.5rem; }
.nav-link {
  font-size: 0.875rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  color: #5F6470; transition: color 0.2s ease; text-decoration: none;
}
.nav-link:hover { color: #7C3AED; }
.nav-link-active { color: #7C3AED; }
.dark .nav-link { color: #CBD5E1; }
.dark .nav-link:hover { color: #A855F7; }
.dark .nav-link-active { color: #A855F7; }

/* Actions group */
.navbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.navbar-theme-btn {
  padding: 0.5rem; border-radius: 0.75rem; cursor: pointer;
  background: none; border: none; color: inherit;
  transition: background-color 0.2s ease;
}
.navbar-theme-btn:hover { background: rgba(255,255,255,0.3); }
.dark .navbar-theme-btn:hover { background: rgba(255,255,255,0.1); }
.navbar-icon { width: 1rem; height: 1rem; display: block; }
.navbar-icon-light { display: block; }
.navbar-icon-dark { display: none; }
.dark .navbar-icon-light { display: none; }
.dark .navbar-icon-dark { display: block; }
/* Burger icon slightly bigger */
.navbar-burger .navbar-icon { width: 1.25rem; height: 1.25rem; }

/* CTA button */
.navbar-cta {
  display: none; align-items: center;
  padding: 0.5rem 1rem; border-radius: 0.75rem;
  background: #7C3AED; color: #fff;
  font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: opacity 0.2s ease;
}
.navbar-cta:hover { opacity: 0.9; }
.dark .navbar-cta { background: #A855F7; }

/* Burger button */
.navbar-burger {
  display: block; padding: 0.5rem; border-radius: 0.75rem;
  background: none; border: none; color: inherit; cursor: pointer;
  transition: background-color 0.2s ease;
}
.navbar-burger:hover { background: rgba(255,255,255,0.3); }
.dark .navbar-burger:hover { background: rgba(255,255,255,0.1); }

/* Mobile menu root */
.mobile-menu-root {
  position: fixed; inset: 0; z-index: 40; display: none;
}
.mobile-menu-root.open { display: block; }

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* Mobile menu panel */
.mobile-menu-panel-wrap {
  position: absolute;
  top: 4rem; left: 0.75rem; right: 0.75rem;
  padding: 1.25rem; gap: 0.75rem;
  display: flex; flex-direction: column;
  border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.mobile-menu-panel {
  opacity: 0; transform: translateY(-16px);
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.mobile-menu-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Mobile links */
.mobile-link {
  font-size: 1rem; font-weight: 500; padding: 0.5rem 0;
  color: inherit; text-decoration: none; cursor: pointer;
  transition: color 0.2s ease;
}
.mobile-link:hover { color: #7C3AED; }
.dark .mobile-link:hover { color: #A855F7; }
.mobile-link-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem; margin-top: 0.5rem;
  background: #7C3AED; color: #fff; border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 600;
  transition: opacity 0.2s ease;
}
.mobile-link-cta:hover { color: #fff; opacity: 0.9; }
.dark .mobile-link-cta { background: #A855F7; }

/* ── SM breakpoint (640px) ── */
@media (min-width: 640px) {
  .navbar-wrap { top: 1rem; left: 1rem; right: 1rem; }
  .navbar-nav { padding: 0.625rem 1rem; }
  .mobile-menu-panel-wrap {
    top: 5rem; left: 1rem; right: 1rem;
    padding: 1.5rem; gap: 1rem;
  }
}

/* ── LG breakpoint (1024px) — desktop ── */
@media (min-width: 1024px) {
  .navbar-wrap {
    display: flex; justify-content: center; pointer-events: none;
  }
  .navbar-nav {
    padding: 0.625rem 1.25rem; gap: 1.5rem;
    justify-content: flex-start; width: auto; max-width: fit-content;
    pointer-events: auto;
  }
  .navbar-links { display: flex; }
  .navbar-cta { display: inline-flex; }
  .navbar-burger { display: none; }
}

/* Counter */
.counter { display: inline-block; }

/* ========== TOAST NOTIFICATION ========== */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 100;
  padding: 1rem 1.5rem; border-radius: 1rem;
  transform: translateY(120%); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ========== RESPONSIVE HERO CARDS ========== */
@media (max-width: 639px) {
  /* Hide some floating cards on very small screens to prevent overflow */
  .reveal-right .float-3:last-of-type { display: none; }
}

/* ========== RESPONSIVE PAGE HEADER ========== */
@media (max-width: 767px) {
  .page-header-anim h1 { font-size: 1.875rem; line-height: 2.25rem; }
  .page-header-anim p { font-size: 1rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .page-header-anim h1 { font-size: 2.5rem; line-height: 2.75rem; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .float-1, .float-2, .float-3 { animation: none; }
  .hero-wave, .hero-wave-reverse { animation: none; }
  .blob { animation: none; }
  .page-header-anim { animation: none; opacity: 1; transform: none; }
  .page-header-line { animation: none; width: 80px; }
  .mobile-menu-overlay, .mobile-menu-panel, .navbar-nav { transition: none; }
  .faq-answer { transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ========== STICKY CALL BUTTON ========== */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.call-btn-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #7C3AED;
  animation: pulse-ring 1.5s ease-out infinite;
  z-index: -1;
}
.dark .call-btn-pulse::before { background: #A855F7; }

/* ========== GDPR COOKIE BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cookie-banner.show { transform: translateY(0); }
