/* ============================================
   Devins Deli — Custom Styles
   Bold editorial · Terracotta & Sand
   ============================================ */

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: #B56C4A;
  color: #FDFBF7;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
  background: #d4af6e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B56C4A;
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(181, 108, 74, 0.1);
}

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

/* Mobile menu animation */
.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; }

/* Hamburger animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.4rem;
}

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Ensure content is visible without JS */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* Image hover parallax feel */
aspect-ratio {
  overflow: hidden;
}

/* Smooth focus visible */
:focus-visible {
  outline: 2px solid #B56C4A;
  outline-offset: 2px;
}

/* Button ripple effect */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
  #navbar, #menuBtn, #mobileMenu {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1023px) {
  .aspect-\[4\/5\] {
    aspect-ratio: 3/4;
  }
}
