/* Главная, редизайн по методике Гэри Саймона (скилл site-design, 26.09.2026).
   Шрифт и палитра прежние, только токены из style.css. Всё под .h-* и .home — другие страницы не задеты. */

/* ------------------------------------------------------------------ герой */
.h-hero h1 {
  font-size: clamp(2.3rem, 1.2rem + 3.8vw, 4.3rem);
  line-height: 1.02; letter-spacing: -.035em; font-weight: 800;
  max-width: none; text-wrap: balance;
}
.h-hero .hero__in { padding-block: 84px 88px; }
.h-hero .hero__copy { justify-content: center; gap: 0; }
.h-hero p.hero__lead { font-size: clamp(1.06rem, 1rem + .3vw, 1.22rem); line-height: 1.6; max-width: 46ch; color: var(--text-dim); }
.h-hero .hero__actions { margin-top: 40px; align-items: center; gap: 28px; }
.btn--lg { padding: 17px 30px; font-size: 1.02rem; }

.h-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--text); font-size: 1rem;
  border-bottom: 1px solid var(--border-strong); padding-bottom: 3px;
  transition: color .15s, border-color .15s;
}
.h-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .2s; }
.h-link:hover { color: var(--accent-text); border-color: var(--accent); }
.h-link:hover svg { transform: translateX(3px); }

/* Факты: значение крупно, подпись мелко — тихо, без цветных «больших цифр». */
.h-facts {
  margin-top: clamp(40px, 4vw, 56px); padding-top: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
}
.h-facts li { display: grid; gap: 6px; align-content: start; padding-right: 20px; margin-right: 20px; border-right: 1px solid var(--border); }
.h-facts li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.h-facts b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.h-facts span { color: var(--text-dim); font-size: .92rem; line-height: 1.35; }

/* ------------------------------------------------------------------ секции */
.h-sec { padding-block: clamp(72px, 9vw, 128px); }
.h-sec--alt { background: var(--bg-elev); }
.h-head { max-width: 680px; margin-bottom: clamp(36px, 4vw, 56px); }
.h-head h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.9rem); letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.h-head p { color: var(--text-dim); font-size: 1.08rem; margin: 18px 0 0; max-width: 58ch; }
.h-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.h-head--row > div { max-width: 680px; }

/* ------------------------------------------------------------------ услуги: бенто */
.h-svcs { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.h-svcs__rest { display: grid; gap: 20px; grid-auto-rows: 1fr; }
.h-svc { color: var(--text); border-radius: 14px; transition: border-color .18s, background .18s; }
.h-svc:hover { color: var(--text); }
.h-svc__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); flex: 0 0 auto; }
.h-svc__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; }
.h-svc h3 { font-size: 1.22rem; letter-spacing: -.015em; }
.h-svc p { color: var(--text-dim); margin: 0; }
.h-svc__price { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; white-space: nowrap; color: var(--text); }
.h-svc__price small { font-weight: 500; font-size: .9rem; color: var(--text-dim); }

.h-svc--main {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(28px, 3vw, 44px);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
}
.h-svc--main::before {          /* тёплое пятно в углу — тот же «дым», что в герое */
  content: ""; position: absolute; inset: -40% -30% auto auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
  pointer-events: none;
}
.h-svc--main > * { position: relative; }
.h-svc--main h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; }
.h-svc--main p { font-size: 1.06rem; max-width: 44ch; }
.h-svc__list { display: grid; gap: 12px; margin-top: 4px; }
.h-svc__list li { display: flex; gap: 11px; align-items: flex-start; color: var(--text); }
.h-svc__list svg { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 3px; stroke: var(--accent); fill: none; stroke-width: 2.2; }
.h-svc__foot { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); }
.h-svc--main .h-svc__price { font-size: clamp(1.8rem, 1.4rem + 1vw, 2.4rem); }
.h-svc--main:hover { border-color: var(--accent); }

.h-svc--row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 24px 26px; background: var(--surface); border: 1px solid var(--border);
}
.h-svc--row h3 { margin-bottom: 6px; }
.h-svc--row p { font-size: .96rem; line-height: 1.5; }
.h-svc__side { display: flex; align-items: center; gap: 14px; }
.h-svc__side svg { width: 18px; height: 18px; fill: none; stroke: var(--text-dim); stroke-width: 2.2; transition: transform .2s, stroke .2s; }
.h-svc--row:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.h-svc--row:hover .h-svc__side svg { stroke: var(--accent); transform: translateX(3px); }

/* ------------------------------------------------------------------ агент в работе */
.h-demos { align-items: start; }
.h-demos .demo:hover { transform: none; }
@media (min-width: 981px) {
  .h-demos .demo:nth-child(2) { margin-top: 48px; }   /* лёгкая «лесенка» вместо ровного ряда */
  .h-demos .demo:nth-child(3) { margin-top: 96px; }
}

