/* Orangetheory brand, sampled from orangetheory.com (otf-localization CSS + new-otf-orange.svg):
   orange #F26922 (--color--primary), light orange #FF8633, dark orange #D95E0B, black #0A0A0A,
   charcoal #2E2E2E, bone #F4EDDF. Orange text on black uses #FF8633 for extra contrast; buttons use black
   text on orange (white on #F26922 is only 3:1). PP Right Grotesk / Proxima Nova are not on Google Fonts:
   Archivo (condensed width) and Figtree stand in. */
:root {
  --bg: #0A0A0A;
  --bg-deep: #050505;
  --panel: #161616;
  --orange: #F26922;
  --orange-hover: #FF8633;
  --orange-dark: #D95E0B;
  --orange-text: #FF8633;
  --orange-deep: #A8470C;              /* brand orange darkened for small text on bone/white (5:1) */
  --fg: #FFFFFF;
  --muted: #B5B0A8;
  --ink: #0A0A0A;
  --paper: #F4EDDF;
  --line: rgba(255, 255, 255, .16);
  --field: rgba(255, 255, 255, .05);
  --picked: rgba(255, 134, 51, .14);
  --error: #FFB3A0;
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --radius: 16px;
  --intro: 1s;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.quiz-open { overflow: hidden; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
main { flex: 1; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- intro: the logo arrives, then zooms through the screen ---------- */
/* Intro: page.js animates the SVG viewBox (vector redraw each frame, so it stays sharp at ~150x).
   The curtain is part of the SVG, so the page shows only through the 4's triangle until it fills the screen.
   The failsafe hides the layer after 3s even if page.js never runs. */
.intro { position: fixed; inset: 0; z-index: 100; overflow: hidden; cursor: pointer; background: var(--bg);
  animation: intro-failsafe 0s linear 3s forwards; }
.intro.is-open { background: transparent; }       /* set by page.js when the zoom starts: the hole becomes see-through */
.intro-svg { display: block; width: 100%; height: 100%; }
.intro-logo { opacity: 0; }
html:not(.js) .intro, html.no-intro .intro { display: none; }
@keyframes intro-failsafe { to { visibility: hidden; pointer-events: none; } }

/* hero content rises in as the logo clears; static when there is no intro or no JS */
.js .reveal { opacity: 0; transform: translateY(22px); animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--intro) * .45 + var(--d, 0) * 90ms); }     /* rising as the hole opens */
.js.no-intro .reveal { animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 6px; cursor: pointer;
  font: 700 15px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center;
  padding: 14px 24px; transition: background .15s, transform .15s, box-shadow .15s; }
.btn svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn:focus-visible, .q-option:focus-visible, .cal-day:focus-visible, .cal-time:focus-visible, .quiz-back:focus-visible,
.quiz-close:focus-visible, .ba-range:focus-visible + .ba-handle { outline: 2px solid #fff; outline-offset: 4px; }
.btn-go { background: var(--orange); color: var(--ink); box-shadow: 0 12px 32px rgba(242, 105, 34, .35); }
.btn-go:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-go:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 20px 30px; font-size: 16px; }

.eyebrow { font: 700 13px/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--orange-text); }

/* ---------- header ---------- */
.topbar { position: relative; z-index: 2; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 150px; height: auto; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: calc(100dvh - 76px); display: flex; align-items: center; padding: 32px 0 88px; }
.hero::before { content: ''; position: absolute; left: 50%; top: 52%; width: min(1200px, 160vw); aspect-ratio: 1.5; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(242, 105, 34, .26), rgba(242, 105, 34, .06) 55%, transparent); pointer-events: none; }
/* the splat, huge and faint, turning slowly behind the headline */
.hero-splat { position: absolute; left: 50%; top: 50%; width: min(980px, 150vw); aspect-ratio: 31 / 41; pointer-events: none; opacity: .07;
  background: url("./assets/otf-splat.svg") center / contain no-repeat; transform: translate(-50%, -50%) rotate(-12deg);
  animation: splat-turn 60s linear infinite; }
