/* Custom styles for NY Deli & Diner */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF9F5;
}
::-webkit-scrollbar-thumb {
  background: #D5D6DD;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7B2D3B;
}

/* Selection color */
::selection {
  background: #7B2D3B;
  color: #FDF9F5;
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(253, 249, 245, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

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

#navbar.scrolled .font-serif.text-charcoal-900 {
  color: #17181C;
}

/* Mobile menu animations */
.mobile-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 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; }

/* Hamburger animation */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
  width: 20px;
  margin-left: 0;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  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; }

/* Image hover effect */
.rounded-2xl.overflow-hidden {
  overflow: hidden;
}

.rounded-2xl.overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Parallax-like subtle effect on hero */
#hero .relative {
  will-change: transform;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rounded-2xl.overflow-hidden img {
    transition: none;
  }
  #menu-toggle .menu-line {
    transition: none;
  }
}

/* Tablet adjustments */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.75rem;
  }
  .floating-card {
    position: relative;
    margin-top: 1rem;
  }
}

/* Print styles */
@media print {
  nav, #menu-toggle, #contact-form, .reveal {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
