/* ============================================================================
   Trenero — лендинг /about
   Дизайн-система Studio: пергамент, терракота, NB-рамки на главном, спокойные
   рабочие поверхности на повторяющемся. Механика скролла — scrollcraft
   (vendor/scrollcraft, MIT); здесь только тема и собственные классы страницы.
   ========================================================================== */

:root {
  --bg: #f5f4ed;
  --bg-2: #eeece2;
  --card: #ffffff;
  --ink: #141413;
  --ink-2: #3d3c38;
  --muted: #5e5d59;
  --line: #e2dfd2;
  --line-strong: #c9c5b6;
  --nb: #141413;
  --accent: #c96442;
  --accent-ink: #9c452c;
  --on-accent: #141413;
  --accent-soft: #f6e3d9;
  --ok: #087650;
  --warn: #985108;
  --alert: #b42318;
  --protein: #397b83;
  --fat: #996d37;
  --carbs: #846b9c;
  --chat: #f0eee6;
  --night: #141413;
  --night-ink: #f5f4ed;
  --night-soft: #d6d4cb;

  --shadow: 4px 4px 0 0 #000;
  --shadow-sm: 2px 2px 0 0 #000;
  --shadow-lg: 6px 6px 0 0 #000;
  --r-nb: 5px;
  --r-card: 10px;
  --r-work: 12px;
  --bar-h: 64px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);

  --font: 'Commissioner', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* scrollcraft читает эти шесть ролей и два шрифта */
  --sc-canvas: var(--bg);
  --sc-surface: var(--card);
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--ink-2);
  --sc-accent: var(--accent);
  --sc-accent-ink: var(--on-accent);
  --sc-font-display: var(--font);
  --sc-font-text: var(--font);
  --sc-gutter: clamp(16px, 4.4vw, 56px);
  --sc-maxw: 1240px;
  --sc-shadow-color: 40 10% 10%;
}

