/* ==========================================================
   Sportify Everyone — Homepage styles
   Mobile-first: base styles target phones, media queries
   progressively enhance for tablet and desktop.
   Animations only touch transform / opacity (plus the
   individual `translate` / `scale` properties) so they stay
   on the compositor and run at 60fps.
   ========================================================== */

/* ---------- Design tokens ---------- */
:root {
  --lime: #BEFF2D;
  --lime-dark: #a8e61f;
  --black: #111111;
  --white: #FFFFFF;
  --navy: #1A1A2E;
  --off-white: #F5F5F5;
  --grey: #8a8a8a;
  --text-muted: #5a5a5a;

  --radius: 24px;
  --radius-sm: 14px;
  --nav-h: 72px;
  --gutter: 20px;

  /* Apple-style easing: fast start, long soft settle */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Shared scroll-reveal transition (delay set per element via --d) */
  --reveal:
    opacity 1s var(--ease) var(--d, 0ms),
    translate 1s var(--ease) var(--d, 0ms);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  scrollbar-width: none; /* Firefox */
}

/* Chrome / Safari / Edge — hides the page scrollbar everywhere;
   internal scroll areas (marquee rows, mobile program slider)
   already hide their own via a dedicated rule. */
::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Lock page scroll while the mobile menu is open */
body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 88px 0; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Section headings with animated lime underline */
.heading {
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72px;
  height: 3px;
  margin-left: -36px;
  border-radius: 3px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 1.1s var(--ease) calc(var(--d, 0ms) + 350ms);
}

.heading.visible::after,
html:not(.js) .heading::after { transform: scaleX(1); }

.section-head-left { text-align: left; }
.section-head-left .heading::after { left: 0; margin-left: 0; transform-origin: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  white-space: nowrap;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.btn:active { transform: scale(0.97); }

.btn-lg { padding: 15px 32px; font-size: 1rem; }

.btn-lime { background: var(--lime); color: var(--black); }
.btn-outline { border-color: rgba(255, 255, 255, 0.85); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); }

.btn-arrow { display: inline-block; transition: transform 0.3s var(--ease); }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn-lime:hover { background: var(--lime-dark); box-shadow: 0 10px 30px -8px rgba(190, 255, 45, 0.6); }
  .btn-outline:hover { background: var(--white); color: var(--black); border-color: var(--white); }
  .btn-dark:hover { background: #262626; box-shadow: 0 14px 30px -10px rgba(17, 17, 17, 0.5); }
  .btn-dark:hover .btn-arrow { transform: translateX(4px); }
}

/* ---------- Apply Now trigger buttons ---------- */
/* Shared by every popup-opening button on the page (navbar, hero,
   featured-program card, program cards, CTA banner). Kept as its
   own component — deliberately reset from scratch — rather than
   layered onto .btn, so it can never inherit a stray browser or
   .btn default. */
.btn-apply {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--black);
  white-space: nowrap;
  transition: transform 250ms ease, box-shadow 250ms ease, background-color 250ms ease, color 250ms ease;
}

/* Arrow lives in CSS, not markup, so every trigger gets exactly
   one regardless of what each button's own HTML used to include */
.btn-apply::after {
  content: "→";
}

@media (hover: hover) {
  .btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(190, 255, 45, 0.35);
  }
}

.btn-apply:active { transform: translateY(0) scale(0.98); }

.btn-apply:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* Navbar: same look, slightly smaller */
.btn-apply--sm { padding: 10px 22px; }

/* CTA banner already has a lime background — invert to a black
   pill with lime text so the button doesn't disappear into it.
   Hover/press/focus behaviour is unchanged. */
.btn-apply--dark {
  background: var(--black);
  color: var(--lime);
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* ==========================================================
   PAGE LOADER + LOAD-IN
   ========================================================== */
.loader { display: none; }

.js .loader {
  position: fixed;
  inset: 0;
  z-index: 2000; /* only element allowed above the navbar, and only briefly */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--black);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.loader-logo {
  height: 64px;
  width: auto;
  animation: loaderPulse 1.4s var(--ease-in-out) infinite;
}

.loader-bar {
  position: relative;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lime);
  transform: translateX(-100%);
  animation: loaderBar 1.2s var(--ease-in-out) infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.96); }
}

@keyframes loaderBar {
  to { transform: translateX(100%); }
}

.loaded .loader {
  opacity: 0;
  visibility: hidden;
}

/* Elements that fade in once the page has loaded (hero) */
.js .load-in {
  opacity: 0;
  translate: 0 24px;
  transition: var(--reveal);
}

.loaded .load-in {
  opacity: 1;
  translate: 0 0;
}

/* ==========================================================
   SCROLL REVEAL (IntersectionObserver adds .visible)
   Uses the individual `translate` property so it never
   conflicts with hover `transform` effects.
   ========================================================== */
