/* Zach Poulos Fitness — site styles.
 * Light + dark themes share every rule; only the tokens in :root / [data-theme="dark"] change.
 * Theme follows the visitor's system setting unless they pick one with the footer toggle (assets/js/theme.js). */

:root {
  --bg: #f3f2f2;
  --text: #201e1d;
  --accent: #ec3013;
  --accent-hover: #dd2b0f;
  --eyebrow: #ae1800;        /* small red text: eyebrows, errors */
  --link-hover: #ae1800;
  --band: #ebe9e9;           /* testimonials section */
  --card: #ffffff;           /* testimonial cards */
  --card-shadow: 0 1px 2px rgba(45, 43, 43, .14);
  --divider: color-mix(in srgb, #201e1d 40%, transparent);
  --feature-border: var(--divider);
  --input-bg: #eae9e9;
  --input-border: color-mix(in srgb, #201e1d 40%, transparent);
  --placeholder: color-mix(in srgb, #201e1d 45%, transparent);
  --track: #eae7e7;          /* progress bar + slider track */
  --frame: #2d2b2b;          /* empty video frame */

  --muted-55: color-mix(in srgb, var(--text) 55%, transparent);
  --muted-65: color-mix(in srgb, var(--text) 65%, transparent);
  --muted-70: color-mix(in srgb, var(--text) 70%, transparent);
  --muted-82: color-mix(in srgb, var(--text) 82%, transparent);

  --shadow-sm: 0 1px 2px rgba(45, 43, 43, .14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, .16);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, .22);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0c0c;
  --text: #f3f2f2;
  --eyebrow: #ff9783;
  --link-hover: #ff9783;
  --band: #151515;
  --card: #1c1c1c;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  --divider: #2a2a2a;
  --feature-border: #2a2a2a;
  --input-bg: #1a1a1a;
  --input-border: #333;
  --placeholder: #777;
  --track: #2a2a2a;
  --frame: #1c1c1c;
  --muted-70: color-mix(in srgb, var(--text) 72%, transparent);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- shared pieces ---------- */
.wordmark { font-weight: 800; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.wordmark span { color: var(--accent); }
a.wordmark:hover { color: var(--text); }

.eyebrow {
  font-weight: 800; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 14px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 19px 42px;
  font-family: var(--font); font-weight: 800; font-size: 17px; line-height: 1.2;
  text-decoration: none; text-align: center;
  border-radius: 999px; border: 0; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover, .btn-primary:active { background: var(--accent-hover); color: #fff; }
.btn-white { background: #fff; color: #ae1800; box-shadow: var(--shadow-md); }
.btn-white:hover { background: #f3f2f2; color: #ae1800; }
.btn-white:focus-visible { outline-color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--divider); font-size: 16px; }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn:disabled { opacity: .6; cursor: progress; }

.video-16x9 {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--frame);
}
.video-16x9 iframe, .video-16x9 video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-16x9 video { object-fit: cover; background: #000; }

/* ---------- landing ---------- */
.section { max-width: 900px; margin: 0 auto; padding: 0 32px 100px; text-align: center; }
.section h2 { font-size: 32px; margin-bottom: 30px; }

.hero { max-width: 1100px; padding: 24px 32px 26px; }
.hero .wordmark { display: block; font-size: 24px; margin-bottom: 22px; }
.hero .eyebrow { margin-bottom: 12px; }
.hero h1 { font-size: clamp(34px, 2.6vw + 10px, 50px); line-height: 1.08; letter-spacing: -0.02em; }

.vsl { padding-top: 0; }
.vsl .eyebrow { margin-bottom: 8px; }
.vsl h2 { margin-bottom: 18px; }
/* Size the VSL from the window height so headline + video + button fit on a laptop screen without scrolling.
   ~430px = everything above and below the video in the first screen (measured). */
.vsl .video-16x9 { width: clamp(360px, calc((100vh - 430px) * 16 / 9), 100%); margin: 0 auto; }
@supports (height: 100svh) { .vsl .video-16x9 { width: clamp(360px, calc((100svh - 430px) * 16 / 9), 100%); } }
.vsl .btn { margin-top: 22px; }

.reel {
  position: relative; display: block; width: 280px; aspect-ratio: 9 / 16; margin: 0 auto;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--frame);
}
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; }
.reel-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; color: #fff; font-size: 13px; font-weight: 600;
}
.reel-play span:first-child {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.reel:hover .reel-play span:first-child { transform: scale(1.06); }
.reel-link { display: inline-block; margin-top: 16px; font-size: 13px; text-decoration: none; }

/* Testimonial videos: one = centred; several = a swipeable row (scroll-snap), arrows on desktop when it overflows */
.stories { position: relative; }
.stories-track { display: flex; gap: 20px; justify-content: safe center; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 4px 24px; margin: 0 -4px; }
.stories-track::-webkit-scrollbar { display: none; }
.story { margin: 0; flex: none; scroll-snap-align: center; }
.story .reel { margin: 0; }
.story figcaption { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted-82); max-width: 280px; }
.stories-arrow {
  position: absolute; top: calc(50% - 34px); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: none; place-items: center; font: 800 28px/1 var(--font); color: #fff; background: var(--accent); box-shadow: var(--shadow-md);
}
.stories-arrow.prev { left: -8px; } .stories-arrow.next { right: -8px; }
.stories-arrow:hover { background: var(--accent-hover); }
.stories-arrow:disabled { opacity: .3; cursor: default; }
.stories.overflow .stories-arrow { display: grid; }

.reviews {
  background: var(--band); padding: 80px 0;
  border-top: 2px solid var(--divider); border-bottom: 2px solid var(--divider);
}
.reviews-head { text-align: center; margin-bottom: 44px; padding: 0 32px; }
.reviews-head h2 { font-size: 32px; }
.marquee { overflow: hidden; width: 100%; }
.marquee-track {
  display: flex; gap: 24px; width: max-content; margin: 0; padding: 4px 0 12px; list-style: none;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--gap, 24px) / 2)); } }