[data-theme='dark'] {
  --bg: #121210;
  --bg-2: #1a1a18;
  --card: #232321;
  --ink: #e8e6dc;
  --ink-2: #cfcdc3;
  --muted: #aaa89e;
  --line: #3a3a33;
  --line-strong: #5a5a50;
  --nb: #e8e6dc;
  --accent: #c96442;
  --accent-ink: #ec9a7a;
  --on-accent: #141413;
  --accent-soft: #3a2820;
  --ok: #34d399;
  --warn: #fbbf24;
  --alert: #f87171;
  --protein: #80b6bd;
  --fat: #cfac79;
  --carbs: #b9a1cf;
  --chat: #2c2c29;
  --night: #0b0b0a;
  --shadow: 4px 4px 0 0 rgba(232, 230, 220, 0.28), 0 8px 20px rgba(0, 0, 0, 0.7);
  --shadow-sm: 2px 2px 0 0 rgba(232, 230, 220, 0.24), 0 4px 10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 6px 6px 0 0 rgba(232, 230, 220, 0.32), 0 12px 28px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

html {
  scroll-padding-top: calc(var(--bar-h) + 8px);
}

body {
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--bg);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wrap {
  width: 100%;
  max-width: var(--sc-maxw);
  margin-inline: auto;
  padding-inline: var(--sc-gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--nb);
  border-radius: var(--r-nb);
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}
.skip:focus-visible {
  transform: none;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  font: 700 16px/1.1 var(--font);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border: 2px solid var(--nb);
  border-radius: var(--r-nb);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    transform 140ms var(--ease),
    box-shadow 140ms var(--ease);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 #000;
  }
}
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--ghost,
.btn--card {
  background: var(--card);
  color: var(--ink);
}
.btn--light {
  background: #faf9f5;
  color: #141413;
  border-color: #faf9f5;
}
.btn--lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 18px;
}
.btn--sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------------- bar */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--bar-h);
  background: var(--bg);
  border-bottom: 2px solid var(--nb);
}
.bar__in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}
.brand__word {
  font-family: 'Space Grotesk', var(--font);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.bar__nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.bar__nav a,
.bar__login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-nb);
}
@media (hover: hover) and (pointer: fine) {
  .bar__nav a:hover,
  .bar__login:hover {
    background: var(--bg-2);
  }
}
.bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ------------------------------------------------------------------- hero */
.hero {
  padding: calc(var(--bar-h) + clamp(28px, 5vw, 72px)) 0 clamp(56px, 8vw, 112px);
  overflow: clip;
}
.hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}
.hero__title {
  font-size: clamp(2.5rem, 1.1rem + 4.5vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 11ch;
}
.strike {
  position: relative;
  white-space: nowrap;
}
.strike::after {
  content: '';
  position: absolute;
  left: -3%;
  right: -3%;
  top: 54%;
  height: 0.11em;
  background: var(--accent);
  border-radius: 2px;
  transform-origin: left center;
  transform: rotate(-4deg) scaleX(0);
  animation: strike 620ms var(--ease) 650ms forwards;
}
@keyframes strike {
  to {
    transform: rotate(-4deg) scaleX(1);
  }
}
.hero__lead {
  margin-top: clamp(18px, 2vw, 26px);
  max-width: 34ch;
  font-size: clamp(17px, 0.9rem + 0.4vw, 20px);
  color: var(--ink-2);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: clamp(24px, 3vw, 36px);
}
.assure {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}
.assure li::before {
  content: '✓';
  margin-right: 8px;
  color: var(--accent-ink);
}
.hero__apps {
  margin-top: clamp(18px, 2vw, 26px);
  font-size: 14px;
  color: var(--muted);
}
.hero__apps a {
  color: var(--ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* сцена hero: четыре плана интерфейса, сдвиг от курсора и скролла */
.hero__stage {
  position: relative;
  height: clamp(440px, 44vw, 600px);
  --mx: 0;
  --my: 0;
  --sy: 0;
}
.plane {
  position: absolute;
  transform: translate3d(
    calc(var(--mx) * var(--d) * 14px),
    calc(var(--my) * var(--d) * 10px + var(--sy) * var(--d) * -48px),
    0
  );
}
.plane--back {
  top: 0;
  right: 0;
  width: 58%;
}
.plane--card {
  top: 15%;
  left: 2%;
  width: 72%;
}
.plane--phone {
  --dw: clamp(176px, 14.5vw, 206px);
  right: 4%;
  bottom: 0;
  width: var(--dw);
}
/* Размер корпуса задаёт плоскость; .device ниже объявляет 252px по умолчанию. */
.device.device--hero {
  --dw: inherit;
  box-shadow: var(--shadow);
}
.plane--toast {
  bottom: 4%;
  left: 0;
}

.ui-panel {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-work);
  padding: 14px 16px;
  box-shadow: 0 10px 30px -12px rgba(20, 20, 19, 0.25);
}
.ui-card {
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--nb);
  font-size: 14px;
  font-weight: 800;
}
.avatar--sm {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1.5px solid var(--nb);
}
.pill--on {
  background: var(--accent);
  color: var(--on-accent);
}

.dash__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.dash__when {
  font-size: 12px;
  color: var(--muted);
}
.dash__head strong {
  font-size: 16px;
}
.dash__row,
.alerts__row {
  display: grid;
  grid-template-columns: 10px auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
}
.dash__row span,
.alerts__row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash__row i,
.alerts__row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dash__row--alert i,
.alerts__row--alert i {
  background: var(--alert);
}
.dash__row--warn i,
.alerts__row--warn i {
  background: var(--warn);
}
.dash__row--ok i,
.alerts__row--ok i {
  background: var(--ok);
}

.client {
  padding: 16px;
}
.client__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client__who {
  display: grid;
  flex: 1;
  min-width: 0;
}
.client__who b {
  font-size: 17px;
}
.client__who span {
  font-size: 13px;
  color: var(--muted);
}
.client__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border: 1.5px solid var(--nb);
  border-radius: 8px;
}
.client__stats div {
  display: grid;
  padding: 8px 10px;
}
.client__stats div + div {
  border-left: 1.5px solid var(--nb);
}
.client__stats b {
  font-size: 17px;
}
.client__stats span {
  font-size: 12px;
  color: var(--muted);
}
.client__tabs {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}
.client__tabs span {
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.client__tabs .is-on {
  background: var(--accent);
  color: var(--on-accent);
}
.client__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.mini {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
}
.mini__label {
  font-size: 12px;
  color: var(--muted);
}
.bar-track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--accent);
}
.spark {
  width: 100%;
  height: 36px;
}
.spark__raw,
.trend__raw {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.spark__trend,
.trend__avg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone__screen {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 6px 12px 0;
  font-size: 12px;
}
.phone__eyebrow {
  color: var(--muted);
}
.phone__title {
  font-size: 16px;
}
.phone__plan {
  color: var(--muted);
  margin-bottom: 4px;
}
.set {
  display: grid;
  grid-template-columns: 20px 1fr 18px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.set span {
  font-weight: 700;
  color: var(--muted);
}
.set b {
  font-family: var(--mono);
  font-size: 13px;
}
.set i {
  font-style: normal;
  color: var(--ok);
  font-weight: 800;
}
.set.is-done {
  background: var(--bg);
}
.set.is-now {
  border: 1.5px solid var(--nb);
}
.phone__timer {
  justify-self: start;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  max-width: 300px;
  font-size: 13px;
  background: var(--card);
  border: 1.5px solid var(--nb);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
}
.toast img {
  border-radius: 4px;
}

/* ---------------------------------------------------------------- morning */
.morning {
  padding: clamp(72px, 11vw, 168px) 0;
}
.morning__in {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(32px, 6vw, 96px);
}
.morning__title {
  font-size: clamp(2rem, 0.9rem + 3.4vw, 4.1rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.morning__side {
  display: grid;
  justify-items: end;
}
.morning__mascot {
  width: clamp(120px, 13vw, 180px);
  height: auto;
  margin-bottom: -10px;
  margin-right: 12px;
}
.morning__list {
  justify-self: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--nb);
}
.morning__list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 18px;
  color: var(--ink-2);
}
.morning__list b {
  color: var(--ink);
}

/* ------------------------------------------------------------------- peak */
.peak {
  background: var(--bg-2);
  border-block: 2px solid var(--nb);
}
.peak__stage {
  display: flex;
  padding-top: calc(var(--bar-h) + clamp(12px, 3vh, 36px));
  padding-bottom: clamp(16px, 3vh, 36px);
}
.peak__in {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.6vh, 32px);
  height: 100%;
}
/* Три реплики лежат в одной ячейке сетки: высота блока равна самой длинной,
   поэтому перенос строки не наезжает на колонки ниже. */
.peak__copy {
  display: grid;
}
.peak__line {
  grid-area: 1 / 1;
  max-width: 62rem;
}
.peak__h {
  font-size: clamp(1.45rem, 0.8rem + 2.1vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.peak__p {
  margin-top: 8px;
  font-size: clamp(15px, 0.82rem + 0.35vw, 18px);
  color: var(--ink-2);
}
.peak__split {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(20px, 5vw, 80px);
  --stamp: 0;
}
.pane {
  display: grid;
  gap: 10px;
  min-height: 0;
}
.pane__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.pane__label--accent {
  color: var(--accent-ink);
}

.chat {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.chat__who {
  display: grid;
  flex: 1;
  font-size: 14px;
}
.chat__who span {
  font-size: 12px;
  color: var(--muted);
}
.chat__unread {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--alert);
  color: #fff;
  font: 700 13px/1 var(--mono);
  transition:
    background 200ms,
    color 200ms;
}
.chat__unread.is-zero {
  background: var(--ok);
}
.chat__feed {
  display: grid;
  gap: 8px;
  padding: 14px;
  justify-items: start;
}
.bubble {
  position: relative;
  max-width: 92%;
  padding: 9px 12px 18px;
  font-size: 14px;
  line-height: 1.35;
  background: var(--chat);
  border-radius: 16px 16px 16px 4px;
  transition: opacity 220ms;
}
.bubble time {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 11px;
  color: var(--muted);
}
.bubble--photos {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 6px;
}
.bubble--photos em {
  grid-column: 1 / -1;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}
.ph {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: linear-gradient(160deg, #d9b9a6, #a77d68);
}
/* Сообщение «ушло» в карточку: на его месте остаётся пустая пунктирная ячейка. */
.bubble.is-sent {
  color: transparent;
  background: transparent;
  outline: 1.5px dashed var(--line-strong);
  outline-offset: -1.5px;
}
.bubble.is-sent * {
  visibility: hidden;
}
.bubble.is-answered {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
}
.chat__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 8px;
  justify-self: stretch;
}
.chat__note {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 1.5px solid var(--nb);
  border-radius: 8px;
  opacity: var(--fill, 0);
  transform: translateY(calc((1 - var(--fill, 0)) * 8px));
}
@media (hover: hover) and (pointer: fine) {
  .bubble[data-bubble] {
    cursor: pointer;
  }
  .bubble[data-bubble]:not(.is-sent):hover {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
}

.cc {
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
}
.cc__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc__who {
  display: grid;
  flex: 1;
  min-width: 0;
  font-size: 15px;
}
.cc__who span {
  font-size: 12px;
  color: var(--muted);
}
.cc__stamp {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--accent);
  border: 1.5px solid var(--nb);
  border-radius: 4px;
  opacity: var(--stamp);
  transform: rotate(calc((1 - var(--stamp)) * 8deg)) scale(calc(0.9 + var(--stamp) * 0.1));
}
.cc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.slot {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 84px;
  padding: 10px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  transition:
    border-color 200ms,
    background 200ms;
}
.slot--wide {
  grid-column: 1 / -1;
  min-height: 68px;
}
.slot__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.slot__body {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
  opacity: var(--fill, 0);
  transform: translateY(calc((1 - var(--fill, 0)) * 6px));
}
.slot.is-filled {
  border-style: solid;
  border-color: var(--nb);
  background: var(--bg);
}
.slot[data-slot='program'] .slot__body {
  --fill: 1;
}
.slot__body--photos {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 6px;
}
.slot__body--sets .num {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line-strong);
}
.slot__body--sets .is-low {
  border-color: var(--accent);
}
.slot__body--sets em {
  font-style: normal;
  color: var(--accent-ink);
  font-weight: 700;
}
.slot__body--food {
  display: grid;
  gap: 4px;
}
.macro {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.macro i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--protein);
}
.cc__next {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14px;
  opacity: var(--stamp);
}
.cc__next span {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
}
.peak__ghosts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.ghost {
  position: absolute;
  margin: 0;
  opacity: 0;
  transition: none;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--nb);
  will-change: transform, opacity;
}

