/* MiauWater — лендинг. Токены из Figma «Капелька» (1565:33062). */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f0f8fe;
  --card-soft: #f1f8fe;
  --ink: #174b71;
  --accent: #4b9fe4;
  --accent-light: #82c7ff;
  --accent-mid: #5fb0f3;
  --contrast: #72b1e6;
  --muted: rgba(23, 75, 113, 0.4);
  --secondary: rgba(58, 94, 124, 0.35);
  --shadow-card: 0 24px 80px rgba(33, 116, 207, 0.13);
  --radius-band: clamp(48px, 8.5vw, 148px);
  --radius-card: 32px;
  /* Nunito (self-hosted) первым — детерминированный вид на всех платформах;
     жирность/трекинг подогнаны под SF Pro Rounded из макета */
  --font: 'Nunito', ui-rounded, -apple-system, system-ui, 'Segoe UI', sans-serif;
  --container: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 32px);
  padding-right: clamp(20px, 4vw, 32px);
}

.accent { color: var(--accent); }

/* ---------- Полосы-секции ---------- */

.band { position: relative; }
.band--hero {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
}
.band--soft {
  background: var(--bg-soft);
}
.band--white { background: var(--bg); }

.section { padding: clamp(48px, 7vw, 96px) 0; }

/* ---------- Header ---------- */

/* Белая липкая верхняя панель: лого + тэглайн слева, GET справа */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 2px 18px rgba(33, 116, 207, 0.06);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header__icon {
  width: 39px;
  height: 39px;
  border-radius: 9px;
  box-shadow: 0 5px 15px rgba(33, 116, 207, 0.18);
}
.site-header__brandtext { display: flex; flex-direction: column; gap: 1px; }
.site-header__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}
.site-header__tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--muted);
}

