/* ========== Токены ========== */
:root {
  --dark: #050807;
  --deep: #062222;
  --paper: #ffffff;
  --paper-2: #f3f4f1;
  --ink: #062424;
  --muted: #7d8683;
  --line: rgba(6, 36, 36, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);
  --lime: #b6ff1a;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(16px, 3.6vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== База ========== */
*, *::before, *::after { box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  background: var(--paper);          /* виден в вырезах тёмных блоков */
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.container { width: 100%; max-width: 1760px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.display {
  font-size: clamp(40px, 5.6vw, 110px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.display--light { color: #fff; }

/* Появление слов снизу */
[data-split] .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
[data-split] .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
}
[data-split].is-visible .word > span { transform: none; }

/* ========== Кнопки ========== */
.tag-btn {
  display: inline-grid;
  place-items: center;
  min-width: 124px;
  min-height: 52px;
  padding: 8px 18px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.tag-btn:hover { transform: translateY(-2px); }
.tag-btn--lime { background: var(--lime); }
.tag-btn--white { background: #fff; }
.tag-btn--gray { background: #dcdcdc; }
.tag-btn--dark { background: var(--ink); color: #fff; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  transition: background-color 0.3s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn svg { width: 22px; height: 22px; }

/* ========== Шапка → плашка ========== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 32px var(--gutter) 0;
  pointer-events: none;
  transition: padding 0.6s var(--ease);
}
.header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1240px;
  padding: 12px 0;
  border-radius: 0 0 14px 14px;
  color: #fff;
  transition: max-width 0.6s var(--ease), padding 0.6s var(--ease), background-color 0.5s, backdrop-filter 0.5s;
}
.header.is-scrolled { padding-top: 0; }
.header.is-scrolled .header__bar {
  max-width: 1260px;
  padding: 12px 24px;
  background: rgba(128, 132, 130, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.logo { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.logo__mark {
  width: 30px; height: 30px;
  background: #fff;
  clip-path: polygon(20% 0, 100% 0, 100% 75%, 78% 100%, 0 100%, 0 18%);
}
.nav { display: flex; gap: 30px; font-size: 17px; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; gap: 8px; opacity: 0.92; }
.nav a:hover { opacity: 1; }
.chev { width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; rotate: 45deg; translate: 0 -2px; }
.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.burger { display: none; }

/* ========== HERO ========== */
.hero { position: relative; height: 420vh; }
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--dark);
}
.hero__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;           /* свисает под hero на глубину козырька */
  z-index: 2;
  height: 24px;
  background: var(--dark);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 111px 111px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,7,0.7) 0%, rgba(5,8,7,0) 30%),
    linear-gradient(0deg, rgba(5,8,7,0.8) 0%, rgba(5,8,7,0) 45%);
  pointer-events: none;
}
.hero__content {
  position: absolute;
  inset: auto 0 clamp(64px, 12vh, 140px);
  display: grid;
  gap: 20px;
  color: #fff;
}
.hero__title { font-size: clamp(48px, 7.4vw, 150px); font-weight: 400; line-height: 0.92; letter-spacing: -0.05em; }
.hero__progress { position: absolute; right: var(--gutter); top: 50%; width: 2px; height: 120px; translate: 0 -50%; background: var(--line-dark); }
.hero__progress span { display: block; width: 100%; height: 0; background: var(--lime); }
.hero__loader { position: absolute; top: 130px; left: var(--gutter); font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.5); transition: opacity 0.5s; }
.hero__loader.is-done { opacity: 0; }

/* ========== Заголовок + линейка ========== */
.intro { padding-block: clamp(100px, 14vw, 200px) 0; text-align: center; }
.intro .display { max-width: 16ch; margin-inline: auto; }
.ruler {
  position: relative;
  height: 90px;
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 7.7vw 100%;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* крестики «+» на линейке через каждые две ячейки */
.ruler::before {
  content: "";
  position: absolute;
  inset: -8px 0 auto;
  height: 16px;
  background-image:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(6,36,36,.55) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(180deg, transparent 7.5px, rgba(6,36,36,.55) 7.5px 8.5px, transparent 8.5px);
  background-size: 15.4vw 16px, 16px 16px;
  background-position: calc(-7.7vw) 0, calc(7.7vw - 8px) 0;
  background-repeat: repeat-x, no-repeat;
}

/* ========== Фичи ========== */
.features { padding-block: 80px clamp(80px, 10vw, 160px); }
.features__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 96px); }
.features__list { display: grid; }
.feature {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  min-height: 85vh;
  align-content: center;
  opacity: 0.25;
  transition: opacity 0.6s var(--ease);
}
.feature.is-active { opacity: 1; }
.feature__num { padding-top: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--muted); }
.feature__title { font-size: clamp(30px, 2.8vw, 52px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.feature__text { margin-top: 48px; max-width: 18ch; font-size: clamp(28px, 2.6vw, 48px); line-height: 1.15; letter-spacing: -0.03em; }

.features__media {
  position: sticky;
  top: 100px;
  height: calc(100vh - 120px);
  overflow: hidden;
  background: #1a1510;
}
.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.2);
  transition: opacity 0.9s var(--ease);
  will-change: transform, opacity;
}
.media.is-active { opacity: 1; }
.media__label { position: absolute; right: 12%; bottom: 14%; font-size: 12px; letter-spacing: 0.15em; color: var(--lime); }

/* ========== Калькулятор ========== */
.calc { padding-block: clamp(80px, 10vw, 160px); }
.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: start; }
.calc__eyebrow { font-size: 24px; color: #b7bcba; letter-spacing: -0.02em; }
.calc__title { font-size: clamp(34px, 3.2vw, 54px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.1; }

.fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; margin-top: 12px; }
.field {
  display: grid;
  gap: 10px;
  padding-block: 24px 16px;
  border-bottom: 1px solid #cfd3d1;
  font-size: 19px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.3s;
}
.field.is-visible { opacity: 1; transform: none; }
.field:focus-within { border-color: var(--ink); }
.field--wide { grid-column: 1 / -1; }
.field input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  color: var(--ink);
}
.field__money { display: flex; gap: 14px; }
.field__money i { font-style: normal; color: var(--muted); }