/* ------------------------------------------------------------- sec heads */
.sec-head {
  max-width: 44rem;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.sec-head h2 {
  font-size: clamp(2rem, 1rem + 2.8vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.sec-head p {
  margin-top: 14px;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 52ch;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-ink);
}
.kicker::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--accent);
}

/* --------------------------------------------------------------- features */
.features {
  padding: clamp(72px, 10vw, 144px) 0;
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    'program program app'
    'progress food app'
    'dash dash dash';
  gap: clamp(14px, 1.6vw, 22px);
}
.tile {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: clamp(18px, 2vw, 28px);
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: var(--r-work);
}
.tile h3 {
  font-size: clamp(1.2rem, 1rem + 0.5vw, 1.45rem);
  letter-spacing: -0.02em;
}
.tile p {
  margin-top: 8px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 46ch;
}
.tile--program {
  grid-area: program;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  box-shadow: var(--shadow-lg);
}
.tile--app {
  grid-area: app;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
}
.tile--progress {
  grid-area: progress;
}
.tile--food {
  grid-area: food;
}
.tile--dash {
  grid-area: dash;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
}

/* Нагрузка по неделям: рабочий вес из отметок клиента. Шкала полос
   начинается с 60 кг, поэтому подписи значений обязательны. */
.load {
  margin: 0;
  display: grid;
  gap: 14px;
  align-self: center;
}
.load__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.load__head b {
  font-size: 15px;
}
.load__head span {
  font-size: 13px;
  color: var(--muted);
}
.load__rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.load__rows li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 10px;
}
.load__wk {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.load__track {
  position: relative;
  height: 26px;
}
.load__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--w) * 100%);
  background: var(--accent);
  border: 1.5px solid var(--nb);
  border-radius: 4px;
  transform-origin: left center;
}
.is-deload .load__bar {
  background: repeating-linear-gradient(-45deg, var(--card) 0 4px, var(--line-strong) 4px 7px);
}
.load__tag {
  position: absolute;
  top: 50%;
  left: calc(var(--w) * 100% + 8px);
  transform: translateY(-50%);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.load__val {
  justify-self: end;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.load__val b {
  font-size: 15px;
  color: var(--ink);
}
.is-deload .load__val b {
  color: var(--ink-2);
}
.tile .load__note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  max-width: none;
}

/* До появления на экране полосы свёрнуты; landing.js снимает data-load-armed,
   когда график виден. Без скрипта атрибута нет — всё видно сразу. */
.load .load__bar {
  transition: transform 760ms var(--ease) calc(120ms + var(--i) * 110ms);
}
.load .load__val,
.load .load__tag {
  transition: opacity 360ms var(--ease) calc(420ms + var(--i) * 110ms);
}
.load[data-load-armed] .load__bar {
  transform: scaleX(0.02);
}
.load[data-load-armed] .load__val,
.load[data-load-armed] .load__tag {
  opacity: 0;
}

/* ----------------------------------------------------------- телефон */
/* Пропорции корпуса iPhone (71,5 × 147 мм), «островок», статус-бар и
   индикатор «домой». Экран — тренировка клиента в стиле приложения. */
.device {
  --dw: 252px;
  position: relative;
  justify-self: center;
  align-self: center;
  width: min(var(--dw), 100%);
  aspect-ratio: 71.5 / 147;
  padding: calc(var(--dw) * 0.032);
  border: 2px solid var(--nb);
  border-radius: calc(var(--dw) * 0.183);
  background: #141413;
  box-shadow: var(--shadow-lg);
  transition:
    opacity 600ms var(--ease),
    transform 800ms var(--ease);
}
.device::before,
.device::after {
  content: '';
  position: absolute;
  width: 4px;
  background: var(--nb);
}
/* Кнопка действия и громкость слева, питание справа. */
.device::before {
  left: -6px;
  top: 17%;
  height: 5%;
  border-radius: 3px 0 0 3px;
  box-shadow:
    0 calc(var(--dw) * 0.2) 0 0 var(--nb),
    0 calc(var(--dw) * 0.38) 0 0 var(--nb);
}
.device::after {
  right: -6px;
  top: 27%;
  height: 13%;
  border-radius: 0 3px 3px 0;
}
.device__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--dw) * 0.15);
  background: var(--bg);
  color: var(--ink);
}
.device--hero .device__screen {
  background: var(--card);
}
.device__status {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: calc(var(--dw) * 0.135 + 6px);
  padding: 4px calc(var(--dw) * 0.08) 0 calc(var(--dw) * 0.095);
}
.device__time {
  font-size: max(12px, calc(var(--dw) * 0.052));
  font-weight: 700;
}
.device__island {
  width: calc(var(--dw) * 0.286);
  height: calc(var(--dw) * 0.083);
  border-radius: 999px;
  background: #000;
}
.device__sys {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: calc(var(--dw) * 0.02);
}
.device__sys svg {
  height: auto;
  fill: var(--ink);
}
.device__sig {
  width: calc(var(--dw) * 0.067);
}
.device__bat {
  width: calc(var(--dw) * 0.1);
}
.device__sys .device__cell {
  fill: none;
  stroke: var(--ink);
  opacity: 0.45;
}
.device__home {
  flex: none;
  width: calc(var(--dw) * 0.365);
  height: 4px;
  margin: calc(var(--dw) * 0.024) auto calc(var(--dw) * 0.028);
  border-radius: 3px;
  background: var(--ink);
}