.review {
  width: 320px; flex-shrink: 0; background: var(--card); border-radius: 18px; padding: 26px;
  box-shadow: var(--card-shadow);
}
.review-who { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.review-who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex-shrink: 0; }
.review-name { font-weight: 800; font-size: 15px; }
.review-stars { color: var(--accent); font-size: 13px; letter-spacing: 2px; }
.review blockquote { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted-82); }
.marquee-results { --gap: 20px; gap: var(--gap); animation-duration: 90s; }
.result { position: relative; width: 400px; flex-shrink: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--card-shadow); background: var(--card); }
.result img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.result .tag {
  position: absolute; bottom: 12px; padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.tag-before { left: 12px; background: rgba(12, 12, 12, .72); color: #fff; }
.tag-after { right: 12px; background: var(--accent); color: #fff; }
.reviews-cta { text-align: center; padding: 56px 32px 0; }
.reviews-cta p { font-size: 15px; color: var(--muted-65); margin-bottom: 16px; }

.features { max-width: 1000px; margin: 0 auto; padding: 100px 32px; }
.features ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin: 0; padding: 0; list-style: none; }
.feature { padding: 34px; border: 2px solid var(--feature-border); border-radius: 20px; }
.feature svg { display: block; margin-bottom: 16px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--muted-70); }

.final-cta { background: var(--accent); color: #fff; text-align: center; padding: 100px 32px; }
.final-cta h2 { font-size: 36px; margin-bottom: 30px; color: #fff; }

.footer { text-align: center; padding: 40px 32px; font-size: 13px; color: var(--muted-55); }
.footer .wordmark { display: inline-block; font-size: 15px; margin-bottom: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px;
  font: inherit; font-size: 12px; color: var(--muted-55);
  background: transparent; border: 1px solid var(--divider); border-radius: 999px; cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }

/* ---------- questionnaire ---------- */
.q-wrap { max-width: 680px; margin: 0 auto; padding: 24px 32px 120px; }
.q-brand { display: block; text-align: center; font-size: 17px; margin-bottom: 32px; }
.q-head { text-align: center; margin-bottom: 20px; }
.q-head h1 { font-size: 34px; }
.progress { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 48px; }
.progress div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.q-intro { font-size: 15px; line-height: 1.6; color: color-mix(in srgb, var(--text) 68%, transparent); margin-bottom: 32px; }

.q-fields { display: grid; gap: 22px; }
.q-fields.grid { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.q-fields.grid .full { grid-column: 1 / -1; }
.field { min-width: 0; border: 0; margin: 0; padding: 0; }
.field-label { display: block; font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 8px; padding: 0; color: var(--muted-82); }
.field-label .req { color: var(--accent); margin-left: 2px; }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--text); caret-color: var(--accent);
  background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px;
  transition: border-color .15s;
}
.input::placeholder { color: var(--placeholder); }
.input:hover { border-color: color-mix(in srgb, var(--text) 55%, transparent); }
.input:focus-visible { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
.field.invalid .input { border-color: var(--eyebrow); }
.error { font-size: 13px; font-weight: 600; color: var(--eyebrow); margin-top: 6px; }

.options { display: grid; gap: 4px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; font-size: 15px; }
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--input-border); transition: border-color .15s; }
:root[data-theme="dark"] .radio .dot { border-color: #444; }
.radio:hover .dot { border-color: var(--accent); }
.radio.check .dot { border-radius: 5px; }
.radio input:checked + .dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg); }
.radio input:focus-visible + .dot { outline: 2px solid var(--accent); outline-offset: 2px; }