/* Строка внутри hero: центрированное мини-лого + переключатель языка справа */
.hero__topline {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: clamp(14px, 1.8vw, 22px);
  min-height: 0;
}
.header-get {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 34px;
  padding: 0 16px;
  border-radius: 41px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(75, 159, 228, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.header-get:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(75, 159, 228, 0.4); filter: saturate(1.08); }
.header-get:active { transform: translateY(0); }
/* Переключатель языка = кнопка с текущей локалью + выпадающий список */
.lang-switch { position: relative; }
.lang-switch__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 41px;
  padding: 10px 15px 10px 18px;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(33, 116, 207, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lang-switch__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(33, 116, 207, 0.18); }
.lang-switch__chev { opacity: 0.75; transition: transform 0.25s ease; }
.lang-switch.is-open .lang-switch__chev { transform: rotate(180deg); }
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(33, 116, 207, 0.20);
  z-index: 20;
  animation: langMenuIn 0.18s ease;
}
@keyframes langMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lang-switch__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-switch__item:hover { background: var(--bg-soft); }
.lang-switch__item.is-active { background: var(--bg-soft); }
.lang-switch__item.is-active .lang-switch__name { color: var(--accent); }
.lang-switch__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.lang-switch__flag { font-size: 16px; line-height: 1; }
.lang-switch__cur { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Hero (центрированный: текст + кот-сёрфер под ним) ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0;
  padding-bottom: 0;
}
.hero__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(-30px, -1.9vw, -6px);
}
.hero__title {
  max-width: 15ch;
  font-size: clamp(38px, 5.4vw, 77px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* акцентная строка заголовка — мягкий градиент (как в макете) */
.hero__title .accent {
  background: linear-gradient(96deg, var(--accent) 12%, var(--accent-light) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.hero__subtitle {
  margin-top: 16px;
  max-width: 600px;
  font-size: clamp(15px, 1.45vw, 19px);
  line-height: 1.5;
  font-weight: 600;
  color: var(--muted);
}
/* App Store — поверх нижней части кота (на доске); полоса кончается по кромке картинки */
.band--hero .hero__cta {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 3.6vw, 58px);
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
}

/* Кот-сёрфер (hero_composite.jpg) — по центру под текстом; фон картинки почти сливается с полосой */
/* верхние ~30% картинки — пустое бледное небо (= цвет полосы); подтягиваем арт вверх,
   пустой верх незаметно уходит за текст, кот встаёт плотно к кнопке (как в макете) */
/* верхние ~30% картинки — пустое бледное небо (= цвет полосы); подтягиваем арт вверх,
   пустой верх незаметно уходит за текст, кот встаёт плотно под подзаголовок */
.hero__art {
  margin-top: calc(min(860px, 96vw) * -0.16);
  margin-bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.hero__composite {
  width: min(860px, 96%);
  height: auto;
  max-width: none;
}
/* на мобиле кот крупный — почти во весь экран, как в макете */
@media (max-width: 620px) {
  .hero__composite { width: 142vw; max-width: 620px; }
  .hero__art { margin-top: calc(142vw * -0.2); }
}

/* ---------- App Store CTA ---------- */

.store-cta {
  position: relative;
  display: inline-flex;
}
.store-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #000;
  border: 2px solid #fff;
  border-radius: 25px;
  padding: 14px 28px 14px 24px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(23, 75, 113, 0.18);
}
.store-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px rgba(23, 75, 113, 0.26); }
.store-btn:active { transform: translateY(0) scale(0.99); }
.store-btn__apple { width: 34px; height: 41px; }
.store-btn__text { display: flex; flex-direction: column; align-items: flex-start; white-space: nowrap; }
.store-btn__small {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
.store-btn__big {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
.free-badge {
  position: absolute;
  top: -15px;
  right: -34px;
  transform: rotate(-6deg);
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(75, 159, 228, 0.35);
  pointer-events: none;
}

/* ---------- Секции-сплиты ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.section-title {
  font-size: clamp(28px, calc(3.4vw + 6px), 42px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-subtitle {
  margin-top: 18px;
  font-size: clamp(15px, 1.45vw, 19px); /* = размер hero-подзаголовка */
  line-height: 1.5;
  font-weight: 600;
  color: var(--muted);
  max-width: 600px;
}

/* Телефоны прикреплены к нижней границе своих секций и клипаются её краем (как в макете) —
   так бинтуется «плавающая» тень: её нижняя часть уходит за границу секции */
#widgets {
  overflow: hidden;
  padding-bottom: 0;
}
#widgets .split { align-items: end; }
#widgets .split__text {
  align-self: center;
  padding-top: clamp(40px, 6vw, 90px);
  padding-bottom: clamp(40px, 6vw, 90px);
}
.widgets-phone, .cta-phone {
  display: block;
  margin: 0 auto;
}
.widgets-phone { width: min(459px, 96%); }
.cta-phone { width: min(445px, 92%); }

/* Секция «Отмечай напитки»: телефон по центру, кот — справа.
   Телефон и кот вырезаны из одного композита (phone_drinks.webp) через background-crop */
.drinks-scene {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* сцена держит телефон и кота в общем боксе шириной с телефон,
   чтобы кот был привязан к телефону на любой ширине (а не улетал к краю колонки) */
.drinks-stage {
  position: relative;
  width: min(385px, 56%);      /* как телефоны в блоке «Твоя привычка» */
}
.drinks-phone-wrap {
  display: block;
  width: 100%;
  line-height: 0;
}
.drinks-phone-img {
  display: block;
  width: 100%;
  height: auto;
}
.drinks-cat-img {
  position: absolute;
  right: -35%;             /* выступает за правый край телефона */
  bottom: 14%;
  width: min(240px, 62%);
  height: auto;
  z-index: 2;              /* кот поверх телефона */
  pointer-events: none;
}
/* колонке арта даём больше места под крупный телефон + кота (только десктоп) */
@media (min-width: 1025px) {
  #drinks .split { grid-template-columns: 0.72fr 1.28fr; }
}
/* на мобиле: телефон обрезаем под «250 ml», кот выше (вверх-вправо), телефон впритык к след. блоку */
@media (max-width: 620px) {
  #drinks { padding-bottom: 0; }
  .drinks-stage { display: contents; }   /* на мобиле бокс не нужен — телефон и кот как раньше */
  .drinks-phone-wrap {
    width: min(330px, 86%);     /* корпус телефона = как в блоке «Твоя привычка» */
    aspect-ratio: 742 / 915;    /* режем сразу под «250 ml» */
    overflow: hidden;
  }
  .drinks-cat-img {
    top: -6%;
    bottom: auto;
    right: -6%;
    width: min(210px, 44%);
  }
}

/* Два телефона в секции «Твоя привычка» (дашборд + профиль) */
.split__art--phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.habit-phone { width: min(410px, 52%); height: auto; }
.habit-phone--dash { position: relative; z-index: 2; }
.habit-phone--profile { position: relative; z-index: 1; margin-left: -9%; border-radius: 30px; }
/* второму блоку даём больше места под крупные телефоны (только десктоп) */
@media (min-width: 1025px) {
  #habit .split { grid-template-columns: 0.66fr 1.34fr; }
}
/* меньше воздуха сверху/снизу во втором блоке */
#habit { padding-top: clamp(16px, 2.4vw, 36px); padding-bottom: clamp(16px, 2.4vw, 36px); }

/* ---------- Калькулятор (Figma 1565:33755…33824, карточка 541×638) ---------- */

.calc-card {
  position: relative;
  background: #fff;
  border-radius: 38px;
  box-shadow: none;
  padding: 32px 22px 108px;
  width: min(541px, 100%);
  margin: 0 auto;
  height: 648px; /* фиксированная — заголовок не скачет, контент центрируется, кнопка внизу */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* тело шага — центрирует контент по вертикали между заголовком и кнопкой */
.calc-step__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 0;
}

/* прогресс-бар вместо точек */
.calc-progress {
  width: min(220px, 62%);
  height: 8px;
  border-radius: 60px;
  background: #e9f5ff;
  margin: 4px auto 30px;
  overflow: hidden;
}
.calc-progress__fill {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: 60px;
  background: linear-gradient(90deg, #a5d6ff, #6fb2e9);
  transition: width 0.35s ease;
}

.calc-step { display: none; flex-direction: column; flex: 1; position: relative; z-index: 2; }
.calc-step.is-active { display: flex; }

.calc-step__title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  max-width: 360px;
  margin: 0 auto;
}
.calc-step__subtitle {
  text-align: center;
  margin: 10px auto 0;
  max-width: 320px;
  font-size: 15.5px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--muted);
}

/* пол */
.gender-grid {
  display: flex;
  justify-content: center;
  gap: 20.5px;
  margin-top: 0;
}
.gender-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gender-tile {
  position: relative;
  width: 127px;
  height: 172px;
  border-radius: 13.7px;
  background: var(--card-soft);
  border: 2.56px solid transparent;
  transition: border-color 0.25s ease, transform 0.2s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}
.gender-tile:hover { transform: translateY(-2px); }
.gender-tile.is-selected { border-color: rgba(114, 177, 230, 0.85); }
.gender-tile__cat { height: 94%; object-fit: contain; }
.gender-tile__check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20.5px;
  height: 20.5px;
  border-radius: 50%;
  background: var(--card-soft);
  border: 0.86px solid rgba(41, 102, 151, 0.4);
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}
.gender-tile.is-selected .gender-tile__check,
.option-row.is-selected .option-row__check,
.calc-checkbox input:checked + .calc-checkbox__box {
  background-image: linear-gradient(180deg, #a5d6ff, #72b1e6);
  border-color: transparent;
}
.gender-tile.is-selected .gender-tile__check::after,
.option-row.is-selected .option-row__check::after,
.calc-checkbox input:checked + .calc-checkbox__box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.6l4.4 4.4 8.6-9.4' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 56% no-repeat;
}
.gender-tile__label { font-size: 14.5px; font-weight: 700; color: var(--accent); }

