/* ─── Base & Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(196, 91, 75, 0.2);
  color: #23252c;
}

/* ─── Hero ─── */
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(19, 20, 26, 0.82) 0%,
    rgba(35, 37, 44, 0.70) 50%,
    rgba(19, 20, 26, 0.78) 100%
  );
}

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

#navbar.scrolled {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
  color: #23252c;
  transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
  color: #23252c;
}

.nav-link {
  position: relative;
}

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

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

#navbar.scrolled .nav-link {
  color: #5c606a;
}

#navbar.scrolled .nav-link:hover {
  color: #C45B4B;
}

/* ─── Hero Animations ─── */
#hero .hero-badge {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

#hero .hero-headline {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
}

#hero .hero-sub {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}

#hero .hero-cta {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

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

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
  }

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

/* ─── Mobile Menu ─── */
.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.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; }

/* ─── Menu Hover ─── */
#menu ul li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#menu ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Dark menu items */
.bg-charcoal-900 ul li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bg-charcoal-900 ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ─── Image Hover ─── */
.group:hover img {
  transform: scale(1.05);
}

/* ─── Focus Styles ─── */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

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

::-webkit-scrollbar-track {
  background: #fdf8f0;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #9fa2a9;
}

/* ─── Responsive tweaks ─── */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.75rem;
    line-height: 1.1;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
