/* ═══════════════════════════════════════════════════════════
   9A Nutrition LLC — Custom Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Base Reset & Typography ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(22, 163, 74, 0.2);
  color: #064e3b;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  /* Stagger children */
  .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
  .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
  .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
  .scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
  .scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
  .scroll-reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* ── Stat Cards Float Animation ── */
@media (prefers-reduced-motion: no-preference) {
  .stat-card {
    animation: float 4s ease-in-out infinite;
  }

  .stat-card:nth-child(1) { animation-delay: 0s; }
  .stat-card:nth-child(2) { animation-delay: 0.5s; }
  .stat-card:nth-child(3) { animation-delay: 1s; }
  .stat-card:nth-child(4) { animation-delay: 1.5s; }
}

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

/* ── Header Scroll State ── */
#site-header.scrolled {
  background-color: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08), 0 4px 20px rgba(22, 101, 52, 0.06);
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
  animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Button / Link Transitions ── */
a, button {
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Image Lazy Load Fallback ── */
img {
  background-color: #dcfce7;
}

/* ── Smooth Scroll Offset for Fixed Header ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Form Focus States ── */
input:focus,
textarea:focus {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* ── Mobile Menu Active State ── */
#mobile-menu.open {
  display: block;
}

/* ── Subtle Card Tilt on Hover ── */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* ── Print Styles ── */
@media print {
  #site-header,
  #contact-form,
  .scroll-reveal {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  a {
    color: black !important;
    text-decoration: underline;
  }
}
