.container{
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.section{ padding: 18px 0; }

.section__head{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.footer{
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
}

.footer__inner{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__social{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.footer__social-link{
  --social-rgb: 115, 165, 255;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  min-height: 58px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(var(--social-rgb), .2);
  border-radius: 16px;
  color: rgba(255, 255, 255, .94);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)), linear-gradient(110deg, rgba(var(--social-rgb), .1), rgba(var(--social-rgb), .035));
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: left;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.footer__social-link--instagram{
  --social-rgb: 237, 100, 172;
}

.footer__social-link--facebook{
  --social-rgb: 115, 165, 255;
}

.footer__social-link--phone{
  --social-rgb: 201, 162, 77;
  display: none;
}

.footer__social-icon{
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
}

.footer__social-link--instagram .footer__social-icon{
  background: radial-gradient(circle at 15% 105%, #ffd776 0%, #f9a43c 22%, #e33d74 48%, #a735b0 73%, #6255cf 100%);
}

.footer__social-link--facebook .footer__social-icon{
  background: linear-gradient(145deg, #4599ff, #1877f2 55%, #1454c9);
}

.footer__social-link--phone .footer__social-icon{
  color: #f0d48d;
  background: linear-gradient(145deg, rgba(201, 162, 77, .4), rgba(201, 162, 77, .12));
}

.footer__social-icon svg{ display: block; width: 21px; height: 21px; }
.footer__social-copy{ display: grid; gap: 3px; min-width: 0; }
.footer__social-copy strong{ font-size: 14px; font-weight: 700; line-height: 1.2; }
.footer__social-copy > span{ font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .68); }
.footer__social-arrow{ display: none; }
.footer__social-link--phone .footer__social-copy strong{ white-space: nowrap; }

.footer__social-link:active{
  transform: translateY(0);
}

.footer__social-link:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine){
  .footer__social-link:hover{
    border-color: rgba(var(--social-rgb), .45);
    background-color: rgba(var(--social-rgb), .055);
    transform: translateY(-1px);
  }
}

@media (min-width: 900px){
  .footer__social-link--phone{ display: inline-flex; width: 252px; margin-left: auto; }
}

@media (max-width: 600px){
  .footer__social{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .footer__social-link{ width: auto; min-width: 0; min-height: 48px; justify-content: center; padding: 10px; gap: 9px; border-radius: 14px; }
  .footer__social-icon{ flex-basis: 26px; width: 26px; height: 26px; border: 0; border-radius: 7px; }
  .footer__social-icon svg{ width: 19px; height: 19px; }
  .footer__social-copy{ display: block; }
  .footer__social-copy strong{ display: block; font-size: 14px; line-height: 20px; }
  .footer__social-copy > span{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  .footer__social-link{ transition: none; }
  .footer__social-link:hover{ transform: none; }
}

@media (min-width: 900px){
  .section{ padding: 28px 0; }
  .h2{ font-size: 32px; }
}

/* чтобы баннер не уходил под topbar */
.section--first{
  padding-top: 0;
}

/* УБРАЛИ scroll-margin-top отсюда:
   он должен быть в одном месте (pages.css -> .menu-section),
   иначе iOS иногда даёт дерготню при автоскролле.
*/

/* ===== DESKTOP LAYOUT (like andys.md) ===== */
@media (min-width: 1100px){
  :root{
    --container: 1320px;
  }

  .section{
    padding: 28px 0;
  }

  .banner__slide img{
    height: 320px;
  }

  .menu-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }
}

@media (min-width: 900px) and (max-width: 1099px){
  .menu-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }

  .banner__slide img{
    height: 260px;
  }
}

/* ===== DESKTOP HERO LIKE ANDY'S ===== */
@media (min-width: 1200px){
  .section--first{
    padding-top: 10px;
  }

  .banner{
    border-radius: 26px;
  }

  .banner__slide img{
    height: 420px;
  }

  .container{
    max-width: 1320px;
  }
}

/* layout.css */

/* Добавь это в конец файла или в начало */
main {
  /* Создает новый композитный слой (layer) для всего контента.
     Когда хедер меняет свой padding-top, браузер не пересчитывает
     каждый пиксель внутри main, а сдвигает весь "слой" целиком.
     Это значительно снижает нагрузку на процессор при анимации. */
  transform: translate3d(0, 0, 0);

  /* Гарантирует, что слой занимает всю ширину */
  width: 100%;

  /* Подсказка браузеру */
  will-change: transform;
}
