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

body {
  overflow-x: hidden;
}

::selection {
  background: #d4a8de;
  color: #2a0f33;
}

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-14px) scale(1.03); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Hero Animations ── */
.hero-anim {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

.blob-1 { animation: float 7s ease-in-out infinite; }
.blob-2 { animation: floatSlow 9s ease-in-out infinite; }
.blob-3 { animation: float 11s ease-in-out infinite; }

/* ── Scroll Reveal ── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Navbar ── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 245, 251, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #F5A623, #e08a0a);
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

/* ── Mobile Menu ── */
.mobile-link {
  position: relative;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Buttons ── */
.btn-primary {
  position: relative;
  overflow: hidden;
}

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

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

.btn-secondary {
  position: relative;
}

/* ── Service Cards ── */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #7B2D8E, #F5A623);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ── Input Focus ── */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.1);
}

/* ── Back to Top ── */
#backToTop.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero-anim {
    animation-duration: 0.6s;
  }

  #hero h1 {
    font-size: 2.5rem;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}