@keyframes splat-turn { to { transform: translate(-50%, -50%) rotate(348deg); } }
.hero-inner { position: relative; text-align: center; }
/* Headline sizing (measured in Archivo 800 condensed: "STRONGER," = 4.84em on its own line, "ONE WORKOUT AT A TIME" = 10.29em,
   "ONE WORKOUT" = 6.18em). 640px+: max-width 10.6em gives exactly two lines at any size; font follows width AND height so the CTA
   stays above the fold on short laptops. Phones: see the max-width 639px block (exactly three lines). */
.hero h1 { margin: 18px auto 0; max-width: 10.6em; text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance;
  font: 800 condensed clamp(52px, min(8.8vw, 15vh), 104px)/.92 var(--display); }
.hero h1 em { display: block; font-style: italic; color: var(--orange-text); }
.hero-sub { margin: 26px auto 0; max-width: 640px; font-size: clamp(17px, 1.8vw, 19px); color: #E6E1D8; text-wrap: pretty; }
.hero-cta { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-note { font-size: 14px; color: var(--muted); }

/* ---------- why it works ---------- */
.how { background: var(--paper); color: var(--ink); padding: 88px 0 80px; }
.how-grid { list-style: none; margin: 44px auto 0; padding: 0; max-width: 1040px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.how-grid li { position: relative; overflow: hidden; padding: 28px 26px 30px; background: #fff; border-radius: var(--radius); box-shadow: 0 16px 36px rgba(10, 10, 10, .08); }
.how-grid li::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--orange); }
.how-num { display: block; font: 900 condensed 44px/1 var(--display); color: var(--orange); }
.how-grid h3 { margin-top: 14px; font: 800 condensed 28px/1.02 var(--display); text-transform: uppercase; }
.how-grid p { margin-top: 10px; font-size: 16px; color: #3A3631; }

/* ---------- before / after ---------- */
.results { background: var(--paper); color: var(--ink); padding: 88px 0 72px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto; }
.results .eyebrow, .how .eyebrow { color: var(--orange-deep); }
.section-head h2, .closer h2 { margin-top: 12px; font: 800 condensed clamp(38px, 5.4vw, 64px)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }
.section-sub { margin-top: 14px; color: #4A4540; }
.ba-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.ba { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 40px rgba(10, 10, 10, .12); }
.ba-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #E2DACA; user-select: none; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-ph { display: grid; place-items: center; font: 600 15px var(--font); letter-spacing: .08em; text-transform: uppercase; }
.ba-ph span { opacity: .7; }
.ba-ph-before { background: repeating-linear-gradient(135deg, #DDD5C3 0 14px, #D3CAB6 14px 28px); color: var(--ink); }
.ba-ph-after { background: repeating-linear-gradient(135deg, #262626 0 14px, #1E1E1E 14px 28px); color: #fff; }
.ba-tag { position: absolute; top: 14px; padding: 5px 10px; border-radius: 4px; font: 700 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.ba-tag-before { left: 14px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.ba-tag-after { right: 14px; background: var(--orange); color: #fff; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, .15); }
.ba-handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 100vh; }
.ba-range::-moz-range-thumb { width: 48px; height: 100vh; border: 0; }
.ba figcaption { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 18px; }
.ba figcaption strong { font: 800 condensed 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.ba figcaption span { font-size: 15px; color: var(--orange-deep); font-weight: 600; }
.disclaimer { margin-top: 28px; text-align: center; font-size: 13px; color: #5E5952; }

/* ---------- closer ---------- */
.closer { background: var(--orange); color: var(--ink); padding: 80px 0; }
.closer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.closer h2 { margin-top: 0; }
.closer p { margin-top: 14px; font-size: 18px; max-width: 520px; }
.closer .btn-go { margin-top: 32px; background: var(--ink); color: #fff; box-shadow: 0 14px 34px rgba(10, 10, 10, .3); }
.closer .btn-go:hover { background: #1F1F1F; }

.footer { background: var(--bg-deep); color: var(--muted); font-size: 12px; padding: 22px 0 28px; text-align: center; }
.footer p + p { margin-top: 4px; }

/* ---------- pop-up ---------- */
.quiz { border: 1px solid var(--line); padding: 0; width: min(640px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); border-radius: 18px;
  background: var(--panel); color: var(--fg); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); overflow: hidden; }
.quiz::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
.quiz[open] { display: flex; animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.quiz-shell { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.quiz-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 0; }
.quiz-progress { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: inherit; transition: width .3s ease; }
.quiz-back, .quiz-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--field); cursor: pointer; display: grid; place-items: center; }
.quiz-back[hidden] { display: none; }
.quiz-back svg, .quiz-close svg { width: 18px; height: 18px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz-body { overflow-y: auto; padding: 26px 32px 32px; overscroll-behavior: contain; }

.q-enter { animation: slide .26s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateY(14px); } }
.q-count { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-text); margin-bottom: 12px; }
.q-title { font: 800 condensed clamp(30px, 5vw, 40px)/1 var(--display); text-transform: uppercase; text-wrap: balance; }
.q-help { margin-top: 10px; color: var(--muted); font-size: 16px; }
.q-options { margin-top: 24px; display: grid; gap: 10px; }
.q-option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 16px; border-radius: 10px; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); font-weight: 500; font-size: 16px; transition: border-color .12s, background .12s; }
.q-option:hover { border-color: rgba(255, 255, 255, .45); }
.q-option[aria-checked="true"] { border-color: var(--orange-text); background: var(--picked); }
.q-key { flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line); color: var(--muted); }
.q-option[aria-checked="true"] .q-key { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.q-input { display: block; width: 100%; margin-top: 20px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font: 500 22px/1.3 var(--font); color: var(--fg); border-radius: 0; }
.q-input::placeholder { color: rgba(255, 255, 255, .38); }
.q-input:focus { border-bottom-color: var(--orange-text); outline: none; }
.q-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.q-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--orange); }
.q-error { min-height: 1.4em; margin-top: 12px; color: var(--error); font-weight: 500; font-size: 15px; }
.q-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.q-hint { font-size: 13px; color: var(--muted); }

/* calendar (only when OTF.booking is true) */
.cal-body { margin-top: 22px; }
.cal-loading { color: var(--muted); padding: 30px 0; text-align: center; }
.cal-zone { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cal-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.cal-day { flex: none; scroll-snap-align: start; width: 72px; padding: 10px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--field); cursor: pointer; display: grid; gap: 2px; }
.cal-dow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cal-dom { font-weight: 600; }
.cal-day[aria-selected="true"] { border-color: #fff; background: #fff; }
.cal-day[aria-selected="true"] span { color: var(--bg); }
.cal-times { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cal-time { padding: 12px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--field); font-weight: 500; cursor: pointer; }
.cal-time:hover { border-color: rgba(255, 255, 255, .45); }
.cal-time[aria-checked="true"] { background: var(--picked); border-color: var(--orange-text); }
.cal-confirm { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.cal-confirm[hidden] { display: none; }
.cal-summary { font-weight: 600; }
.cal-other { margin-top: 4px; background: none; border: 0; padding: 6px 0; color: var(--muted); font-size: 14px; text-decoration: underline; cursor: pointer; }

/* end screens */
.q-end { text-align: center; padding: 18px 0 6px; display: flex; flex-direction: column; align-items: center; }
.q-end .btn { margin-top: 22px; }
.q-end-icon { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 18px; background: var(--orange)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 30px no-repeat; }

/* ---------- thank-you page ---------- */
.ty-hero { position: relative; overflow: hidden; padding: 40px 0 64px; text-align: center; }
.ty-hero::before { content: ''; position: absolute; left: 50%; top: 40%; width: min(1000px, 160vw); aspect-ratio: 1.5; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(242, 105, 34, .24), rgba(242, 105, 34, .05) 55%, transparent); pointer-events: none; }
.ty-hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.ty-check { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 22px; box-shadow: 0 12px 32px rgba(242, 105, 34, .35); background: var(--orange)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 36px no-repeat;
  animation: pop .4s ease-out; }
.ty-hero h1 { margin-top: 14px; font: 800 condensed clamp(48px, 9vw, 104px)/.92 var(--display); text-transform: uppercase; text-wrap: balance; }
.ty-card { margin-top: 32px; width: min(460px, 100%); padding: 22px 24px; border-radius: 14px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); border-top: 4px solid var(--orange); }
.ty-card[hidden] { display: none; }
.ty-card-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ty-when { margin-top: 6px; font: 800 condensed clamp(26px, 4.4vw, 34px)/1.05 var(--display); text-transform: uppercase; }
.ty-when span { display: block; }
.ty-time { color: var(--orange-text); }
.ty-what { margin-top: 10px; font-size: 15px; color: #E6E1D8; line-height: 1.5; }
.ty-lead { margin-top: 26px; max-width: 560px; color: #E6E1D8; text-wrap: pretty; }

.ty-expect { background: var(--paper); color: var(--ink); padding: 72px 0 80px; }
.ty-expect h2 { text-align: center; font: 800 condensed clamp(38px, 5.4vw, 60px)/.95 var(--display); text-transform: uppercase; }
.ty-steps { list-style: none; margin: 40px auto 0; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.ty-steps li { display: flex; flex-direction: column; gap: 14px; padding: 24px 22px; background: #fff; border-radius: 16px; box-shadow: 0 14px 34px rgba(10, 10, 10, .1); }
.ty-num { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--orange); color: var(--ink); font: 800 condensed 22px/1 var(--display); }
.ty-steps h3 { font: 800 condensed 24px/1.05 var(--display); text-transform: uppercase; }
.ty-steps p { margin-top: 8px; font-size: 15px; color: #3A3631; line-height: 1.55; }
@media (max-width: 560px) {
  .ty-hero { padding: 28px 0 48px; }
  .ty-expect { padding: 56px 0 60px; }
  .ty-steps li { flex-direction: row; align-items: flex-start; padding: 20px 18px; }
  .ty-num { flex: none; }
}


/* ---------- phones: three-line headline, largest size where the widest word fits and the CTA stays visible ---------- */
@media (max-width: 639px) {
  .hero h1 { max-width: none; font-size: clamp(40px, min(calc((100vw - 32px) / 6.35), calc((100vh - 400px) / 2.8)), 76px); }
  @supports (height: 100svh) {
    .hero h1 { font-size: clamp(40px, min(calc((100vw - 32px) / 6.35), calc((100svh - 400px) / 2.8)), 76px); }
  }
}
@media (max-width: 639px) and (max-height: 640px) {
  .hero { padding-top: 24px; }
  .hero h1 { margin-top: 12px; }
  .hero-sub { margin-top: 18px; font-size: 16px; }
  .hero-cta { margin-top: 26px; }
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-inner { height: 64px; }
  .brand img { width: 124px; }
  .hero .eyebrow { font-size: 12px; letter-spacing: .1em; }   /* keeps "8-week plan with guaranteed results" on one line at 360px */
  .hero { min-height: 0; align-items: flex-start; padding: 40px 0 64px; }
  .btn-lg { width: 100%; padding: 18px 16px; font-size: 14px; letter-spacing: .04em; }
  .results, .how { padding: 64px 0 56px; }
  .closer { padding: 64px 0; }
  .quiz { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .quiz-body { padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
  .q-hint { display: none; }
  .q-actions .btn { width: 100%; }
  .cal-confirm .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