.js .fade-in {
  opacity: 0;
  translate: 0 40px;
  transition: var(--reveal);
}

.js .heading.fade-in { translate: 0 56px; }

.js .fade-in.visible {
  opacity: 1;
  translate: 0 0;
}

/* ==========================================================
   1. NAVBAR
   ========================================================== */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000; /* above every page element */
  height: var(--nav-h);
  background: var(--black);
  transition: transform 0.45s var(--ease), box-shadow 0.45s;
}

/* Hidden state toggled by script.js on scroll down */
.navbar.nav-hidden { transform: translateY(-100%); }
.navbar.nav-scrolled { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }

.nav-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo { display: inline-flex; flex-shrink: 0; }
.nav-logo img { height: 40px; width: auto; }

/* ---- Mobile menu: full-height panel under the bar ---- */
.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  padding: 24px var(--gutter) 40px;
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
  overflow-y: auto;
}

.nav-links.open {
  opacity: 1;
  visibility: visible;
}

.nav-links a:not(.btn) {
  color: var(--white);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s;
}

/* Links slide in one by one when the menu opens */
.nav-links > a {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.5s var(--ease), translate 0.5s var(--ease), color 0.2s;
}

.nav-links.open > a { opacity: 1; translate: 0 0; }
.nav-links.open > a:nth-child(1) { transition-delay: 0.05s; }
.nav-links.open > a:nth-child(2) { transition-delay: 0.1s; }
.nav-links.open > a:nth-child(3) { transition-delay: 0.15s; }
.nav-links.open > a:nth-child(4) { transition-delay: 0.2s; }
.nav-links.open > a:nth-child(5) { transition-delay: 0.25s; }
.nav-links.open > a:nth-child(6) { transition-delay: 0.3s; }

.nav-links a:not(.btn):hover,
.nav-links a.active { color: var(--lime); }

.nav-mobile-cta { margin-top: 32px; padding: 16px; font-size: 1.05rem; }
.nav-cta { display: none; }

/* Hamburger */
.nav-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   2. HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  color: var(--white);
  background: var(--black);
  overflow: hidden;
  isolation: isolate; /* keeps hero layers below the navbar */
}

/* Parallax layer — taller than the hero so it never shows a gap */
.hero-bg {
  position: absolute;
  inset: -15% 0;
  z-index: -3;
  background: url("images/hero2.jpeg") center / cover no-repeat;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% 40%, rgba(17, 17, 17, 0.25) 0%, rgba(17, 17, 17, 0.6) 100%),
    linear-gradient(180deg, rgba(17, 17, 17, 0.6) 0%, rgba(17, 17, 17, 0.2) 35%, rgba(17, 17, 17, 0.92) 100%);
}

/* Full-width watermark with a soft vertical gradient fill */
.hero-watermark {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: -1;
  margin-top: -0.55em;
  font-size: 20.3vw; /* fitted so the word spans the full viewport width */
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.06) 70%, rgba(255, 255, 255, 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.js .hero-watermark {
  opacity: 0;
  scale: 1.08;
  transition: opacity 1.6s var(--ease) 0.2s, scale 1.8s var(--ease) 0.2s;
}

.loaded .hero-watermark { opacity: 1; scale: 1; }

.hero-content {
  /* No position:relative here on purpose — .hero-card-wrap needs to
     anchor to .hero (the full-bleed section) on desktop, not to this
     1200px-capped container, so "right: 6%" means 6% of the actual
     viewport at 1920px wide, not 6% of a centered 1200px box. */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 40px;
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 48px;
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 32px;
  /* Parallax fade/shift (script.js) targets this element instead of
     .hero-content — see the JS comment for why */
  will-change: transform, opacity;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  /* No max-width cap here — mobile wraps naturally based on
     the viewport; desktop (≥1024px) is forced to one line below. */
}

/* Word-by-word headline (spans created in script.js) */
.split-words .word {
  display: inline-block;
}

.js .split-words .word {
  opacity: 0;
  translate: 0 0.45em;
  transition:
    opacity 0.9s var(--ease) calc(var(--i) * 90ms + 150ms),
    translate 0.9s var(--ease) calc(var(--i) * 90ms + 150ms);
}

.loaded .split-words .word { opacity: 1; translate: 0 0; }

.hero-sub {
  margin-top: 20px;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 42ch;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---- Floating glass card ---- */
/* Wrapper handles the float; inner card handles the 3D tilt,
   so the two transforms never fight each other. */
.hero-card-wrap {
  align-self: center;
  margin-block: auto; /* centres the card in the free space above the headline */
  perspective: 900px;
  animation: float 6s var(--ease-in-out) infinite;
}

.hero-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 20px 20px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  overflow: hidden;
}

/* CSS-only fallback tilt; script.js overrides --rx/--ry to follow the pointer */
.hero-card:hover { --rx: 6deg; --ry: -8deg; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.hero-card.is-tilting { transition: transform 0.15s linear, box-shadow 0.6s var(--ease); }

.hero-card-body,
.arrow-btn { transform: translateZ(30px); }

/* Light reflection that follows the pointer */
.hero-card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.hero-card:hover .hero-card-glare { opacity: 1; }

.hero-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2px 0 4px;
}

/* Layout only — appearance comes entirely from .btn-apply now */
.hero-card-apply {
  margin: 12px 0 16px;
}

.hero-card-rating { font-weight: 700; font-size: 0.95rem; }
.hero-card-rating span { color: var(--lime); letter-spacing: 0.1em; font-size: 0.8rem; }

.arrow-btn {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--black);
  box-shadow: 0 10px 24px -8px rgba(190, 255, 45, 0.7);
}