.app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 11px 0;
  font-size: 12px;
}
.app svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app__head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app__back {
  flex: none;
  width: 18px;
  height: 18px;
}
.app__head span {
  display: grid;
  line-height: 1.2;
}
.app__head b {
  font-size: 15px;
}
.app__head small {
  font-size: 12px;
  color: var(--muted);
}
.xcard {
  display: grid;
  gap: 5px;
  padding: 9px 8px 8px;
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: 6px;
}
.xcard__head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
}
.xcard__icon,
.xcard__video {
  display: grid;
  place-items: center;
  height: 26px;
  border: 1.5px solid var(--nb);
  border-radius: 5px;
}
.xcard__icon {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.xcard__icon svg {
  width: 15px;
  height: 15px;
}
.xcard__video {
  height: 28px;
  background: var(--accent);
  color: var(--on-accent);
}
.xcard__video svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
.xcard__name {
  display: grid;
  line-height: 1.2;
}
.xcard__name b {
  font-size: 14px;
}
.xcard__name small {
  font-size: 12px;
  color: var(--muted);
}
.xcard__prev {
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink-2);
}
.xcard__prev b {
  color: var(--ink);
}
.xcard__cols,
.lset {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) minmax(0, 0.7fr) 22px;
  align-items: center;
  gap: 5px;
}
.xcard__cols {
  margin-top: 2px;
  padding: 0 2px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.lset > span {
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.lset > b {
  display: grid;
  place-items: center;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
  transition:
    border-color 240ms var(--ease),
    background-color 240ms var(--ease),
    color 240ms var(--ease);
}
.lset > i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  font-style: normal;
  transition:
    background-color 240ms var(--ease),
    border-color 240ms var(--ease);
}
.lset > i::after {
  content: '';
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border: solid var(--card);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
  transition: transform 320ms var(--ease);
}
.lset.is-now > b {
  border: 1.5px solid var(--nb);
  color: var(--ink);
}
.lset.is-now > i {
  border-color: var(--nb);
}
.lset.is-done > b {
  border-color: transparent;
  background: var(--bg);
  color: var(--ink);
}
.lset.is-done > i {
  border-color: var(--ok);
  background: var(--ok);
}
.lset.is-done > i::after {
  transform: rotate(-45deg) scale(1);
}

.rest {
  display: grid;
  grid-template-columns: 16px auto auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  background: var(--card);
  border: 1.5px solid var(--nb);
  border-radius: 6px;
}
.rest svg {
  width: 16px;
  height: 16px;
  color: var(--accent-ink);
}
.rest > span:first-of-type {
  font-weight: 600;
}
.rest b {
  font-size: 13px;
}
.rest__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-2);
}
.rest__bar i {
  display: block;
  height: 100%;
  width: calc(var(--rest, 1) * 100%);
  background: var(--accent);
  transition: width 1s linear;
}
.xnext {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
}
.xnext__n {
  display: grid;
  place-items: center;
  height: 22px;
  border-radius: 4px;
  background: var(--bg);
  font-weight: 700;
  color: var(--muted);
}
.xnext > span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.xnext b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xnext small {
  font-size: 12px;
  color: var(--muted);
}
.app__finish {
  display: grid;
  place-items: center;
  margin-top: auto;
  min-height: 38px;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--nb);
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 700;
}

