/* ==========================================================================
   Азбука Севера — адаптив
   Десктоп ≥ 1200, планшет 768–1199, телефон < 768
   ========================================================================== */

@media (max-width: 1199px) {
  :root {
    --gutter: 28px;
  }

  .main-nav {
    gap: 20px;
  }

  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-5 {
    grid-template-columns: repeat(3, 1fr);
  }


}

/* Меню-бургер */
@media (max-width: 1023px) {
  .header-cta {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: grid;
    gap: 0;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: rgba(7, 26, 32, .98);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
    font-size: 16px;
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s;
  }

  .main-nav.is-open {
    transform: none;
    visibility: visible;
  }

  .site-header:has(.main-nav.is-open) {
    background: rgba(7, 26, 32, .98);
  }

  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line-dark);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-cta {
    display: inline-flex;
    margin-top: 20px;
  }

  .hero-features {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }

  .hero-features li:nth-child(3) {
    border-left: 0;
  }

  .banner-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .banner-north .banner-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quality {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: var(--section-y) 0 0;
  }

  .quality-media {
    position: relative;
    display: block;
    order: 2;
    height: clamp(260px, 45vw, 420px);
    margin-top: 8px;
  }

  .quality-media img {
    width: 100%;
    object-position: 70% center;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  }

  .quality-list {
    margin-bottom: 26px;
  }

  .quality::before {
    display: none;
  }

  .company {
    padding-bottom: 0;
  }

  .company-inner {
    flex-direction: column;
    gap: 24px;
  }

  .company-media {
    position: relative;
    display: block;
    width: 100%;
    height: clamp(240px, 45vw, 380px);
    margin-top: 24px;
  }

  .company-media img {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  }

  .company {
    display: flex;
    flex-direction: column;
  }

  .company-media {
    order: 2;
  }

}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }

  body {
    font-size: 15px;
  }

  .logo-mark {
    width: 36px;
    height: 22px;
  }

  .logo-title {
    font-size: 15px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 36px);
  }

  .hero-media img {
    object-position: center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(7, 26, 32, .9) 0%, rgba(7, 26, 32, .75) 45%, rgba(7, 26, 32, .35) 70%, rgba(7, 26, 32, .95) 100%);
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-features {
    margin-top: 40vh;
  }

  .hero-features li {
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-features img,
  .hero-features svg {
    width: 32px;
    height: 32px;
  }

  .br-desktop {
    display: none;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cards {
    gap: 14px;
  }

  .cards-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-body {
    padding: 14px 14px 16px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 13px;
  }

  .banner-north {
    padding-top: 48px;
  }

  .banner-north .banner-grid {
    min-height: 0;
  }

  .banner-north .banner-shade {
    background: linear-gradient(180deg, rgba(7, 26, 32, .9) 0%, rgba(7, 26, 32, .55) 55%, rgba(7, 26, 32, .9) 100%);
  }

  .north-features {
    justify-content: space-between;
    margin-top: 140px;
  }

  .north-features li {
    width: auto;
    flex: 1;
    padding: 0 6px;
    font-size: 12px;
  }


  .fish-banner {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0 0 var(--section-y);
  }

  .fish-banner-media {
    position: relative;
    display: block;
    height: 240px;
  }

  .fish-banner::before {
    background: linear-gradient(180deg, rgba(0, 13, 24, 0) 0%, rgba(0, 13, 24, 0) 150px, #000d18 240px);
  }

  .fish-banner-content {
    margin-top: -24px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .footer-brand,
  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .partner {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
  }

  .partner-logo {
    width: 64px;
    height: 64px;
  }

  .partner-body {
    flex: 1 1 calc(100% - 80px);
  }

  .partner-title {
    font-size: 20px;
  }

  .partner-link {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .wa-widget {
    right: 16px;
    bottom: 16px;
  }

  .wa-btn {
    width: 54px;
    height: 54px;
  }

  .wa-tooltip {
    display: none;
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal-card {
    max-height: 92svh;
    border-radius: 16px 16px 0 0;
  }

  .modal-body {
    padding: 22px 18px 26px;
  }

  .draft .todo::after {
    white-space: normal;
    max-width: 240px;
  }
}

@media (max-width: 389px) {
  .cards-4,
  .cards-5 {
    grid-template-columns: 1fr;
  }

  .hero-features li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
