/* ---------- Tokens ---------- */
:root {
  --graphite: #1b1c1a;
  --graphite-2: #232521;
  --graphite-3: #30332d;
  --bone: #eceae2;
  --ash: #95978e;
  --lime: #c9f53b;
  --lime-ink: #151610;

  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Golos Text", "Segoe UI", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --section: clamp(96px, 14vw, 220px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--graphite);
  background-image:
    linear-gradient(to right, rgba(236, 234, 226, .035) 1px, transparent 1px);
  background-size: calc((100vw - 2 * var(--gutter)) / 6) 100%;
  background-position: var(--gutter) 0;
  color: var(--bone);
  font-family: var(--text);
  font-size: clamp(16px, 1.05vw + 10px, 19px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

/* Наклонная лента шире экрана — обрезаем её, не создавая контейнер прокрутки (sticky продолжает работать) */
main { overflow-x: clip; }

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

::selection { background: var(--lime); color: var(--lime-ink); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

/* Фактура: шум поверх всей страницы */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 44px;
  border: 2px solid var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  transition: background-color .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--lime); }
.btn--small {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background-color .3s, padding .3s;
}
.topbar.is-solid {
  background: rgba(27, 28, 26, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-top: 10px;
  padding-bottom: 10px;
}
.topbar__brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--bone);
  text-decoration: none;
}
.topbar__buy { display: flex; align-items: center; gap: 18px; }
.topbar__price { font-family: var(--display); font-weight: 600; font-size: 15px; }

/* ---------- Price ---------- */
.price,
.order__price {
  display: flex;
  align-items: flex-start;
  gap: .12em;
  font-family: var(--display);
  font-weight: 900;
  line-height: .9;
  white-space: nowrap;
  color: var(--lime);
}
.price__cur { font-size: .5em; font-weight: 600; margin-top: .08em; }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(27, 28, 26, .92) 0%, rgba(27, 28, 26, .35) 45%, rgba(27, 28, 26, 0) 70%),
    linear-gradient(0deg, var(--graphite) 0%, rgba(27, 28, 26, 0) 38%);
}
/* При прокрутке картинка уходит вниз, но верх первого экрана в этот момент уже за краем окна */
.hero__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 70% 50%;
  will-change: transform;
}
.hero__content {
  width: 100%;
  padding: 120px var(--gutter) clamp(40px, 6vw, 88px);
}
.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 12.5vw, 220px);
  line-height: .86;
  letter-spacing: -.045em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line--shift { padding-left: 1.05em; }

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 30ch) auto;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-top: clamp(28px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid rgba(236, 234, 226, .2);
}
.hero__lead { font-size: clamp(17px, 1.4vw, 22px); color: var(--bone); }
.hero__buy { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.hero__buy .price { font-size: clamp(44px, 5vw, 84px); }

/* Входная анимация заголовка — единственная «самостоятельная» анимация на странице */
.js .hero__title .line > span { transform: translateY(105%); }
.js.is-loaded .hero__title .line > span {
  transform: none;
  transition: transform 1s cubic-bezier(.16, 1, .3, 1);
}
.js.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: .12s; }
.js.is-loaded .hero__title .line:nth-child(3) > span { transition-delay: .24s; }

/* ---------- Lime band ---------- */
.band {
  position: relative;
  z-index: 2;
  margin: clamp(24px, 4vw, 56px) -5vw 0;
  background: var(--lime);
  color: var(--lime-ink);
  transform: rotate(-3deg);
  overflow: hidden;
}
.band__track {
  display: flex;
  gap: 0;
  width: max-content;
  padding: 14px 0;
  white-space: nowrap;
  will-change: transform;
}
.band__track span {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 44px);
  letter-spacing: -.02em;
  padding: 0 .6em;
}
.band__track span:nth-child(even) { font-weight: 400; }

/* ---------- 2. Energy ---------- */
.energy {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding: var(--section) var(--gutter);
}
.energy__title {
  grid-column: 1 / span 10;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6.6vw, 120px);
  line-height: .95;
  letter-spacing: -.04em;
}
.energy__list {
  grid-column: 6 / -1;
  margin-top: clamp(56px, 8vw, 120px);
  border-top: 2px solid var(--bone);
}
.energy__list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  gap: 20px;
  padding: clamp(20px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--graphite-3);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.energy__list li:nth-child(2) { padding-left: clamp(0px, 4vw, 72px); }
.energy__list li:nth-child(3) { padding-left: clamp(0px, 8vw, 144px); }
.mark {
  width: 18px;
  height: 18px;
  background: var(--lime);
  transform: translateY(-.1em);
}
.energy__note {
  grid-column: 6 / -1;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ash);
}

