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

body {
  overflow-x: hidden;
}

::selection {
  background: #C8A45A;
  color: #0B1F3F;
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

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

.animate-slide-up {
  animation: slideUp 1s ease forwards;
  opacity: 0;
}

.animate-slide-up-delay {
  animation: slideUp 1s ease 0.3s forwards;
  opacity: 0;
}

.animate-fade-in {
  animation-delay: 0.5s;
  opacity: 0;
}

.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

/* ─── Reveal on Scroll ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal.revealed:nth-child(2) { transition-delay: 100ms; }
.reveal.revealed:nth-child(3) { transition-delay: 200ms; }
.reveal.revealed:nth-child(4) { transition-delay: 300ms; }

/* ─── Header Scroll State ─── */
#header.scrolled {
  background: rgba(251, 249, 244, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(11, 31, 63, 0.08);
}

#header.scrolled .nav-link {
  color: #0B1F3F;
}

#header.scrolled .nav-link:hover {
  color: #C8A45A;
}

/* ─── Mobile Menu ─── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#menu-btn.active #bar1 {
  transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active #bar2 {
  opacity: 0;
}

#menu-btn.active #bar3 {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.5rem;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ─── Testimonial Slider ─── */
.testimonial-slide {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-slide.hidden {
  display: none;
}

/* ─── Form Styles ─── */
input:focus,
select:focus,
textarea:focus {
  border-color: #C8A45A !important;
  box-shadow: 0 0 0 3px rgba(200, 164, 90, 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='%230B1F3F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  appearance: none;
  -webkit-appearance: none;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.2;
  }
}
