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

:root {
  --indigo: #4F46E5;
  --indigo-light: #6366F1;
  --indigo-dark: #3730A3;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #ffffff;
  color: #111;
  overflow-x: hidden;
}

::selection {
  background: var(--indigo);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Page Transitions */
.page-transition {
  opacity: 0;
  transform: translateY(8px);
  animation: pageIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.page-exit {
  animation: pageOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

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

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

.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float-slow 8s ease-in-out infinite; }
.float-reverse { animation: float-reverse 7s ease-in-out infinite; }

/* Pulse Glow */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.pulse-glow { animation: pulse-glow 4s ease-in-out infinite; }

/* Animated Gradient Background for Hero */
.hero-gradient-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(79, 70, 229, 0.04) 0%, transparent 50%);
  animation: heroGradientShift 12s ease-in-out infinite;
}

@keyframes heroGradientShift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* Hero headline stagger animation */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-animate {
  opacity: 0;
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-animate-1 { animation-delay: 0.1s; }
.hero-animate-2 { animation-delay: 0.25s; }
.hero-animate-3 { animation-delay: 0.4s; }
.hero-animate-4 { animation-delay: 0.55s; }
.hero-animate-5 { animation-delay: 0.7s; }
.hero-animate-6 { animation-delay: 0.85s; }

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient Background */
.gradient-bg {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-light) 100%);
}

.gradient-bg-subtle {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}

/* Card Styles */
.card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: #e5e7eb;
}

.card-dark {
  background: #111;
  border: 1px solid #222;
  border-radius: 1rem;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-dark:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.15);
  border-color: #333;
}

/* Case study card with expandable hover */
.case-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
  border-color: #e0e7ff;
}

.case-card .case-expand {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
}

.case-card:hover .case-expand {
  max-height: 200px;
  opacity: 1;
}

/* Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-light) 100%);
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: #fff;
  color: #111;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--indigo);
  color: var(--indigo);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.03);
}

.nav-link {
  position: relative;
  color: #6b7280;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: #111;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--indigo);
  border-radius: 999px;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.35s; }
.mobile-menu.open a:nth-child(8) { transition-delay: 0.4s; }

.mobile-menu a:hover {
  color: var(--indigo);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Star Rating */
.star {
  color: #FBBF24;
  font-size: 1rem;
}

/* Section Divider */
.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-light) 100%);
  border-radius: 999px;
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #111;
  background: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* Image Placeholder */
.img-placeholder {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
  border-radius: 0.75rem;
}

/* Client Logo Placeholder */
.logo-placeholder {
  height: 40px;
  padding: 0 1.5rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c5c8ce;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.logo-placeholder:hover {
  border-color: #e0e7ff;
  color: #a5b4fc;
}

/* Sticky CTA Bar */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.75rem 0;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta.hidden-by-user {
  transform: translateY(100%) !important;
}

/* Exit Intent Popup */
.exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 1.5rem;
}

.exit-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.exit-popup {
  background: #fff;
  border-radius: 1.5rem;
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  position: relative;
}

.exit-overlay.active .exit-popup {
  transform: scale(1) translateY(0);
}

.exit-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #6b7280;
}

.exit-close:hover {
  background: #e5e7eb;
  color: #111;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid #f3f4f6;
  border-radius: 0.875rem;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.faq-item:hover {
  border-color: #e0e7ff;
}

.faq-item.open {
  border-color: #c7d2fe;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.06);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
}

.faq-trigger svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.faq-item.open .faq-trigger svg {
  transform: rotate(45deg);
  color: var(--indigo);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: #6b7280;
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* Score Bar */
.score-bar-track {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo) 0%, var(--indigo-light) 100%);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

.score-bar-fill.animated {
  /* width is set inline via JS */
}

.score-bar-fill.good {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.score-bar-fill.medium {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}

.score-bar-fill.low {
  background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
}

/* Tool card active state */
.tool-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-card:hover {
  border-color: #e0e7ff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

/* Result card animation */
@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-card {
  animation: resultSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }

/* Guarantee badge */
.guarantee-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.guarantee-badge::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed #c7d2fe;
}

/* Loading shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .sticky-cta .sticky-text {
    display: none;
  }
}

/* Testimonial photo avatar */
.avatar-ring {
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-light) 100%);
}

.avatar-ring > div {
  border-radius: 50%;
  border: 2px solid #fff;
}