/* Появление: landing.js ставит data-demo="armed" до того, как телефон
   попадёт в кадр, и меняет на "on", когда его видно. Без скрипта и при
   reduced motion атрибута нет — экран показан сразу целиком. */
.device [data-step] {
  transition:
    opacity 460ms var(--ease) calc(260ms + var(--s) * 100ms),
    transform 560ms var(--ease) calc(260ms + var(--s) * 100ms);
}
.device[data-demo='armed'] {
  opacity: 0;
  transform: translateY(36px) rotate(-3deg);
}
.device[data-demo='armed'] [data-step] {
  opacity: 0;
  transform: translateY(12px);
}
.device[data-demo='armed'] .lset.is-done > i {
  border-color: var(--line-strong);
  background: transparent;
}
.device[data-demo='armed'] .lset.is-done > i::after {
  transform: rotate(-45deg) scale(0);
}
.device[data-demo='on'] .lset.is-done > i,
.device[data-demo='on'] .lset.is-done > i::after {
  transition-delay: calc(900ms + var(--s) * 160ms);
}
.device[data-demo='live'] .lset > i,
.device[data-demo='live'] .lset > i::after,
.device[data-demo='live'] .lset > b {
  transition-delay: 0ms;
}
.device__tap {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 22%, transparent);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
}
.device__tap.is-pressed {
  animation: tap 560ms var(--ease);
}
@keyframes tap {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.store {
  display: grid;
  min-height: 44px;
  padding: 6px 12px;
  text-decoration: none;
  border: 1.5px solid var(--nb);
  border-radius: 8px;
  line-height: 1.15;
}
.store span {
  font-weight: 800;
  font-size: 14px;
}
.store small {
  font-size: 12px;
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .store:hover {
    background: var(--bg);
  }
}

.trend__now {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 14px;
}
.trend__now b {
  font-size: 28px;
}
.trend__now span {
  color: var(--ink-2);
  font-weight: 700;
}
.trend svg {
  width: 100%;
  height: 84px;
  margin-top: 8px;
}
.trend__legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.trend__legend span:last-child {
  color: var(--accent-ink);
  font-weight: 700;
}

.macros {
  display: grid;
  gap: 10px;
}
.macros__row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.macros__row i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.macros__row i::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--ink);
}
.macros__row--kcal i::before {
  background: var(--accent);
}
.macros__row--p i::before {
  background: var(--protein);
}
.macros__row--f i::before {
  background: var(--fat);
}
.macros__row--c i::before {
  background: var(--carbs);
}

