/* ============================================================
   Контрольные ширины: 1440 / 1280 / 1024 / 768 / 390 / 360
   ============================================================ */

/* ---------- ≤1280px: чуть плотнее контейнеры ---------- */
@media (max-width: 1280px) {
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- ≤1024px: переход навигации в мобильный режим,
   двухколоночные секции становятся плотнее ---------- */
@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(160deg, rgba(10, 18, 36, 0.96) 0%, rgba(13, 23, 51, 0.96) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height var(--transition-base), opacity var(--transition-base);
  }

  .primary-nav.is-open {
    max-height: 480px;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-chip {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 18px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
    min-height: clamp(320px, 70vw, 520px);
  }

  .approach__body,
  .product__body,
  .production__inner,
  .contacts__top {
    grid-template-columns: 1fr;
  }

  .production__inner {
    display: flex;
    flex-direction: column-reverse;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

/* ---------- ≤768px: одноколоночные карточки, компактные отступы ---------- */
@media (max-width: 768px) {
  :root {
    --header-height-mobile: 76px;
  }

  .site-header {
    padding-top: 12px;
  }

  .site-header__inner {
    padding: 8px 8px 8px 12px;
  }

  .brand__name {
    font-size: 17px;
  }

  .brand__descriptor {
    font-size: 7px;
  }

  .tech-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: calc(var(--header-height-mobile) + 24px);
  }

  .hero__content {
    padding-top: 8px;
    gap: 18px;
  }

  .hero__eyebrow {
    padding: 9px 16px;
    font-size: 10px;
  }

  .hero__title {
    font-size: clamp(34px, 9vw, 48px);
  }

  .quote-card {
    padding: 28px 22px;
  }

  .contact-row {
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 20px 16px;
  }

  .contact-row__value {
    font-size: clamp(18px, 6vw, 26px);
  }

  .site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
  }

  .brand--footer {
    justify-content: center;
  }

  .footer-nav {
    justify-content: center;
  }

  .footer-principle,
  .footer-copyright {
    justify-self: unset;
    text-align: center;
  }
}

/* ---------- ≤390px / ≤360px: минимальные мобильные ширины ---------- */
@media (max-width: 420px) {
  .container, .section-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero__title {
    font-size: clamp(30px, 10vw, 40px);
    letter-spacing: -0.02em;
  }

  .hero__lead {
    font-size: 15px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 20px;
  }

  .section-title {
    font-size: clamp(26px, 8vw, 32px);
  }

  .approach__statement-text {
    font-size: 24px;
  }

  .quote-card__main {
    font-size: 22px;
  }

  .quote-card__emphasis {
    font-size: 26px;
  }

  .contacts__intro p {
    font-size: 16px;
  }

  .contact-row__label {
    width: 70px;
    font-size: 9px;
  }

  .nav-chip {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hero__eyebrow span:first-child {
    font-size: 9px;
  }

  .brand__descriptor {
    display: none;
  }
}