.arrow-btn svg { transition: transform 0.4s var(--ease); }
.hero-card:hover .arrow-btn svg { transform: rotate(45deg); }

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

/* ---- Bottom-right stats widget ---- */
.hero-widget {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-widget strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-widget span {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.hero-widget strong span { display: inline; margin: 0; font-size: inherit; color: inherit; }

.widget-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.3);
}

/* ---- Scroll cue (desktop) ---- */
.scroll-cue { display: none; }

/* ==========================================================
   3. STATS BAR
   ========================================================== */
.stats {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}

.stats-grid {
  display: grid;
  gap: 36px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.stat > span {
  display: block;
  margin-top: 10px;
  font-weight: 500;
  color: var(--white);
}

/* ==========================================================
   4. PROGRAMS
   ========================================================== */
.programs { background: var(--white); }
.programs .section-head { margin-bottom: 40px; }

/* Mobile: horizontal swipe slider with scroll-snap */
.programs-grid {
  position: relative; /* offsetParent for slider-dot maths */
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 12px var(--gutter) 28px;
  margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.programs-grid::-webkit-scrollbar { display: none; }

.program-card {
  position: relative;
  flex: 0 0 84%;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  scroll-snap-align: start;
  box-shadow: 0 10px 30px -18px rgba(17, 17, 17, 0.4);
  transition:
    var(--reveal),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

/* Photo background — a div, not an <img>, so it can carry two
   layered background-images (see the HTML comment above the cards):
   the real photo on top, the original photo underneath as a fallback
   that shows through cleanly if the top file doesn't exist yet. */
.card-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: saturate(1.15) brightness(1.05);
  transition: transform 400ms var(--ease);
}

/* Shorter, lighter bottom-only gradient — just enough to keep the
   text readable without shading the top ~65% of the photo at all */
.program-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 40%);
}

@media (hover: hover) {
  .program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -18px rgba(17, 17, 17, 0.4);
  }

  .program-card:hover .card-bg { transform: scale(1.04); }
}

/* Coming soon: slightly greyed, still clearly readable */
.program-card.is-soon .card-bg { filter: grayscale(0.85) brightness(0.8); }
.program-card.is-soon .card-content { opacity: 0.88; }

.badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-lime { background: var(--lime); color: var(--black); }

.badge-soon {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.program-icon {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--lime);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.program-icon svg { width: 18px; height: 18px; }

/* Text block sits in only the bottom slice of the card — see the
   ≥960px override below for the "one line, no wrap" desktop rule */
.card-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.card-content p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* "Learn More" here is a small lime text link, not the solid
   .btn-apply pill used everywhere else — same trigger, same click
   behaviour, just a lighter visual treatment over a photo. */
.program-card .btn-apply {
  background: none;
  color: var(--lime);
  padding: 0;
  border-radius: 0;
  font-size: 0.85rem;
}

.program-card .btn-apply::after { transition: transform 0.3s var(--ease); }

@media (hover: hover) {
  .program-card .btn-apply:hover {
    transform: none;
    box-shadow: none;
    background: none;
  }

  .program-card .btn-apply:hover::after { transform: translateX(4px); }
}

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.18);
  cursor: pointer;
  transition: width 0.4s var(--ease), background-color 0.3s;
}

.slider-dots button[aria-selected="true"] {
  width: 26px;
  background: var(--black);
}

/* ==========================================================
   4a. CAMP TYPES
   ========================================================== */
.camp-types { background: var(--white); }
.camp-types .section-head { margin-bottom: 40px; }

.camp-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.camp-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.35s var(--ease);
}

/* Div with two layered background-images (see the HTML comment
   above the grid): the real photo on top, the current placeholder
   underneath as a fallback if the top file doesn't exist yet. */
.camp-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: saturate(1.15) brightness(1.05);
  transition: transform 0.5s var(--ease);
}

.camp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Same bright, bottom-only treatment as the Programs cards */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 55%);
}

.camp-card-title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

@media (hover: hover) {
  .camp-card:hover { border-color: var(--lime); }
  .camp-card:hover .camp-card-bg { transform: scale(1.08); }
}