.slider { display: flex; align-items: center; gap: 14px; }
.slider input { flex: 1; height: 28px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(var(--accent), var(--accent)) 0 / var(--fill, 44%) 100% no-repeat, var(--track); }
.slider input::-moz-range-track { height: 6px; border-radius: 999px; background: var(--track); }
.slider input::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: var(--shadow-md); }
.slider input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: var(--shadow-md); }
.slider input:focus-visible { outline-offset: 4px; border-radius: 6px; }
.slider output {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.scale { font-size: 12px; color: var(--muted-55); margin-top: 6px; }

.q-nav { display: flex; gap: 14px; margin-top: 52px; }
.q-nav .btn { padding: 17px 32px; }
.q-nav .btn-outline { flex: 1; }
.q-nav .btn-primary { flex: 2; }
.form-error {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--eyebrow); background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.done { max-width: 720px; margin: 0 auto; padding: 100px 32px 120px; text-align: center; }
.done-check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 28px;
}
.done h1 { font-size: 34px; margin-bottom: 18px; }
#done-body { font-size: 16px; line-height: 1.65; color: color-mix(in srgb, var(--text) 72%, transparent); max-width: 560px; margin: 0 auto 40px; }
.done .video-16x9 { max-width: 640px; margin: 0 auto; }
.done-home { display: inline-block; margin-top: 44px; font-size: 14px; text-decoration: none; }

/* Sticky CTA (phones only): appears once the first button has scrolled away, hides when another CTA is on screen */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: none; transform: translateY(150%); transition: transform .25s ease;
}
.sticky-cta .btn { width: 100%; padding: 16px 24px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.sticky-cta.show { transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 22px 24px 26px; }
}
@media (max-width: 720px) {
  .section { padding: 0 20px 72px; }
  .section h2, .reviews-head h2 { font-size: 26px; }
  .hero { padding: 18px 20px 22px; }
  .hero .wordmark { font-size: 20px; margin-bottom: 18px; }
  .hero h1 { font-size: clamp(26px, 7.6vw, 34px); }
  .vsl .video-16x9 { width: 100%; border-radius: 16px; }
  .vsl .btn { margin-top: 18px; }
  .reel { width: min(280px, 72vw); }
  .stories-arrow { display: none !important; }
  .stories.many .stories-track { justify-content: flex-start; padding-inline: calc((100vw - min(280px, 72vw)) / 2 - 20px); margin-inline: -20px; scroll-padding-inline: 20px; }
  .reviews { padding: 64px 0; }
  .reviews-head { margin-bottom: 32px; padding: 0 20px; }
  .reviews-cta { padding: 44px 20px 0; }
  .review { width: 280px; padding: 22px; }
  .result { width: 300px; }
  .marquee-results { animation-duration: 70s; }
  .features { padding: 72px 20px; }
  .features ul { grid-template-columns: 1fr; gap: 18px; }
  .feature { padding: 26px; }
  .final-cta { padding: 72px 20px; }
  .final-cta h2 { font-size: 28px; }
  .section .btn, .reviews-cta .btn, .final-cta .btn { width: 100%; max-width: 420px; padding: 18px 24px; }
  .sticky-cta { display: block; }
  .footer { padding-bottom: 96px; }

  .q-wrap { padding: 18px 20px 80px; }
  .q-brand { margin-bottom: 22px; }
  .q-head h1, .done h1 { font-size: 28px; }
  .progress { margin-bottom: 36px; }
  .q-fields.grid { grid-template-columns: 1fr; }
  .q-nav { margin-top: 40px; }
  .q-nav .btn { padding: 16px 18px; }
  .done { padding: 64px 20px 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; scrollbar-width: thin; }
  .marquee-track { padding-inline: 20px; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .progress div, .btn, .input, .sticky-cta { transition: none; }
}