/* ------------------------------------------------------------------ как работаем: линия шагов */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.h-steps::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 15%, var(--border)));
}
.h-step { position: relative; }
.h-step__dot {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent-text);
  font-weight: 800; font-size: 1.05rem; margin-bottom: 22px; position: relative;
}
.h-step:first-child .h-step__dot { background: var(--accent); color: var(--accent-ink); }
.h-step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.h-step p { color: var(--text-dim); margin: 0; font-size: .98rem; max-width: 30ch; }

/* ------------------------------------------------------------------ память */
.h-mem .kicker { display: none; }
.h-mem .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 72px); }
.h-mem .graph { border: 0; background: transparent; box-shadow: none; }
.h-mem .graph__caption { border: 0; background: transparent; padding: 14px 0 0; color: var(--text-faint); font-size: .9rem; max-width: 60ch; }
.h-mem .split__text h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.9rem); letter-spacing: -.03em; line-height: 1.08; }
.h-mem .split__text p { font-size: 1.05rem; }

/* ------------------------------------------------------------------ почему к нам: без коробок */
.h-whys {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto auto; column-gap: clamp(40px, 6vw, 96px); row-gap: 40px;
}
.h-why--lead { grid-row: 1 / span 2; }
.h-whys .h-why--lead h3 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px; }
.h-whys .h-why--lead p { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; max-width: 44ch; }
.h-why--lead .h-link { margin-top: 26px; }
.h-why { padding-top: 24px; border-top: 1px solid var(--border-strong); }
.h-why:first-child { border-top-color: var(--accent); }
.h-why h3 { font-size: 1.3rem; letter-spacing: -.02em; margin-bottom: 12px; }
.h-why p { color: var(--text-dim); margin: 0; font-size: 1rem; }

/* ------------------------------------------------------------------ призыв */
.h-sec--cta { padding-block: clamp(56px, 7vw, 96px); }
.h-cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.h-cta > * { position: relative; }
.h-cta > .cta__glow { position: absolute; }
.h-cta h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -.03em; line-height: 1.1; max-width: 20ch; }
.h-cta p { color: var(--text-dim); margin: 14px 0 0; max-width: 56ch; font-size: 1.05rem; }

/* ------------------------------------------------------------------ адаптив */
@media (max-width: 980px) {
  .h-svcs { grid-template-columns: 1fr; }
  .h-svcs__rest { grid-auto-rows: auto; }
  .h-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .h-steps::before { display: none; }
  .h-mem .split { grid-template-columns: 1fr; }
  .h-whys { grid-template-columns: 1fr; row-gap: 32px; }
  .h-why--lead { grid-row: auto; }
  .h-cta { grid-template-columns: 1fr; }
  .h-facts { padding-top: 36px; }
}
@media (max-width: 640px) {
  .h-hero .hero__in { padding-block: 48px 56px; }
  .h-hero .hero__actions { gap: 22px; }
  .h-hero .hero__actions .btn { flex: 1 1 100%; }
  .h-facts { grid-template-columns: 1fr; }
  .h-facts li { grid-template-columns: 4.6rem minmax(0, 1fr); align-items: baseline; gap: 12px;
    border-right: 0; margin-right: 0; padding: 12px 0; border-top: 1px solid var(--border); }
  .h-facts li:last-child { border-bottom: 1px solid var(--border); }
  .h-facts b { font-size: 1.4rem; }
  .h-facts span { font-size: .95rem; }
  .h-svc--row { grid-template-columns: auto minmax(0, 1fr); padding: 20px; }
  .h-svc__side { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; width: 100%; }
  .h-svc__foot { flex-wrap: wrap; }
  .h-svc__foot .btn { flex: 1 1 100%; }
  .h-steps { grid-template-columns: 1fr; }
  .h-head--row { flex-direction: column; align-items: flex-start; }
  .h-cta .btn { width: 100%; }
}

/* контраст мелких подписей на главной (site_check 26.09) */
.h-demos .demo__tag { color: var(--text-dim); }
.h-mem .graph__caption { color: var(--text-dim); }
.home .post__meta { color: var(--text-dim); font-size: .875rem; }

/* шаги на телефоне: вертикальная линия через кружки */
@media (max-width: 640px) {
  .h-steps { row-gap: 32px; }
  .h-steps::before { display: block; left: 21px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 15%, var(--border))); }
  .h-step { padding-left: 64px; }
  .h-step__dot { position: absolute; left: 0; top: -8px; margin: 0; }
  .h-facts li { padding-right: 10px; margin-right: 10px; }
}

