/* ============================================================
   CoachJSD — Media system + audit fixes (loaded LAST, can override)
   Original stylized imagery (no third-party photos), mobile polish, a11y
   ============================================================ */

/* ---------- AUDIT FIX #3: anchor links land below fixed nav ---------- */
html { scroll-padding-top: 96px; }

/* ---------- AUDIT FIX #5: visible keyboard focus ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, .faq-q:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Shared "photo" surface ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #e9eefb 0%, #d3ddf4 100%);
}
.media::before { /* soft vignette for depth */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 30% 15%, rgba(255,255,255,.5), transparent 55%),
              radial-gradient(120% 90% at 80% 100%, rgba(10,30,80,.18), transparent 60%);
  pointer-events: none;
}
.media-dark { background: linear-gradient(150deg, #1b2233 0%, #0a0d14 100%); }
.media-blue { background: linear-gradient(150deg, #2f6bff 0%, #0a2a99 100%); }

/* ---------- AUDIT FIX #6: real Before/After card ---------- */
.ba {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  isolation: isolate;
}
.ba-side { position: relative; overflow: hidden; }
.ba-before {
  background: linear-gradient(160deg, #7c8aa8 0%, #55627d 100%);
}
.ba-after {
  background: linear-gradient(160deg, #2f6bff 0%, #123a9e 100%);
}
/* the human silhouette */
.ba-side::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -6%;
  width: 78%; height: 92%;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.25));
}
.ba-before::after { background-image: url("img/figure-before.svg"); opacity: .85; }
.ba-after::after  { background-image: url("img/figure-after.svg"); opacity: .95; }
/* subtle floor glow under the "after" */
.ba-after::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 40% at 50% 100%, rgba(120,160,255,.55), transparent 70%);
}
.ba-tag {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: rgba(10,13,20,.42); backdrop-filter: blur(6px);
  padding: 6px 11px; border-radius: 100px;
}
.ba-after .ba-tag { left: auto; right: 14px; background: rgba(10,30,90,.5); }
/* center divider + handle (before/after slider look) */
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 4;
  width: 3px; transform: translateX(-50%);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.ba-handle {
  position: absolute; top: 50%; left: 50%; z-index: 5;
  width: 42px; height: 42px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; color: var(--blue-600);
  display: grid; place-items: center; font-size: 1rem; font-weight: 800;
  box-shadow: 0 6px 18px rgba(10,20,60,.28);
}

/* ---------- Avatars (AUDIT FIX #7) ---------- */
.av {
  display: grid; place-items: center;
  border-radius: 50%; color: #fff; font-family: var(--display);
  font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(140deg, #2f6bff, #123a9e);
  flex-shrink: 0;
}
.av-2 { background: linear-gradient(140deg, #16b8a6, #0b7c74); }
.av-3 { background: linear-gradient(140deg, #6b5bff, #3a2b9e); }
.av-4 { background: linear-gradient(140deg, #ff7043, #c1451f); }
.av-5 { background: linear-gradient(140deg, #1b2233, #0a0d14); }
.quote .av { width: 46px; height: 46px; font-size: 1rem; }

/* ---------- Logo wordmarks ---------- */
.logo-mark {
  display: grid; place-items: center; height: 40px; padding: 0 22px;
  border-radius: 10px; background: #fff; border: 1px solid var(--line);
  font-family: var(--display); font-weight: 800; letter-spacing: -.01em;
  color: #9aa3b8; font-size: 1rem; white-space: nowrap;
}

/* ---------- Product / program tiles with icon motif ---------- */
.tile {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.tile-ic {
  width: 30%; max-width: 88px; opacity: .9;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.18));
}
.tile-pattern::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.5px, transparent 1.6px);
  background-size: 18px 18px; opacity: .5;
}

/* ---------- HERO scene (AUDIT FIX #1 + #4) ---------- */
.hero { min-height: 100svh; }
.hero-bg {
  background:
    radial-gradient(90% 70% at 78% 30%, rgba(47,107,255,.55), transparent 60%),
    radial-gradient(70% 60% at 15% 85%, rgba(90,134,255,.28), transparent 60%),
    linear-gradient(155deg, #0c1224 0%, #060912 60%, #0a1030 100%);
}
/* abstract athlete silhouette on the right + grid texture */
.hero-figure {
  position: absolute; right: 4%; bottom: 0; z-index: 1;
  width: min(46vw, 560px); height: 92%;
  background: url("img/figure-after.svg") no-repeat bottom center;
  background-size: contain;
  opacity: .14;
  filter: blur(.3px);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 1; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 40%, transparent 85%);
}
.hero-avatars .av { width: 44px; height: 44px; font-size: .85rem; border: 2px solid rgba(255,255,255,.9); margin-left: -12px; }
.hero-avatars .av:first-child { margin-left: 0; }

/* ---------- Coach portrait ---------- */
.coach-portrait {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-xl); overflow: hidden;
  background: linear-gradient(160deg, #2a3346 0%, #0a0d14 100%);
}
.coach-portrait::before { /* backdrop glow */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 55% at 50% 20%, rgba(47,107,255,.5), transparent 65%);
}
.coach-portrait::after { /* silhouette */
  content: ""; position: absolute; left: 50%; bottom: -4%;
  width: 82%; height: 96%; transform: translateX(-50%);
  background: url("img/figure-after.svg") no-repeat bottom center;
  background-size: contain; opacity: .96;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.4));
}
.coach-portrait .coach-badge {
  position: absolute; left: 20px; bottom: 20px; z-index: 3;
  background: rgba(255,255,255,.14); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25); color: #fff;
  padding: 12px 18px; border-radius: 16px;
}
.coach-portrait .coach-badge strong { font-family: var(--display); font-size: 1.05rem; display: block; }
.coach-portrait .coach-badge span { font-size: .82rem; color: rgba(255,255,255,.8); }

/* ---------- AUDIT FIX #8: sticky mobile CTA bar ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.86); backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--line);
}
.mobile-cta .btn { flex: 1; padding: 15px; }

/* ============================================================
   RESPONSIVE — sleek phone experience
   ============================================================ */
@media (max-width: 860px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 76px; } /* room for the sticky bar */
  .footer { padding-bottom: 90px; }

  /* AUDIT FIX #10: tighter, cleaner rhythm on phones */
  .section { padding: 60px 0; }
  .head { margin-bottom: 36px; }
  .display { font-size: clamp(2.3rem, 10vw, 3rem); }
  h2 { font-size: clamp(1.8rem, 7vw, 2.3rem); }

  .hero-inner { padding-top: 130px; padding-bottom: 96px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-figure { opacity: .1; width: 70vw; }

  /* larger tap targets */
  .nav-links a, .footer a { padding: 4px 0; }
  .btn { min-height: 48px; }

  .coach-inner { gap: 28px; }
  .ba { aspect-ratio: 4/5; }
}

@media (max-width: 520px) {
  .section { padding: 52px 0; }
  .quote { padding: 26px 22px; }
  .ba-handle { width: 36px; height: 36px; }
  .prog-body, .shop-body { padding: 22px; }
}

/* remove old placeholder label text where real media now lives */
.media::after, .tile::after { content: none; }

/* ============================================================
   REAL PHOTO before/after cards
   ============================================================ */
.ba.photo .ba-side { background: #0a0d14; }
.ba.photo .ba-side::after { content: none; }
.ba.photo .ba-after::before { display: none; }
.ba.photo .ba-side img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
}
.ba.photo .ba-tag { background: rgba(10,13,20,.62); z-index: 3; }

/* CTA tile that sits in the transformation gallery */
.ba-cta {
  aspect-ratio: 3/4; border-radius: var(--radius-lg); display: grid; place-items: center;
  text-align: center; background: linear-gradient(160deg, #123a9e 0%, #2f6bff 100%);
  color: #fff; padding: 26px;
}
.ba-cta .n { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem,4vw,2.8rem); line-height: 1; }
.ba-cta .t { margin-top: 10px; font-weight: 600; opacity: .92; }
.ba-cta .go {
  margin-top: 18px; display: inline-flex; padding: 11px 20px; border-radius: 100px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.32);
  font-weight: 600; font-size: .92rem;
}

/* Featured transformations band (transformations page) */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 56px; }
.feat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.feat-card .ba { aspect-ratio: 5/4; border-radius: 0; }
.feat-body { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.feat-body h3 { font-size: 1.2rem; }
@media (max-width: 860px) { .feat { grid-template-columns: 1fr; } }
