/* ============================================================
   Nyamus — промо-лендинг.
   Самодостаточные стили: системный шрифтовой стек, палитра
   брендборда (кремовый / шалфейный / персиковый), без внешних
   ресурсов. Мобильная адаптивность без горизонтального скролла.
   ============================================================ */

:root {
  --bg: #faf6f0;            /* кремовый фон */
  --card: #ffffff;          /* белые карточки */
  --ink: #2b2b2b;           /* основной текст */
  --ink-soft: #6e675e;      /* приглушённый тёплый серый */
  --sage: #8fbc8f;          /* шалфейный зелёный */
  --sage-deep: #567f56;     /* тёмный шалфей: акценты, ссылки */
  --sage-ink: #22371f;      /* текст на шалфейном фоне */
  --sage-soft: #e9f2e6;     /* светлая шалфейная подложка */
  --peach: #f4a58a;         /* персиковый акцент */
  --peach-soft: #fbe4d8;    /* светлая персиковая подложка */
  --line: #eae1d3;          /* тонкие границы на кремовом */
  --radius: 20px;
  --shadow: 0 12px 32px rgba(43, 43, 43, .08);
  --shadow-soft: 0 6px 18px rgba(43, 43, 43, .06);
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip; /* страница никогда не скроллится горизонтально */
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; }
p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--sage-deep); }

::selection { background: var(--sage); color: var(--sage-ink); }

:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

.container--narrow { max-width: 760px; }

