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

body {
  overflow-x: hidden;
}

::selection {
  background-color: #7B2D3B;
  color: #FDF8F5;
}

/* ===== 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.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

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

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

#navbar.scrolled .nav-link {
  color: #564f43;
}

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

#navbar.scrolled .font-serif {
  color: #7B2D3B !important;
}

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

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

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

/* ===== Menu Cards ===== */
.menu-card {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.menu-card:hover {
  transform: translateY(-6px);
}

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

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

/* ===== Gallery ===== */
.gallery-item {
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover {
  transform: scale(1.02);
}

/* ===== Floating Cards Animation ===== */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float-2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-0.5deg); }
}

@keyframes float-3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-card {
  animation: float-1 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
  animation: float-2 7s ease-in-out infinite;
  animation-delay: -2s;
}

.floating-card:nth-child(3) {
  animation: float-3 5s ease-in-out infinite;
  animation-delay: -1s;
}

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

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Mobile Menu Button Animation ===== */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.375rem;
}

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

/* ===== Smooth image loading ===== */
img {
  image-rendering: auto;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 767px) {
  .floating-card {
    display: none;
  }
}

/* ===== Print styles ===== */
@media print {
  #navbar, #mobileMenu { display: none; }
  body { background: white; color: black; }
}