.calc-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  width: min(340px, 100%);
  background: var(--card-soft);
  border-radius: 18px;
  padding: 17px 24px;
  margin: 22px auto 0;
  transition: opacity 0.25s ease;
}
.calc-checkboxes.is-hidden { visibility: hidden; opacity: 0; }
.calc-checkbox {
  display: flex;
  align-items: center;
  gap: 13.7px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.calc-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.calc-checkbox__box {
  position: relative;
  width: 20.5px;
  height: 20.5px;
  border-radius: 5.1px;
  background: var(--card-soft);
  border: 0.86px solid rgba(41, 102, 151, 0.4);
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}
.calc-checkbox input:focus-visible + .calc-checkbox__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* вес */
.weight-block { margin-top: 0; width: min(333px, 100%); }
.weight-field {
  background: var(--card-soft);
  border-radius: 34px;
  width: min(333px, 100%);
  height: 67px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.weight-field__input {
  width: 3ch;
  background: transparent;
  border: none;
  outline: none;
  text-align: right;
  font-family: inherit;
  font-size: 32px;
  font-weight: 500;
  color: var(--contrast);
  caret-color: var(--accent);
  padding: 0;
}
.weight-field__unit {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(33, 116, 207, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.weight-field__unit:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(33, 116, 207, 0.2); }
.weight-field__unit:active { transform: translateY(0); }
.weight-hint {
  text-align: center;
  margin-top: 13px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(41, 102, 151, 0.4);
}

/* списки опций */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0 auto;
  width: min(325px, 100%);
}
.option-row {
  display: flex;
  align-items: center;
  gap: 8.8px;
  text-align: left;
  padding: 0;
  transition: transform 0.2s ease;
}
.option-row:hover { transform: translateX(2px); }
.option-row__art {
  position: relative;
  width: 78px;
  height: 70px;
  border-radius: 11.7px;
  background: var(--card-soft);
  flex-shrink: 0;
  overflow: hidden;
  border: 2.2px solid transparent;
  transition: border-color 0.25s ease;
}
.option-row.is-selected .option-row__art { border-color: rgba(114, 177, 230, 0.85); }
.option-row__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.option-row:hover .option-row__art img { opacity: 0.8; }
.option-row.is-selected .option-row__art img { opacity: 1; }
.option-row__check {
  position: absolute;
  top: 4.4px;
  left: 4.4px;
  width: 17.6px;
  height: 17.6px;
  border-radius: 50%;
  background: var(--card-soft);
  border: 0.73px solid rgba(58, 94, 124, 0.35);
}
.option-row__text { display: flex; flex-direction: column; gap: 2.9px; }
.option-row__title { font-size: 14.5px; font-weight: 700; color: var(--accent); }
.option-row__subtitle { font-size: 14px; line-height: 1.28; font-weight: 600; color: rgba(41, 102, 151, 0.4); }

/* результат (влезает в фиксированные 638px карточки; забирает зону кнопки «Продолжить») */
.calc-step--result { text-align: center; margin-bottom: -88px; }
.calc-result__label {
  margin-top: 0;
  font-size: 17px;
  font-weight: 600;
  color: rgba(41, 102, 151, 0.4);
}
.calc-result__value {
  margin-top: 5px;
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.calc-result__oz { margin-top: 2px; font-size: 15px; font-weight: 600; color: rgba(41, 102, 151, 0.4); }
.calc-result__app { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 4.3px; }
.calc-result__appicon {
  width: 92px;
  height: 92px;
  border-radius: 21px;
}
.calc-result__appname { font-size: 18.6px; font-weight: 700; color: var(--ink); margin-top: 5px; }
.calc-result__tagline { font-size: 12px; line-height: 1.3; font-weight: 600; color: rgba(23, 71, 111, 0.4); max-width: 200px; }
.calc-step--result .store-cta--card { margin: 14px auto 0; }
.calc-step--result .store-btn { border-radius: 21.6px; border-width: 1.84px; padding: 10px 22px 10px 18px; }
.calc-step--result .store-btn__big { font-size: 24px; }
.calc-step--result .store-btn__apple { width: 30px; height: 36px; }
.calc-restart {
  margin: 10px auto 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.calc-restart:hover { opacity: 1; }

/* кнопки карточки */
.calc-continue {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 31px;
  z-index: 3;
  height: 64px;
  border-radius: 60px;
  background: linear-gradient(180deg, rgba(186, 224, 255, 0.82), rgba(51, 148, 227, 0.82));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.calc-continue:hover { transform: translateY(-2px); filter: saturate(1.12); }
.calc-continue:active { transform: translateY(0) scale(0.985); }
.calc-back {
  position: absolute;
  left: 16px;
  top: 20px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--card-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease;
}
.calc-back:hover { transform: translateX(-1px); background: #e5f2fd; }

/* ---------- Чипы режимов (Figma 1565:33285) ---------- */

.split__art--modes { position: relative; }
.mode-chips { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 9px; }
.mode-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 306px;
  background: var(--card-soft);
  border-radius: 19.8px;
  padding: 9.9px 13.2px;
  transform: translateX(var(--shift, 0));
}
.mode-chip--active {
  width: 328px;
  background: #fff9ee;
  border: 1.77px solid rgba(255, 195, 78, 0.3);
  border-radius: 21.3px;
  box-shadow: 0 7px 60px 17px rgba(255, 230, 185, 0.37);
  padding: 15px 14px;
}
.mode-chip__icon { width: 39.7px; height: 39.7px; flex-shrink: 0; }
.mode-chip--active .mode-chip__icon { width: 42.5px; height: 42.5px; }
.mode-chip__icon img { width: 100%; height: 100%; object-fit: contain; }
.mode-chip__text { display: flex; flex-direction: column; gap: 3.3px; min-width: 0; }
.mode-chip__title { font-size: 14px; line-height: 1.06; font-weight: 700; color: var(--contrast); }
.mode-chip__subtitle { font-size: 12.4px; line-height: 1.33; font-weight: 600; color: rgba(41, 102, 151, 0.4); }
.mode-chip--active .mode-chip__title { font-size: 15.1px; color: #e1a531; }
.mode-chip--active .mode-chip__subtitle { font-size: 13.3px; color: rgba(26, 82, 127, 0.32); }
.mode-chip__badge {
  margin-left: auto;
  align-self: flex-start;
  background: #fff;
  border-radius: 45px;
  padding: 2.7px 7.1px;
  font-size: 13.3px;
  font-weight: 700;
  color: rgba(219, 156, 36, 0.66);
  white-space: nowrap;
}
/* кот ПОВЕРХ чипов, передними лапами наступает на нижнюю карточку (как в макете) */
.modes-cat {
  position: absolute;
  right: 42px;
  bottom: 32px;
  width: 206px;
  z-index: 3;
  pointer-events: none;
}

/* ---------- Челленджи (Figma 1565:33363) ---------- */

/* карточки прижаты к нижнему краю секции (как в макете) */
#challenges { overflow: hidden; padding-bottom: 0; }
#challenges .split { align-items: end; }
#challenges .split__text {
  align-self: center;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(48px, 7vw, 96px);
}
.challenge-cards { margin-bottom: -21px; }
.challenge-cards { display: flex; flex-direction: column; gap: 18.5px; width: min(455px, 100%); }
.challenge-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 121px;
  border-radius: 30px;
  overflow: hidden;
  padding-left: 144px;
  padding-right: 20px;
}
.challenge-card--kickstart { background: #ffffff; min-height: 132px; border-radius: 32.6px; }
.challenge-card--coffee { background: #fff5eb; }
.challenge-card--detox { background: #f6f9d3; }
.challenge-card--alcohol { background: #ffeefe; }
.challenge-card__art {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: auto;
  max-width: none;
}
.challenge-card--kickstart .challenge-card__art { left: 15px; }
.challenge-card--coffee .challenge-card__art { left: -5px; }
.challenge-card--detox .challenge-card__art { height: auto; width: 133px; top: auto; bottom: 0; }
.challenge-card--alcohol .challenge-card__art { left: 9px; height: auto; width: 126px; bottom: 0; }
.challenge-card__text { display: flex; flex-direction: column; gap: 4px; }
.challenge-card__title { font-size: 21.2px; line-height: 1.08; font-weight: 700; }
.challenge-card__subtitle { font-size: 18.6px; line-height: 1.35; font-weight: 600; }
.challenge-card--kickstart .challenge-card__title { color: #69ade5; }
.challenge-card--kickstart .challenge-card__subtitle { color: rgba(58, 94, 124, 0.35); }
.challenge-card--coffee .challenge-card__title { color: #c38f6f; }
.challenge-card--coffee .challenge-card__subtitle { color: rgba(113, 55, 19, 0.35); }
.challenge-card--detox .challenge-card__title { color: #afb127; }
.challenge-card--detox .challenge-card__subtitle { color: rgba(104, 105, 15, 0.35); }
.challenge-card--alcohol .challenge-card__title { color: #ee548a; }
.challenge-card--alcohol .challenge-card__subtitle { color: rgba(202, 35, 93, 0.35); }

/* ---------- Финальный CTA (Figma 1565:33638) ---------- */

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  margin: 0 auto;
  max-width: 300px;
}
.cta-block__icon {
  width: 161px;
  height: 161px;
  border-radius: 37px;
  box-shadow: 0 14px 36px rgba(33, 116, 207, 0.18);
}
.cta-block__name { margin-top: 16px; font-size: 30px; font-weight: 700; color: var(--ink); }
.cta-block__tagline { font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--muted); max-width: 240px; }
.cta-block__store { margin-top: 22px; }

/* ---------- Footer (Figma 1565:33752) ---------- */

.site-footer { padding: 64px 0 88px; background: var(--bg); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.site-footer a:hover { color: var(--accent); }

/* ---------- Адаптив ---------- */

@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; }
  .split--art-left .split__art { order: 2; }
  .split--art-left .split__text { order: 1; }
  .split__text { text-align: left; }        /* тексты секций — по левому краю */
  .section-subtitle { margin-left: 0; margin-right: 0; }
  .mode-chips, .challenge-cards { margin: 0 auto; }
  .split__art--modes { justify-content: center; }
  .mode-chip { transform: none; }
  .modes-cat { display: none; }

  /* в разложенном виде верхний отступ до заголовка — одинаковый у всех секций:
     habit поднимаем до базового, у widgets/challenges убираем двойной отступ текст-колонки */
  #habit { padding-top: clamp(48px, 7vw, 96px); }
  #widgets .split__text,
  #challenges .split__text { padding-top: 0; padding-bottom: 0; }
}

/* планшеты: секции компактнее, телефоны в «привычке» меньше */
@media (max-width: 768px) {
  .split { gap: clamp(26px, 6vw, 48px); }
  .habit-phone { width: min(320px, 50%); }
}

/* на мобиле в «Твоя привычка» — один крупный телефон (дашборд), обрезанный снизу под напитками */
@media (max-width: 620px) {
  #habit { padding-top: clamp(44px, 12vw, 56px); padding-bottom: 0; overflow: hidden; }
  .habit-phone--profile { display: none; }
  .habit-phone--dash {
    width: min(320px, 84%);
    aspect-ratio: 827 / 1103;   /* обрезаем телефон под подписями напитков */
    object-fit: cover;
    object-position: top center;
    display: block;
    margin-bottom: 0;
  }
}

/* на мобиле центр-лого в hero убираем (лого уже есть в белой панели) —
   в hero-строке остаётся только переключатель языка справа */
@media (max-width: 620px) {
  .hero__topline { padding-top: clamp(14px, 4vw, 22px); }
  /* переключатель языка компактнее */
  .lang-switch__btn { padding: 7px 12px 7px 14px; font-size: 15px; gap: 5px; }
  .lang-switch__flag { font-size: 14px; }
  .lang-switch__chev { width: 14px; height: 14px; }
}

/* плитки пола — резиновые, чтобы не переполнять карточку на узких экранах */
@media (max-width: 480px) {
  .gender-grid { gap: 14px; width: 100%; }
  .gender-col { flex: 1 1 0; min-width: 0; max-width: 158px; }
  .gender-tile { width: 100%; height: auto; aspect-ratio: 127 / 172; }
}

@media (max-width: 560px) {
  .site-header__icon { width: 35px; height: 35px; border-radius: 8px; }
  .site-header__name { font-size: 16.5px; }
  .site-header__tagline { font-size: 9.5px; }
  .topbar__brand { gap: 9px; }
  .topbar__inner { padding-top: 8px; padding-bottom: 8px; }
  .header-get { min-width: 54px; height: 32px; padding: 0 14px; font-size: 12.5px; }

  .store-btn { padding: 11px 22px 11px 18px; gap: 11px; border-radius: 20px; }
  .store-btn__apple { width: 26px; height: 32px; }
  .store-btn__big { font-size: 21px; }
  .store-btn__small { font-size: 10px; }
  .free-badge { right: -18px; font-size: 13px; }

  .calc-card { padding: 26px 18px 104px; }
  .calc-continue { left: 18px; right: 18px; height: 56px; font-size: 17px; }
  .option-row__subtitle { font-size: 13px; }
  .weight-field__input { font-size: 26px; }
}

@media (max-width: 400px) {
  .mode-chip, .mode-chip--active { width: 100%; }
}

/* челленджи на мобиле: карточки компактнее, меньше зазор от текста; нижний отступ = верхний */
@media (max-width: 620px) {
  #challenges { padding-bottom: clamp(48px, 7vw, 96px); }
  #challenges .split__text { padding-top: 0; padding-bottom: 0; }
  #challenges .split { gap: clamp(16px, 5vw, 26px); }
  .challenge-cards { gap: 12px; margin-bottom: 0; }
  .challenge-card { min-height: 88px; padding-left: 104px; padding-right: 16px; border-radius: 22px; }
  .challenge-card--kickstart { min-height: 96px; border-radius: 24px; }
  .challenge-card__title { font-size: 16px; }
  .challenge-card__subtitle { font-size: 13px; }
  .challenge-card--detox .challenge-card__art { width: 94px; }
  .challenge-card--alcohol .challenge-card__art { top: auto; bottom: 0; left: 4px; width: 94px; }
}

/* «Добавляй воду» на мобиле: верхний отступ как везде, меньше зазор текст→картинка */
@media (max-width: 620px) {
  #widgets .split__text { padding-top: 0; padding-bottom: 0; }
  #widgets .split { gap: clamp(12px, 4vw, 22px); }
}

/* финальный CTA на мобиле: иконка/текст меньше (кнопку не трогаем), меньше отступ до футера */
@media (max-width: 620px) {
  .cta-block__icon { width: 118px; height: 118px; border-radius: 27px; }
  .cta-block__name { font-size: 24px; margin-top: 8px; }
  .cta-block__tagline { font-size: 15px; }
  #download { padding-bottom: clamp(18px, 5vw, 32px); }
  .site-footer { padding-top: 30px; padding-bottom: 56px; }
}

@media (max-width: 340px) {
  .site-header__name { font-size: 17px; }
  .site-header__tagline { font-size: 10.5px; }
  .hero__title { font-size: 33px; }
}

/* ---------- Подгонка Nunito под SF Pro Rounded (фидбек владельца: жирнее, плотнее) ---------- */

.hero__title, .section-title { font-weight: 800; letter-spacing: -0.022em; }
.hero__subtitle, .section-subtitle { font-weight: 700; letter-spacing: -0.008em; }
.calc-step__title { font-weight: 800; letter-spacing: -0.01em; }
.calc-step__subtitle { font-weight: 600; }
.gender-tile__label,
.option-row__title,
.calc-checkbox,
.mode-chip__title,
.challenge-card__title,
.calc-result__appname,
.calc-result__value,
.cta-block__name,
.site-header__name,
.calc-continue,
.free-badge,
.lang-switch { font-weight: 800; }
.option-row__subtitle,
.mode-chip__subtitle,
.challenge-card__subtitle,
.weight-hint,
.calc-result__tagline,
.cta-block__tagline,
.site-footer__inner { font-weight: 700; }

/* ---------- След воды на кнопках: за курсором остаются капли-разводы, которые растворяются ---------- */

.store-btn,
.header-get,
.calc-continue,
.lang-switch__btn,
.weight-field__unit {
  overflow: hidden;
  isolation: isolate;
}
/* position:relative только статичным кнопкам — у .calc-continue своя position:absolute */
.store-btn,
.header-get,
.lang-switch__btn,
.weight-field__unit { position: relative; }

.liquid-drop {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.28) rotate(var(--rot, 0deg));
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.6),
    rgba(175, 218, 255, 0.32) 42%,
    transparent 70%);
  filter: blur(4px);
  mix-blend-mode: screen;
  animation: liquidDrop 0.95s ease-out forwards;
}
@keyframes liquidDrop {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.22) rotate(var(--rot, 0deg)); }
  22%  { opacity: 0.9; }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.9) rotate(var(--rot, 0deg)); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
