/* ── Base & Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* ── Navbar transitions ── */
.nav-text,
.nav-btn svg {
  transition: color 0.4s ease, background 0.4s ease;
}

#navbar.scrolled .nav-text,
#navbar.scrolled .nav-btn svg {
  color: rgb(94, 50, 100);
}

#navbar.scrolled {
  background: rgba(250, 245, 252, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(123, 74, 140, 0.08);
  border-bottom: 1px solid rgba(233, 208, 238, 0.5);
}

#navbar:not(.scrolled) .nav-text { color: rgb(94, 50, 100); }
#navbar:not(.scrolled) .nav-btn { background: rgba(123, 74, 140, 0.1); }
#navbar:not(.scrolled) .nav-btn svg { color: rgb(94, 50, 100); }

/* ── Mobile menu ── */
.mobile-link {
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-link:hover {
  color: rgb(123, 74, 140);
  padding-left: 8px;
}

/* ── Scroll reveal ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: always visible if JS is disabled or reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Service cards ── */
.service-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.service-card:hover {
  transform: translateY(-4px);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgb(250, 245, 252); }
::-webkit-scrollbar-thumb { background: rgb(217, 173, 223); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgb(168, 85, 167); }

/* ── 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='%237B4A8C' stroke-width='2.5' 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 14px center;
  padding-right: 40px;
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid rgb(168, 85, 167);
  outline-offset: 2px;
}

/* ── Smooth anchor jumps ── */
@media (prefers-reduced-motion: no-preference) {
  section {
    scroll-margin-top: 80px;
  }
}