/* ==========================================================
   4b. PROGRAM HIGHLIGHTS
   ========================================================== */
.highlights { background: var(--white); }
.highlights .section-head { margin-bottom: 40px; }

/* Highlighter-pen effect: lime covers the lower ~55% of the text's
   own line box (not a full pill), with black text on top — reads as
   a real marker stroke rather than a lime-on-white label. */
.marker-highlight {
  background: linear-gradient(to top, var(--lime) 0%, var(--lime) 55%, transparent 55%);
  padding: 0 2px;
  color: var(--black);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Smaller than the generic .heading scale, and balanced across two
   lines on small phones instead of a single long/short split */
.highlights-heading {
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  text-wrap: balance;
}

@media (min-width: 768px) {
  .highlights-heading { white-space: nowrap; }
}

.highlights-grid {
  display: grid;
  gap: 20px;
}

/* Quick, snappy slide-in from the right — deliberately short
   and linear-feeling (ease-out) so it never feels sluggish */
.js .slide-right {
  opacity: 0;
  translate: 40px 0;
  transition: opacity 0.2s ease-out var(--d, 0ms), translate 0.2s ease-out var(--d, 0ms);
}

.js .slide-right.visible { opacity: 1; translate: 0 0; }

.highlight-card {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--off-white);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (hover: hover) {
  .highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -26px rgba(17, 17, 17, 0.25);
  }
}

.highlight-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--black);
  margin-bottom: 20px;
}

.highlight-icon svg { width: 26px; height: 26px; }

.highlight-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.highlight-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================
   4c. ACTIVITIES (marquee)
   ========================================================== */
.activities {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.activities .eyebrow { color: var(--lime); }
.activities .section-head { margin-bottom: 48px; }

.activities-sub {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
}

/* Two independent rows, stacked, each scrolling its own way */
.marquee-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Desktop: continuous auto-scroll. Each row's track is duplicated
   by script.js, then translated exactly -50% for a seamless loop;
   row 2 runs the same keyframes in reverse. */
.marquee {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 14px;
  padding: 0 var(--gutter);
}

.pill {
  flex-shrink: 0;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(190, 255, 45, 0.4);
  background: rgba(190, 255, 45, 0.06);
  color: var(--lime);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Photo "polaroid" cards for activities with a real photo.
   Fixed 150×195 (140 image + 55 white caption area) so every
   card in the row is pixel-identical; the tilt lives in a
   custom property so the hover rule (which needs to win)
   doesn't have to out-specificity the nth-child rule that
   sets it. */
.polaroid {
  --tilt: -2deg;
  flex-shrink: 0;
  width: 150px;
  height: 195px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

/* Alternate the tilt regardless of what type of item comes before it */
.marquee-track > .polaroid:nth-child(odd)  { --tilt: -2deg; }
.marquee-track > .polaroid:nth-child(even) { --tilt: 2deg; }

.polaroid img {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

/* Caption sits in the remaining 55px below the photo, inside
   the white card — never overlapping the image itself */
.polaroid figcaption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #111111;
}

@media (hover: hover) {
  .polaroid:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.04);
    box-shadow: 0 26px 44px -18px rgba(0, 0, 0, 0.55);
    z-index: 1;
  }
}

/* Mobile / tablet: a plain swipeable strip, no auto-scroll.
   touch-action: pan-x is the key fix — it tells the browser
   this element only ever handles horizontal panning, so a
   swipe that starts here doesn't get "claimed" and can still
   fall through to the page's normal vertical scroll. */
.marquee,
.activities-track {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  scrollbar-width: none;
}

.marquee::-webkit-scrollbar,
.activities-track::-webkit-scrollbar { display: none; }

.pill,
.polaroid { scroll-snap-align: start; }

/* Below desktop there's no auto-scroll, so hide the cloned pills
   (added by script.js for the seamless loop) to avoid repeats */
.marquee-track [aria-hidden="true"] { display: none; }

/* ==========================================================
   5. APPLICATION PROCESS ("How It Works" replacement)
   Mobile-first: a simple vertical timeline with the line on
   the left. The ≥960px query below turns it into a horizontal
   line with cards alternating above/below.
   ========================================================== */
.how { background: var(--off-white); }

/* .timeline is just the positioning context + the line — the actual
   flex row/column of numbered steps is .timeline-list, a separate
   element, so the plane (a sibling, not a 6th <li>) can be laid out
   and absolutely positioned independently of it. */
.timeline {
  position: relative;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* The connecting line — vertical on mobile, horizontal on desktop */
.timeline::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(180deg, #d3d3d3 0 8px, transparent 8px 14px);
}

.timeline-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.timeline-num {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--black);
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--off-white), 0 10px 22px -8px rgba(140, 200, 0, 0.7);
  transition: transform 0.4s var(--ease);
}

