/* ============================================================
   M99 Hotel — responsive: mobile (0–599) и tablet (600–1199)
   Контрольные макеты: Mobile 10313:41335 (360), Tablet 10296:36156 (768)
   Desktop (1200+) не затрагивается — см. style.css
   ============================================================ */

/* ============================================================
   MOBILE 0–599
   ============================================================ */
@media (max-width: 599.98px) {

  /* ---------- токены и утилиты ---------- */
  :root {
    --gap-block-l: 40px;
    --pad-card: 24px;
    --radius-card: 16px;
  }
  .section--p24 { padding-left: 8px; padding-right: 8px; }
  .section--p40 { padding-left: 16px; padding-right: 16px; }
  .section--m64 { margin-bottom: 40px; }
  .card { border-radius: 16px; }

  /* ---------- типографика (mobile UI Kit) ---------- */
  .h5 { font-size: 20px; line-height: 20px; }
  .text-l { font-size: 18px; line-height: 24px; }
  .text-m { font-size: 16px; line-height: 20px; }
  .hero__title { font-size: 32px; line-height: 32px; }
  .hero__subtitle { font-size: 18px; line-height: 24px; }
  .banner__title-xl { font-size: 28px; line-height: 28px; }
  .banner-1__text,
  .banner-2__sub { font-size: 18px; line-height: 24px; }
  .faq__q { font-size: 18px; line-height: 24px; }
  .faq__number { font-size: 14px; line-height: 18px; }
  .numbers__value { font-size: 40px; line-height: 40px; }
  .numbers__text { font-size: 18px; line-height: 24px; }
  .reserve__title { font-size: 32px; line-height: 42px; }
  .benefit-card__text { font-size: 18px; line-height: 24px; }
  .facility__title { font-size: 28px; line-height: 28px; }
  .contacts__card-title { font-size: 24px; line-height: 24px; margin-bottom: 16px; }
  .footer__menu a { font-size: 16px; line-height: 20px; }
  .btn--l { height: 60px; padding: 18px 40px; font-size: 18px; line-height: 24px; }

  /* ---------- header: строка на hero (y8) / пилюля y16 ---------- */
  .header {
    top: 8px;
    padding: 0 8px;
    transition: top .25s ease;
  }
  .header.is-sticky { top: 16px; }
  .header::before {
    left: 0;
    right: 0;
    top: 0;
    height: 56px;
  }
  .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 15px;
    height: 40px;
  }
  .header.is-sticky .header__inner { height: 56px; }
  .header__logo img {
    height: 28.6px;
    width: 148px;
  }
  .header__nav,
  .header__contacts,
  .header__btn,
  .header__right { display: none; }
  .header__menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    gap: 0;
    position: relative;
    z-index: 2;
  }
  .header__menu-line {
    position: absolute;
    left: 5px;
    display: block;
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-900);
    transition: background-color .25s ease;
  }
  .header__menu-line:nth-child(1) { top: 9px; }
  .header__menu-line:nth-child(2) { top: 19px; }
  .header__menu-line:nth-child(3) { top: 29px; }
  .header.is-sticky .header__menu-line { background: var(--c-900); }
  .header.is-sticky .header__logo img { filter: brightness(.1); }

  /* ---------- полноэкранное меню (10340:16111) ---------- */
  .mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 24px 16px 24px;
    background: var(--c-50);
    color: var(--c-900);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
  }
  .mobile-menu::backdrop { background: rgba(13, 13, 13, .35); }
  .mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
  }
  .mobile-menu__logo img {
    height: 28.6px;
    width: auto;
    filter: brightness(.1);   /* белая версия → тёмная */
  }
  .mobile-menu__close .close-x__line { background: var(--c-900); }
  .mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 80px 8px 0;
  }
  .mobile-menu__link {
    font-size: 16px;
    line-height: 20px;
    text-transform: uppercase;
    color: var(--c-1000);
  }
  .mobile-menu__contacts {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 8px 24px;
    margin-top: auto;
  }
  .mobile-menu__contact {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    line-height: 20px;
    color: var(--c-1000);
  }
  .mobile-menu__contact .icon { color: var(--c-900); }

  /* mobile: email и языки — отдельными строками (Figma 12239:6051, gap 32) */
  .mobile-menu__contact-row {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  .mobile-menu__lang { font-size: 16px; line-height: 20px; }

  /* ---------- hero: видео 344×304 + teal 344×324 (итог 640) ----------
     Высота зафиксирована 640px как в Figma (HeroScreen 10313:41342 = 360×640):
     на высоких viewport flex-растяжение media ломало пропорции маски —
     начало полотна уезжало вниз, у меню появлялся лишний зазор */
  .hero {
    min-height: 640px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
    padding: 8px 8px 0;
  }
  .hero__media {
    position: relative;
    inset: auto;
    flex: 0 0 304px;   /* 344×304 из Figma — без растяжения, маска не искажается */
    min-height: 304px;
    border-radius: 16px;
    overflow: hidden;
    /* «папочная» форма из Figma (Video Background 10323:14322, 344×304),
       нормализована в viewBox 100×88 c preserveAspectRatio='none'.
       Сверена построчно с экспортом узла (304 строки, max dev ≤2px):
       длинное ушко под лого 148px, правый верхний радиус, скруглённый низ.
       fill непрозрачный: маска читает alpha */
    --hero-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='88' viewBox='0 0 100 88' preserveAspectRatio='none'%3E%3Cpath d='M 53.5 0 C 55.91 0.04 60.89 16.71 62.32 16.71 L 97.23 16.31 C 99.03 16.42 100 18.44 100 18.44 L 100 84.44 C 100.07 86.68 98.9 88.04 97.66 88 L 2.27 88 C 1.01 87.44 -0.05 86.91 0 84.73 L 0 2.55 C 0.05 1.34 1.43 0.39 2.27 0 L 53.5 0 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-image: var(--hero-mask);
            mask-image: var(--hero-mask);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
  }
  .hero__content {
    position: relative;
    flex: 0 0 auto;
    min-height: 324px;
    padding: 24px;
    border-radius: 16px;
    background: var(--c-teal);
  }
  .hero__description {
    width: auto;
    height: auto;
    padding: 0;
    gap: 16px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hero__subtitle { color: var(--c-50); }
  .hero__btn {
    width: 216px;
    align-self: flex-start;
    margin-top: 16px;   /* + gap 16px родителя = 32px как в Figma */
    background: var(--c-50);
    color: var(--c-1000);
  }
  .hero__btn .icon { color: var(--c-900); }
  /* RHA — отдельная белая карточка в потоке (340×108);
     max-width страхует экраны <360, на 360+ не влияет (342>340) */
  .hero__rha {
    position: static;
    aspect-ratio: auto;   /* сбрасывает пропорцию desktop-плашки */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 340px;
    max-width: calc(100vw - 18px);
    min-height: 108px;
    margin: 16px 10px 0;
    background: var(--c-50);
    border-radius: 19px;
    padding: 0;
  }
  /* <340: 100vw не учитывает scrollbar — сжимаем по родителю */
  @media (max-width: 339.98px) {
    .hero__rha { width: auto; max-width: calc(100% - 20px); }
  }
  .hero__rha-logo {
    position: static;
    width: 150px;
    height: auto;
    filter: none;
  }

  /* ---------- about: 1 колонка, заголовок → тексты → фото ---------- */
  .about {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    min-height: 0;
  }
  .about__left,
  .about__right { display: contents; }
  .about .h5 { margin-bottom: 32px; }
  .about__right .text-l { margin-bottom: 24px; }
  .about__right .text-m { margin-bottom: 32px; }
  .about__photo-wrap {
    order: 1;
    position: relative;
    width: fit-content;
    margin-top: 0;
  }
  .about__photo {
    position: static;
    width: 178px;
    height: 203px;
  }
  .about__sparkle {
    right: 0;
    bottom: 8px;
  }
  .about br { display: none; }

  /* ---------- numbers: горизонтальный rail (Swiper на mobile) ---------- */
  .numbers {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .numbers.swiper-initialized { overflow: hidden; }
  .numbers::-webkit-scrollbar { display: none; }
  .numbers__card {
    flex: 0 0 280px;
    min-height: 240px;
    padding: 32px 24px;
  }
  .numbers__label {
    margin-top: 16px;
    background-size: contain;
  }

  /* ---------- reserve: card 328×492 ---------- */
  .reserve { padding: 40px 16px; }
  .reserve__title { margin-bottom: 24px; }
  .reserve__form {
    flex-direction: column;
    gap: 16px;
  }
  .reserve__field { height: 48px; }
  .reserve__label,
  .reserve__value,
  .reserve__control { color: var(--c-teal); }
  .reserve__submit {
    width: 100%;
    min-width: 0;
    height: 48px;
    margin-top: 0;
    border-radius: 8px;
  }

  /* ---------- capsules: card 344×1032, select + стрелки под фото ---------- */
  .capsule {
    height: auto;
    min-height: 0;
    padding: 32px 24px;
  }
  .capsule__heading {
    position: static;
    margin-bottom: 32px;
  }
  .capsule__content {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 40px;
  }
  .capsule__info {
    order: 1;
    padding-top: 0;
  }
  .capsule__media {
    order: 2;
    display: block;
    width: 100%;
    height: 384px;
    aspect-ratio: auto;
    border-radius: 16px;
    overflow: hidden;
  }
  .capsule__media-track {
    width: 100%;
    height: 296px;
  }
  .capsule__slide {
    width: 100%;
    height: 296px;
  }
  .capsule__img { height: 296px; }
  .capsule__arrow {
    position: static;
    transform: none;
    margin-top: 32px;
  }
  .capsule__arrow--prev { margin-right: 16px; }
  .capsule__tabs { display: none; }
  .capsule__select-wrap {
    display: block;
    position: relative;
    margin-bottom: 32px;
  }
  .capsule__select {
    display: block;
    width: 100%;
    height: 56px;
    padding: 0 56px 0 16px;
    border: 1px solid var(--c-50);
    border-radius: 8px;
    background: var(--c-1000);
    color: var(--c-50);
    font: inherit;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }
  .capsule__select-icon {
    display: none;
  }
  .capsule__select-wrap::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 21px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--c-50);
    border-bottom: 2px solid var(--c-50);
    transform: rotate(45deg);
    pointer-events: none;
  }
  .capsule__panel { margin-top: 0; }
  .capsule__features { gap: 24px; margin-top: 24px; }
  .capsule__btn {
    width: 100%;
    max-width: 296px;
    margin-top: 40px;
  }
  .capsule__btn .icon { color: var(--c-100); }

  /* ---------- benefits: card 344×937, стрелки после текста ---------- */
  .benefits { padding: 32px 24px; }
  .benefits__top {
    display: flex;
    flex-direction: column;
  }
  .benefits__heading-col,
  .benefits__desc-col { display: contents; }
  .benefits__top .h5 { margin-bottom: 32px; }
  .benefits__desc-col .text-l { margin-bottom: 24px; }
  .benefits__desc-col .text-m { margin-bottom: 32px; }
  .benefits__arrows {
    order: 1;
    margin-top: 0;
  }
  .benefits__viewport {
    height: auto;
    margin-top: 40px;
  }
  .benefit-card {
    flex-basis: 296px;
    min-height: 337px;
    padding-bottom: 40px;
  }
  .benefit-card img {
    width: calc(100% - 2px);
    height: auto;
  }

  /* ---------- banner 1: 328×277, персонаж 366 слева ---------- */
  .banner--1 {
    min-height: 277px;
    padding: 24px;
  }
  .banner-1__content {
    position: relative;
    z-index: 1;
    gap: 16px;
  }
  .banner__man {
    right: auto;
    left: -62px;
    top: 128px;
    width: 366px;
  }

  /* ---------- facilities: колонка, фото 296, зазор 0 ---------- */
  .facility,
  .facility--reverse {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 32px 24px;
  }
  .facility__info {
    padding-bottom: 0;
    justify-content: flex-start;
  }
  .facility__title { margin-top: 16px; }
  .facility__text { margin-top: 16px; }
  .facility__arrows { margin-top: 32px; }
  .facility__tag,
  .facility__tag--coworking,
  .facility__tag--bar,
  .facility__tag--playroom {
    width: auto;
    height: 20px;
    line-height: 20px;
    background-size: auto 20px;
  }
  .facility__media,
  #services .facility__media {
    width: 100%;
    height: 296px;
    border-radius: 16px;
  }
  .facility__img { border-radius: 16px; }
  .facility__media { margin-top: 40px; }
  .facility-stack::after { height: 40px; }

  /* ---------- banner 2: вертикальный teal 328×480 ---------- */
  .banner-2-section { padding-top: 0; }
  .banner-2-section::before { display: none; }
  .banner-2-section .banner--2 {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    height: auto;
    min-height: 480px;
    padding: 24px;
    background: var(--c-teal);
  }
  .banner-2__btn { width: 100%; max-width: 296px; }
  .banner__man--2 {
    position: static;
    margin-top: auto;
    align-self: flex-start;
    width: 180px;
  }

  /* ---------- gallery: viewport 203, стрелки +32/−72 ---------- */
  .gallery__viewport { height: 203px; }
  .gallery__arrows { padding: 32px 0 72px; }

  /* ---------- faq: card 1140, ряды во всю ширину ---------- */
  .faq { padding: 0 0 24px; }
  .faq__head {
    grid-template-columns: 1fr;
    padding: 24px 16px 0;
  }
  .faq__grid {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 40px;
  }
  .faq__item { padding: 24px; border-radius: 24px; }
  .faq__answer-inner { font-size: 16px; line-height: 20px; }
  #faq.section--m64 { margin-bottom: 24px; }

  /* ---------- banner 3: фон 317×300 + персонаж 211×175 ---------- */
  .banner-3-section {
    padding-left: 0;
    padding-right: 0;
  }
  .banner--3 {
    height: 378px;
    min-height: 378px;
  }
  .banner-3__bg {
    inset: auto;
    left: 24px;
    top: 78px;
    width: 317px;
    height: 300px;
    border-radius: 24px;
  }
  .banner-3__content {
    left: 48px;
    top: 198px;
    width: 269px;
    max-width: none;
    gap: 16px;
  }
  .banner__man--3 {
    left: 81px;
    right: auto;
    top: 0;
    width: 211px;
  }

  /* ---------- reviews: card 344×423.5, слайд 432.8 по центру ---------- */
  .reviews { padding: 64px 0 0; }
  .reviews__title { padding: 0 24px; }
  .reviews__body { margin-top: 32px; }
  .reviews__viewport { margin: 0; }
  .reviews__track { padding: 0; }
  .review-card { flex-basis: 432.8px; height: 307.52px; }
  .reviews__arrow--prev { left: 54px; }
  .reviews__arrow--next { right: 54px; }
  #reviews.section--m16 { margin-bottom: 56px; }

  /* ---------- contacts: заголовок + 3 карточки + карта, зазор 4 ---------- */
  .contacts {
    flex-direction: column;
    gap: 4px;
  }
  .contacts__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    flex: none;
  }
  .contacts__card {
    aspect-ratio: auto;
    padding: 24px;
  }
  .contacts__card--headline {
    background: none;
    border: 0;
    margin-bottom: 28px;
    padding: 0 16px;
  }
  .contacts__socials { margin-top: 16px; }
  .contacts__map {
    flex: none;
    height: 480px;
  }

  /* ---------- footer: card 344×641 ---------- */
  .footer { padding: 40px 24px 32px; }
  .footer__bg-pattern {
    display: block;
    top: auto;
    right: -118px;
    bottom: 82px;
    width: 420px;
    opacity: .55;
  }
  .footer__top {
    display: block;
    height: auto;
  }
  .footer__logo { margin-bottom: 50px; }
  .footer__logo img { width: 200px; }
  .footer__cols {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  .footer__address { gap: 24px; }
  .footer__socials {
    justify-content: flex-start;
    margin-top: 8px;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    height: auto;
    margin-top: 56px;
  }

  /* ---------- нижняя sticky CTA ---------- */
  .mobile-booking-bar {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    z-index: 90;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    background: var(--c-50);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: translateY(100%);
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }
  .mobile-booking-bar.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  .mobile-booking-bar__button {
    display: flex;
    width: 100%;
    height: 60px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 24px;
  }
}