/* ------------------------------------------------------------------ призыв с Нэко */
.h-cta { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); padding-bottom: 0; align-items: end; }
.h-cta__txt { padding-bottom: clamp(32px, 5vw, 64px); align-self: center; }
.h-cta__txt .btn { margin-top: 30px; }
.h-cta__neko {
  width: 100%; height: auto; align-self: end; margin-top: -8px;
  -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 46%, #000 62%, transparent 100%);
}
@media (max-width: 980px) {
  .h-cta { grid-template-columns: 1fr; }
  .h-cta__neko { max-width: 300px; justify-self: center; }
}
@media (max-width: 640px) {
  .h-cta__txt .btn { width: 100%; }
}

/* ------------------------------------------------------------------ пиксельная волна */
.pxw { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.h-hero .hero__in { z-index: 1; }

/* ------------------------------------------------------------------ живой чат в мониторе (livechat.js) */
.monitor .chat { transition: opacity .3s ease-out; }
.monitor .chat.is-fading { opacity: 0; }
.monitor .msg.is-new { animation: tg-in .35s ease-out; }
@keyframes tg-in { from { opacity: 0; transform: translateY(8px); } }
.tg__typing { display: inline-flex; gap: 4px; align-items: center; justify-self: start; padding: 10px 12px; }
.tg__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--tg-dim); animation: tg-dot 1s infinite ease-in-out; }
.tg__typing i:nth-child(2) { animation-delay: .15s; }
.tg__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tg-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.monitor .tg__item { transition: background .3s; }
.monitor .tg__list { overflow: hidden; }

/* ------------------------------------------------------------------ тихая пиксельная сетка за Нэко в призыве */
.h-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='6' y='6' width='4' height='4' fill='%23ff9000'/%3E%3C/svg%3E");
  opacity: .22;
  -webkit-mask-image: radial-gradient(ellipse 38% 75% at 82% 55%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 38% 75% at 82% 55%, #000 20%, transparent 80%);
}
[data-theme="light"] .h-cta::before { opacity: .3; }
@media (max-width: 980px) {
  .h-cta::before {
    -webkit-mask-image: radial-gradient(ellipse 70% 40% at 50% 80%, #000 20%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 40% at 50% 80%, #000 20%, transparent 80%);
  }
}

/* ------------------------------------------------------------------ водяной знак «24/7» за «Почему к нам» */
.h-sec--why { position: relative; overflow: hidden; }
.h-sec--why > .wrap { position: relative; }
.h-mark {
  position: absolute; right: -2vw; top: 50%; transform: translateY(-50%);
  font-size: clamp(9rem, 26vw, 26rem); font-weight: 800; letter-spacing: -.06em; line-height: 1;
  color: var(--text); opacity: .035; pointer-events: none; user-select: none; white-space: nowrap;
}
@media (max-width: 640px) { .h-mark { top: 30px; transform: none; font-size: 8rem; } }

/* светлая тема: тёмная картинка Нэко в овальной маске смотрится дырой — показываем её карточкой */
[data-theme="light"] .h-cta__neko {
  -webkit-mask-image: none; mask-image: none;
  border-radius: 16px 16px 0 0; margin-top: 24px;
}

/* ------------------------------------------------------------------ «Один день нашего агента» */
.h-day {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(40px, 6vw, 96px);
}
.h-day__item {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 20px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--border);
}
.h-day__time {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.h-day__item h3 { font-size: 1.12rem; letter-spacing: -.01em; margin: 0 0 6px; }
.h-day__item p { margin: 0; color: var(--text-dim); font-size: 1rem; line-height: 1.55; }
@media (max-width: 980px) { .h-day { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .h-day__item { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .h-day__time { font-size: 1.1rem; }
}

/* ------------------------------------------------------------------ тарифы (главная и «Установка агента») */
.tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.tariff {
  display: flex; flex-direction: column; gap: 0;
  padding: clamp(24px, 2.6vw, 34px); border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.tariff__name { font-size: 1.6rem; letter-spacing: -.03em; margin: 0; }
.tariff__sub { margin: 6px 0 0; color: var(--text-dim); font-size: 1rem; line-height: 1.45; min-height: 2.9em; }
.tariff__price {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 22px;
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.tariff__price small { font-size: 1rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.tariff__price span { font-size: .95rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.tariff__packs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.tariff__packs li {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-top: 1px solid var(--border); font-size: .98rem; color: var(--text-dim);
}
.tariff__packs li:last-child { border-bottom: 1px solid var(--border); }
.tariff__packs b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.tariff__list { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 12px; }
.tariff__list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: .98rem; line-height: 1.5; }
.tariff__list svg { width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--accent); stroke-width: 2.4; }
.tariff__btn { margin-top: auto; justify-content: center; }
.tariffs__note { margin: 24px 0 0; color: var(--text-dim); font-size: 1rem; max-width: 72ch; }
.h-tariffs-page { padding-block: clamp(56px, 7vw, 96px); }
@media (max-width: 980px) { .tariffs { grid-template-columns: 1fr; max-width: 560px; } .tariff__sub { min-height: 0; } }
