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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(107, 15, 26, 0.6);
  color: #f8cdd7;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #111118;
}
::-webkit-scrollbar-thumb {
  background: #353544;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6b0f1a;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* ── Hero Reveal Animations ── */
.hero-reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.2s; }
.hero-reveal:nth-child(3) { animation-delay: 0.3s; }
.hero-reveal:nth-child(4) { animation-delay: 0.4s; }
.hero-reveal:nth-child(5) { animation-delay: 0.5s; }

.hero-image-reveal {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

/* ── Section Reveal (scroll-triggered) ── */
.section-reveal,
.service-card,
.reason-card,
.about-image-reveal,
.about-content-reveal,
.contact-reveal,
.map-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.visible,
.service-card.visible,
.reason-card.visible,
.about-image-reveal.visible,
.about-content-reveal.visible,
.contact-reveal.visible,
.map-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.reason-card:nth-child(1) { transition-delay: 0.05s; }
.reason-card:nth-child(2) { transition-delay: 0.15s; }
.reason-card:nth-child(3) { transition-delay: 0.25s; }
.reason-card:nth-child(4) { transition-delay: 0.35s; }

/* ── Navigation ── */
#nav {
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#nav.scrolled {
  background: rgba(17, 17, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

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

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

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

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

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

/* ── Image hover effects ── */
.service-card img:hover {
  transform: scale(1.05);
}

/* ── Gold shimmer on hover for CTA ── */
a[href="tel:3614315255"]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

a[href="tel:3614315255"]:hover::after {
  transform: translateX(100%);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-reveal {
    animation-duration: 0.6s;
  }

  .hero-image-reveal {
    animation-duration: 0.6s;
  }
}

/* ── Focus styles for accessibility ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 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;
  }
}