.alerts {
  display: grid;
  border-top: 2px solid var(--nb);
}
.alerts__row {
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

/* ------------------------------------------------------------------- case */
.case {
  padding: clamp(72px, 10vw, 144px) 0;
  background: var(--card);
  border-block: 2px solid var(--nb);
}
.case__in {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(32px, 5vw, 80px);
}
.case__copy > * + * {
  margin-top: 18px;
}
.case__title {
  font-size: clamp(1.9rem, 1rem + 2.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.case__copy > p {
  color: var(--ink-2);
  max-width: 52ch;
}
.facts {
  margin: 26px 0 0;
  border-top: 2px solid var(--nb);
}
.facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-weight: 600;
}
.quote {
  margin: 28px 0 0;
}
.quote p {
  font-size: clamp(19px, 1rem + 0.5vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.quote footer {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.quote--client p {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-2);
}

.carousel {
  min-width: 0;
}
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 400px);
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 8px 12px 4px;
  border-radius: var(--r-card);
}
.carousel__track::-webkit-scrollbar {
  display: none;
}
.slide {
  margin: 0;
  scroll-snap-align: start;
  border: 2px solid var(--nb);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.slide img {
  width: 100%;
  height: auto;
}
.carousel__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.carousel__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font: 800 18px/1 var(--font);
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: var(--r-nb);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 120ms var(--ease),
    box-shadow 120ms var(--ease),
    opacity 120ms;
}
.carousel__btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}
.carousel__count {
  min-width: 52px;
  text-align: center;
  font-weight: 700;
}

/* ------------------------------------------------------------------ start */
.start {
  padding: clamp(72px, 10vw, 144px) 0 clamp(36px, 5vw, 72px);
}
.start__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 80px);
  border-top: 2px solid var(--nb);
}
.answer {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line-strong);
}
.answer h3 {
  font-size: 21px;
  letter-spacing: -0.02em;
}
.answer p {
  margin-top: 8px;
  color: var(--ink-2);
  max-width: 48ch;
}

