/* ===== Custom Styles for Vernal Vineyard ===== */

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

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

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes floatDelay {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes bounceSlow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

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

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
  opacity: 0;
}

.animate-slide-up-delay {
  animation: slideUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: slideUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

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

.animate-float-delay {
  animation: floatDelay 5s ease-in-out 1s infinite;
}

.animate-bounce-slow {
  animation: bounceSlow 2.5s ease-in-out infinite;
}

/* ===== Scroll-triggered animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.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; }

/* ===== Navbar ===== */
.nav-link {
  position: relative;
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 253, 251, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#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;
}

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

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

/* ===== Image hover effects ===== */
.rounded-2xl.overflow-hidden {
  will-change: transform;
}

/* ===== Button hover glow ===== */
button:hover,
a:hover {
  will-change: transform, box-shadow;
}

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

/* ===== Selection color ===== */
::selection {
  background: #f8c3cc;
  color: #5a1a28;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.2;
  }
}

/* ===== Print styles ===== */
@media print {
  #navbar,
  #mobileMenu,
  .animate-bounce-slow {
    display: none;
  }
}