.js .timeline-num { scale: 0.6; transition: scale 0.8s var(--ease) var(--d, 0ms), transform 0.4s var(--ease); }
.js .timeline-step.visible .timeline-num { scale: 1; }

/* Step 6: same circle as every other step, just an icon instead
   of a digit — a clean minimal plane, not a separate animated set-piece */
.timeline-num--icon svg { width: 20px; height: 20px; }

@media (hover: hover) {
  .timeline-step:hover .timeline-num { transform: translateY(-4px); }
}

.timeline-card {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 34px -20px rgba(17, 17, 17, 0.35);
  padding: 18px 20px;
}

.timeline-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================
   5b. APPLY (embedded form)
   Also used standalone as the first section on apply.html —
   the extra top padding there clears the fixed navbar, since
   (unlike index.html's hero) nothing else does that for it.
   ========================================================== */
.apply-form {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding-top: calc(var(--nav-h) + 88px);
}

.apply-form-sub {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
}

.apply-form-card {
  position: relative;
  margin: 40px auto 0;
  max-width: 760px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(190, 255, 45, 0.25), 0 20px 60px rgba(0, 0, 0, 0.35);
  /* Tally's dynamic-height resize changes the iframe's height as the
     visitor moves between form pages — this smooths that out. */
  transition: height 300ms ease;
}

.apply-form-card iframe { vertical-align: top; }

/* Spinner shown until the iframe's `load` event fires (script.js) */
.apply-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(190, 255, 45, 0.25);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: applySpin 0.8s linear infinite;
  transition: opacity 300ms ease-out;
  pointer-events: none;
}

.apply-spinner.is-hidden { opacity: 0; }

@keyframes applySpin {
  to { transform: rotate(360deg); }
}

/* Page-load fade + rise for the card, using the shared .load-in
   mechanism (gated behind .js, so a JS failure just shows the card
   plainly instead of hiding it) but with its own quicker timing. */
.js .apply-form-card.load-in {
  translate: 0 20px;
  /* `transition` is a shorthand — this list has to include the base
     rule's `height` entry too, or this higher-specificity rule would
     silently replace it instead of adding to it. */
  transition: opacity 400ms ease-out, translate 400ms ease-out, height 300ms ease;
}

/* "Form not loading?" fallback line under the card */
.apply-form-help {
  margin: 24px auto 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.apply-form-help a {
  color: var(--lime);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apply-form-help a:hover { color: var(--white); }

/* ==========================================================
   6. WHY CHOOSE US
   ========================================================== */
.why {
  /* Soft dark-overlay photo background — the gradient alone is
     the fallback tint if the image is ever missing, so the section
     never goes fully transparent/broken. */
  background:
    linear-gradient(rgba(26, 26, 46, 0.88), rgba(26, 26, 46, 0.93)),
    url("images/sportify-pics/zipline.jpeg") center / cover no-repeat;
  background-color: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.why .eyebrow { color: var(--lime); }

.why-layout {
  display: grid;
  gap: 72px;
}

/* Photo collage */
.why-media {
  position: relative;
  padding-bottom: 40px;
}

.why-img-main {
  width: 86%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 35% center;
  border-radius: var(--radius);
}

.why-img-small {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  border: 6px solid var(--navy);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.why-chip {
  position: absolute;
  top: 24px;
  right: 4%;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--lime);
  color: var(--black);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6);
}

.why-chip strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.why-chip > span { font-size: 0.8rem; font-weight: 600; }

.why-content .section-head { margin-bottom: 24px; }

.why-item {
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.why-item:last-child { border-bottom: 0; }

.why-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(190, 255, 45, 0.12);
  color: var(--lime);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}

.why-icon svg { width: 27px; height: 27px; }

@media (hover: hover) {
  .why-item:hover .why-icon { transform: translateY(-3px) rotate(-6deg); background: rgba(190, 255, 45, 0.2); }
}

.why-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.why-item p { color: rgba(255, 255, 255, 0.68); }

/* ==========================================================
   7. TESTIMONIALS (auto-rotating, white background)
   ========================================================== */
.testimonials { background: var(--white); }

/* Arrows flank the quote on both sides at every width */
.testimonial-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
}

.testimonial-nav {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--lime);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.testimonial-nav svg { width: 18px; height: 18px; }

@media (hover: hover) {
  .testimonial-nav:hover {
    background: var(--lime);
    color: var(--black);
    transform: scale(1.08);
  }
}

.testimonial-nav:active { transform: scale(0.94); }

/* Grid-stacking trick: every slide occupies the same cell, so
   the container sizes to the tallest quote and swapping the
   active one never shifts the page layout. */
.testimonial-slider {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 820px;
  margin: 0 auto;
}

.testimonial-slide {
  grid-area: 1 / 1;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}

.testimonial-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease) 0.1s, visibility 0s linear;
}

