/* Il Matto — десктопные раскладки. Подключается последним.
   Брейкпоинты: 768 (планшет), 1024 (видимая навигация, без нижней панели), 1200 (полный десктоп).
   Мобильная версия (<768) — точная копия макета и здесь не трогается. */

/* ==========================================================================
   ≥768: полотно перестаёт быть колонкой 440px
   ========================================================================== */
@media (min-width:768px){
  :root{
    --wrap:1320px;       /* контейнер, включая боковые поля */
    --pad:40px;
    --sp:128px;
    --sp-sm:72px;
    --sp-xs:36px;
    --gap:16px;
    --radius:20px;
    --radius-sm:14px;
    --topbar-h:74px;
    --fs-eyebrow:11px;
    --fs-h2:38px;
    --fs-lead:15.5px;
    --fs-body:15px;
    --fs-small:13px;
  }
  .site{max-width:none;box-shadow:none}
  .wrap{max-width:var(--wrap)}

  /* --- контейнеры секций --- */
  .region__in{max-width:calc(var(--wrap) - var(--pad) * 2);margin-left:auto;margin-right:auto}
  .region--flush>.region__in{max-width:var(--wrap)}
  .section--flush>.region__pad{max-width:var(--wrap);margin-left:auto;margin-right:auto}
  .region__head{max-width:720px}
  .region__bg{inset:-6% 0}
  .region__veil{background:linear-gradient(180deg,var(--bg) 0%,rgba(var(--bg-rgb),.66) 14%,rgba(var(--bg-rgb),.56) 46%,rgba(var(--bg-rgb),.72) 80%,var(--bg) 100%)}
  .rail{max-width:var(--wrap);margin-left:auto;margin-right:auto}

  /* --- шапка --- */
  .topbar{top:14px;padding:0 var(--pad)}
  .topbar__in{max-width:calc(var(--wrap) - var(--pad) * 2);margin:0 auto;padding:11px 12px 11px 22px;gap:24px}
  .topbar__logo{gap:11px}
  .topbar__logo img{height:28px}
  .topbar__name{font-size:18px}
  .ico{width:40px;height:40px}

  /* --- хиро --- */
  .hero{min-height:720px;max-height:1100px}
  .hero__body{
    left:50%;right:auto;width:100%;max-width:var(--wrap);transform:translateX(-50%);
    bottom:64px;gap:18px;
  }
  .hero__title{font-size:52px;line-height:1.04;max-width:14ch}
  .hero__text{font-size:16px;max-width:480px}
  .hero__cta{margin-top:10px;gap:12px}
  .hero__cta .btn{flex:none;padding:0 34px}
  .hero__badge{top:calc(var(--topbar-h) + 44px);left:var(--pad);right:var(--pad)}
  .hero__badge .pill{max-width:calc(var(--wrap) - var(--pad) * 2);padding:9px 16px 9px 12px;font-size:11px}
  .quick{bottom:66px;width:270px}
  .hero__veil--grad{background:linear-gradient(180deg,
    rgba(var(--deep-rgb),.45) 0%,rgba(var(--deep-rgb),.06) 30%,rgba(var(--deep-rgb),.4) 58%,rgba(var(--bg-rgb),.94) 86%,var(--bg) 100%)}

  /* --- бегущая строка --- */
  .marquee{padding:12px 0}
  .marquee__track span{font-size:16px;letter-spacing:.16em}
  .marquee__track{animation-duration:40s}

  /* --- локация: на планшете карта над фактами, с 1024 — в две колонки --- */
  .region__grid{gap:16px}
  .map{height:380px;margin:0}
  .map__link{left:16px;bottom:16px;padding:12px 18px;font-size:14px}
  .facts-wrap{gap:12px;justify-content:center}
  .facts{gap:12px}
  .facts+.facts{margin-top:0}
  .fact{padding:22px 20px 20px;border-radius:var(--radius)}
  .fact b{font-size:26px}
  .fact b.is-sm{font-size:19px}
  .fact span{font-size:13px;margin-top:5px}

  /* --- шеф: портрет крупнее (двухколонник — с 1024) --- */
  .chef{gap:28px}
  .chef__photo{flex-basis:260px;height:340px}
  .chef__quote blockquote{font-size:24px}
  .chef__cv{font-size:13.5px}
  .chef__text{margin-top:var(--sp-xs);max-width:720px}

  /* --- кухня: сетка блюд --- */
  .rail--dishes{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;
    overflow:visible;padding:0 var(--pad);scroll-snap-type:none;
  }
  .dish{flex:none}
  .dish__img{height:auto;aspect-ratio:3/4}
  .dish__body{padding:16px 4px 0}
  .dish__name{font-size:22px}
  .dish__note{font-size:13.5px}
  .region__pad--menu{padding-top:var(--sp-sm)}
  .menu__head{padding:22px 26px}
  .menu__title{font-size:22px}
  .menu__list{padding:0 26px 22px}
  .row{font-size:14.5px;padding:11px 0}
  .row b{font-size:16px}

  /* --- почему Il Matto: 2 колонки --- */
  .feats{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .feats--slider{display:flex;gap:16px;margin:0;padding:0 0 8px}
  .feats--slider .feat{flex:0 0 calc((100% - 16px) / 2);min-height:340px}
  .feat__art{width:280px;height:280px;right:-56px;top:-50px}
  .slider__nav{display:flex}
  .feat{flex-direction:column;gap:20px;padding:26px 24px 28px}
  .feat__ico{width:60px;height:60px}
  .feat b{font-size:20px;margin-bottom:6px}
  .feat span{font-size:13.5px;line-height:1.6}

  /* --- вино --- */
  .wine{padding:40px 40px 44px}
  .wine__art{width:220px;right:-24px;top:-24px;opacity:.13}
  .wine__num{font-size:56px}
  .wine__nums{gap:28px;margin-bottom:22px}
  .wine__nums>div:not(.wine__sep){flex:0 1 auto;min-width:0}
  .wine__nums{flex-wrap:wrap}
  .wine__cap{font-size:13px}
  .wine__text{max-width:560px}

  /* --- залы: сетка 2 колонки --- */
  .rail--halls{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;
    overflow:visible;padding:0 var(--pad) 8px;scroll-snap-type:none;
  }
  .hall{flex:none;height:400px;border-radius:var(--radius)}
  .rail--halls .hall:nth-child(odd):last-child{grid-column:span 2}
  .hall__body{left:22px;right:22px;bottom:22px}
  .hall__name{font-size:28px}
  .hall__text{font-size:13.5px;max-width:380px}
  .hall__more{font-size:13px;margin-top:14px}
  .hall .pill{top:16px;left:16px}

  /* --- атмосфера: плотная сетка вместо ленты --- */
  .rail--shots{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:240px;grid-auto-flow:dense;gap:14px;
    overflow:visible;padding:0 var(--pad) 8px;scroll-snap-type:none;
  }
  .shot{flex:none;height:auto}
  .shot--wide{grid-column:span 2}
  .shot:nth-child(7n+1){grid-row:span 2}
  .shot__cap{font-size:12px;padding:40px 16px 14px}

  /* --- банкеты --- */
  .banquet__title{font-size:38px}
  .banquet__text{font-size:15.5px;max-width:560px;margin-bottom:22px}
  .banquet__acts{gap:12px}
  .banquet__stats{padding:26px 28px 28px;margin-top:32px}
  .facts--stats .fact b{font-size:28px}
  .awards{font-size:13.5px}

  /* --- контакты --- */
  .contacts{font-size:15.5px;gap:20px}
  .contacts__phone{font-size:30px}
  .contacts__soc a{padding:12px 20px;font-size:13.5px;border-radius:var(--radius-sm)}

  /* --- подвал --- */
  .footer__in{max-width:calc(var(--wrap) - var(--pad) * 2);margin:0 auto}
  .footer__links{font-size:13px;gap:22px}

  /* --- панель и оверлеи: пока колонка (до 1024) --- */
  .dock{max-width:520px}
  .nav__in{max-width:600px;padding-top:24px}
  .nav__label{font-size:30px}

  /* --- окно брони: центрированная карточка --- */
  .sheet{align-items:flex-start;padding:32px 24px}
  .sheet__box{
    max-width:560px;margin:auto;
    border-top:1px solid var(--line-glass);border-radius:24px;
    padding:32px 32px 34px;
    box-shadow:0 40px 90px -30px rgba(var(--shadow-rgb),.8),inset 0 1.5px 0 rgba(255,255,255,.12);
    animation:sheetpop .5s var(--ease);
  }
  .sheet__close{top:18px;right:18px}
  .sheet__title{font-size:30px;margin-right:56px}

  /* --- внутренние страницы: контейнер --- */
  .region--hall{min-height:60vh}
}

@keyframes sheetpop{from{transform:translateY(16px) scale(.98);opacity:0}to{transform:none;opacity:1}}

/* ==========================================================================
   ≥1024: навигация в шапке, без нижней панели, двухколонные секции
   ========================================================================== */
@media (min-width:1024px){
  :root{--fs-h2:42px;--fs-lead:16px}

  /* --- шапка: логотип · ссылки · бронь · бургер --- */
  .topbar__nav{display:block;flex:1;min-width:0}
  .topbar__links{display:flex;justify-content:center;gap:2px}
  .topbar__links a{
    position:relative;display:inline-flex;align-items:center;
    padding:9px 11px;border-radius:9px;
    font-size:12.5px;font-weight:500;letter-spacing:.02em;color:var(--ink-2);white-space:nowrap;
    transition:color .3s var(--ease-soft);
  }
  .topbar__links .nav__label{font:inherit;font-family:var(--sans);line-height:1}
  .topbar__links .nav__note{display:none}
  .topbar__links a::after{
    content:'';position:absolute;left:11px;right:11px;bottom:5px;height:1px;
    background:var(--gold);transform:scaleX(0);transform-origin:left;
    transition:transform .4s var(--ease-soft);
  }
  .topbar__links a:hover{color:var(--ink)}
  .topbar__links a:hover::after{transform:scaleX(1)}
  .topbar__links a:nth-child(n+7){display:none}   /* до 1200 — только первые шесть */
  .topbar__book{display:inline-flex;height:40px;padding:0 18px;font-size:13px}
  .topbar__acts{gap:8px}
  .topbar__acts a.ico{display:none}                /* телефон — в оверлее и контактах */

  /* --- нижняя панель на десктопе не нужна: бронь в шапке --- */
  .dock{display:none}
  .footer{padding:40px var(--pad) 44px}

  /* --- локация: карта слева, факты справа --- */
  .region__grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;align-items:stretch}
  .map{height:auto;min-height:400px}

  /* --- шеф: портрет слева, цитата и текст справа --- */
  .region__in:has(>.chef){
    display:grid;grid-template-columns:minmax(300px,420px) minmax(0,1fr);
    column-gap:64px;row-gap:0;align-items:center;
  }
  .region__in:has(>.chef)>.eyebrow{grid-column:2;grid-row:1;align-self:end;margin-bottom:22px}
  .chef{display:contents}
  .chef__photo{grid-column:1;grid-row:1/4;flex:none;height:100%;min-height:560px;border-radius:calc(var(--radius) + 4px)}
  .chef__photo img{object-position:50% 15%}
  .chef__name{left:22px;bottom:20px;font-size:11px}
  .chef__quote{grid-column:2;grid-row:2;justify-content:flex-start}
  .chef__quote blockquote{font-size:30px;line-height:1.28;max-width:16em}
  .chef__cv{font-size:14px;margin-top:16px;max-width:560px}
  .chef__text{grid-column:2;grid-row:3;align-self:start;margin-top:28px;max-width:600px}

  /* --- кухня: меню в два столбца, PDF-ссылки сбоку --- */
  .region__pad--menu{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:28px;align-items:start}
  .region__pad--menu .menu{border-radius:calc(var(--radius) + 4px)}
  .region__pad--menu .links{
    margin:0;flex-direction:column;align-items:stretch;gap:10px;
    position:sticky;top:calc(var(--topbar-h) + 24px);
  }
  .region__pad--menu .btn-ghost{justify-content:space-between;padding:16px 20px}
  .menu__list{display:grid;grid-template-columns:1fr 1fr;column-gap:40px;align-content:start}

  /* --- вино: цифры и текст слева, список справа --- */
  .wine{
    display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);column-gap:64px;
    padding:52px 56px 56px;align-items:start;
  }
  .wine>*{grid-column:1}
  .wine__list{grid-column:2;grid-row:1/6;align-self:center;margin:0;padding-top:6px}
  .wine__art{width:280px;right:-40px;top:-40px;opacity:.11}
  .wine__num{font-size:68px}
  .wine__nums{gap:36px;margin-bottom:26px}
  .wine__text{margin-bottom:24px}
  .wine__pill{margin-bottom:22px}

  /* --- банкеты: текст слева, цифры и награды справа --- */
  .banquet .region__in{
    display:grid;grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr);column-gap:72px;
    align-items:center;min-height:600px;
  }
  .banquet__top{min-height:0;align-items:center}
  .banquet__copy{padding-bottom:0;max-width:600px}
  .banquet__stats{margin-top:0}
  .banquet__veil{background:
    linear-gradient(180deg,var(--bg) 0%,rgba(var(--bg-rgb),0) 22%,rgba(var(--bg-rgb),0) 78%,var(--bg) 100%),
    linear-gradient(90deg,rgba(var(--bg-rgb),.86) 0%,rgba(var(--bg-rgb),.62) 48%,rgba(var(--bg-rgb),.5) 100%)}
  .facts--stats{margin-bottom:22px}

  /* --- контакты: три колонки + карта --- */
  .region--contacts .region__in{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);column-gap:64px;align-items:center;
  }
  .region--contacts .eyebrow,.region--contacts .h2,.region--contacts .contacts,.region--contacts .contacts__facts{grid-column:1}
  .contacts__facts{margin-top:28px;max-width:560px}
  .contacts__facts .facts-wrap,.contacts__facts{justify-content:flex-start}
  .contacts__map{display:block;grid-column:2;grid-row:1/5;height:100%;min-height:480px;margin-top:0;align-self:stretch}
  .contacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px;row-gap:28px;max-width:560px}
  .contacts__phone{white-space:nowrap}
  .contacts__soc{grid-column:1/-1;margin-top:4px}
  .region--contacts .h2{margin-bottom:var(--sp-xs)}
  .region__veil--contacts{background:linear-gradient(180deg,var(--bg) 0%,rgba(var(--bg-rgb),.82) 16%,rgba(var(--bg-rgb),.74) 60%,rgba(var(--bg-rgb),.96) 100%)}
  .region--contacts .region__veil::after{background:radial-gradient(70% 70% at 30% 50%,rgba(var(--deep-rgb),.5),rgba(var(--deep-rgb),0) 70%)}

  /* --- подвал: в строку --- */
  .footer__in{flex-direction:row;align-items:center;justify-content:space-between;gap:32px}
  .footer__copy{order:3;white-space:nowrap}
  .footer__links{justify-content:center}

  /* --- оверлей навигации: ссылки слева, контакты справа --- */
  .nav__in{
    max-width:calc(var(--wrap) - var(--pad) * 2);padding:24px var(--pad) 48px;
    display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-template-rows:auto minmax(0,1fr);
    column-gap:96px;
  }
  .nav__head{grid-column:1/-1;margin-bottom:32px}
  .nav__name{font-size:18px}
  .nav__in>nav{grid-column:1;grid-row:2;align-self:center;min-width:0}
  .nav__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:64px}
  .nav__list a{
    flex-direction:column;align-items:flex-start;gap:7px;padding:18px 0 16px;
    border-bottom:1px solid rgba(var(--ink-rgb),.09);transition:color .3s var(--ease-soft);
  }
  .nav__list a:hover{color:var(--gold-2)}
  .nav__list a:hover .nav__note{color:var(--gold)}
  .nav__label{font-size:36px;line-height:1.05;text-wrap:balance}
  .nav__note{font-size:11px;transition:color .3s var(--ease-soft)}
  .nav__foot{
    grid-column:2;grid-row:2;align-self:center;margin-top:0;padding:30px 30px 32px;gap:22px;
    border:1px solid var(--line-glass);border-radius:calc(var(--radius) + 4px);background:rgba(var(--ink-rgb),.03);
  }
  .nav__contacts{display:flex;flex-direction:column;gap:16px;font-size:15px;line-height:1.5}
  .nav__contacts .contacts__phone{font-size:26px}
  .nav__row{gap:10px}
  .nav__row a{padding:13px 0;font-size:13px;border-radius:var(--radius-sm)}
}

