/* =========================================================================
   Bounce Back Smart — public pages served by the API (/for-trainers,
   /for-clinics, /affiliates).

   This is the marketing site's design system (bouncebacksmart.com,
   styles.css in the Netlify site source) reduced to the components these
   pages use, so a visitor arriving from the site sees the same site. The
   tokens in :root are copied verbatim from the site; if the site retunes its
   palette, retune this block the same way.

   Served at /public-assets/site.css — on the marketing domain that path is
   proxied to the API, so the same file works on both hosts.
   ========================================================================= */

:root {
  --bg:          #070a12;
  --bg-soft:     #0b111d;
  --bg-ink:      #04060c;
  --surface:     #111726;
  --surface-2:   #161d2f;

  --ink:         #eef1f8;
  --muted:       #98a1b4;
  --faint:       #6b7488;

  --line:        rgba(255,255,255,.08);
  --line-2:      rgba(255,255,255,.14);

  --accent:      #17c1d6;
  --accent-2:    #45e2ee;
  --accent-press:#12a8bc;
  --accent-soft: rgba(23,193,214,.14);
  --glow:        rgba(23,193,214,.40);
  --glow-2:      rgba(69,226,238,.30);
  --success:     #34d8a6;
  --danger:      #ff7a7a;

  --grad: linear-gradient(100deg, var(--accent), var(--accent-2));

  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --radius:      20px;
  --radius-sm:   14px;
  --radius-pill: 999px;
  --maxw: 1160px;
  --gutter: 24px;
  --section-y: 96px;
  --shadow:     0 30px 80px -24px rgba(0,0,0,.7);
  --shadow-sm:  0 10px 30px -12px rgba(0,0,0,.6);
  --ring-inset: inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -8%, rgba(23,193,214,.18), transparent 60%),
    radial-gradient(50% 40% at 8% 4%, rgba(69,226,238,.10), transparent 60%);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 .4em;
  letter-spacing: -0.025em;
  font-weight: 800;
}
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.container--narrow { max-width: 820px; }
.section { padding: var(--section-y) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: var(--bg-ink); }
.section--tight { padding: 72px 0; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .76rem;
  font-weight: 700;
  color: transparent;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  margin: 0 0 16px;
}
.lead { font-size: 1.16rem; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  padding: 13px 28px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #04060c; box-shadow: 0 10px 30px -8px var(--glow), var(--ring-inset); }
.btn--primary:hover { background: var(--accent-press); color: #04060c; box-shadow: 0 16px 44px -8px var(--glow); }
.btn--ghost { background: rgba(255,255,255,.03); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,10,18,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__logo img { height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .98rem; }
.nav__links a:not(.btn):hover, .nav__links a.is-here { color: var(--ink); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 10px; }
.nav__toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }
.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); }

/* ---------- Page hero ---------- */
.page-hero { padding: 92px 0 56px; text-align: center; }
.page-hero .eyebrow { display: block; }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); max-width: 18ch; margin-inline: auto; }
.page-hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero .lead { margin-inline: auto; margin-top: 18px; }
.page-hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.page-hero h1, .page-hero .lead, .page-hero__cta { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.page-hero .lead { animation-delay: .06s; }
.page-hero__cta { animation-delay: .12s; }

/* ---------- Walkthrough video ---------- */
.walk { max-width: 980px; margin: 0 auto; }
.walk__frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-2); background: #05070c; aspect-ratio: 16 / 10;
  box-shadow: 0 40px 90px -30px var(--glow), var(--shadow), var(--ring-inset);
}
.walk__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.walk__cap { text-align: center; color: var(--faint); font-size: .92rem; margin-top: 18px; }

/* Phone-portrait variant, for pages capturing the member app itself rather
   than a landscape trainer/clinic portal. */
.walk--phone .walk__frame { aspect-ratio: 1206 / 2622; max-width: 340px; margin: 0 auto; }

/* ---------- How-to video grid ---------- */
.howto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.howto {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--ring-inset);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.howto:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-sm), var(--ring-inset); }
.howto__frame {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--line-2); background: #05070c; aspect-ratio: 1206 / 2622;
}
.howto__frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.howto h3 { font-size: 1.02rem; margin: 16px 0 6px; }
.howto p { color: var(--muted); margin: 0; font-size: .92rem; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--ring-inset);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-sm), var(--ring-inset); }
.feature__icon {
  width: 50px; height: 50px; border-radius: 14px; background: var(--accent-soft);
  border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 18px; color: var(--accent-2);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.16rem; margin-bottom: .35em; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- Numbered steps ---------- */
.howsteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.howsteps li {
  counter-increment: step; position: relative;
  background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 26px;
}
.howsteps li::before {
  content: counter(step);
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #04060c; font-family: var(--font-display); font-weight: 800;
  box-shadow: 0 10px 30px -8px var(--glow); margin-bottom: 18px;
}
.howsteps h3 { font-size: 1.16rem; margin: 0 0 8px; }
.howsteps p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------- Tick list ---------- */
.tick-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.tick-list li span:last-child { color: var(--muted); }
.tick-list li span:last-child strong { color: var(--ink); }
.tick-list .tick {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--success);
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; margin-top: 2px;
  border: 1px solid var(--line);
}
.who-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.who-grid h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.usecases {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 32px; box-shadow: var(--ring-inset);
}
.usecases h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: 18px; }
.usecases .tick-list { margin: 0; }