.quote-mark {
  display: block;
  font-size: 8rem;
  line-height: 0.8;
  height: 72px;
  font-weight: 800;
  color: var(--lime);
}

.testimonial-slide blockquote {
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

/* Longer quotes get a smaller size so they read as a paragraph
   rather than a giant pull-quote — the grid-stacking trick above
   already sizes the container to the tallest slide once, so this
   doesn't reintroduce any layout jump when the slider rotates. */
.testimonial-slide.is-long blockquote {
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}

.testimonial-slide figcaption { margin-top: 28px; }
.testimonial-slide figcaption strong { display: block; font-size: 1.05rem; }
.testimonial-slide figcaption span { color: var(--grey); font-size: 0.95rem; }

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.testimonial-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #dcdcdc;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s var(--ease);
}

.testimonial-dots button[aria-selected="true"] {
  background: var(--lime);
  transform: scale(1.35);
}

/* ==========================================================
   7b. CIEE PARTNERSHIP BADGE
   ========================================================== */
.ciee-badge {
  background: var(--off-white);
  padding: 64px 0;
}

.ciee-badge-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.accent-line {
  display: block;
  width: 48px;
  height: 3px;
  margin: 0 auto 20px;
  border-radius: 3px;
  background: var(--lime);
}

.ciee-badge-inner .eyebrow { margin-bottom: 18px; }

.ciee-pill {
  display: inline-block;
  padding: 14px 28px;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.ciee-sub {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================
   8. CTA BANNER
   ========================================================== */
.cta {
  background: var(--lime);
  color: var(--black);
  padding: 80px 0;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.cta h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

/* ==========================================================
   9. FOOTER
   ========================================================== */
.footer {
  background: var(--black);
  color: var(--white);
  padding-top: 60px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding-bottom: 40px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--lime); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- Footer social / contact icons ---- */
.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-social a:hover {
  color: var(--lime);
  background: #22223f;
  transform: translateY(-3px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(190, 255, 45, 0.15);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  padding-bottom: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--grey);
  font-size: 0.875rem;
}

/* ==========================================================
   FLOATING CONTACT BUTTONS
   ========================================================== */
.float-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.float-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.float-btn svg { width: 26px; height: 26px; }

.float-email { background: var(--navy); }
.float-whatsapp { background: #25D366; }

@media (hover: hover) {
  .float-btn:hover { transform: translateY(-3px) scale(1.05); }
}

.float-btn:active { transform: scale(0.95); }

/* Soft pulsing glow so the WhatsApp button draws the eye without being loud */
.float-whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: #25D366;
  animation: whatsappPulse 2.6s var(--ease-in-out) infinite;
}

@keyframes whatsappPulse {
  0%   { opacity: 0.55; scale: 1; }
  70%  { opacity: 0; scale: 1.7; }
  100% { opacity: 0; scale: 1.7; }
}

/* Tooltip: label on the left, revealed on hover/focus */
.float-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  translate: 0 -50%;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease);
}

.float-tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  translate: 0 -50%;
  border: 6px solid transparent;
  border-left-color: var(--black);
}

.float-btn:hover .float-tooltip,
.float-btn:focus-visible .float-tooltip {
  opacity: 1;
  translate: -6px -50%;
}

@media (prefers-reduced-motion: reduce) {
  .float-whatsapp::after { display: none; }
}

/* Keep both floating buttons clear of mobile browser chrome */
@media (max-width: 639px) {
  .float-contact { right: 16px; bottom: 16px; }
  .float-btn { width: 48px; height: 48px; }
  .float-btn svg { width: 24px; height: 24px; }
}

/* ==========================================================
   RESPONSIVE — Tablet (≥ 640px)
   ========================================================== */
@media (min-width: 640px) {
  :root { --gutter: 32px; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); }

  .program-card { flex-basis: 46%; }

  .highlights-grid { grid-template-columns: repeat(3, 1fr); }

  .camp-types-grid { grid-template-columns: repeat(4, 1fr); }

  .testimonial-wrap { gap: 28px; }
  .testimonial-nav { width: 48px; height: 48px; }
  .testimonial-nav svg { width: 20px; height: 20px; }

  .steps { grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }

  .why-media { max-width: 560px; margin: 0 auto; }
}

/* ==========================================================
   RESPONSIVE — Desktop (≥ 960px)
   ========================================================== */
