/* =============================================================
   Адаптивность: 1440 / 1024 / 768 / 430 / 390 / 360
   ============================================================= */

@media (min-width: 1800px) {
  :root { --container: 1520px; }
  body { font-size: 18px; }
}

@media (max-width: 1240px) {
  .nav__list { gap: 20px; }
  .nav__link { font-size: 14px; letter-spacing: .05em; }
  .header-actions .btn { display: none; }
  .grid-cards--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .nav, .header-actions .btn { display: none; }
  .header-actions { margin-left: auto; }
  .burger { display: block; }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .page-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--c-line); }
  .local, .contact-grid, .life, .cta-final__grid { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product__media { position: static; max-width: 640px; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row:nth-child(even) .feature-row__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .principles { grid-template-columns: 1fr; }
  .atex__head { grid-template-columns: 1fr; }
  .atex__badge { justify-self: start; text-align: left; }
  .atex__badge-sub { margin-left: 0; }
  .atex__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atex__notes { grid-template-columns: 1fr; }
  .banner__media { --ar: 16 / 10; min-height: 460px; }
  .hero__scroll { display: none; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .types3 { grid-template-columns: 1fr; }
  .types3__item { display: grid; grid-template-columns: 120px 1fr; gap: 0 22px; padding: 22px; align-items: center; }
  .types3__media { margin: 0; border: 1px solid var(--c-line); grid-row: span 3; --ar: 1 / 1; }
  .types3__item h3 { font-size: 24px; margin-bottom: 6px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .kpis { grid-template-columns: 1fr; }
  .kpi + .kpi { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-line); }
  .info-list li { grid-template-columns: 1fr; gap: 4px; }
  .map { min-height: 320px; }
  .fab { display: grid; }
  .faq__body p { padding-right: 0; }
  .life__key { padding: 26px 20px; }
  .life__key span { font-size: 20px; }

  /* HERO — мобильная композиция: кадр сверху, рамка наезжает на него */
  .hero { min-height: auto; display: block; padding-top: var(--header-h); }
  .hero__media { position: relative; inset: auto; aspect-ratio: 4 / 5; max-height: 68svh; width: 100%; }
  .hero__media::after { background: linear-gradient(0deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 45%); }
  .hero__content { margin-top: -120px; padding-top: 0; padding-bottom: 56px; }
  .hero__frame { background: rgba(0, 0, 0, .55); width: 100%; }
  .hero__sub { margin: 22px 0 26px; }
  .hero .btn-row .btn { flex: 1 1 100%; }

  .banner__media { --ar: 3 / 4; min-height: 0; max-height: 80svh; }
  .banner__media::after { background: linear-gradient(0deg, rgba(0, 0, 0, .92) 10%, rgba(0, 0, 0, .1) 70%); }
  .banner__content { align-items: flex-end; padding-bottom: 40px; }
  .app-visual::before { width: 86%; right: 7%; }
  .phone { width: min(64%, 270px); }
  .card__actions .btn { flex: 1 1 100%; }
}

@media (max-width: 640px) {
  .grid-cards, .grid-cards--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 28px 0 4px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--c-line); }
  .steps li::before { font-size: 52px; margin-bottom: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .atex__item { min-height: 0; padding: 20px 16px; gap: 12px; }
  .atex__item span { font-size: 15px; font-stretch: 80%; }
  .frame { border-width: 5px; }
  .filters__label { min-width: 100%; }
  .filters__row { gap: 8px; }
  .cta-final .btn-row .btn, .split__body .btn-row .btn { flex: 1 1 100%; }
  .footer-bottom__row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 430px) {
  :root { --gutter: 20px; }
  .logo { --logo-w: 100px; }
  .logo__city, .city-btn { font-size: 10px; letter-spacing: .14em; }
  .brand { gap: 16px; }
  .city-btn { max-width: 150px; }
  .lang__btn { min-width: 36px; }
  .header-actions { gap: 10px; }
  .card__body { padding: 22px 20px 24px; }
  .types3__item { grid-template-columns: 96px 1fr; gap: 0 16px; padding: 18px; }
  .hero__content { margin-top: -96px; }
  .h-xl { font-size: clamp(30px, 9.4vw, 42px); }
}

@media (max-width: 374px) {
  :root { --gutter: 16px; }
  .logo { --logo-w: 92px; }
  .logo__city, .city-btn { letter-spacing: .08em; }
  .brand { gap: 14px; }
  .city-btn { max-width: 118px; }
  .btn { padding: 0 20px; font-size: 14px; }
  .burger { width: 42px; height: 42px; }
  .burger span { left: 11px; right: 11px; }
  .burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 20px; } .burger span:nth-child(3) { top: 26px; }
}

@media print {
  .site-header, .mobile-menu, .fab, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Шапка с выбором города ---------- */
.city-btn span { min-width: 0; }
.cta-short { display: none; }
.lang--menu { display: none; }
@media (max-width: 1600px) and (min-width: 1241px) {
  .header-cta .cta-full { display: none; }
  .header-cta .cta-short { display: inline; }
}
@media (max-width: 640px) {
  .header-actions > .lang { display: none; }
  .lang--menu { display: inline-flex; width: max-content; align-self: flex-start; justify-self: start; margin-bottom: 8px; }
  .city-btn { max-width: 190px; }
}
@media (max-width: 390px) { .city-btn { max-width: 150px; } }
