/* ===== Токены ===== */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-alt: #eeede7;
  --ink: #15181b;
  --ink-soft: #4a4f55;
  --ink-mute: #6b7076;
  --line: #dddbd3;
  --accent: #1d5c4a;
  --accent-hover: #164a3b;
  --accent-soft: #e2ece7;
  /* Тёплый акцент — только для бесплатной демоверсии. Как фон с тёмным текстом (контраст ~7.8:1) */
  --warm: #d9a441;
  --warm-hover: #c8912f;
  --dark: #15181b;
  --dark-soft: #23272b;
  --error: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 24, 27, .04), 0 8px 24px rgba(21, 24, 27, .06);
  --shadow-lg: 0 2px 4px rgba(21, 24, 27, .05), 0 24px 48px rgba(21, 24, 27, .12);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Unbounded", "Onest", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --container: 1160px;
  --gutter: 16px;
  --header-h: 64px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }
[hidden] { display: none !important; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.02em; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* На тёмном фоне зелёная обводка почти не видна */
.section--dark :focus-visible,
.footer :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: calc(800px + var(--gutter) * 2); }

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 92, 74, .2), 0 6px 16px rgba(29, 92, 74, .18);
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 4px rgba(29, 92, 74, .22), 0 10px 24px rgba(29, 92, 74, .26);
}
.btn[disabled] { opacity: .7; cursor: progress; }

.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); box-shadow: var(--shadow); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #e9e8e2; }

.btn--outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--outline-light:hover { border-color: #fff; }

.link-btn {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

.icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 241, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}
.logo__muted { color: var(--ink-mute); font-weight: 500; }

.nav { display: none; }
.nav__list { display: flex; gap: 28px; }
.nav__list a {
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s;
}
.nav__list a:hover { color: var(--ink); }

.header__actions { display: flex; align-items: center; gap: 6px; }

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.contact-link:hover { background: var(--surface-alt); color: var(--ink); }
.contact-link__text { display: none; }
.header__cta { display: none; }

@media (min-width: 420px) {
  .header__cta { display: inline-flex; margin-left: 4px; }
}
@media (max-width: 419px) {
  .logo__muted { display: none; }
}
@media (min-width: 1024px) {
  .nav { display: block; margin-right: 12px; }
  .logo { margin-right: 0; }
  .nav { margin-left: auto; }
}
@media (min-width: 1200px) {
  .contact-link__text { display: inline; }
}

/* ===== Hero ===== */
/* overflow-x: clip — декоративный каркас за карточкой не должен давать горизонтальную прокрутку */
.hero { padding: 48px 0 72px; overflow-x: clip; }
.hero__inner { display: grid; gap: 40px; align-items: center; }

.hero__title {
  max-width: 13em;
  color: var(--ink);
  font-size: clamp(30px, 7.4vw, 62px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__accent { color: var(--accent); }
.hero__lead {
  max-width: 32em;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.55;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero__actions .btn { flex: 1 1 220px; }
@media (min-width: 560px) {
  .hero__actions .btn { flex: 0 0 auto; }
}

/* Пояснение под главной кнопкой: тёплый маркер — деталь демоверсии */
.hero__note {
  position: relative;
  max-width: 30em;
  margin-top: 16px;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}
.hero__note::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  bottom: .2em;
  width: 3px;
  border-radius: 2px;
  background: var(--warm);
}
.hero__note span { display: block; color: var(--ink-mute); font-size: 14px; }

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.hero__link::after { content: "→"; transition: transform .2s; }
.hero__link:hover { color: var(--ink); }
.hero__link:hover::after { transform: translateX(3px); }

.hero__trust {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.hero__trust::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: .6em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.offer-card {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow .3s ease, transform .3s ease;
}
.offer-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
@media (min-width: 560px) { .offer-card { padding: 36px; } }

.offer-card__title {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.3;
}
.offer-card__list li {
  position: relative;
  padding: 14px 0 14px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 500;
}
.offer-card__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.offer-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  background: var(--accent);
}
.offer-card__list li:last-child::before { margin-top: 6px; }
.offer-card__list .offer-card__demo { padding-left: 0; }
.offer-card__list .offer-card__demo::before { display: none; }
.offer-card__badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--warm);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

/* Визуальный якорь: каркас страницы за карточкой и «заявка» поверх неё */
.hero__aside { position: relative; }
.hero__aside .offer-card { position: relative; z-index: 1; }
.hero__art,
.hero__chip { display: none; }

@media (min-width: 1024px) {
  .hero__art {
    position: absolute;
    top: -52px;
    right: -52px;
    z-index: 0;
    display: block;
    width: 300px;
    height: auto;
    color: var(--line);
  }
  .hero__chip {
    position: absolute;
    left: -44px;
    bottom: -26px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    animation: chip-float 6s ease-in-out infinite;
  }
  .hero__chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-soft) url("assets/icons/check-bold.svg") center / 16px no-repeat;
  }
  .hero__art-dot { animation: art-pulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
}
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes art-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

@media (min-width: 1024px) {
  .hero { padding: 88px 0 120px; }
  .hero__inner { grid-template-columns: minmax(0, 1fr) 400px; gap: 72px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero__title { font-size: 48px; }
  .hero__art { right: -28px; }
}
@media (min-width: 1280px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) 420px; gap: 104px; }
}