/* ---------- 3. Relationship ---------- */
.love {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.love__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.love__media img {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 70% 50%;
  will-change: transform;
}
.love__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--graphite) 0%, rgba(27, 28, 26, 0) 22%, rgba(27, 28, 26, 0) 78%, var(--graphite) 100%),
    linear-gradient(90deg, rgba(20, 8, 8, .85) 0%, rgba(20, 8, 8, .2) 55%, rgba(20, 8, 8, 0) 100%);
}
.love__content {
  width: min(100%, 720px);
  padding: var(--section) var(--gutter);
}
.love__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 96px);
  line-height: .95;
  letter-spacing: -.04em;
}
.love__text {
  max-width: 34ch;
  margin: 32px 0 40px;
  font-size: clamp(17px, 1.35vw, 21px);
  color: #d8d4ca;
}

/* ---------- 4. Sport ---------- */
.sport {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
  padding: var(--section) var(--gutter);
}
.sport__text {
  position: sticky;
  top: 18vh;
}
.sport__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 5.6vw, 110px);
  line-height: .9;
  letter-spacing: -.045em;
}
.sport__lead {
  max-width: 32ch;
  margin-top: 32px;
  font-size: clamp(17px, 1.35vw, 21px);
  color: #d8d4ca;
}
.stat {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: 24px;
  border-top: 2px solid var(--lime);
}
.stat__num {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(88px, 13vw, 240px);
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--lime);
}
.stat__label {
  max-width: 12ch;
  padding-bottom: .4em;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.15;
}
.sport__figure {
  position: relative;
  will-change: transform;
}
/* Изображение целиком: исходные пропорции 9:16, без обрезки */
.sport__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 2160 / 3840;
  object-fit: contain;
  background: var(--graphite-2);
}
.sport__figure::before {
  content: "";
  position: absolute;
  inset: 24px -24px -24px 24px;
  z-index: -1;
  border: 2px solid var(--lime);
}

/* ---------- 5. Formula ---------- */
.formula {
  padding: var(--section) var(--gutter);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(201, 245, 59, .06), transparent 55%),
    var(--graphite-2);
}
.formula__title {
  max-width: 11ch;
  margin-left: auto;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6.6vw, 120px);
  line-height: .95;
  letter-spacing: -.04em;
  text-align: right;
}
.formula__media {
  position: relative;
  width: calc(100% + var(--gutter));
  margin: clamp(48px, 6vw, 96px) 0 0 calc(-1 * var(--gutter));
  aspect-ratio: 16 / 8;
  overflow: hidden;
}
.formula__media img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}
.formula__count {
  margin-top: clamp(40px, 5vw, 72px);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 26px);
}
.formula__count span { color: var(--lime); font-weight: 900; font-size: 1.8em; vertical-align: -.15em; }
.formula__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
  border-top: 2px solid var(--bone);
}
.formula__list li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 170px;
  padding: 24px 24px 22px 0;
  border-bottom: 1px solid var(--graphite-3);
}
.formula__list li:not(:nth-child(4n)) { border-right: 1px solid var(--graphite-3); }
.formula__list li:not(:nth-child(4n + 1)) { padding-left: 24px; }
.formula__list b {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 1.7vw, 28px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.formula__list i { font-size: 14px; color: var(--ash); }
.formula__list li:hover b { color: var(--lime); }

/* ---------- 6. Dose ---------- */
.dose {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: var(--section) var(--gutter) var(--section) 0;
}
.dose__media {
  position: relative;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
}
.dose__media img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: 35% 50%;
  will-change: transform;
}
.dose__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 6.4vw, 120px);
  line-height: .9;
  letter-spacing: -.045em;
}
.steps { margin: clamp(32px, 4vw, 56px) 0 44px; counter-reset: none; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--graphite-3);
}
.steps li:last-child { border-bottom: 1px solid var(--graphite-3); }
.steps__n {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 6vw, 96px);
  line-height: .8;
  color: var(--lime);
  min-width: 1ch;
}
.steps p {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(18px, 1.7vw, 27px);
  line-height: 1.2;
}

