/* Transformity Health quiz funnel (kegel-plan style app layout). */

:root {
  --brand: #215199;
  --brand-dark: #193f78;
  --navy: #0b1f3f;
  --navy-2: #12305c;
  --accent: #70acd3;
  --tint: #eaf2fb;
  --pill: #f2f4f7;
  --pill-hover: #e8ecf1;
  --ink: #0d1424;
  --muted: #5b6475;
  --line: #e3e8ef;
  --gold: #f5b301;
  --ok: #15a35a;
  --warn: #e08a00;
  --error: #c0262d;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Marcellus", Georgia, serif;
  --w: 520px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (min-width: 700px) {
  body { background: linear-gradient(180deg, #f3f6fa 0%, #eef3f9 100%); }
  .f-app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgb(11 31 63 / .08); }
}

.f-app { position: relative; max-width: var(--w); min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: #fff; display: flex; flex-direction: column; }
.f-app.is-dark { background: var(--navy); color: #fff; }

/* ---------- Top bar ---------- */
.f-top { padding: 14px 20px 0; }
.f-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; }
.f-logo img { height: 28px; width: auto; }
.f-app.is-dark .f-logo img { filter: brightness(0) invert(1); }
.f-call { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; padding: 7px 10px; border-radius: 999px; background: var(--tint); }
.f-app.is-dark .f-call { background: rgb(255 255 255 / .1); color: #fff; }
.f-call svg { width: 15px; height: 15px; }
.f-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 16px; }
.f-seg { height: 5px; border-radius: 99px; background: var(--pill); overflow: hidden; }
.f-app.is-dark .f-seg { background: rgb(255 255 255 / .14); }
.f-seg span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .45s ease; }
.f-app.is-dark .f-seg span { background: var(--accent); }
.f-chapter { margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.f-app.is-dark .f-chapter { color: #9db3cf; }

/* ---------- Body ---------- */
.f-body { flex: 1; display: flex; flex-direction: column; transition: opacity .3s ease, transform .3s ease; }
.f-body.is-entering { opacity: 0; transform: translateY(10px); }
.f-screen { flex: 1; padding: 22px 20px 120px; }
.f-q { font-size: 25px; line-height: 1.22; font-weight: 750; letter-spacing: -.02em; }
.f-q-center { text-align: center; }
.f-q-small { font-size: 20px; margin-top: 28px; }
.f-sub { margin-top: 8px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.f-sub-center { text-align: center; margin-top: 18px; }
.f-ok { color: var(--ok); font-weight: 600; }
.f-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.f-app.is-dark .f-kicker { color: var(--accent); }

/* ---------- Options ---------- */
.f-options { display: grid; gap: 10px; margin-top: 22px; }
.f-options--grid { grid-template-columns: 1fr 1fr; }
.f-opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 58px; padding: 14px 48px 14px 18px; text-align: left; color: var(--ink);
  background: var(--pill); border: 2px solid transparent; border-radius: 14px; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
@media (hover: hover) { .f-opt:hover { background: var(--pill-hover); } }
.f-opt:active { transform: scale(.985); }
.f-opt.is-on { background: var(--tint); border-color: var(--brand); }
.f-opt-emoji { font-size: 22px; line-height: 1; }
.f-opt-text { display: grid; gap: 2px; }
.f-opt-text strong { font-size: 16px; font-weight: 600; line-height: 1.3; }
.f-opt-text small { font-size: 13.5px; color: var(--muted); }
.f-opt-mark { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: transparent; box-shadow: inset 0 0 0 1.5px #d5dbe4; transition: background-color .15s ease; }
.f-opt.is-multi .f-opt-mark { border-radius: 7px; }
.f-opt-mark svg { width: 14px; height: 14px; }
.f-opt.is-on .f-opt-mark { background: var(--brand); color: #fff; box-shadow: none; }
.f-opt-age { justify-content: center; padding: 18px 40px 18px 16px; min-height: 64px; }
.f-opt-age strong { font-size: 19px; font-weight: 700; }

.f-rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.f-rate-btn { height: 58px; border: 2px solid transparent; border-radius: 14px; background: var(--pill); font-size: 19px; font-weight: 700; color: var(--ink); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.f-rate-btn.is-on { background: var(--brand); color: #fff; }
.f-rate-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- Footer nav ---------- */
.f-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; pointer-events: none; }
.f-foot-row { max-width: var(--w); margin: 0 auto; display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgb(255 255 255 / 0) 0%, #fff 30%); pointer-events: auto; }
.f-foot.is-dark .f-foot-row { background: linear-gradient(180deg, rgb(11 31 63 / 0) 0%, var(--navy) 30%); }
.f-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 20px; border: 0; border-radius: 14px; font-weight: 700; font-size: 16.5px; cursor: pointer; text-decoration: none; transition: background-color .15s ease, opacity .15s ease, transform .12s ease; }
.f-btn svg { width: 20px; height: 20px; }
.f-btn:active { transform: translateY(1px); }
.f-btn-back { flex: 0 0 34%; background: var(--pill); color: var(--ink); }
.f-foot.is-dark .f-btn-back { background: rgb(255 255 255 / .1); color: #fff; }
.f-btn-next { flex: 1; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgb(33 81 153 / .28); }
.f-btn-next:hover { background: var(--brand-dark); }
.f-btn-next:disabled { background: #c9d2de; box-shadow: none; cursor: not-allowed; }
.f-foot.is-dark .f-btn-next { background: #fff; color: var(--navy); box-shadow: none; }
.f-btn-wide { width: 100%; margin-top: 24px; }

/* ---------- Intro ---------- */
.f-intro { padding-top: 18px; padding-bottom: 32px; }
.f-hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 9vw, 40px); line-height: 1.12; text-align: center; letter-spacing: -.01em; color: var(--navy); }
.f-hero-title em { font-style: normal; color: var(--brand); }
.f-hero-sub { margin: 10px auto 0; max-width: 400px; text-align: center; color: var(--muted); font-size: 15px; }
.f-collage { margin: 22px -20px 0; display: grid; gap: 8px; overflow: hidden; }
.f-marquee { overflow: hidden; }
.f-marquee-track { display: flex; gap: 8px; width: max-content; animation: f-slide 38s linear infinite; }
.f-marquee.is-rev .f-marquee-track { animation-direction: reverse; animation-duration: 44s; }
.f-marquee img { width: 104px; height: 128px; object-fit: cover; border-radius: 14px; flex: none; }
.f-marquee:nth-child(2) img { width: 116px; height: 120px; }
@keyframes f-slide { to { transform: translateX(-50%); } }
.f-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; text-align: center; }
.f-badges li { display: grid; gap: 2px; padding: 10px 6px; border-radius: 12px; background: #f8fafc; }
.f-badges strong { font-size: 15px; font-weight: 800; color: var(--navy); }
.f-badges span { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.f-intro .f-q { margin-top: 26px; font-size: 22px; }
.f-legal { margin-top: 18px; font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.f-legal a { color: inherit; }

/* ---------- Info / story ---------- */
.f-info { text-align: center; }
.f-info-title { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -.01em; color: var(--navy); }
.f-info.is-dark .f-info-title, .f-app.is-dark .f-info-title { color: #fff; }
.f-info-title em { font-style: normal; color: var(--brand); }
.f-app.is-dark .f-info-title em { color: var(--accent); }
.f-info-img { width: 100%; max-height: 300px; object-fit: cover; object-position: 50% 30%; border-radius: 18px; margin: 22px 0 0; }
.f-info-text { margin-top: 18px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.f-app.is-dark .f-info-text { color: #c5d3e6; }
.f-stat { margin: 24px auto 0; max-width: 360px; padding: 22px; border-radius: 18px; background: var(--tint); display: grid; gap: 6px; }
.f-app.is-dark .f-stat { background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); }
.f-stat strong { font-size: 44px; line-height: 1; font-weight: 800; color: var(--brand); }
.f-app.is-dark .f-stat strong { color: var(--accent); }
.f-stat span { font-size: 15px; color: var(--muted); }
.f-app.is-dark .f-stat span { color: #c5d3e6; }
.f-info-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; text-align: left; }
.f-info-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; line-height: 1.45; }
.f-info-list svg { width: 22px; height: 22px; flex: none; padding: 4px; border-radius: 50%; background: var(--brand); color: #fff; margin-top: 1px; }
.f-app.is-dark .f-info-list svg { background: var(--accent); color: var(--navy); }
.f-note { margin-top: 16px; font-size: 12px; line-height: 1.5; color: var(--muted); font-style: italic; }
.f-app.is-dark .f-note { color: #8ea4c2; }

.f-story-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 20%; border-radius: 18px; margin-top: 20px; }
.f-video { position: relative; margin: 20px auto 0; width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, var(--navy-2), var(--navy)); box-shadow: 0 20px 50px rgb(11 31 63 / .25); }
.f-video img, .f-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 72px; height: 72px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--brand); cursor: pointer; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.f-video-play svg { width: 30px; height: 30px; margin-left: 4px; }
.f-video-label { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 10px; border-radius: 10px; background: rgb(11 31 63 / .7); color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; backdrop-filter: blur(6px); }
.f-quote { margin: 22px 0 0; padding: 20px; border-radius: 18px; background: #f8fafc; border: 1px solid var(--line); text-align: left; }
.f-quote blockquote { margin: 10px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.f-quote figcaption { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.f-stars { display: inline-flex; gap: 2px; color: var(--gold); }
.f-stars svg { width: 16px; height: 16px; }

/* ---------- Loader ---------- */
.f-loader { padding-top: 34px; }
.f-bars { display: grid; gap: 18px; margin-top: 28px; }
.f-bar-top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.f-bar-pct { color: var(--brand); font-variant-numeric: tabular-nums; }
.f-bar-track { height: 8px; border-radius: 99px; background: var(--pill); overflow: hidden; }
.f-bar-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.f-bar.is-done .f-bar-pct::after { content: " ✓"; color: var(--ok); }
.f-reviews { position: relative; margin-top: 34px; min-height: 170px; }
.f-review { position: absolute; inset: 0 0 auto 0; margin: 0; padding: 20px; border-radius: 18px; background: #f8fafc; border: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.f-review.is-on { opacity: 1; transform: none; }
.f-review blockquote { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }
.f-review figcaption { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* ---------- Result ---------- */
.f-profile { display: grid; gap: 10px; margin-top: 20px; }
.f-factor { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.f-factor-head { display: flex; align-items: center; gap: 8px; }
.f-factor-head svg { width: 20px; height: 20px; flex: none; color: var(--warn); }
.f-factor.is-high .f-factor-head svg { color: var(--error); }
.f-factor-head strong { font-size: 15.5px; }
.f-factor-head em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #fff4e0; color: #9a5d00; white-space: nowrap; }
.f-factor.is-high .f-factor-head em { background: #fde8e8; color: #a11d22; }
.f-factor p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.f-offer { margin-top: 24px; padding: 20px; border-radius: 20px; background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: #fff; }
.f-offer h3 { margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.25; }
.f-offer .f-info-list svg { background: var(--accent); color: var(--navy); }
.f-offer .f-info-list li { font-size: 15px; color: #dfe8f4; }
.f-offer-doc { display: flex; align-items: center; gap: 12px; }
.f-offer-doc img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid rgb(255 255 255 / .3); }
.f-offer-doc strong { display: block; font-size: 16px; }
.f-offer-doc span { font-size: 13px; color: #b6c7dd; }
.f-price { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .14); }
.f-price span { font-size: 14px; color: #b6c7dd; }
.f-price strong { font-size: 28px; }
.f-offer .f-note { color: #94a9c6; }

/* ---------- Forms ---------- */
.f-form { display: grid; gap: 14px; margin-top: 22px; }
.f-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.f-field input { width: 100%; height: 58px; padding: 0 16px; font-size: 17px; color: var(--ink); background: var(--pill); border: 2px solid transparent; border-radius: 14px; transition: border-color .15s ease, background-color .15s ease; }
.f-field input:focus { outline: none; background: #fff; border-color: var(--brand); }
.f-field input[aria-invalid="true"] { border-color: var(--error); }
.f-otp { text-align: center; letter-spacing: .3em; font-size: 24px !important; }
.f-otp:placeholder-shown { letter-spacing: normal; font-size: 17px !important; }
.f-err, .f-form-error { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--error); }
.f-form-error { margin: 0; }
.f-consent { font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-private { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.f-private svg { width: 14px; height: 14px; }
.f-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 16px; }
.f-links button { border: 0; background: none; padding: 6px 2px; color: var(--brand); font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Done ---------- */
.f-done { text-align: center; padding-top: 40px; }
.f-done-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 10px rgb(21 163 90 / .12); }
.f-done-icon svg { width: 34px; height: 34px; }
.f-done .f-sub { max-width: 420px; margin: 12px auto 0; }
.f-done-list { counter-reset: s; list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; text-align: left; }
.f-done-list li { counter-increment: s; display: flex; gap: 12px; font-size: 15px; line-height: 1.45; }
.f-done-list li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }

.f-video.is-wide { max-width: 100%; aspect-ratio: 16 / 9; }
.f-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.f-video img { opacity: .92; }
.f-intro-media { display: none; }

/* ---------- Desktop: full width app, wide intro and result ---------- */
@media (min-width: 1024px) {
  :root { --w: 100%; }
  body { background: #fff; }
  .f-app { max-width: none; box-shadow: none; }
  .f-top { padding: 18px 48px 0; }
  .f-top-row { max-width: 1200px; margin: 0 auto; height: 52px; }
  .f-logo img { height: 40px; }
  .f-call { font-size: 15px; padding: 10px 16px; }
  .f-progress, .f-chapter { max-width: 680px; margin-left: auto; margin-right: auto; }
  .f-progress { margin-top: 26px; }
  .f-screen { width: 100%; max-width: 720px; margin: 0 auto; padding: 44px 20px 150px; }
  .f-q { font-size: 34px; }
  .f-sub { font-size: 17px; }
  .f-opt { min-height: 66px; padding: 18px 56px 18px 22px; }
  .f-opt-text strong { font-size: 17.5px; }
  .f-foot-row { max-width: 720px; padding-bottom: 28px; }
  .f-info-title { font-size: 40px; }
  .f-info-img { max-height: 420px; }
  .f-video { max-width: 340px; }
  .f-video.is-wide { max-width: 100%; }

  /* Intro: copy left, moving photo wall right */
  .f-intro { max-width: 1200px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; padding: 40px 48px 56px; }
  .f-intro .f-collage { display: none; }
  .f-intro-copy { max-width: 520px; }
  .f-intro .f-hero-title { text-align: left; font-size: 56px; line-height: 1.06; }
  .f-intro .f-hero-sub { text-align: left; margin: 16px 0 0; max-width: 460px; font-size: 18px; }
  .f-intro .f-badges { margin-top: 28px; }
  .f-intro .f-q { text-align: left; margin-top: 32px; font-size: 24px; }
  .f-intro .f-legal { text-align: left; }
  .f-intro-media {
    display: grid; gap: 12px; height: 620px; overflow: hidden; border-radius: 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  }
  .f-intro-media .f-marquee-track { gap: 12px; }
  .f-intro-media img { width: 170px !important; height: 196px !important; border-radius: 18px; }

  /* Result: profile left, offer right */
  .f-result { max-width: 1120px; display: grid; grid-template-columns: 1fr .9fr; gap: 48px; align-items: start; padding-top: 48px; }
  .f-result .f-offer { margin-top: 0; }
  .f-result-side .f-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .f-body, .f-seg span, .f-opt, .f-review { transition: none; }
  .f-marquee-track { animation: none; }
}
