html {
  scroll-behavior: smooth;
}

::selection {
  background: #C4A87C;
  color: #1a1118;
}

*:focus-visible {
  outline: 2px solid #862633;
  outline-offset: 3px;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Navigation ===== */
#main-nav.scrolled {
  border-bottom: 1px solid rgba(26, 17, 24, 0.07);
  background: rgba(253, 251, 249, 0.985);
  box-shadow: 0 1px 0 rgba(26, 17, 24, 0.02), 0 10px 30px -20px rgba(26, 17, 24, 0.25);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.active {
  max-height: 480px;
}

/* Nav link active state */
.nav-link-active {
  color: #862633;
}
.nav-link-active::after {
  content: "";
  display: block;
  width: 60%;
  height: 2px;
  background: #862633;
  margin-top: 3px;
}

/* ===== Hero staggered entrance ===== */
.hero-stagger-1 { animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.hero-stagger-2 { animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
.hero-stagger-3 { animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both; }
.hero-stagger-4 { animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both; }
.hero-stagger-5 { animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both; }
.hero-stagger-6 { animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both; }

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

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Textures / patterns ===== */
.coaches-texture {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
}

.grid-lines {
  background-image:
    linear-gradient(to right, rgba(26, 17, 24, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 17, 24, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Duplicated marquee row used for ticker bars */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.marquee-track > * {
  flex-shrink: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Camp card dramatic hover ===== */
.camp-card {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.camp-card:hover {
  transform: translateY(-6px);
}
.camp-card:hover .camp-card-image {
  transform: scale(1.04);
}
.camp-card-image {
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== FAQ accordion ===== */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer > div {
  overflow: hidden;
}
.faq-answer.active {
  grid-template-rows: 1fr;
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Pricing cards ===== */
.price-card {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.price-card:hover {
  transform: translateY(-4px);
  border-color: rgba(134, 38, 51, 0.35);
  box-shadow: 0 28px 60px -30px rgba(26, 17, 24, 0.35);
}

/* Feature pill row */
.feature-pill {
  background: linear-gradient(180deg, rgba(245, 240, 235, 0.95) 0%, rgba(245, 240, 235, 0.65) 100%);
}

/* Headline underline stroke */
.stroke-underline {
  background-image: linear-gradient(180deg, transparent 62%, rgba(196, 168, 124, 0.5) 62%);
  padding: 0 0.1em;
}

/* Coach card */
.coach-card {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.coach-card:hover {
  transform: translateY(-6px);
}
.coach-card:hover .coach-card-image {
  transform: scale(1.04);
}
.coach-card-image {
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Gradient divider line */
.hairline {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(26, 17, 24, 0.18) 50%,
    transparent 100%
  );
}

/* Dark hairline for cream bg */
.hairline-maroon {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(134, 38, 51, 0.45) 50%,
    transparent 100%
  );
}

/* Slim custom scrollbar for horizontal gallery */
.hgallery {
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(134, 38, 51, 0.4) transparent;
}
.hgallery::-webkit-scrollbar {
  height: 6px;
}
.hgallery::-webkit-scrollbar-track {
  background: transparent;
}
.hgallery::-webkit-scrollbar-thumb {
  background-color: rgba(134, 38, 51, 0.35);
  border-radius: 999px;
}
.hgallery > * {
  scroll-snap-align: start;
}

/* Detail chip row (hero details) */
.detail-chip {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Print */
@media print {
  #main-nav,
  #mobile-menu-btn {
    display: none;
  }
}

/* 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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-stagger-1,
  .hero-stagger-2,
  .hero-stagger-3,
  .hero-stagger-4,
  .hero-stagger-5,
  .hero-stagger-6 {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .marquee-track {
    animation: none;
  }
}
