/* ============================================================
   Military Workout Funnel — theme
   Mobile-first. Dark. Orange accent. Compact (tight spacing).
   ============================================================ */
:root {
  --bg: #111111;
  --bg-card: #2c2c2e;
  --bg-card-hover: #38383a;
  --bg-card-sel: #3a2418;
  --accent: #ff5a1f;
  --accent-hover: #ff6f3c;
  --accent-soft: rgba(255, 90, 31, 0.15);
  --text: #ffffff;
  --text-dim: #9a9a9e;
  --text-faint: #6a6a6e;
  --border: #2e2e30;
  --border-sel: var(--accent);
  --info: #1366d6;
  --radius: 12px;
  --maxw: 480px;            /* funnel column width (mobile-first, capped) */
  --gap: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ---------- Top bar ---------- */
#topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}
.brand { color: var(--accent); font-weight: 800; letter-spacing: .5px; text-decoration: none; font-size: 15px; }
.back-btn {
  background: #222; color: #fff; border: 0; border-radius: 8px;
  width: 30px; height: 30px; font-size: 20px; line-height: 1; cursor: pointer;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.help-link { color: var(--text); text-decoration: none; font-size: 13px; }
.lang-switch { background: #1a1a1a; color: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; font-size: 13px; }

/* progress */
.progress-wrap { flex: 1; display: flex; align-items: center; gap: 8px; }
.progress-track { flex: 1; height: 3px; background: #2a2a2a; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.progress-count { font-size: 11px; color: var(--text-faint); min-width: 34px; text-align: right; }

/* ---------- Layout ---------- */
.app { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 14px 16px 40px; }
.step { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

h1.q { font-size: 24px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.landing-title { font-size: 30px; font-weight: 800; text-align: center; margin: 6px 0; }
.sub { color: var(--text-dim); text-align: center; font-size: 14px; margin-bottom: 4px; }
.sub.tight { margin-bottom: 18px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .5px; text-align: center; margin: 14px 0 8px; text-transform: uppercase; }

/* ---------- Option cards ---------- */
.options { display: flex; flex-direction: column; gap: var(--gap); }
.opt {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; text-align: left; color: var(--text); width: 100%;
  font-size: 16px; font-weight: 600; transition: background .15s, border-color .15s;
}
.opt:hover { background: var(--bg-card-hover); }
.opt.selected { border-color: var(--border-sel); background: var(--bg-card-sel); }
.opt .desc { display: block; font-size: 12px; font-weight: 400; color: var(--text-dim); margin-top: 3px; }
.opt .tick { width: 20px; height: 20px; border: 2px solid var(--text-faint); border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; }
.opt .tick.box { border-radius: 5px; }
.opt.selected .tick { border-color: var(--accent); background: var(--accent); }
.opt.selected .tick::after { content: "✓"; font-size: 12px; color: #fff; }
.opt .arrow { margin-left: auto; color: var(--text-dim); font-size: 18px; }
.opt .label { flex: 1; }
.opt .badge { font-size: 11px; color: var(--accent); font-weight: 700; }

/* image card variant */
.opt.image { padding: 0; overflow: hidden; min-height: 200px; align-items: stretch; }
.opt.image .label { display: flex; align-items: center; padding: 16px; font-size: 17px; }
.opt.image .thumb { width: 180px; flex: 0 0 auto; background: center/contain no-repeat; }
.opt.image .thumb.placeholder { display: grid; place-items: center; color: var(--text-faint); font-size: 10px; text-align: center; }

/* recommended tag floats top-right of a card */
.opt .rec { position: absolute; top: 6px; right: 8px; font-size: 10px; color: var(--accent); font-weight: 700; }
.opt { position: relative; }

/* ---------- Buttons ---------- */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius);
  font-size: 17px; font-weight: 700; padding: 15px 22px; width: 100%; max-width: 280px;
  margin: 18px auto 0; cursor: pointer; transition: background .15s, opacity .15s;
}
.cta:hover { background: var(--accent-hover); }
.cta[disabled] { background: #3a2418; color: #8a6a58; cursor: not-allowed; }
.cta.center { margin-inline: auto; }
.linkbtn { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--text-dim); font-size: 13px; cursor: pointer; }

/* ---------- Inputs ---------- */
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius);
  color: #fff; font-size: 17px; padding: 14px 16px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.unit-toggle { display: inline-flex; background: var(--bg-card); border-radius: 8px; padding: 3px; gap: 3px; margin-left: auto; }
.unit-toggle button { background: none; border: 0; color: var(--text-dim); padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 13px; }
.unit-toggle button.on { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.unit-row { display: flex; align-items: center; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12px; color: var(--text-dim); }
.consent input { margin-top: 2px; }
.disclaimer { font-size: 11px; color: var(--text-faint); margin-top: 12px; line-height: 1.4; }
.disclaimer a, .consent a { color: var(--accent); }

/* ---------- Statement (agree scale) ---------- */
.statement-q { font-size: 16px; color: var(--text-dim); margin-bottom: 14px; }
.quote { background: linear-gradient(180deg, #1c1c1e, #241a14); border-radius: var(--radius); padding: 22px 16px; text-align: center; font-weight: 700; font-size: 16px; position: relative; }
.quote::before, .quote::after { content: '"'; color: var(--text-faint); font-size: 20px; position: absolute; }
.quote::before { left: 8px; top: 4px; } .quote::after { right: 10px; top: 4px; }
.scale { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 16px; }
.scale .opt { flex-direction: column; gap: 6px; padding: 16px 8px; text-align: center; font-size: 13px; }
.scale .opt .ico { font-size: 22px; color: var(--accent); }

/* ---------- Reassurance / social-proof card ---------- */
.reassure { background: var(--info); border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; animation: fade .25s; }
.reassure .t { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.reassure .b { font-size: 13px; }

/* ---------- Info / interstitial ---------- */
.info-img { width: 100%; aspect-ratio: 4/3; background: var(--bg-card) center/contain no-repeat; border-radius: var(--radius); display: grid; place-items: center; color: var(--text-faint); font-size: 12px; }
.info-title { font-size: 24px; font-weight: 800; margin-top: 18px; }
.info-body { color: var(--text-dim); margin-top: 8px; font-size: 14px; }

/* ---------- Loader ---------- */
.loader-wrap { display: grid; place-items: center; min-height: 60dvh; text-align: center; }
.ring { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800;
  background: conic-gradient(var(--accent) var(--p,0%), #2a2a2a 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); }
.ring span { position: relative; z-index: 1; }
.loader-label { color: var(--text-dim); margin-top: 16px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 40; padding: 16px; animation: fade .2s; }
.modal { background: #1a1a1c; border-radius: 16px; padding: 22px; max-width: 360px; width: 100%; position: relative; }
.modal .opt { background: var(--bg-card); }
.modal .opt:hover { background: var(--bg-card-hover); }
.modal .close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--text-dim); font-size: 20px; cursor: pointer; }
.modal h3 { font-size: 20px; margin-bottom: 14px; }
.modal .eyebrow { text-align: left; margin: 0 0 4px; }

/* ---------- Results page ---------- */
.result-section { margin-top: 26px; }
.card { background: var(--bg-card); border-radius: var(--radius); padding: 16px; }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; }
.ba-col { padding: 14px; background: var(--bg-card); }
.ba-col h4 { text-align: center; font-size: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.ba-col .k { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.ba-col .v { font-size: 17px; font-weight: 800; color: var(--accent); }
.bmi-bar { height: 8px; border-radius: 8px; background: linear-gradient(90deg,#2e7dd6,#43c463,#e7c43a,#e8732e,#d83a3a); position: relative; margin: 10px 0 6px; }
.bmi-bar .knob { position: absolute; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translateX(-50%); }
.bmi-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 14px; }
.metric .lab { font-size: 12px; color: var(--text-dim); }
.metric .val { font-size: 20px; font-weight: 800; }
.feature { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; }
.feature .fi { width: 34px; height: 34px; border-radius: 8px; background: #262628; flex: 0 0 auto; display: grid; place-items: center; }
.feature .ft { font-weight: 700; } .feature .fb { font-size: 13px; color: var(--text-dim); }
.social { text-align: center; margin: 24px 0; }
.social .big { font-size: 30px; font-weight: 800; }
.stars { color: var(--accent); letter-spacing: 3px; font-size: 18px; }

/* pricing */
.plans { display: flex; flex-direction: column; gap: var(--gap); margin-top: 12px; }
.plan { position: relative; background: var(--bg-card); border: 2px solid transparent; border-radius: var(--radius); padding: 16px; cursor: pointer; }
.plan.selected { border-color: var(--accent); background: var(--bg-card-sel); }
.plan .row { display: flex; justify-content: space-between; align-items: center; }
.plan .name { font-weight: 800; }
.plan .renew { font-size: 12px; color: var(--text-dim); }
.plan .now { font-size: 18px; font-weight: 800; }
.plan .was { font-size: 12px; color: var(--text-faint); text-decoration: line-through; }
.plan .per { font-size: 11px; color: var(--text-dim); }
.plan .tag { position: absolute; top: -10px; right: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.plan .tag.left { right: auto; left: 10px; background: #333; }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(180deg, transparent, var(--bg) 35%); }

/* checkout summary */
.sumrow { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.sumrow.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 16px; }
.save { color: var(--accent); font-size: 12px; }
.pay-note { font-size: 11px; color: var(--text-faint); margin: 14px 0; line-height: 1.4; }
.pay-btn { width: 100%; padding: 14px; border-radius: 10px; border: 0; font-weight: 700; margin-top: 8px; cursor: pointer; }
.pay-btn.apple { background: #fff; color: #000; } .pay-btn.gpay { background: #fff; color: #000; } .pay-btn.card { background: var(--accent); color: #fff; }

/* ---------- images added with real assets ---------- */
/* landing hero (soldier) */
.hero { width: 100%; height: 340px; background: center/contain no-repeat; margin: 8px 0; }
/* side figure (mascot / injuries body / pricing) */
.side-img { width: 100%; height: 300px; background: center/contain no-repeat; margin: 6px 0 14px; }
.reassure-img { height: 320px; margin: 12px 0 0; }
/* per-option thumbnail (challenge body-maps) — full image, not trimmed */
.opt-thumb { width: 130px; min-height: 120px; align-self: stretch; margin: -14px -16px -14px auto; background: center/contain no-repeat; border-radius: 0 10px 10px 0; flex: 0 0 auto; }
.opt { overflow: hidden; }
/* result imagery */
.transform-hero { width: 100%; height: 400px; background: center/contain no-repeat; margin-bottom: 6px; }
.calendar-img { width: 100%; aspect-ratio: 4/3; background: center/contain no-repeat; margin-top: 14px; border-radius: var(--radius); }

@media (min-width: 540px) {
  .info-img { aspect-ratio: 16/10; }
}