/* ===== Окно-превью ===== */
.window {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
.window__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cfccc2;
}
.window__url {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  padding: 3px 10px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-mute);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.window__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
.window--card { box-shadow: var(--shadow); }
.window--modal { box-shadow: none; }

/* Рамка телефона для мобильного скриншота */
.phone {
  display: block;
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 26px;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}
.phone__img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
}

/* ===== Секции ===== */
.section { padding: 72px 0; }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--dark); color: #fff; }

@media (min-width: 1024px) {
  .section { padding: 112px 0; }
}

.section__head { max-width: 760px; margin-bottom: 48px; }
.section__title {
  color: var(--ink);
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section--dark .section__title { color: #fff; }
.section__lead {
  max-width: 40em;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
}

.section__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.section__cta p { font-size: 18px; font-weight: 600; }
@media (max-width: 559px) {
  .section__cta .btn { width: 100%; }
}

/* ===== Выгоды ===== */
.benefits { display: grid; gap: 16px; }
@media (min-width: 640px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .benefits { grid-template-columns: repeat(4, 1fr); } }

.benefit {
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow .3s ease, transform .3s ease;
}
.benefit:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.benefit__num {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.benefit__title {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.3;
}
.benefit p { color: var(--ink-soft); font-size: 15px; }

/* ===== CTA «Бесплатная демоверсия» ===== */
.demo-cta {
  margin-top: 48px;
  padding: 36px 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--warm);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
@media (min-width: 768px) { .demo-cta { padding: 56px 48px; } }
.demo-cta__title {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.demo-cta__text {
  max-width: 34em;
  margin: 12px auto 28px;
  color: var(--ink-soft);
  font-size: 17px;
}
.demo-cta--inline {
  margin-top: 40px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* Главная кнопка демоверсии: тёплый фон + тёмный текст */
.btn--demo {
  min-height: 56px;
  max-width: 100%;
  padding: 16px 32px;
  background: var(--warm);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(150, 105, 25, .25), 0 10px 24px rgba(217, 164, 65, .35);
}
.btn--demo:hover {
  background: var(--warm-hover);
  box-shadow: 0 2px 4px rgba(150, 105, 25, .28), 0 16px 32px rgba(217, 164, 65, .45);
  transform: translateY(-2px);
}
.btn--demo:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 999px;
}
@media (min-width: 768px) { .btn--demo.btn--xl { min-height: 64px; padding: 18px 40px; font-size: 18px; } }
@media (max-width: 559px) {
  .btn--demo { width: 100%; padding: 14px 16px; }
}
@media (max-width: 399px) {
  .btn--demo { padding: 14px 10px; font-size: 16px; letter-spacing: -.01em; }
}

/* ===== Тарифы ===== */
.tiers { display: grid; gap: 20px; }
@media (min-width: 900px) {
  /* subgrid выравнивает строки карточек: цена, описание, списки, срок и кнопка на одной высоте */
  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(8, auto);
    column-gap: 24px;
    row-gap: 0;
  }
  .tier { grid-row: span 8; grid-template-rows: subgrid; }
  /* «Что входит»: подпись, видимый список и «Остальное» — отдельные строки,
     чтобы кнопки «Остальное» в обеих карточках стояли на одном уровне */
  .tier > .tier__block {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    align-content: start;
  }
}

.tier {
  display: grid;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: box-shadow .3s ease, transform .3s ease;
}
@media (min-width: 560px) { .tier { padding: 36px 32px; } }
.tier:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* Рамка толще на 1px — padding меньше на 1px, чтобы строки карточек совпадали */
.tier--featured {
  padding: 27px 21px;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 4px rgba(29, 92, 74, .08), 0 24px 48px rgba(29, 92, 74, .16);
}
@media (min-width: 560px) { .tier--featured { padding: 35px 31px; } }

.tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.tier__name { font-size: 24px; line-height: 1.2; }
.tier__badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.tier__price {
  margin-top: 12px;
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.tier__for { margin-top: 12px; color: var(--ink-soft); font-size: 16px; }

.tier__block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.tier__label {
  margin-bottom: 14px;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tier__list { display: grid; gap: 10px; align-content: start; }
.tier__list li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.45; }
.tier__list strong { font-weight: 650; }
.tier__list--in li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .1em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("assets/icons/check.svg") center / 13px no-repeat;
}
.tier__list--out li { color: var(--ink-mute); }
.tier__list--out li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: .72em;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: #b9b6ad;
}

.tier__time {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-weight: 650;
}
.tier__time span { color: var(--ink-mute); font-weight: 500; }
.tier > .btn { align-self: end; margin-top: 20px; }

/* «Остальное»: раскрывает оставшиеся пункты тарифа */
.tier__more { margin-top: 16px; }
.tier__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, box-shadow .2s;
}
.tier__more-btn::-webkit-details-marker { display: none; }
.tier__more-btn::after {
  content: "";
  width: 12px;
  height: 12px;
  background: url("assets/icons/chevron-down.svg") center / contain no-repeat;
  transition: transform .2s;
}
.tier__more-btn:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.tier__more[open] .tier__more-btn::after { transform: rotate(180deg); }
.tier__more-body { margin-top: 16px; animation: fade-in .25s ease-out; }
/* На телефоне раскрытый список закрывается касанием (см. script.js) */
@media (max-width: 899px) {
  .tier__more-body { cursor: pointer; -webkit-tap-highlight-color: transparent; }
}

/* ===== Условия работы ===== */
.terms {
  margin-top: 48px;
  padding: 28px 24px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--accent);
  color: #fff;
}
@media (min-width: 640px) { .terms { padding: 36px; } }
.terms__title {
  margin-bottom: 20px;
  font-size: 22px;
}
.terms__list { display: grid; gap: 12px; }
@media (min-width: 640px) { .terms__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .terms__list { grid-template-columns: repeat(4, 1fr); } }
.terms__item {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background-color .2s;
}
.terms__item:hover { background: rgba(255, 255, 255, .12); }
.terms__item strong { display: block; font-size: 19px; line-height: 1.3; }
.terms__item span { display: block; margin-top: 6px; color: #d3e6de; font-size: 15px; }

/* ===== Этапы ===== */
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
/* В две колонки последний (5-й) этап остаётся один — ставим его по центру */
@media (min-width: 640px) and (max-width: 1099px) {
  .step:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 16px) / 2);
  }
}
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 12px; } }

