/* ===== CUSTOM STYLES FOR 239 NUTRITION ===== */

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

/* Custom scroll bar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f2fbf6;
}
::-webkit-scrollbar-thumb {
  background: #c0ebd4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8fd9b4;
}

/* Selection */
::selection {
  background: #c0ebd4;
  color: #0A1628;
}

/* ===== ANIMATIONS ===== */

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVIGATION ===== */

#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(10, 22, 40, 0.06);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #6DD5A8;
  border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* ===== HERO ===== */

.hero-headline {
  animation: heroFadeUp 1s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-sub {
  animation: heroFadeUp 1s ease-out 0.2s forwards;
  opacity: 0;
  transform: translateY(30px);
}

.hero-cta {
  animation: heroFadeUp 1s ease-out 0.4s forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

/* ===== PRODUCT CARDS ===== */

.product-card {
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover::before {
  border-color: rgba(109, 213, 168, 0.3);
}

/* ===== MOBILE MENU ===== */

#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-link {
  border-radius: 12px;
}

/* ===== FORM ===== */

input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(109, 213, 168, 0.15);
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .fade-in,
  .fade-in.visible {
    opacity: 1;
    transform: none;
  }
  .fade-in-stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* ===== FOCUS VISIBLE ===== */

:focus-visible {
  outline: 2px solid #6DD5A8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== RESPONSIVE TWEAKS ===== */

@media (max-width: 640px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}
