/* ============================================
   Piddlin' in the Kitchen — Custom Styles
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
  background: #a1223e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #842035;
}

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

#navbar.scrolled {
  background-color: rgba(254, 253, 251, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(109, 29, 47, 0.08);
}

.nav-logo-text {
  transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
  color: #3d0a15;
}

#navbar.scrolled .nav-logo-text {
  color: #6f1d2f;
}

.nav-link {
  position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
  color: #3d0a15;
}

/* Mobile Menu */
#mobile-menu {
  transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

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

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

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

#menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 6px;
}

.mobile-nav-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

input::placeholder, textarea::placeholder {
  color: #f4a8b8;
}

/* ============================================
   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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 767px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}