/* ---------------------------------------------------------------- pricing */
.pricing {
  padding: clamp(56px, 8vw, 112px) 0 clamp(72px, 10vw, 144px);
}
.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px 20px;
  background: var(--card);
  border: 2px solid var(--nb);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.plan h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.plan__price b {
  font-size: clamp(28px, 1.2rem + 1vw, 36px);
}
.plan__price span {
  font-size: 14px;
  font-weight: 600;
}
.plan__for {
  font-size: 15px;
  min-height: 3em;
}
.plan ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 14px 0 0;
  list-style: none;
  font-size: 15px;
  border-top: 1.5px solid currentColor;
}
.plan li {
  display: flex;
  gap: 8px;
}
.plan li::before {
  content: '✓';
  font-weight: 800;
}
.plan .btn {
  margin-top: auto;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.plan--free {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.plan--pro {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-lg);
}
.plan--biz {
  background: #141413;
  color: #faf9f5;
  border-color: #141413;
}
[data-theme='dark'] .plan--biz {
  background: #faf9f5;
  color: #141413;
  border-color: #faf9f5;
}
[data-theme='dark'] .plan--biz .btn--light {
  background: #141413;
  color: #faf9f5;
  border-color: #141413;
}
.plan__badge {
  position: absolute;
  top: -14px;
  left: 18px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #141413;
  background: #f0b86c;
  border: 2px solid #141413;
  border-radius: 4px;
}
.plans__note {
  margin-top: clamp(24px, 3vw, 36px);
  max-width: 68ch;
  font-size: 15px;
  color: var(--muted);
}
.plans__note a {
  color: var(--ink);
  font-weight: 700;
}

/* -------------------------------------------------------------------- faq */
.faq {
  padding: 0 0 clamp(72px, 10vw, 144px);
}
.faq__in {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(24px, 5vw, 80px);
}
.faq h2 {
  font-size: clamp(2rem, 1rem + 2.4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.03;
}
.qa {
  border-top: 2px solid var(--nb);
}
.qa:last-child {
  border-bottom: 2px solid var(--nb);
}
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 18px 0;
  font-size: clamp(17px, 0.95rem + 0.3vw, 19px);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: 800 18px/1 var(--font);
  border: 2px solid var(--nb);
  border-radius: 4px;
  transition:
    background 160ms,
    color 160ms;
}
.qa[open] summary::after {
  content: '−';
  background: var(--accent);
  color: var(--on-accent);
}
.qa p {
  padding: 0 0 22px;
  max-width: 62ch;
  color: var(--ink-2);
}
.qa a {
  font-weight: 600;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ close */
.close {
  padding-top: clamp(80px, 11vw, 160px);
  background: var(--night);
  color: var(--night-ink);
  overflow: clip;
}
.close__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
}
.close h2 {
  font-size: clamp(2.4rem, 1.1rem + 4.2vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.close__copy p {
  margin-top: 18px;
  max-width: 40ch;
  font-size: clamp(17px, 0.9rem + 0.4vw, 20px);
  color: var(--night-soft);
}
.close__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
  margin-top: clamp(26px, 3vw, 40px);
}
.close .btn--primary {
  border-color: var(--night-ink);
  box-shadow: 4px 4px 0 0 var(--night-ink);
}
@media (hover: hover) and (pointer: fine) {
  .close .btn--primary:hover {
    box-shadow: 2px 2px 0 0 var(--night-ink);
  }
}
.close__login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-underline-offset: 4px;
}
.close__mascot {
  width: clamp(130px, 14vw, 200px);
  height: auto;
  margin-bottom: -2px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(245, 244, 237, 0.2);
  font-size: 14px;
  color: var(--night-soft);
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.foot__links a {
  text-underline-offset: 3px;
}

/* --------------------------------------------------------- без JS/движка */
.sc-fallback [data-sc-in],
.sc-fallback [data-sc-stagger] > *,
.sc-fallback [data-sc-cue] {
  opacity: 1 !important;
  transform: none !important;
}

/* ----------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'program program'
      'app progress'
      'app food'
      'dash dash';
  }
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }
}

@media (max-width: 960px) {
  .bar__nav {
    display: none;
  }
  .hero__in {
    grid-template-columns: 1fr;
  }
  .hero__title {
    max-width: 13ch;
  }
  .hero__stage {
    height: clamp(360px, 70vw, 520px);
    max-width: 640px;
  }
  .morning__in,
  .case__in,
  .faq__in {
    grid-template-columns: 1fr;
  }
  .tile--program,
  .tile--dash {
    grid-template-columns: 1fr;
  }
  .peak__split {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
  }
}

/* ----------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  :root {
    --bar-h: 56px;
  }
  body {
    font-size: 16px;
  }
  .brand__word {
    font-size: 20px;
  }
  .bar__login {
    padding: 0 8px;
  }
  .hero__lead {
    max-width: none;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .hero__stage {
    height: 380px;
  }
  .plane--back {
    display: none;
  }
  .plane--card {
    top: 34px;
    left: 0;
    width: 92%;
  }
  .plane--phone {
    --dw: 150px;
    right: 0;
    bottom: 64px;
  }
  .plane--toast {
    top: auto;
    bottom: 0;
    left: 0;
  }
  .toast {
    max-width: 260px;
  }
  .client {
    padding: 12px;
  }
  .client__tabs span:nth-child(n + 4) {
    display: none;
  }
  .plane--phone .phone__screen {
    gap: 5px;
    padding: 4px 8px 0;
  }
  .plane--phone .set {
    grid-template-columns: 12px 1fr 12px;
    gap: 4px;
    padding: 5px 6px;
  }
  .plane--phone .set b {
    font-size: 12px;
    white-space: nowrap;
  }
  .morning__list li {
    font-size: 17px;
  }

  /* Пик на телефоне: сцена должна влезть в ~640 px видимой высоты
     (Safari и встроенные браузеры с панелями). */
  .peak__stage {
    padding-top: calc(var(--bar-h) + 8px);
    padding-bottom: 8px;
  }
  .peak__in {
    gap: 10px;
  }
  .peak__h {
    font-size: 19px;
  }
  .pane {
    gap: 0;
  }
  .pane__label,
  .peak__p,
  .bubble time,
  .chat__head .avatar,
  .chat__who span,
  .cc__head .avatar,
  .cc__who span,
  .slot__body--sets em {
    display: none;
  }
  .chat {
    border-radius: 12px;
  }
  .chat__head {
    padding: 6px 10px;
  }
  .chat__unread {
    min-width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .chat__feed {
    gap: 4px;
    padding: 8px 10px;
  }
  .bubble {
    padding: 5px 9px;
    font-size: 12px;
    line-height: 1.3;
  }
  .bubble--photos {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .bubble--photos .ph {
    width: 14px;
  }
  .bubble--photos em {
    margin-left: 4px;
    font-size: 12px;
  }
  .chat__note {
    padding: 4px 8px;
    font-size: 12px;
  }
  .cc {
    padding: 10px;
  }
  .cc__grid {
    gap: 6px;
    margin-top: 8px;
  }
  .slot {
    min-height: 46px;
    padding: 6px 8px;
    gap: 2px;
  }
  .slot--wide {
    min-height: 42px;
  }
  .slot__body {
    gap: 2px 8px;
    font-size: 12px;
  }
  .slot__body--photos {
    grid-template-columns: repeat(3, 18px);
    gap: 4px;
  }
  .slot__body--sets .num {
    padding: 1px 4px;
  }
  .cc__next {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .slot__body--food .macro,
  .slot__body--food span:first-child,
  .slot[data-slot='checkin'] .slot__body span:nth-child(3),
  .slot[data-slot='program'] .slot__body span + span {
    display: none;
  }

  .bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      'program'
      'app'
      'progress'
      'food'
      'dash';
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .start__grid {
    grid-template-columns: 1fr;
  }
  .carousel__track {
    grid-auto-columns: 82%;
    margin-inline: calc(-1 * var(--sc-gutter));
    padding-inline: var(--sc-gutter);
    scroll-padding-inline: var(--sc-gutter);
  }
  .close__in {
    grid-template-columns: 1fr;
  }
  .close__actions .btn {
    width: 100%;
  }
  .close__mascot {
    justify-self: end;
    width: 120px;
    margin-top: -24px;
  }
}

@media (max-width: 380px) {
  .brand__word {
    display: none;
  }
}

/* Короткие телефоны: сцена пика должна поместиться в один экран. */
@media (prefers-reduced-motion: reduce) {
  .strike::after {
    animation: none;
    transform: rotate(-4deg);
  }
  .plane {
    transform: none;
  }
  .load .load__bar,
  .load .load__val,
  .load .load__tag,
  .device,
  .device * {
    transition: none !important;
  }
}
