/* ============================================
   Muffins And Scones — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

::selection {
  background: #B3E8D0;
  color: #0A3D5C;
}

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

#navbar.scrolled {
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(10, 61, 92, 0.06);
}

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

#navbar.scrolled .nav-logo-text {
  color: #0A3D5C;
}

.nav-link {
  position: relative;
}

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

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

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

/* Hero Animations */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-headline {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-sub {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-ctas {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-badges {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards 1s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Line */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* Feature Cards */
.feature-card {
  position: relative;
}

.feature-card:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
  .feature-card:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* Section Eyebrow */
.section-eyebrow {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-eyebrow.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Menu Items */
.menu-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(10, 61, 92, 0.06);
}

.menu-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.menu-item h4 {
  transition: color 0.2s ease;
}

/* Gallery */
.gallery-item {
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(10, 61, 92, 0.08);
  transition: box-shadow 0.3s ease;
}

.gallery-item:hover {
  box-shadow: 0 8px 40px rgba(10, 61, 92, 0.15);
}

/* Visit Cards */
.visit-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.visit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Form */
#contact-form input,
#contact-form select,
#contact-form textarea {
  transition: box-shadow 0.2s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(79, 191, 148, 0.15);
}

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

/* Menu Toggle Animation */
.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;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* About Image Wrapper */
.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(179, 232, 208, 0.4), transparent, rgba(10, 61, 92, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .section-eyebrow {
    opacity: 1;
    transform: none;
  }
}