/* ============================================================
   TABLET 600–1199
   ============================================================ */
@media (min-width: 600px) and (max-width: 1199.98px) {

  /* ---------- токены ---------- */
  :root { --gap-block-l: 40px; }
  .section--p24,
  .section--p40 { padding-left: 24px; padding-right: 24px; }
  .section--m64 { margin-bottom: 40px; }

  /* ---------- типографика (tablet UI Kit) ---------- */
  .h5 { font-size: 22px; line-height: 22px; }
  .text-l { font-size: 22px; line-height: 30px; }
  .text-m { font-size: 17px; line-height: 22px; }
  .hero__subtitle { font-size: 22px; line-height: 30px; }
  .banner__title-xl { font-size: 40px; line-height: 40px; }
  .benefit-card__text { font-size: 22px; line-height: 30px; }
  .facility__title { font-size: 34px; line-height: 34px; }
  .contacts__card-title { font-size: 28px; line-height: 28px; }
  .reserve__title { font-size: 28px; line-height: 28px; }
  .faq__q { font-size: 22px; line-height: 30px; }
  .faq__number { font-size: 17px; line-height: 22px; }
  .faq__answer-inner { font-size: 17px; line-height: 22px; }
  .footer__menu a { font-size: 17px; line-height: 22px; }
  .btn--l { height: 66px; padding: 18px 40px; font-size: 22px; line-height: 30px; }

  /* ---------- header: пилюля 736×73, лого 73 всегда ---------- */
  .header {
    top: 10px;
    padding: 0 32px 0 16px;
  }
  .header::before {
    left: 0;
    right: 0;
    top: 0;
    height: 73px;
  }
  .header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-left: 32px;
    height: 73px;
  }
  .header__logo img {
    height: auto;
    width: 213px;
  }
  .header__nav,
  .header__contacts { display: none; }
  .header__right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    width: auto;
  }
  .header__right::before { display: none; }   /* планшетной hero-панели нет */
  .header__btn {
    visibility: hidden;
    opacity: 0;
    height: 40px;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .header.is-sticky .header__btn { visibility: visible; opacity: 1; }
  .header__menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    gap: 0;
    position: relative;
    z-index: 2;
  }
  .header__menu-line {
    position: absolute;
    left: 5px;
    display: block;
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-900);
    transition: background-color .25s ease;
  }
  .header__menu-line:nth-child(1) { top: 9px; }
  .header__menu-line:nth-child(2) { top: 19px; }
  .header__menu-line:nth-child(3) { top: 29px; }
  .header.is-sticky .header__menu-line { background: var(--c-900); }
  .header.is-sticky .header__logo img { filter: brightness(.1); }

  /* ---------- полноэкранное меню (10340:15997) ---------- */
  .mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: 32px 56px 60px;
    background: var(--c-50);
    color: var(--c-900);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .mobile-menu::backdrop { background: rgba(13, 13, 13, .35); }
  .mobile-menu__header { display: flex; align-items: center; justify-content: space-between; }
  .mobile-menu__logo img {
    height: 34.8px;
    width: auto;
    filter: brightness(.1);
  }
  .mobile-menu__close .close-x__line { background: var(--c-900); }
  .mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 60px;
  }
  .mobile-menu__link {
    font-size: 17px;
    line-height: 22px;
    text-transform: uppercase;
    color: var(--c-1000);
  }
  .mobile-menu__contacts {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: auto;
  }
  .mobile-menu__contact {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 17px;
    line-height: 22px;
    color: var(--c-1000);
  }
  .mobile-menu__contact .icon { color: var(--c-900); }

  /* tablet: языки в одной строке с email, прижаты вправо (Figma 12239:6159) */
  .mobile-menu__contact-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-menu__lang { font-size: 17px; line-height: 22px; }

  /* ---------- hero: 768×1008 = 12 + 632 + 16 + 302 + 46 ---------- */
  .hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    min-height: 1008px;
    padding: 12px 24px 0;
  }
  .hero__media {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    border-radius: 24px;
    min-height: 632px;
    overflow: hidden;
    /* «папочная» форма из Figma (Video Background 10296:36164, 720×632),
       нормализована в viewBox 100×88 c preserveAspectRatio='none'.
       Сверена построчно с экспортом узла (632 строк): тело ≤1px,
       локальные переходы ≤4px. Микрокоррекции: верх таба горизонтален,
       нижний уступ поднят на y=72.0 (631/632 строк с dev ≤3px).
       fill непрозрачный: маска читает alpha */
    --hero-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='88' viewBox='0 0 100 88' preserveAspectRatio='none'%3E%3Cpath d='M 30.68 0 C 33.09 0.34 37.33 10.66 38.77 10.66 L 97.23 10.66 C 99.11 10.72 100 12.86 100 12.86 L 100 69 C 99.87 71.65 97.55 72 97.55 72 L 76.16 72 C 74.31 72.46 65.44 88.04 64.21 88 L 2.7 88 C 1.44 87.44 -0.05 86.71 0 84.53 L 0 2.84 C 0.05 1.63 1.11 0.22 2.7 0 L 30.68 0 Z' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-image: var(--hero-mask);
            mask-image: var(--hero-mask);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
  }
  .hero__content {
    position: relative;
    flex: 0 0 auto;
    min-height: 302px;
    padding: 32px;
    border-radius: 24px;
    background: var(--c-teal);
  }
  .hero__description {
    width: 100%;
    height: auto;
    padding: 0;
    gap: 16px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hero__title { font-size: 40px; line-height: 40px; }
  .hero__subtitle { color: var(--c-50); }
  .hero__btn {
    width: auto;
    align-self: flex-start;
    margin-top: 32px;
    background: var(--c-50);
    color: var(--c-1000);
  }
  .hero__btn .icon { color: var(--c-900); }
  .hero__rha {
    position: absolute;
    right: 15px;
    top: 550px;   /* низ видео (12+632) минус высота плашки */
    bottom: auto;
    z-index: 2;
    background: var(--rha-plaque) 0 0 / 100% 100% no-repeat;
  }
  .hero__rha-logo { width: 150px; }

  /* ---------- about: card 720×607 ---------- */
  .about {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    min-height: 0;
  }
  .about__left,
  .about__right { display: contents; }
  .about .h5 { margin-bottom: 32px; }
  .about__right .text-l { margin-bottom: 24px; }
  .about__right .text-m { margin-bottom: 32px; }
  .about__photo-wrap {
    order: 1;
    position: relative;
    width: 100%;
    margin-top: 0;
  }
  .about__photo {
    position: static;
    width: 178px;
    height: 203px;
  }
  .about__sparkle {
    right: 0;
    bottom: 0;
  }
  .about br { display: none; }

  /* ---------- numbers: сетка 2×2, 355×280 ---------- */
  .numbers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
  }
  .numbers__track { display: contents; }   /* карточки становятся grid-элементами напрямую */
  .numbers__card { min-height: 280px; }

  /* ---------- reserve: card 720×300 ---------- */
  .reserve { padding: 40px; }
  .reserve__title { margin-bottom: 24px; }
  .reserve__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .reserve__field { height: 40px; }
  .reserve__submit {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    height: 48px;
  }

  /* ---------- capsules: card 720×1269, media 640 ---------- */
  .capsule {
    height: auto;
    min-height: 0;
    padding: 40px;
  }
  .capsule__heading {
    position: static;
    margin-bottom: 32px;
  }
  .capsule__content {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 60px;
  }
  .capsule__info {
    order: 1;
    padding-top: 0;
  }
  .capsule__media {
    order: 2;
    width: 640px;
    height: 641px;
    max-width: 100%;
  }
  .capsule__select-wrap { display: none; }
  .capsule__tabs { display: flex; }
  .capsule__tab {
    height: 54px;
    font-size: 22px;
    line-height: 30px;
    padding: 12px 16px;
  }
  .capsule__panel { margin-top: 32px; }
  .capsule__btn { margin-top: 40px; }

  /* ---------- benefits: card 720×830, 2 слайда 328 ---------- */
  .benefits { padding: 32px 24px; }
  .benefits__top {
    display: flex;
    flex-direction: column;
  }
  .benefits__heading-col,
  .benefits__desc-col { display: contents; }
  .benefits__top .h5 { margin-bottom: 32px; }
  .benefits__desc-col .text-l { margin-bottom: 24px; }
  .benefits__desc-col .text-m { margin-bottom: 32px; }
  .benefits__arrows {
    order: 1;
    margin-top: 0;
  }
  .benefits__viewport {
    height: auto;
    margin-top: 40px;
  }
  .benefit-card {
    flex-basis: 328px;
    min-height: 374px;
  }

  /* ---------- banner 1: 720×180, персонаж 560 ---------- */
  .banner--1 {
    min-height: 180px;
    padding: 32px;
  }
  .banner-1__content { position: relative; z-index: 2; }
  .banner__man {
    z-index: 1;
    right: auto;
    left: 104px;
    top: 9px;
    width: 560px;
  }

  /* ---------- facilities: колонка 672, зазор 0 ---------- */
  .facility,
  .facility--reverse {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 24px;
  }
  .facility__info {
    padding-bottom: 0;
    justify-content: flex-start;
  }
  .facility__title { margin-top: 16px; }
  .facility__text { margin-top: 16px; }
  .facility__arrows { margin-top: 32px; }
  .facility__media,
  #services .facility__media {
    width: 672px;
    height: 672px;
    max-width: 100%;
    margin-top: 40px;
  }
  .facility-stack::after { height: 40px; }

  /* ---------- banner 2: 720×320, персонаж 240 внизу справа ---------- */
  .banner-2-section { padding-top: 0; }
  .banner-2-section::before { display: none; }
  .banner-2-section .banner--2 {
    background: var(--c-teal);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    min-height: 320px;
  }
  .banner-2__text { max-width: 480px; }
  .banner-2__btn {
    margin-top: 100px;
  }
  .banner__man--2 {
    position: absolute;
    left: auto;
    right: 24px;
    top: auto;
    bottom: 0;
    margin-top: 0;
    width: 240px;
  }

  /* ---------- gallery: viewport 446, стрелки +32/−40 ---------- */
  .gallery__viewport { height: 446px; }
  .gallery__arrows { padding: 32px 0 40px; }

  /* ---------- faq: card 720×1058 ---------- */
  .faq { padding: 32px 40px; }
  .faq__head {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .faq__grid {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 40px;
  }

  /* ---------- banner 3: фон 688×208 + персонаж 312×259 ---------- */
  .banner-3-section {
    padding-left: 0;
    padding-right: 0;
  }
  .banner--3 { height: 208px; min-height: 208px; }
  .banner-3__bg {
    left: 40px;
    top: 0;
    width: calc(100% - 80px);
    height: 100%;
    border-radius: 24px;
  }

  .banner-3__content {
    left: 80px;
    top: 39px;
    width: 395px;
    max-width: none;
  }
  .banner__man--3 {
    left: auto;
    right: 68px;
    top: -24px;
    width: 312px;
  }

  /* ---------- reviews: card 720×433.5 ---------- */
  .reviews { padding: 32px 40px 40px; }
  .reviews__body {
    width: auto;
    margin: 32px -40px 0;
  }
  .reviews__viewport { width: 100%; margin: 0; }
  .review-card { flex-basis: 432.8px; height: 307.52px; }
  .reviews__arrow--prev { left: 68px; }
  .reviews__arrow--next { right: 21px; }

  /* ---------- contacts ---------- */
  .contacts { flex-direction: column; }
  .contacts__map {
    flex: none;
    height: 720px;
  }

  /* ---------- footer: card 720×570 ---------- */
  .footer { padding: 40px 40px 32px; }
  .footer__bg-pattern {
    display: block;
    top: auto;
    right: -48px;
    bottom: 72px;
    width: 520px;
    opacity: .65;
  }
  .footer__top {
    display: block;
    height: auto;
  }
  .footer__logo { margin-bottom: 50px; }
  .footer__logo img { width: 240px; }
  .footer__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .footer__address { gap: 24px; }
  .footer__socials {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 40px;
  }
  .footer__bottom {
    height: auto;
    margin-top: 140px;
  }
}

/* Якоря: не прилипать под sticky-хедер */
.section[id] { scroll-margin-top: 120px; }

@media (max-width: 599.98px) {
  .section[id] { scroll-margin-top: 80px; }
}
@media (min-width: 600px) and (max-width: 1199.98px) {
  .section[id] { scroll-margin-top: 113px; }
}

/* Маска формы услуг (style.css) несёт геометрию целиком —
   mobile-MQ радиусы 16px не должны возвращаться при поддержке mask */
@supports ((mask-image: none) or (-webkit-mask-image: none)) {
  .facility__media,
  #services .facility__media,
  .facility__img { border-radius: 0; }
}
