/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(151, 71, 160, 0.2);
  color: #43214c;
}

/* ── Floating Card Animations ── */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

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

.floating-card {
  animation: float-1 4s ease-in-out infinite;
}

.floating-card-2 {
  animation: float-2 5s ease-in-out infinite;
}

.floating-card-3 {
  animation: float-3 3.5s ease-in-out infinite;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* Stagger children */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* ── Navbar Transition ── */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(91, 44, 111, 0.08), 0 4px 24px rgba(91, 44, 111, 0.06);
}

/* ── Custom Select Arrow ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237e358a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Subtle hover lift for cards ── */
.service-card {
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(91, 44, 111, 0.2);
}

/* ── Smooth anchor offset ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Focus visible outlines ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #9747a0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Mobile menu animation ── */
#mobileMenu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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