*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background-color: rgba(123, 63, 123, 0.15);
  color: #381c38;
}

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(250, 240, 250, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(123, 63, 123, 0.08);
}

.nav-scrolled .nav-logo-text {
  color: #381c38 !important;
}

.nav-scrolled .nav-link {
  color: #7B3F7B !important;
}

.nav-scrolled .nav-link:hover {
  color: #a844a8 !important;
}

.nav-scrolled #navbar svg.text-plum-600 {
  color: #7B3F7B !important;
}

/* Hero animations */
.hero-headline {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.9s ease forwards 0.3s;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards 0.15s;
}

.hero-body {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards 0.45s;
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards 0.6s;
}

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

/* Scroll reveal - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

  .service-card {
    transition: background-color 0.5s ease;
  }
}

/* Mobile menu */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

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

/* Form focus states */
input:focus, textarea:focus {
  border-bottom-color: #7B3F7B !important;
}

input:focus + label,
textarea:focus + label {
  color: #7B3F7B;
}

/* Smooth scroll offset for fixed nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Subtle line accents */
.accent-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, #7B3F7B, transparent);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #d991d9;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7B3F7B;
}