@media (min-width: 960px) {
  .section { padding: 128px 0; }

  /* Navbar: inline links, hide hamburger */
  .nav-toggle,
  .nav-mobile-cta { display: none; }

  .nav-cta { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    height: auto;
    transform: translate(-50%, -50%); /* truly centred between logo and CTA */
    flex-direction: row;
    gap: 36px;
    padding: 0;
    background: none;
    border: 0;
    opacity: 1;
    visibility: visible;
    overflow: visible;
  }

  .nav-links > a { opacity: 1; translate: 0 0; }

  .nav-links a:not(.btn) {
    position: relative;
    padding: 6px 0;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
    border: 0;
    color: rgba(255, 255, 255, 0.78);
  }

  /* Small lime underline on nav hover / active */
  .nav-links a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--lime);
    transform: scaleX(0);
    transition: transform 0.35s var(--ease);
  }

  .nav-links a:not(.btn):hover::after,
  .nav-links a.active::after { transform: scaleX(1); }

  /* Hero layout: text bottom-left, widget bottom-right */
  .hero { min-height: max(100svh, 760px); }

  /* A bit less bottom padding nudges the whole text block lower */
  .hero-content { padding-bottom: 40px; }

  .hero-bottom {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  /* Featured-program card: off the top-center flow entirely, pinned
     to the upper-right of the hero instead. Anchors to .hero (see
     the note on .hero-content) so the percentages hold at any width. */
  .hero-card-wrap {
    position: absolute;
    top: 36%;
    right: 6%;
    left: auto;
    margin: 0;
    align-self: auto;
  }

  .hero-widget {
    padding: 22px 28px;
    border-radius: var(--radius);
    background: rgba(17, 17, 17, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .hero-widget strong { font-size: 2.5rem; }

  .scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    display: block;
    width: 24px;
    height: 38px;
    margin-left: -12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
  }

  .scroll-cue span {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--lime);
    animation: scrollCue 1.8s var(--ease-in-out) infinite;
  }

  @keyframes scrollCue {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
  }

  /* Programs: 3 on top, 2 centred below */
  .programs-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .program-card {
    flex: 0 0 calc((100% - 48px) / 3);
    /* Fixed ratio + a height cap, not min-height — this is what
       keeps a full row visible on a 1366×768 / 1440×900 laptop
       instead of pushing the fold down. min-height:0 resets the
       mobile base rule, which would otherwise win over aspect-ratio. */
    min-height: 0;
    aspect-ratio: 4 / 3;
    max-height: 340px;
  }

  /* Description never wraps on desktop — ellipsis is just the
     safety net if a future line is ever too long for the card */
  .card-content p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .slider-dots { display: none; }

  /* Marquee: switch from swipe-scroll to a continuous auto-scroll loop.
     The track is rendered twice by script.js so translating -50%
     loops seamlessly; duration is tuned to stay readable. */
  .marquee,
  .activities-track { overflow: hidden; touch-action: auto; }

  .marquee-track [aria-hidden="true"] { display: flex; }

  .js .marquee-track {
    /* transform (not margin/left) keeps this on the compositor;
       will-change hints the browser to promote it to its own
       layer up front, avoiding a jank spike on the first frame */
    animation: marqueeScroll 35s linear infinite;
    will-change: transform;
  }

  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* Second row runs the same loop backwards for a two-way effect */
  .marquee-rows .marquee:nth-child(2) .marquee-track {
    animation-direction: reverse;
  }

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

  /* Application process: horizontal timeline, cards alternating
     above/below a centre line; the plane sits at the end instead
     of the arrowhead a normal step-6 circle would have had. */
  .timeline-list {
    flex-direction: row;
    height: 320px;
    gap: 0;
  }

  .timeline::before {
    left: 0;
    right: 14px;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(90deg, #d3d3d3 0 8px, transparent 8px 14px);
  }

  .timeline-step {
    flex: 1;
    justify-content: center;
    align-items: center;
  }

  .timeline-card {
    position: absolute;
    left: 50%;
    width: 200px;
    translate: -50% 0;
  }

  /* Odd steps (1, 3, 5) sit above the line; even (2, 4, 6) below */
  .timeline-step:nth-child(odd) .timeline-card { bottom: calc(50% + 34px); }
  .timeline-step:nth-child(even) .timeline-card { top: calc(50% + 34px); }

  /* Why: collage left, content right */
  .why-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 96px;
  }

  .why-media { max-width: none; margin: 0; }

  .cta-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .testimonial { padding: 160px 0; }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ==========================================================
   RESPONSIVE — Hero one-liners (≥ 1024px only, narrower than
   the general ≥960px desktop breakpoint above on purpose)
   ========================================================== */
@media (min-width: 1024px) {
  .hero-text h1,
  .hero-sub {
    white-space: nowrap;
  }
}

/* ==========================================================
   MOBILE FIXES (≤ 768px)
   Placed after the tablet (≥640px) and desktop (≥960px)
   blocks so it wins the cascade for any width it targets.
   Desktop (≥960px) is untouched — this query never reaches it.
   ========================================================== */
@media (max-width: 768px) {
  :root { --gutter: 20px; }

  /* Consistent, less cramped section spacing on small screens */
  .section { padding: 40px 0; }

  /* apply.html: keep navbar clearance, just with tighter spacing */
  .apply-form { padding-top: calc(var(--nav-h) + 40px); }

  /* apply.html card: exactly 16px from the viewport edge, regardless
     of --gutter above, and never wider than the screen allows */
  .apply-form-card {
    margin-left: calc(-1 * var(--gutter) + 16px);
    margin-right: calc(-1 * var(--gutter) + 16px);
  }

  /* Programs: single column, full width, no horizontal scroll —
     overrides the tablet 46%-flex-basis slider for this range */
  .programs-grid {
    display: block;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .program-card {
    flex: none;
    width: 100%;
    min-height: 380px;
    margin-bottom: 16px;
  }

  .program-card:last-child { margin-bottom: 0; }

  .slider-dots { display: none; }

  /* Activities: force the auto-scroll off (it's already gated to
     ≥960px, this just makes the intent explicit) and give pills
     a taller, easier-to-tap hit area */
  .js .marquee-track { animation: none !important; }

  .pill { padding: 14px 24px; }
}

/* ==========================================================
   APPLY NOW POPUP
   Desktop: centred sheet, scale + fade. Mobile: bottom sheet,
   slides up. Both use independent translate/scale properties
   (not the transform shorthand) so nothing else has to fight
   over which one "owns" transform.
   ========================================================== */
body.modal-open { overflow: hidden; }

.apply-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.apply-modal[hidden] { display: none; }

.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  opacity: 0;
  transition: opacity 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.apply-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.65);
  padding: 32px 28px 28px;
  color: var(--white);
  opacity: 0;
  scale: 0.94;
  transition:
    opacity 450ms cubic-bezier(0.22, 1, 0.36, 1),
    scale 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.apply-modal.is-open .apply-modal-backdrop { opacity: 1; }
.apply-modal.is-open .apply-modal-sheet { opacity: 1; scale: 1; }

/* Closing runs the same transitions in reverse, just faster */
.apply-modal.is-closing .apply-modal-backdrop,
.apply-modal.is-closing .apply-modal-sheet {
  transition-duration: 250ms;
}

.apply-modal-handle {
  display: none;
  width: 40px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.apply-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.apply-modal-close svg { width: 16px; height: 16px; }

@media (hover: hover) {
  .apply-modal-close:hover { background: var(--lime); color: var(--black); }
}

.apply-modal-close:active { transform: scale(0.92); }

.apply-modal-sheet h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding-right: 28px;
}

.apply-modal-sheet > p {
  margin-top: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.apply-modal-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Rows stagger in 60ms apart, gated the same way every other
   reveal on the site is — opacity/translate only, no dependency
   the popup itself doesn't already guarantee */
.apply-modal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  opacity: 0;
  translate: 0 12px;
  transition:
    opacity 300ms var(--ease) calc(var(--i, 0) * 60ms + 120ms),
    translate 300ms var(--ease) calc(var(--i, 0) * 60ms + 120ms),
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.apply-modal.is-open .apply-modal-row { opacity: 1; translate: 0 0; }

.apply-modal-row-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.apply-modal-row-icon svg { width: 22px; height: 22px; }

.apply-modal-row-text { flex: 1; min-width: 0; }
.apply-modal-row-text strong { display: block; font-size: 1rem; font-weight: 700; }
.apply-modal-row-text span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

.apply-modal-row-arrow {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

@media (hover: hover) {
  .apply-modal-row:hover {
    border-color: rgba(190, 255, 45, 0.6);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -14px rgba(190, 255, 45, 0.4);
  }

  .apply-modal-row:hover .apply-modal-row-icon { background: var(--lime); color: var(--black); }
  .apply-modal-row:hover .apply-modal-row-arrow { color: var(--lime); transform: translateX(4px); }
}

.apply-modal-row:focus-visible {
  outline: none;
  border-color: var(--lime);
}

.apply-modal-row:active { transform: scale(0.98); }

/* Mobile: bottom sheet that slides up instead of scaling in */
@media (max-width: 640px) {
  .apply-modal { align-items: flex-end; padding: 0; }

  .apply-modal-sheet {
    max-width: none;
    max-height: 88vh;
    border-radius: 28px 28px 0 0;
    padding-top: 14px;
    scale: 1;
    translate: 0 100%;
    transition: opacity 450ms cubic-bezier(0.22, 1, 0.36, 1), translate 450ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .apply-modal.is-open .apply-modal-sheet { translate: 0 0; }

  .apply-modal.is-closing .apply-modal-sheet { transition-duration: 250ms; }

  .apply-modal-handle { display: block; }

  .apply-modal-close { top: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .hero-bg,
  .hero-watermark,
  .hero-content { transform: none !important; }

  /* The popup keeps a real (short) fade instead of collapsing to
     ~0ms like everything else — "fade only, no springy motion" */
  .apply-modal-backdrop,
  .apply-modal-sheet {
    transition: opacity 200ms ease !important;
    scale: 1 !important;
    translate: 0 0 !important;
  }
}
