/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B83FF;
  --primary-subtle: rgba(108, 99, 255, 0.1);
  --dark: #1A1A2E;
  --dark-secondary: #2D2D44;
  --text-secondary: #6B7280;
  --bg-light: #F8F9FE;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 40px rgba(108, 99, 255, 0.12);
  --shadow-lg: 0 20px 60px rgba(108, 99, 255, 0.18);
  --radius: 16px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-3 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.display-5 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  font-weight: 400;
  color: var(--text-secondary);
}

.text-primary {
  color: var(--primary) !important;
}

.bg-primary-subtle {
  background-color: var(--primary-subtle) !important;
}

.text-primary-emphasis {
  color: var(--primary-dark) !important;
}

/* ============================================
   Buttons & Badges
   ============================================ */
.btn {
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition);
  border-radius: 50px;
  padding: 0.75rem 1.75rem;
}

.btn-primary {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

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

.btn-outline-secondary {
  border: 2px solid #E5E7EB;
  color: var(--dark);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--primary-subtle) !important;
  color: var(--primary-dark) !important;
  border: 1px solid rgba(108, 99, 255, 0.2);
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  z-index: 1050;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.06);
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark) !important;
}

.navbar-brand .text-primary {
  color: var(--primary) !important;
}

.nav-link {
  font-weight: 600;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.navbar-toggler {
  padding: 0.5rem;
  border: none;
  transition: var(--transition);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 46, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  padding-top: 100px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F8F9FE 0%, #FFFFFF 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-img {
  animation: float 6s ease-in-out infinite;
  max-width: 90%;
  filter: drop-shadow(0 20px 40px rgba(108, 99, 255, 0.15));
}

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

/* ============================================
   Sections
   ============================================ */
.section-padding {
  padding: 100px 0;
}

.bg-light {
  background: var(--bg-light) !important;
}

/* ============================================
   Cards
   ============================================ */
.card {
  border-radius: var(--radius);
  transition: var(--transition);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md) !important;
}

.card .card {
  border: none;
}

.card .bi {
  transition: var(--transition);
}

.card:hover .bi {
  transform: scale(1.05);
}

.card.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.card.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   Testimonials
   ============================================ */
#testimonials .card {
  border: 1px solid rgba(108, 99, 255, 0.06);
}

#testimonials .card .bi-star-fill {
  font-size: 1rem;
}

/* ============================================
   Contact / CTA
   ============================================ */
#contact .card {
  background: linear-gradient(135deg, var(--white) 0%, #F8F9FE 100%);
  border: 1px solid rgba(108, 99, 255, 0.08);
}

#contact .form-control {
  border: 2px solid #E5E7EB;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: var(--transition);
  border-radius: 50px;
}

#contact .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--dark) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

footer .text-secondary {
  color: rgba(255, 255, 255, 0.5) !important;
}

footer a {
  transition: var(--transition);
}

footer a:hover {
  color: var(--primary-light) !important;
}

/* ============================================
   Back-to-Top Button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 1040;
  text-decoration: none;
  font-size: 1.5rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
  color: var(--white);
}

/* ============================================
   Animations (Intersection Observer)
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger delays */
.animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.25s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.35s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
  .hero-section {
    padding-top: 80px;
    text-align: center;
  }

  .hero-section .display-3 {
    font-size: 2.8rem;
  }

  .section-padding {
    padding: 70px 0;
  }

  .navbar-nav {
    padding: 1rem 0;
  }

  .nav-link::after {
    display: none;
  }

  .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .display-3 {
    font-size: 2.2rem !important;
  }

  .display-5 {
    font-size: 1.8rem !important;
  }

  .hero-section .lead {
    font-size: 1.1rem;
  }

  .section-padding {
    padding: 50px 0;
  }

  .hero-img {
    max-width: 70%;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
    font-size: 1.2rem;
  }

  #contact .card {
    padding: 2rem !important;
  }

  .card {
    padding: 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .hero-section .display-3 {
    font-size: 1.8rem !important;
  }

  .btn-lg {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .section-padding {
    padding: 40px 0;
  }

  .hero-img {
    max-width: 80%;
  }

  .d-flex.gap-3 {
    gap: 0.75rem !important;
  }
}