/* ===== Base & Utilities ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  /* Default state is visible — JS adds revealed class for timing control */
  .reveal {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

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

/* ===== Stat Cards ===== */
.stat-card {
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease;
}

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

/* ===== Menu Cards ===== */
.menu-card {
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* ===== Feature Cards ===== */
.feature-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease, border-color 0.4s ease;
}

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

/* ===== Mobile Menu ===== */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

::-webkit-scrollbar-thumb {
  background: #d9c08a;
  border-radius: 999px;
}

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

/* ===== Selection ===== */
::selection {
  background: #f8c4b0;
  color: #642215;
}

/* ===== Focus ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid #d4522a;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

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