/* ===== Base & Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* ===== Header Scroll State ===== */
#header.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

#header.scrolled .font-serif,
#header.scrolled span {
  color: #0a1628 !important;
}

#header.scrolled .menu-line {
  background: #0a1628 !important;
}

/* ===== Mobile Menu ===== */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== Menu Button Active State ===== */
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* ===== Service Cards ===== */
.service-card {
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease, border-color 0.5s ease;
}

.service-card:hover {
  transform: translateY(-6px);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ===== Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
  background: #a8b8cc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7d94aa;
}

/* ===== Selection ===== */
::selection {
  background: #bce8d0;
  color: #0a1628;
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid #5bbf88;
  outline-offset: 2px;
}

/* ===== Input autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f5f3ee inset !important;
  -webkit-text-fill-color: #0f2437 !important;
}
