/* floerfit — лендинг. Mobile-first: базові стилі для телефону, ширші екрани внизу. */

:root {
  --bg: #0a0a0b;
  --surface: #151517;
  --border: #29292e;
  --text: #ffffff;
  --muted: #a8a8b0;
  --accent: #ff3b47;     /* акцент у тексті (у темній — червоний) */
  --btn: #e3192a;        /* фон кнопки */
  --btn-hover: #c81422;
  --btn-ink: #ffffff;    /* текст на кнопці */
  --text-soft: #e4e4e8;  /* основний текст абзаців, трохи м'якший за --text */
  --inset: #0f0f11;      /* фон усередині карток (фото кейсів, цифри) */
  --topbar-bg: rgba(10, 10, 11, 0.92);
  --todo-bg: #1a170c;
  --todo-border: #6b5a1e;
  --todo-text: #e8c95a;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* Світла тема: кремовий фон і блакитно-сиреневий акцент (як у макеті тарифів). */
:root[data-theme="light"] {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --border: #e7e3dc;
  --text: #111113;
  --muted: #6b6a68;
  --accent: #2e6a96;
  --btn: #a9cbea;
  --btn-hover: #97bfe3;
  --btn-ink: #111113;
  --text-soft: #2a2a2e;
  --inset: #f2efe9;
  --topbar-bg: rgba(251, 249, 245, 0.92);
  --todo-bg: #fff6d6;
  --todo-border: #d9b84a;
  --todo-text: #6b5410;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 9.5vw, 60px); }
h2 { font-size: clamp(28px, 7.5vw, 44px); margin-bottom: 24px; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }

em { font-style: normal; color: var(--accent); }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Верхня стрічка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.topbar__brand { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.topbar__title { flex: 1; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; text-align: right; }

/* Перемикач теми */
.theme-switch {
  display: flex; flex-shrink: 0; gap: 2px; padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.theme-switch button {
  min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
/* На вузькому телефоні напис у стрічці не влазить поруч із перемикачем */
@media (max-width: 479px) { .topbar__title { display: none; } }

/* ---------- Перший екран ---------- */
.hero { border-top: 0; padding-top: 40px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}
.lead { margin-top: 18px; font-size: 19px; color: var(--text-soft); }

.story p { color: var(--text-soft); }
.story p + p { margin-top: 16px; }
.story__final {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  font-weight: 600;
  color: var(--text) !important;
}

/* ---------- Кнопки ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  margin-top: 28px;
  padding: 16px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn--ghost { margin-top: 12px; background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface); color: var(--text); }

.hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.hint--left { text-align: left; margin-top: 16px; }

/* ---------- Заглушки (прибрати перед запуском) ---------- */
.todo {
  padding: 18px;
  border: 2px dashed var(--todo-border);
  border-radius: var(--radius);
  background: var(--todo-bg);
  color: var(--todo-text);
  font-size: 15px;
}

/* ---------- Відео ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video__play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  width: 100%; padding: 0; border: 0;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.video__play span {
  display: grid; place-items: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-ink); font-size: 28px; padding-left: 5px;
}
.video .todo { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.video__cap {
  position: absolute; left: 8px; bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff; font-size: 13px; font-weight: 600;
  pointer-events: none;
}
/* Відео в картці тарифу (варіант B) */
.plan__video { margin: 0 0 18px; border-radius: 12px; background: var(--inset); }
.plan__video .video__play span { width: 56px; height: 56px; font-size: 20px; padding-left: 4px; }

/* ---------- Болі ---------- */
.pains { display: grid; gap: 12px; }
.pains li {
  position: relative;
  padding: 16px 16px 16px 46px;
  background: var(--surface);
  border-radius: var(--radius);
}
.pains li::before {
  content: "";
  position: absolute; left: 18px; top: 24px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Картки «Що входить» ---------- */
.cards { display: grid; gap: 12px; }
.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); }

/* ---------- Про мене ---------- */
.about { display: grid; gap: 20px; }
.about__photo { aspect-ratio: 4 / 5; max-width: 280px; display: grid; place-items: center; }
img.about__photo { width: 100%; height: auto; object-fit: cover; object-position: center 45%; border-radius: var(--radius); }
.about__name { font-size: 24px; font-weight: 800; }
.about .todo { margin-top: 14px; }
.facts { display: grid; gap: 10px; margin-top: 16px; }
.facts li { position: relative; padding-left: 22px; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.about__video { display: block; width: 100%; max-width: 320px; height: auto; margin-top: 24px; border-radius: var(--radius); background: var(--surface); }

/* ---------- Карусель кейсів ---------- */
.carousel__track {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }

.case {
  flex: 0 0 88%;
  max-width: 520px;
  scroll-snap-align: start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.carousel--single .case { flex-basis: 100%; margin: 0 auto; }

.case__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case__photo {
  position: relative;
  aspect-ratio: 6 / 11;
  border-radius: 12px;
  overflow: hidden;
  background: var(--inset);
}
.case__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.case__photo .todo { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 8px; font-size: 13px; }
.case__tag {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.case__tag--after { background: var(--btn); color: var(--btn-ink); }

.case__goal { margin-top: 16px; color: var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.case__name { margin-top: 2px; font-size: 22px; font-weight: 800; }
.case__goal + .case__start { margin-top: 2px; color: var(--text); font-size: 20px; font-weight: 800; }
.case__review { display: block; width: 100%; margin-top: 14px; border-radius: 12px; }
.case__start { color: var(--muted); font-size: 15px; }
.case__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.case__stats li {
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--inset);
  font-size: 14px; color: var(--muted);
}
.case__stats strong { display: block; color: var(--accent); font-size: 22px; line-height: 1.1; }
.case__quote { margin-top: 14px; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--text-soft); }

.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.carousel--single .carousel__nav { display: none; }
.carousel__arrow {
  width: 52px; height: 52px;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text);
  font-size: 20px; cursor: pointer;
}
.carousel__arrow:hover { border-color: var(--accent); }
.carousel__arrow[disabled] { opacity: 0.35; cursor: default; }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.carousel__dots span.is-active { background: var(--accent); }

/* ---------- Кроки ---------- */
.steps { counter-reset: step; display: grid; gap: 12px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 18px 18px 68px;
  background: var(--surface);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 16px; top: 16px;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-ink);
  font-weight: 800;
}
.steps p { margin-top: 4px; color: var(--muted); }

/* ---------- Тарифи (як у макеті) ---------- */
:root {
  --main-bg: linear-gradient(180deg, #1d1214 0, #151517 140px);
  --main-border: #ff3b47;
  --main-ink: #ffffff;
  --main-muted: #a8a8b0;
  --main-dot: #ff3b47;
  --main-shadow: 0 0 0 4px rgba(255, 59, 71, 0.10);
  --tag-bg: #e3192a;
  --tag-ink: #ffffff;
  --lim-bg: var(--main-bg);
  --lim-border: #ff3b47;
  --lim-ink: #ffffff;
  --lim-muted: #a8a8b0;
  --lim-dot: #ff3b47;
  --lim-shadow: var(--main-shadow);
  --lim-hover: rgba(255, 255, 255, 0.08);
}
:root[data-theme="light"] {
  --main-bg: #111113;
  --main-border: #111113;
  --main-ink: #ffffff;
  --main-muted: #c9c9cc;
  --main-dot: #a9cbea;
  --main-shadow: 0 24px 60px rgba(17, 17, 19, 0.25);
  --tag-bg: #a9cbea;
  --tag-ink: #111113;
  --lim-bg: linear-gradient(180deg, #e3effa 0, #ffffff 140px);
  --lim-border: #a9cbea;
  --lim-ink: var(--text);
  --lim-muted: var(--muted);
  --lim-dot: #2e6a96;
  --lim-shadow: 0 0 0 4px rgba(169, 203, 234, 0.25);
  --lim-hover: #e3effa;
}

.plans-sub { margin-top: -12px; color: var(--muted); }
.plans { display: grid; gap: 30px; margin-top: 36px; }
.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plan__price { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; }
.plan__price b { font-size: 46px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.plan__price s { font-size: 19px; color: var(--muted); }
.plan__per { margin-left: -4px; font-size: 17px; color: var(--muted); }
.plan--main .plan__per { color: var(--main-muted); }
.plan--limited .plan__per { color: var(--lim-muted); }
.plan__desc { margin-bottom: 18px; color: var(--muted); }
.plan__list { display: grid; gap: 10px; flex: 1; align-content: start; }
.plan__list li { position: relative; padding-left: 22px; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.plan__list li.is-base { font-weight: 700; }
.plan .btn { width: 100%; min-width: 0; margin-top: 24px; line-height: 1.25; text-wrap: balance; text-align: center; }
.plan__btn { background: transparent; border: 1px solid var(--border); color: var(--text); }
.plan__btn:hover { background: var(--bg); color: var(--text); }
.plan__tag {
  position: absolute; top: -14px; left: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-ink);
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}

.plan--main { background: var(--main-bg); border: 2px solid var(--main-border); box-shadow: var(--main-shadow); color: var(--main-ink); }
.plan--main .plan__desc, .plan--main .plan__price s { color: var(--main-muted); }
.plan--main .plan__list li::before { background: var(--main-dot); }

.plan--limited { background: var(--lim-bg); border-color: var(--lim-border); box-shadow: var(--lim-shadow); color: var(--lim-ink); }
.plan--limited .plan__desc, .plan--limited .plan__price s { color: var(--lim-muted); }
.plan--limited .plan__list li::before { background: var(--lim-dot); }
.plan--limited .plan__btn { color: var(--lim-ink); border-color: var(--lim-border); }
.plan--limited .plan__btn:hover { background: var(--lim-hover); }
/* Мітка «місць обмежена» — контурна, без заливки */
.plan--limited .plan__tag { background: var(--surface); color: var(--lim-dot); border: 1px solid var(--lim-border); }

/* На телефоні тарифи гортаються вбік (як на комп'ютері — в ряд), відкривається на «Веденні» */
@media (max-width: 859px) {
  .plans {
    position: relative; display: flex; gap: 12px;
    margin-left: -20px; margin-right: -20px;
    padding: 16px 20px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .plans::-webkit-scrollbar { display: none; }
  .plan { flex: 0 0 84%; scroll-snap-align: center; }
}
.plans-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.plans-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.plans-dots span.is-active { background: var(--accent); }
@media (min-width: 860px) { .plans-dots { display: none; } }
@media (min-width: 860px) {
  .wrap--wide { max-width: 1040px; }
  /* Бічні картки («Програма» і «1 на 1») однакової висоти, основна — трохи вища */
  .plans { grid-template-columns: 1fr 1.12fr 1fr; gap: 16px; align-items: stretch; }
  .plan:not(.plan--main) { margin: 28px 0; }
  .plan--main { padding: 36px 26px; }
  .plan--main .plan__price b { font-size: 52px; }
}

/* Вибір тарифу у формі */
.plan-pick { margin: 18px 0 0; padding: 0; border: 0; }
.plan-pick legend { margin-bottom: 6px; padding: 0; font-size: 15px; color: var(--muted); }
.plan-pick__options { display: grid; gap: 8px; }
.plan-pick label { position: relative; display: block; cursor: pointer; }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick span {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
}
.plan-pick span b { color: var(--muted); font-weight: 600; }
.plan-pick input:checked + span { border: 2px solid var(--accent); padding: 9px 15px; }
.plan-pick input:checked + span b { color: var(--accent); }
.plan-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--radius); }
.faq summary {
  position: relative;
  padding: 18px 52px 18px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent); font-size: 28px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 18px; color: var(--muted); }

/* ---------- Футер ---------- */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--border); }
.footer p { margin-top: 10px; }
.footer__brand { font-size: 22px; font-weight: 800; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.footer__links a { display: inline-block; padding: 8px 0; }

/* ---------- Форма (модальне вікно) ---------- */
.modal {
  width: 100%;
  max-width: 480px;
  max-height: 100dvh;
  margin: auto auto 0;
  padding: 28px 20px 24px;
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.75); }
.modal h2 { margin-bottom: 6px; padding-right: 44px; }
.modal__close {
  position: absolute; right: 10px; top: 10px;
  width: 48px; height: 48px;
  border: 0; background: none; color: var(--muted);
  font-size: 32px; line-height: 1; cursor: pointer;
}

.field { display: block; margin-top: 16px; }
.field span { display: block; margin-bottom: 6px; font-size: 15px; color: var(--muted); }
.field i { font-style: normal; opacity: 0.7; }
.field input {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px; /* ≥16px, щоб iPhone не збільшував сторінку */
}
.field input:focus { outline: 0; border-color: var(--accent); }
.field input.is-invalid { border-color: var(--accent); }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn { margin-top: 20px; }
.form .small { margin-top: 12px; text-align: center; }
.form__error { margin-top: 14px; color: var(--accent); font-size: 15px; }
.success p { margin-top: 8px; }

[hidden] { display: none !important; }

/* ---------- Ширші екрани ---------- */
@media (min-width: 720px) {
  body { font-size: 18px; }
  .section { padding: 80px 0; }
  .hero { padding-top: 72px; }
  .btn { width: auto; min-width: 320px; display: inline-flex; }
  .hint { text-align: left; }
  .cards { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 280px 1fr; align-items: start; }
  .carousel__track { padding: 0 max(20px, calc((100vw - 680px) / 2)); scroll-padding: 0 max(20px, calc((100vw - 680px) / 2)); }
  .case { flex-basis: 440px; }
  .carousel--single .case { flex-basis: 520px; margin: 0; }
  .modal { margin: auto; border-radius: 24px; }
  .form .btn, .success .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