/* Якоря учитывают липкую шапку */
section[id] { scroll-margin-top: 84px; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn--primary {
  background: var(--sage);
  color: var(--sage-ink);
  box-shadow: 0 10px 24px rgba(143, 188, 143, .4);
}
.btn--primary:hover { background: #7fb07f; transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(143, 188, 143, .35); }

.btn--ghost {
  background: transparent;
  border: 1.5px solid #ddd2bf;
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--sage-deep); color: var(--sage-deep); }

.btn--cream {
  background: #fff;
  color: var(--sage-ink);
  box-shadow: 0 10px 24px rgba(34, 55, 31, .18);
}
.btn--cream:hover { background: #f6efe3; transform: translateY(-1px); }

.btn--small { padding: 9px 20px; font-size: .92rem; }
.btn--wide { width: 100%; }

/* ---------- Шапка ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.logo__paw {
  font-size: .85em;
  transform: translateY(-6px) rotate(18deg);
  display: inline-block;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.5vw, 30px);
  margin-inline: auto;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: .96rem;
  transition: color .15s ease;
}
.site-nav a:hover { color: var(--sage-deep); }

.site-head .btn { margin-left: auto; }
.site-nav + .btn { margin-left: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px);
}

/* мягкие цветовые пятна на фоне */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.hero::before {
  width: 420px; height: 420px;
  right: -120px; top: -140px;
  background: rgba(143, 188, 143, .28);
}
.hero::after {
  width: 360px; height: 360px;
  left: -140px; bottom: -160px;
  background: rgba(244, 165, 138, .22);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-size: .88rem;
  font-weight: 600;
  color: var(--sage-deep);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__lead {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--ink-soft);
}

.hero__cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__note {
  margin-top: 16px;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* --- Маскот: слот под картинку + заглушка-кот в цветном круге --- */

.hero__visual {
  display: grid;
  justify-items: center;
}

.mascot {
  position: relative;
  width: min(400px, 86%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(115% 115% at 30% 22%,
      #fff7ee 0%, var(--peach-soft) 38%, var(--sage-soft) 72%, #dcead7 100%);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mascot img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

/* пунктирное кольцо — только в режиме заглушки */
.mascot--fallback::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(86, 127, 86, .4);
  border-radius: 50%;
}

.mascot__fallback {
  display: none;
  place-items: center;
  gap: 10px;
  text-align: center;
}
.mascot--fallback .mascot__fallback { display: grid; }

.mascot__emoji {
  font-size: clamp(72px, 12vw, 116px);
  line-height: 1;
}

.mascot__hint {
  font-size: .9rem;
  font-weight: 600;
  color: var(--sage-deep);
}

/* --- Мини-чат под маскотом --- */

.chat {
  position: relative;
  z-index: 2;
  margin-top: -52px;
  width: min(360px, 94%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chat__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sage-soft);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.chat__title { display: grid; line-height: 1.25; }
.chat__title strong { font-size: .98rem; }
.chat__title span { font-size: .8rem; color: var(--sage-deep); }

.chat__bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.45;
}

.chat__bubble--user {
  justify-self: end;
  background: var(--sage-soft);
  color: var(--sage-ink);
  border-bottom-right-radius: 4px;
}

.chat__bubble--bot {
  justify-self: start;
  background: var(--bg);
  border-bottom-left-radius: 4px;
}

/* ---------- Секции ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }

.section--tinted {
  background: #f3ede3; /* чуть плотнее кремового — мягкое чередование полос */
}

.section__head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.kicker {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 12px;
}

.section__head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section__sub {
  margin-top: 14px;
  color: var(--ink-soft);
}

/* ---------- Шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 28px);
  counter-reset: step;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 3vw, 32px);
  transition: transform .18s ease, box-shadow .18s ease;
}

.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.step-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.step-card__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--peach);
  color: #4a2416;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.step-card__icon { font-size: 1.9rem; }

.step-card h3 { font-size: 1.13rem; font-weight: 700; }

.step-card p {
  margin-top: 10px;
  font-size: .96rem;
  color: var(--ink-soft);
}

/* ---------- Фичи ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(18px, 2.5vw, 26px);
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 3vw, 30px);
  transition: transform .18s ease, box-shadow .18s ease;
}

.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--sage-soft);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* чередование подложек иконок: шалфей / персик */
.feature-card:nth-child(even) .feature-card__icon { background: var(--peach-soft); }

.feature-card h3 { font-size: 1.08rem; font-weight: 700; }

.feature-card p {
  margin-top: 8px;
  font-size: .95rem;
  color: var(--ink-soft);
}

/* ---------- Тариф ---------- */

.plan {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 44px);
  text-align: center;
}

.plan__sticker {
  position: absolute;
  top: -26px;
  right: 18px;
  width: 76px;
  transform: rotate(8deg);
}

.plan__pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.plan__title {
  margin-top: 14px;
  font-size: 1.7rem;
  font-weight: 800;
}

.plan__trial {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1.5px dashed var(--sage);
  border-radius: 14px;
  background: var(--sage-soft);
  color: var(--sage-ink);
  font-size: .98rem;
}
.plan__trial span { margin-right: 8px; }

.plan__list {
  margin-top: 22px;
  text-align: left;
  display: grid;
  gap: 10px;
}

.plan__list li {
  position: relative;
  padding-left: 30px;
  font-size: .98rem;
}

.plan__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--sage-ink);
  font-size: .78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 3px;
}

.plan__price {
  margin-top: 26px;
  font-size: 1.28rem;
  font-weight: 800;
}

.plan__price-note {
  margin-top: 6px;
  margin-bottom: 24px;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ---------- FAQ ---------- */

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.faq-item + .faq-item { margin-top: 14px; }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
  border-radius: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background-color .2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  background: var(--peach-soft);
  color: #a4532f;
}

.faq-item p {
  padding: 0 22px 20px;
  color: var(--ink-soft);
  font-size: .97rem;
}

/* ---------- Закрывающий блок ---------- */

.section--band { padding-top: 0; }

.band {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #9cc49c 0%, var(--sage) 45%, #7aa77a 100%);
  color: var(--sage-ink);
  text-align: center;
  padding: clamp(48px, 7vw, 80px) clamp(24px, 5vw, 72px);
}

.band__paw {
  position: absolute;
  right: -28px;
  bottom: -40px;
  font-size: 200px;
  opacity: .12;
  transform: rotate(-18deg);
  pointer-events: none;
}

.band__quote {
  max-width: 21em;
  margin-inline: auto;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.band__sub {
  margin-top: 14px;
  margin-bottom: 30px;
  font-weight: 600;
  opacity: .85;
}

.band__note {
  margin-top: 14px;
  font-size: .88rem;
  opacity: .8;
}

/* ---------- Футер ---------- */

.site-foot {
  background: var(--ink);
  color: #f2ecdf;
  padding-block: clamp(40px, 6vw, 56px) 28px;
}

.site-foot__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.logo--foot { color: #f2ecdf; font-size: 1.5rem; margin: 0; }
.logo--foot span { font-size: .8em; display: inline-block; transform: translateY(-6px) rotate(18deg); }

.site-foot__slogan {
  margin-top: 6px;
  color: #b9b1a4;
  font-size: .95rem;
}

.site-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.site-foot__links a {
  color: #e4dccb;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid rgba(228, 220, 203, .35);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.site-foot__links a:hover { color: var(--sage); border-color: var(--sage); }

.site-foot__bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(242, 236, 223, .14);
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  color: #98917f;
  font-size: .88rem;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__visual { margin-top: 8px; }
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; } /* на телефоне: логотип + кнопка «Скачать» */
  body { font-size: 16px; }
  .chat { margin-top: -40px; }
}

/* На узких экранах широкие кнопки переносят текст: «Скачать и попробовать
   бесплатно» не влезает в карточку тарифа одной строкой (~335px текста против
   ~264px доступной ширины на 360px-вьюпорте). */
@media (max-width: 480px) {
  .btn--wide { white-space: normal; }
}

@media (max-width: 420px) {
  .hero__cta .btn { width: 100%; white-space: normal; }
  .plan__sticker { width: 60px; top: -20px; }
  .band__paw { font-size: 150px; }
}
