/* ═══════════════════════════════════════
   MC Nutrition & Fitness — Custom Styles
   ═══════════════════════════════════════ */

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

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

body {
  overflow-x: hidden;
}

::selection {
  background: color-mix(in srgb, #34B872 30%, transparent);
  color: #0A1F3F;
}

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

#site-header.scrolled {
  background: rgba(235, 240, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(10, 31, 63, 0.06), 0 4px 24px rgba(10, 31, 63, 0.06);
}

.nav-link {
  position: relative;
}

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

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

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 50px;
}

.mobile-nav-link {
  position: relative;
}

/* ── Hero Floating Cards ── */
.floating-card-1 {
  animation: floatA 6s ease-in-out infinite;
}

.floating-card-2 {
  animation: floatB 7s ease-in-out infinite;
}

.floating-card-3 {
  animation: floatC 5.5s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(0.5deg); }
}

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

@keyframes floatC {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

/* ── Product Cards ── */
.product-card {
  transition: transform 0.4s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

/* ── Philosophy Cards ── */
.philosophy-card {
  padding: 2rem 1.5rem;
  border-radius: 1.5rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.philosophy-card:hover {
  background: rgba(167, 243, 208, 0.06);
  transform: translateY(-4px);
}

/* ── Gallery ── */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 63, 0);
  transition: background 0.3s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  background: rgba(10, 31, 63, 0.1);
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

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

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid #34B872;
  outline-offset: 2px;
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
