/* ============================================
   The Cabbage Rose Cafe — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

::selection {
  background: #e05229;
  color: #fefcf8;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf6ec;
}
::-webkit-scrollbar-thumb {
  background: #c93a1a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a82c16;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-medium {
  animation: floatMedium 4s ease-in-out infinite;
}

.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

/* --- Reveal on Scroll --- */
.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[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
}

/* --- Navbar --- */
#site-header {
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

#site-header.scrolled {
  background: rgba(254, 252, 248, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 24px rgba(15, 26, 46, 0.08);
}

.nav-link {
  position: relative;
}

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

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

/* --- Mobile Menu --- */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu .mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s 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; }

/* --- Menu Tabs --- */
.menu-tab {
  background: transparent;
  color: #1a2744;
  opacity: 0.5;
  cursor: pointer;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
}

.menu-tab.active {
  background: #e05229;
  color: #fefcf8;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(224, 82, 41, 0.3);
}

.menu-tab:not(.active):hover {
  opacity: 0.8;
}

.menu-panel {
  animation: fadeInUp 0.4s ease forwards;
}

/* --- Button Hover Effects --- */
a[href^="tel:"] {
  text-decoration: none;
}

/* --- Image Hover --- */
.rounded-2xl.overflow-hidden {
  position: relative;
}

.rounded-2xl.overflow-hidden::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 26, 46, 0.15) 0%, transparent 40%);
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}

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

/* --- Tablet & Desktop --- */
@media (min-width: 768px) {
  .reveal {
    transform: translateY(0);
  }
}

/* --- Large Desktop --- */
@media (min-width: 1024px) {
  .reveal {
    transform: translateY(0);
  }
}