/* ---------- Affiliate terms ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 34px; }
.stat {
  background: rgba(255,255,255,.02); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 26px 24px; text-align: center;
}
.stat .n {
  font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .l { color: var(--muted); font-size: .92rem; margin-top: 10px; }
.terms { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.terms li { background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; }
.terms h3 { font-size: 1.02rem; margin: 0 0 6px; }
.terms .body { color: var(--muted); font-size: .96rem; }
.hint { font-size: .88rem; color: var(--faint); margin-top: 8px; }
.hint.ok { color: var(--success); } .hint.err { color: var(--danger); }
.slug-preview { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
.notice {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255,194,75,.08); border: 1px solid rgba(255,194,75,.35); color: #ffd58a; font-size: .95rem;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: rgba(255,255,255,.02); overflow: hidden; transition: border-color .2s ease; }
.faq__item.is-open { border-color: var(--line-2); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink);
  padding: 22px 56px 22px 24px; position: relative;
}
.faq__q::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--accent-2); font-weight: 400; transition: transform .25s;
}
.faq__item.is-open .faq__q::after { content: "\2212"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { color: var(--muted); padding: 0 24px 24px; margin: 0; }
/* Crawlers and reduced-motion readers get the answers open. */
@media (prefers-reduced-motion: reduce) { .faq__a { max-height: none !important; } }

/* ---------- Forms ---------- */
.form-card { background: linear-gradient(180deg, var(--surface), var(--bg-soft)); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--ring-inset); }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field > label .opt { color: var(--faint); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--ink); font-family: var(--font-body); font-size: 1rem; padding: 12px 14px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 20px) 1.2em, calc(100% - 14px) 1.2em; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--surface-2); color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: .94rem; color: var(--ink); }
.agree input { margin-top: 4px; flex: 0 0 auto; width: auto; }
.form-card .btn { width: 100%; margin-top: 10px; }
.form-note { font-size: .85rem; color: var(--faint); margin: 14px 0 0; text-align: center; }
.form-hidden { position: absolute; left: -9999px; top: -9999px; }
.msg { margin-top: 16px; font-size: .96rem; text-align: center; min-height: 1.2em; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--success); font-weight: 600; }

/* ---------- Referral strip / value tiles ---------- */
.refer { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.refer > div { max-width: 640px; }
.refer .eyebrow { margin-bottom: 10px; }
.refer h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.refer .lead { margin: 0; font-size: 1.04rem; }
.refer .btn { flex: 0 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 860px; margin: 34px auto 0; }
.tile { background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px 20px; text-align: center; }
.tile .n { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile .l { color: var(--muted); font-size: .92rem; margin-top: 8px; }
.say { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.say blockquote { margin: 0; background: linear-gradient(180deg, var(--surface), var(--bg-soft)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--ring-inset); color: var(--ink); font-size: 1.02rem; line-height: 1.55; }
.say blockquote small { display: block; margin-top: 14px; color: var(--faint); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--font-display); font-weight: 700; }
@media (max-width: 900px) { .tiles, .say { grid-template-columns: 1fr; } }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 20ch; margin-inline: auto; }
.final-cta .lead { margin: 14px auto 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-ink); padding: 80px 0 42px; border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 36px; margin-bottom: 18px; }
.footer__tag { color: var(--muted); max-width: 280px; }
.footer__mail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; margin-top: 10px; }
.footer__mail:hover { color: var(--accent-2); }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer ul a { color: var(--muted); font-size: .96rem; }
.footer ul a:hover { color: var(--ink); }
.footer__bottom { border-top: 1px solid var(--line); margin-top: 52px; padding-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --section-y: 72px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: rgba(7,10,18,.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 22px; box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 10px 4px; }
  .nav__links .btn { margin-top: 6px; }
  .feature-grid, .howsteps { grid-template-columns: 1fr 1fr; }
  .howto-grid { grid-template-columns: 1fr 1fr; }
  .who-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .feature-grid, .howsteps, .howto-grid, .stat-row, .field-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .page-hero__cta .btn { width: 100%; }
}

/* ---------- Motion / a11y ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