/* ---------- 7. Order ---------- */
.order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
  padding: var(--section) var(--gutter);
  background: var(--lime);
  color: var(--lime-ink);
  clip-path: polygon(0 clamp(32px, 5vw, 80px), 100% 0, 100% 100%, 0 100%);
}
.order :focus-visible { outline-color: var(--lime-ink); }
.order__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 10vw, 190px);
  line-height: .85;
  letter-spacing: -.055em;
}
.order__price {
  margin-top: clamp(24px, 3vw, 48px);
  font-size: clamp(48px, 5vw, 88px);
  color: var(--lime-ink);
}
.order__hint { max-width: 30ch; margin-top: 24px; font-size: 17px; }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
}
.field { position: relative; padding-top: 22px; }
.field--wide { grid-column: 1 / -1; }
.field input {
  width: 100%;
  height: 56px;
  padding: 10px 0 6px;
  border: 0;
  border-bottom: 2px solid var(--lime-ink);
  border-radius: 0;
  background: transparent;
  color: var(--lime-ink);
  font: 500 20px/1.2 var(--text);
}
.field input:focus { outline: none; border-bottom-width: 4px; }
.field label {
  position: absolute;
  left: 0;
  top: 40px;
  font-size: 18px;
  color: rgba(21, 22, 16, .62);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .2s, color .2s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-30px) scale(.78);
  color: var(--lime-ink);
}
.field__err {
  display: block;
  min-height: 22px;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #7a1500;
}
.field.is-invalid input { border-bottom-color: #7a1500; }

.btn--submit {
  margin-top: 20px;
  width: 100%;
  min-height: 76px;
  background: var(--lime-ink);
  border-color: var(--lime-ink);
  color: var(--lime);
  font-size: 22px;
}
.btn--submit:hover { background: transparent; color: var(--lime-ink); }
.btn--submit:disabled { opacity: .6; cursor: progress; }
.form__trap { position: absolute; left: -9999px; }
.form__status {
  font-size: 15px;
  font-weight: 600;
  color: #7a1500;
}
.form__status:empty { display: none; }

.order__done {
  align-self: center;
  padding: 40px 0;
  border-top: 2px solid var(--lime-ink);
  font-size: 20px;
}
.order__done:focus { outline: none; }
.order__done-title {
  margin-bottom: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1;
}

/* ---------- 8. Warning ---------- */
.warning {
  display: grid;
  grid-template-columns: auto minmax(0, 72ch);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(56px, 7vw, 104px) var(--gutter);
  background: #141513;
  color: var(--ash);
}
.warning__age {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 6vw, 96px);
  line-height: .8;
  color: var(--bone);
}
.warning__text { font-size: 15px; line-height: 1.6; }
.warning__note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ash);
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .energy__title { grid-column: 1 / -1; }
  .energy__list,
  .energy__note { grid-column: 3 / -1; }
  .formula__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formula__list li { border-right: 0 !important; padding-left: 0 !important; }
  .formula__list li:nth-child(odd) { border-right: 1px solid var(--graphite-3) !important; }
  .formula__list li:nth-child(even) { padding-left: 24px !important; }
  .order { grid-template-columns: 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  body { background-size: calc((100vw - 2 * var(--gutter)) / 2) 100%; }

  .topbar__price { display: none; }

  .hero { align-items: stretch; }
  .hero__media { bottom: auto; height: 62svh; }
  .hero__media::after {
    background: linear-gradient(0deg, var(--graphite) 2%, rgba(27, 28, 26, .2) 45%, rgba(27, 28, 26, .55) 100%);
  }
  .hero__img { object-position: 78% 50%; }
  .hero__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 42svh;
    padding-bottom: 40px;
  }
  .hero__title { font-size: clamp(60px, 19vw, 110px); }
  .btn { padding: 0 28px; }
  .hero__foot { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero__buy { justify-content: space-between; gap: 16px; }
  .hero__buy .price { font-size: clamp(34px, 11vw, 48px); }

  .band { transform: rotate(-4deg); }

  .energy { display: block; }
  .energy__list li { grid-template-columns: 18px 1fr; gap: 14px; }
  .energy__list li:nth-child(n) { padding-left: 0; }
  .mark { width: 12px; height: 12px; }

  .love { min-height: auto; display: block; }
  .love__media { position: relative; height: 70vw; }
  .love__media img { object-position: 72% 50%; }
  .love__content { padding-top: 8px; }
  .love__media::after {
    background: linear-gradient(180deg, var(--graphite) 0%, rgba(27, 28, 26, 0) 25%, rgba(27, 28, 26, 0) 60%, var(--graphite) 100%);
  }

  /* Самые длинные слова («Тренировка», «Растительная») занимают всю ширину строки */
  .sport__title { font-size: calc((100vw - 2 * var(--gutter)) / 8); }
  .formula__title { font-size: calc((100vw - 2 * var(--gutter)) / 9.1); }

  .sport { grid-template-columns: 1fr; }
  .sport__text { position: static; }
  .sport__figure { margin-right: 24px; }

  .formula__title { text-align: left; margin-left: 0; }
  .formula__media { width: calc(100% + 2 * var(--gutter)); aspect-ratio: 4 / 3; }
  .formula__list { grid-template-columns: 1fr; }
  .formula__list li,
  .formula__list li:nth-child(n) {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 14px;
    min-height: 0;
    padding: 16px 0 !important;
    border-right: 0 !important;
  }

  .dose { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; }
  .dose__media { margin-right: var(--gutter); }
  .dose__content { padding: 0 var(--gutter); }

  .form { grid-template-columns: 1fr; }
  .form .field { grid-column: 1 / -1; }

  .warning { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-parallax],
  [data-drift] { transform: none !important; }
  .js .hero__title .line > span { transform: none; }
  .js.is-loaded .hero__title .line > span { transition: none; }
}