.step {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.step__title { margin-bottom: 8px; font-size: 19px; }
.step p { color: var(--ink-soft); font-size: 15px; }
.step .step__result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
}
.step__result span { color: var(--accent); font-weight: 600; }

/* ===== Портфолио ===== */
.projects { display: grid; gap: 24px; }
@media (min-width: 768px) { .projects { grid-template-columns: repeat(2, 1fr); } }

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
}
.project {
  box-shadow: var(--shadow);
  transition: box-shadow .3s ease;
}
.project:hover { box-shadow: var(--shadow-lg); }

.project__preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 24px 20px 0;
  overflow: hidden;
  border: 0;
  background: var(--bg);
  cursor: pointer;
}
@media (min-width: 560px) { .project__preview { padding: 32px 28px 0; } }
.project__preview .window {
  width: 88%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
  transition: transform .35s ease;
}
.phone--card {
  position: absolute;
  right: 16px;
  bottom: -28px;
  width: 24%;
  max-width: 150px;
  border-width: 4px;
  border-radius: 20px;
  transition: transform .35s ease;
}
.phone--card .phone__img { border-radius: 16px; }
@media (min-width: 560px) { .phone--card { right: 28px; } }
.project__preview:hover .window,
.project__preview:focus-visible .window { transform: translateY(-4px); }
.project__preview:hover .phone--card,
.project__preview:focus-visible .phone--card { transform: translateY(-10px); }

.project__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid var(--line);
}
.project__title { font-size: 21px; line-height: 1.3; }
.project__desc { color: var(--ink-soft); font-size: 15px; }
.project__body .btn { margin-top: auto; }

