/* ===== Base & Typography ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ===== Navbar ===== */
.nav-bar {
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav-bar.scrolled {
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #F27261;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

.mobile-menu.closed .mobile-link {
  transform: translateY(20px);
  opacity: 0;
}

.mobile-link {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* ===== Hero Stat Cards ===== */
.stat-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.stat-card:hover {
  box-shadow: 0 20px 60px rgba(242, 114, 97, 0.1);
}

/* ===== Service Cards ===== */
.service-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* ===== Gallery ===== */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 44, 44, 0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.testimonial-card:hover {
  box-shadow: 0 25px 60px rgba(242, 114, 97, 0.08);
}

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

/* ===== 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;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
  
  .gallery-item img,
  .rounded-2xl img {
    transition: none;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
}

/* ===== Selection ===== */
::selection {
  background: rgba(242, 114, 97, 0.3);
  color: #fff;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #4f4f4f;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #F27261;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .font-serif {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
}
