/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }

/* ========== NAVBAR ========== */
#navbar {
  background: rgba(255, 252, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(123, 36, 50, 0.08);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
#navbar.scrolled {
  background: rgba(255, 252, 248, 0.96);
  box-shadow: 0 4px 30px rgba(123, 36, 50, 0.08);
}
.nav-link { position: relative; }

/* ========== HERO BLOBS ========== */
.hero-blob {
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 { animation-delay: 0s; }
.blob-2 { animation-delay: -3s; }
.blob-3 { animation-delay: -5s; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ========== BUTTONS ========== */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
  position: relative;
  overflow: hidden;
}

/* ========== SERVICE CARDS ========== */
.service-card {
  perspective: 1000px;
}
.service-card > div {
  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 > div {
  transform: translateY(-6px);
}

/* ========== MOBILE NAV ========== */
.mobile-nav-link {
  transition: all 0.2s ease;
}
#mobileMenu {
  animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #7B2432;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(123, 36, 50, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
  z-index: 50;
  text-decoration: none;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #631e2b;
  transform: translateY(-2px);
}

/* ========== FORM ========== */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(123, 36, 50, 0.1);
}
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='%237B2432' 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 1rem center;
  padding-right: 2.5rem;
}

/* ========== SELECTION ========== */
::selection {
  background: rgba(123, 36, 50, 0.15);
  color: #7B2432;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .service-card:hover > div { transform: none; }
  .back-to-top { transition: none; }
}