/* Пока в портфолио один проект — карточка на всю ширину, превью слева */
@media (min-width: 900px) {
  .project:only-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
  }
  .project:only-child .project__preview { padding: 40px 40px 0; }
  .project:only-child .phone--card { right: 40px; }
  .project:only-child .project__body {
    justify-content: center;
    padding: 40px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  .project:only-child .project__body .btn { margin-top: 12px; }
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
}
.tag--accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ===== Отзывы (скрыт до появления реальных) ===== */
.reviews { display: grid; gap: 16px; }
.review {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.review__text { margin: 0 0 16px; font-size: 17px; }
.review__author { font-weight: 600; }
.review__author span { color: var(--ink-mute); font-weight: 400; }

/* ===== FAQ ===== */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--surface-alt) url("assets/icons/plus.svg") center / 14px no-repeat;
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--accent); }
.faq__item p {
  padding: 0 44px 22px 0;
  color: var(--ink-soft);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.text-link:hover { color: var(--accent-hover); }

/* ===== Финальный CTA ===== */
.contact { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1024px) {
  .contact { grid-template-columns: 1fr 480px; gap: 72px; }
}
.contact__lead {
  margin-top: 16px;
  color: #c9ccd0;
  font-size: 18px;
}
.contact__facts {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  color: #e4e6e8;
}
.contact__facts li { position: relative; padding-left: 28px; }
.contact__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .25em;
  width: 18px;
  height: 18px;
  background: url("assets/icons/check-light.svg") center / contain no-repeat;
}
.contact__direct { margin-top: 32px; color: #a9adb2; font-size: 15px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
@media (max-width: 559px) {
  .contact__links .btn { flex: 1 1 100%; }
}

.form-card {
  padding: 28px 20px;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  color: var(--ink);
}
@media (min-width: 560px) { .form-card { padding: 36px; } }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 15px; font-weight: 600; }
.field__optional { margin-left: 4px; color: var(--ink-mute); font-weight: 400; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #c9c6bc;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #8b8f94; }
.field__input:hover { border-color: #a9a69c; }
.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 92, 74, .15);
}
.field__input--area { min-height: 112px; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .15); }
.field__hint { color: var(--ink-mute); font-size: 13px; }
.field__error { color: var(--error); font-size: 14px; }
.field__error:empty { display: none; }

.form__note { color: var(--ink-mute); font-size: 13px; text-align: center; }
.form__free {
  margin-top: -6px;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}
.form__free::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--warm);
  vertical-align: .1em;
}

.form-result { animation: fade-in .3s ease-out; }
.form-result:focus { outline: none; }
.form-result__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("assets/icons/check-bold.svg") center / 28px no-repeat;
}
.form-result__title { font-size: 24px; line-height: 1.25; }
.form-result--error .form-result__title { color: var(--error); }
.form-result p { margin-top: 10px; color: var(--ink-soft); }
.form-result .form-result__hint { font-size: 14px; }
.form-result__actions { display: grid; gap: 10px; }
.form-result__message {
  margin: 18px 0;
  padding: 14px;
  max-height: 200px;
  overflow: auto;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-family: inherit;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== Футер ===== */
.footer {
  padding: 40px 0;
  background: var(--dark);
  border-top: 1px solid var(--dark-soft);
  color: #a9adb2;
  font-size: 15px;
}
.footer__inner {
  display: grid;
  gap: 20px;
}
@media (min-width: 768px) {
  .footer__inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 40px; }
}
.footer__name { color: #fff; font-weight: 700; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { color: #e4e6e8; text-underline-offset: 3px; }
.footer__links a:hover { color: #fff; }

/* ===== Модальное окно ===== */
.modal {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop {
  background: rgba(21, 24, 27, .6);
  backdrop-filter: blur(3px);
}
.modal[open] { animation: modal-in .25s ease-out; }
.modal[open]::backdrop { animation: fade-in .25s ease-out; }

.modal__inner {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}
@media (min-width: 768px) { .modal__inner { padding: 24px; } }

.modal__close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 0 -44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .2s;
}
.modal__close:hover { background: var(--surface-alt); }
.modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}
.modal__previews {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22%;
  gap: 20px;
  align-items: start;
  margin-right: 56px;
}
.phone--modal { border-width: 5px; }
@media (max-width: 559px) {
  .modal__previews {
    grid-template-columns: minmax(0, 1fr) 30%;
    gap: 12px;
    margin-right: 0;
    margin-top: 52px;
  }
  .phone--modal { border-width: 3px; border-radius: 16px; }
  .phone--modal .phone__img { border-radius: 13px; }
}

.modal__body { padding: 24px 4px 4px; }
@media (min-width: 768px) { .modal__body { padding: 28px 8px 8px; } }
.modal__title {
  margin: 12px 0 20px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
}
.modal__grid { display: grid; gap: 20px; margin-bottom: 20px; }
@media (min-width: 768px) { .modal__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.modal__subtitle {
  margin-bottom: 8px;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.modal__body p { color: var(--ink-soft); }
.modal__done { display: grid; gap: 6px; color: var(--ink-soft); }
.modal__done li { position: relative; padding-left: 16px; }
.modal__done li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
@media (max-width: 559px) {
  .modal { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .modal__inner { max-height: calc(100dvh - 16px); }
  .modal__actions .btn { flex: 1 1 100%; }
}

/* ===== Анимации ===== */
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero__chip, .hero__art-dot { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