/* ==========================================================================
   ≥1200: полный десктоп
   ========================================================================== */
@media (min-width:1200px){
  :root{--pad:48px;--sp:144px;--sp-sm:80px;--sp-xs:40px;--fs-h2:46px;--fs-lead:16.5px}

  .topbar__links a{padding:9px 13px;font-size:13px}
  .topbar__links a:nth-child(n+7){display:inline-flex}

  /* --- хиро --- */
  .hero__title{font-size:68px;line-height:1.02}
  .hero__text{font-size:17px;max-width:520px}
  .hero__badge{
    top:auto;bottom:74px;justify-content:flex-end;
    left:50%;right:auto;transform:translateX(-50%);width:100%;max-width:var(--wrap);padding:0 var(--pad);
    animation:fade 1.2s ease .3s both;
  }
  .hero__badge .pill{width:auto}

  /* --- локация --- */
  .region__grid{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px}
  .map{min-height:460px}

  /* --- кухня: 4 блюда в ряд --- */
  .rail--dishes{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}

  /* --- причины: 4×2 --- */
  .feats{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
  .feats--slider{display:flex;gap:18px}
  .feats--slider .feat{flex:0 0 calc((100% - 18px * 3) / 4)}

  /* --- залы: 3 + 2 --- */
  .rail--halls{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px}
  .rail--halls .hall{grid-column:span 2;height:440px}
  .rail--halls .hall:nth-child(4):nth-last-child(2),.rail--halls .hall:nth-child(5):last-child{grid-column:span 3;height:400px}
  .rail--halls .hall:first-child:nth-last-child(4),.rail--halls .hall:first-child:nth-last-child(4)~.hall{grid-column:span 3}
  .rail--halls .hall:first-child:nth-last-child(2),.rail--halls .hall:first-child:nth-last-child(2)~.hall{grid-column:span 3}
  .rail--halls .hall:first-child:last-child{grid-column:span 6;height:480px}

  /* --- атмосфера: 4 колонки --- */
  .rail--shots{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:320px;gap:16px}
  .shot:nth-child(7n+1){grid-row:span 1}
  .shot:nth-child(5n+1){grid-row:span 2}

  /* --- вино --- */
  .wine{padding:60px 64px 64px;column-gap:80px}

  /* --- банкеты --- */
  .banquet__title{font-size:46px}
  .banquet .region__in{min-height:660px}

  /* --- контакты --- */
  .region--contacts .region__in{column-gap:80px}
}

/* ==========================================================================
   Только мышь: курсор и наведения, которых не должно быть на тач-устройствах
   ========================================================================== */
@media (min-width:1024px) and (hover:hover){
  .topbar__links a,.nav__list a,.footer__links a,.contacts__soc a{cursor:pointer}
}

/* ==========================================================================
   Уважение к reduced-motion на десктопе
   ========================================================================== */
@media (prefers-reduced-motion:reduce){
  .topbar__links a::after{transition:none}
  .hero__badge{animation:none}
}