.range { display: grid; gap: 18px; margin-top: 40px; font-size: 19px; }
.range input { width: 100%; accent-color: var(--ink); }
.range__labels { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }

.calc__card {
  position: relative;
  padding: clamp(40px, 4vw, 64px) clamp(28px, 3vw, 56px) clamp(40px, 4vw, 64px) calc(clamp(28px, 3vw, 56px) + 36px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #0a2a26 0%, #06201f 60%, #041816 100%);
  opacity: 0;
  transition: opacity 1s var(--ease);
}
.calc__card.is-visible { opacity: 1; }
.calc__glow {
  position: absolute;
  top: 5%;
  left: 40%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 180, 60, 0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.calc__card > *:not(.calc__glow) { position: relative; }
.calc__card-title { font-size: clamp(28px, 2.6vw, 44px); font-weight: 400; letter-spacing: -0.04em; margin-top: 24px; }
.calc__card-title span { color: #a9b3ad; }
.calc__total { margin-top: 12px; font-size: clamp(44px, 4.4vw, 72px); letter-spacing: -0.02em; }
.calc__pct { margin-top: 8px; font-size: 24px; letter-spacing: -0.03em; color: #cfd6d2; }
.calc__pct b { margin-left: 12px; font-size: 34px; font-weight: 400; color: #fff; }
.calc__divider { height: 1px; margin: 36px -80px 36px; background: rgba(255,255,255,0.14); }
.calc__sub { font-size: 24px; letter-spacing: -0.03em; }
.calc__rows { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.calc__rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 18px; letter-spacing: -0.02em; }
.calc__rows em { font-style: normal; color: #a9b3ad; }
.calc__rows b { flex-shrink: 0; font-size: clamp(22px, 1.8vw, 30px); font-weight: 400; }

/* ========== Параллакс-полоса ========== */
.band { position: relative; height: 120vh; color: #fff; }
.band__media { position: absolute; inset: 0; overflow: hidden; background: var(--dark); }
.band__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); will-change: transform; }
.band__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0.1) 60%); }
.band__content { position: relative; display: grid; align-content: end; gap: 24px; height: 100%; padding-block: 0 clamp(64px, 10vw, 140px); }

/* ========== CTA / футер ========== */
.cta { padding-block: clamp(100px, 12vw, 180px); }
.cta__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 32px; }
.cta .display { max-width: 12ch; }
.footer { padding-block: 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; }

/* ========== Адаптив ========== */
@media (max-width: 1100px) {
  .nav { display: none; }
}
@media (max-width: 900px) {
  .header { padding-top: 16px; }
  .header__actions { display: none; }
  .burger { display: grid; gap: 6px; margin-left: auto; padding: 8px; background: none; border: 0; cursor: pointer; }
  .burger span { width: 26px; height: 2px; background: #fff; }
  .header.is-scrolled .header__bar { padding: 10px 16px; }

  .features__grid { grid-template-columns: 1fr; }
  .features__media { order: -1; top: 72px; height: 42vh; z-index: 1; }
  .feature { min-height: 60vh; }
  .feature__text { margin-top: 20px; }

  .calc__grid, .fields { grid-template-columns: 1fr; }
  .calc__rows li { flex-direction: column; gap: 4px; }
  .calc__card-title { font-size: 26px; }
  .hero__progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  [data-split] .word > span { transform: none; }
}
