/* BEINI — редизайн v2. Mobile first, одна точка перелома 1024px. */
:root {
  --bg: #FAF8F3;
  --bg-alt: #F1EDE3;
  --ink: #1F3A2B;
  --ink-2: #3C4F43;
  --muted: #5B6B60;
  --muted-2: #66756B; /* в макете #7A877E — ниже AA (3.6:1) на мелком тексте */
  --accent: #A3161A;
  --line: #E4DFD3;
  --line-2: #D9D2C2;
  --input-line: #CFC6B5;
  --on-ink-muted: #C9D3CB;
  --on-accent-muted: #F6DCD6;
  --img-placeholder: #EDE8DD;
  --pad: 20px;
  --sec-pad: 48px;
  --serif: Cormorant, Georgia, serif;
  --sans: 'Golos Text', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: var(--ink); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wide-only { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::-webkit-scrollbar { display: none; }

/* Элементы сеток не растягиваются по содержимому (ленты с горизонтальной прокруткой) */
.hero > *, .menu-grid > *, .spaces-grid > *, .booking-in > *, .contacts-in > * { min-width: 0; }

.container { max-width: 1280px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.serif { font-family: var(--serif); font-weight: 600; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 20px; border-radius: 4px;
  font-size: 15px; font-weight: 500; text-align: center;
}
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-line { border: 1px solid var(--ink); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 243, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.logo img { height: 36px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-phone { font-size: 15px; margin-right: 12px; }
.header-book { height: 44px; padding: 0 18px; display: flex; align-items: center; border: 1px solid var(--ink); border-radius: 4px; font-size: 15px; }
.call-pill { height: 44px; padding: 0 14px; display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; }
.cart-btn {
  height: 44px; padding: 0 16px; display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg); border-radius: 999px; font-size: 15px; white-space: nowrap;
}
.cart-btn.bump { animation: bump .35s; }
.cart-count { background: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
@keyframes bump { 40% { transform: scale(1.08); } }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad) 32px; }
.hero-photo { order: 0; height: 380px; margin: 0 calc(var(--pad) * -1); background: var(--img-placeholder) url('../assets/images/taplink/interior_01.jpg') center 60% / cover; }
.hero-text { order: 1; }
.eyebrow { font-size: 14px; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: 50px; line-height: .96; letter-spacing: -.01em; margin-bottom: 22px; text-wrap: balance; }
.lead { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 520px; margin-bottom: 30px; text-wrap: pretty; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.facts b { color: var(--ink); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.quick a { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14px; background: var(--bg-alt); border-radius: 4px; }

/* Промо */
.promo { background: var(--accent); color: var(--bg); }
.promo-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 18px; padding-bottom: 18px; }
.promo-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.promo-title { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.promo-sub { font-size: 15px; color: var(--on-accent-muted); }
.promo a { color: var(--bg); font-size: 15px; border-bottom: 1px solid var(--bg); padding-bottom: 2px; }

/* Секции */
.section { max-width: 1280px; margin: 0 auto; padding: var(--sec-pad) var(--pad); scroll-margin-top: 60px; }
.menu-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.menu-sub { font-size: 15px; color: var(--muted); margin-top: 10px; max-width: 520px; }
.seg { display: flex; background: var(--bg-alt); border-radius: 999px; padding: 3px; font-size: 14px; }
.seg button { padding: 9px 16px; border-radius: 999px; white-space: nowrap; color: var(--muted); min-height: 40px; }
.seg button.on { background: #fff; color: var(--ink); }
.seg-box { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-alt); border-radius: 6px; padding: 3px; margin: 20px 0 12px; }
.seg-box button { height: 42px; border-radius: 4px; font-size: 14px; color: var(--muted); }
.seg-box button.on { background: #fff; color: var(--ink); }

.menu-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
.cat-chips {
  position: sticky; top: 65px; z-index: 10; background: var(--bg);
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px var(--pad) 12px; margin: 0 calc(var(--pad) * -1); border-bottom: 1px solid var(--img-placeholder);
}
.chip {
  flex: none; height: 40px; padding: 0 16px; display: flex; align-items: center; white-space: nowrap;
  border-radius: 999px; font-size: 14px; border: 1px solid var(--line-2);
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-side { position: sticky; top: 90px; flex-direction: column; gap: 4px; }
.cat-side button { padding: 9px 0; font-size: 16px; text-align: left; color: var(--muted); }
.cat-side button.on { color: var(--accent); font-weight: 500; }

.menu-cat { scroll-margin-top: 120px; padding: 24px 0 8px; }
.menu-cat > .h3 { margin-bottom: 4px; }
.dish { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dish img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: var(--img-placeholder); }
.dish img.img-fallback, .sheet-row img.img-fallback { opacity: .6; }
.dish-body { display: flex; flex-direction: column; min-width: 0; }
.dish-badge { font-size: 12.5px; color: var(--accent); margin-bottom: 2px; }
.dish-name { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; }
.dish-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font-size: 16px; font-weight: 600; white-space: nowrap; }
.weight { font-weight: 400; font-size: 13px; color: var(--muted-2); }
.add { width: 44px; height: 44px; flex: none; border: 1px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stepper { height: 44px; flex: none; display: flex; align-items: center; background: var(--ink); color: var(--bg); border-radius: 999px; }
.stepper button { width: 42px; height: 44px; font-size: 20px; }
.stepper span { min-width: 16px; text-align: center; font-size: 15px; font-weight: 600; }

/* Корзина-карточка (десктоп) и строки заказа */
.cart-card { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; flex-direction: column; gap: 14px; }
.cart-title { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; }
.cart-empty { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--img-placeholder); }
.cart-row-name { font-size: 14px; line-height: 1.3; }
.cart-row-sum { font-size: 14px; font-weight: 600; margin-top: 2px; }
.mini-step { height: 36px; display: flex; align-items: center; border: 1px solid var(--input-line); border-radius: 999px; }
.mini-step button { width: 32px; height: 36px; font-size: 17px; }
.mini-step span { min-width: 14px; text-align: center; font-size: 14px; font-weight: 600; }
.cart-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-sum { font-family: var(--serif); font-size: 30px; font-weight: 600; }

/* Для семьи */
.spaces { background: var(--bg-alt); scroll-margin-top: 60px; }
.spaces-lead { font-size: 16px; color: var(--ink-2); line-height: 1.55; max-width: 620px; margin: 12px 0 20px; }
.spaces-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.space { display: flex; flex-direction: column; gap: 12px; }
.arch { height: 300px; border-radius: 999px 999px 4px 4px; background-size: cover; background-position: center; background-color: var(--img-placeholder); }
.space-tag { font-size: 13px; color: var(--accent); margin-top: 8px; }
.space-title { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.05; }
.space-text { font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* Бронь */
.booking { background: var(--ink); color: var(--bg); scroll-margin-top: 60px; }
.booking-in { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.booking .h2 { margin-bottom: 16px; }
.booking-text { font-size: 16px; line-height: 1.55; color: var(--on-ink-muted); max-width: 440px; margin-bottom: 20px; }
.booking-call { color: var(--bg); font-size: 17px; border-bottom: 1px solid var(--bg); padding-bottom: 2px; }
.book-card { background: var(--bg); color: var(--ink); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.book-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.scroll { flex-wrap: nowrap; overflow-x: auto; }
.pill { height: 42px; padding: 0 16px; display: flex; align-items: center; white-space: nowrap; border-radius: 999px; font-size: 14px; border: 1px solid var(--ink); }
.pill.on, .opt.on { background: var(--ink); color: var(--bg); }
.opt { flex: none; height: 44px; padding: 0 14px; display: flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: 6px; font-size: 14px; border: 1px solid var(--input-line); }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.grid5 .opt { padding: 0; }
.form-cols { display: grid; grid-template-columns: 1fr; gap: 8px; }
.input { width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--input-line); border-radius: 6px; background: #fff; font-size: 15px; outline-color: var(--ink); }
.input.bad { border-color: var(--accent); }
.book-summary { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: -6px; }
.form-error { font-size: 14px; color: var(--accent); line-height: 1.4; }
.book-done .h3 { font-size: 30px; margin-bottom: 8px; }
.book-done p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-bottom: 16px; }
.link-btn { font-size: 14px; border-bottom: 1px solid var(--ink); }

/* Instagram */
.insta { padding-top: 48px; padding-bottom: 0; }
.insta-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.insta-head a { font-size: 15px; border-bottom: 1px solid var(--ink); }
.reels { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; }
.reels img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--img-placeholder); }

/* Контакты */
.contacts-in { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.contacts .h2 { margin-bottom: 24px; }
.contact-list { display: flex; flex-direction: column; gap: 18px; font-size: 16px; line-height: 1.5; }
.contact-label { font-size: 13px; color: var(--muted-2); }
.contact-phone { font-weight: 600; font-size: 18px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.contact-btns .btn { height: 46px; }
.map { height: 260px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Футер */
.footer { border-top: 0; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 90px; font-size: 13.5px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 27px; width: auto; }

/* Мобильная полоса корзины */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, var(--bg) 70%, rgba(250, 248, 243, 0));
}
.cart-bar button {
  width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  background: var(--ink); color: var(--bg); border-radius: 10px; box-shadow: 0 6px 20px rgba(31, 58, 43, .25);
}
.cart-bar .sum { font-size: 16px; font-weight: 600; }

/* Шторка оформления */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(20, 32, 25, .5); display: flex; justify-content: center; align-items: flex-end; }
.sheet {
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--bg); border-radius: 16px 16px 0 0;
  padding: 14px 24px calc(24px + env(safe-area-inset-bottom));
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-title { font-family: var(--serif); font-size: 34px; font-weight: 600; }
.sheet-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--muted); }
.sheet-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--img-placeholder); }
.sheet-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.sheet-row .cart-row-name { font-size: 15px; }
.sheet-row .mini-step { height: 40px; }
.sheet-row .mini-step button { width: 40px; height: 40px; font-size: 18px; }
.fields { display: flex; flex-direction: column; gap: 8px; }
.pickup-note { font-size: 14px; color: var(--muted); padding: 4px 2px; }
.sheet-total { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 12px; }
.sheet-total .lbl { font-size: 15px; color: var(--muted); }
.sheet-total .sum { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.sheet .btn { height: 54px; font-size: 16px; width: 100%; }
.sheet .form-error { margin-top: 10px; }
.sheet .btn-wa { margin-top: 10px; height: 50px; }
.sheet-msg { font-size: 16px; line-height: 1.55; margin: 12px 0 20px; }
.sheet-empty { padding: 8px 0 24px; font-size: 15px; color: var(--muted); line-height: 1.5; }

/* Тост */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 6px; font-size: 14px; max-width: calc(100vw - 32px); }

@media (hover: hover) {
  a:hover { color: var(--accent); }
  .btn-ink:hover, .btn-accent:hover, .cart-btn:hover, .cart-bar button:hover { color: var(--bg); }
  .btn-line:hover { color: var(--accent); }
  .add:hover { background: var(--ink); color: var(--bg); }
  .cat-side button:hover { color: var(--accent); }
  .promo a:hover, .booking-call:hover { color: var(--bg); opacity: .8; }
}

/* Десктоп */
@media (min-width: 1024px) {
  :root { --pad: 48px; --sec-pad: 88px; }
  .wide-only { display: flex !important; }
  .narrow-only { display: none !important; }
  a.wide-only { display: flex !important; }
  .h2 { font-size: 60px; }
  .h3 { font-size: 34px; }

  .cart-btn { border-radius: 4px; }
  .hero { grid-template-columns: 1.05fr 1fr; gap: 72px; padding: 64px var(--pad) 72px; }
  .hero-photo { order: 1; height: 600px; margin: 0; border-radius: 999px 999px 4px 4px; }
  .hero-text { order: 0; }
  .hero h1 { font-size: 72px; }
  .lead { font-size: 19px; }

  .menu-head { margin-bottom: 44px; }
  .menu-grid { grid-template-columns: 180px minmax(0, 1fr) 280px; }
  .menu-cat { scroll-margin-top: 90px; padding: 0 0 40px; }
  .dish { grid-template-columns: 112px 1fr; }
  .dish-name { font-size: 24px; }

  .spaces-lead { margin-bottom: 44px; }
  .spaces-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
  .arch { height: 420px; }

  .booking-in { grid-template-columns: 1fr 1.1fr; gap: 72px; }
  .book-card { padding: 32px; }
  .form-cols { grid-template-columns: 1fr 1fr; }

  .insta { padding-top: 80px; }
  .reels { grid-auto-columns: calc((100% - 50px) / 6); }

  .contacts-in { grid-template-columns: 1fr 1.2fr; gap: 72px; }
  .map { height: 420px; }
  .footer-in { padding-bottom: 32px; }

  .overlay { justify-content: flex-end; align-items: stretch; }
  .sheet { max-width: 460px; height: 100%; max-height: 100vh; border-radius: 0; }
  .toast { bottom: 32px; }
}
@media (min-width: 1200px) {
  .menu-grid { grid-template-columns: 210px minmax(0, 1fr) 300px; }
  .hero h1 { font-size: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cart-btn.bump { animation: none; }
}

/* ---- Правки по критике: доступность ---- */
/* Тап-зоны не меньше 44px */
.seg button, .chip, .pill, .cat-side button { min-height: 44px; }
.pill { height: 44px; }
.logo { display: flex; align-items: center; min-height: 44px; }
.nav a, .header-phone, .booking-call, .contact-phone, .promo a, .insta-head a, .link-btn {
  display: inline-flex; align-items: center; min-height: 44px;
}
.promo a, .booking-call, .insta-head a, .link-btn {
  border-bottom: 0; padding-bottom: 0;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.cat-chips { align-items: center; }

/* Видимое фокус-кольцо на тёмных и красных блоках */
.booking :focus-visible, .promo :focus-visible { outline-color: var(--bg); }
.sheet-title:focus { outline: none; }

/* Цифры сумм: lining вместо old-style у Cormorant */
.total-sum, .sheet-total .sum, .cart-title, .h2, .h3 {
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
}

/* Шторка не уезжает под экранную клавиатуру */
.sheet { max-height: 90vh; max-height: 90dvh; }

/* Орнамент по мотивам знака в логотипе: тонкий разделитель между секциями */
.ornament { display: flex; align-items: center; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); color: var(--accent); }
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ornament svg { width: 40px; height: 40px; flex: none; }
@media (min-width: 1024px) { .ornament { gap: 28px; } }
.nav a { min-width: 44px; justify-content: center; }
main .ornament { margin-top: 48px; }
.ornament svg { width: 48px; height: 48px; }
@media (min-width: 1024px) { main .ornament { margin-top: 64px; } }

/* ---- Мобильный hero: CTA выше сгиба; бронь: честный статус ---- */
@media (max-width: 1023px) {
  .hero { gap: 24px; }
  .hero-photo { height: 260px; }
  .hero h1 { font-size: 44px; margin-bottom: 18px; }
  .lead { margin-bottom: 24px; }
}
.row.scroll { scroll-snap-type: x proximity; }
.row.scroll .opt { scroll-snap-align: start; }
.book-done p { margin-bottom: 12px; }
.book-done .book-done-sum { font-size: 14px; color: var(--muted); }
.book-done .btn { margin-top: 4px; }
.book-done-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: 8px; }
.book-done-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }

.menu-search { margin-bottom: 16px; }
.menu-search label { display: block; font-size: 14px; margin-bottom: 6px; }
.menu-search-row { display: flex; gap: 8px; }
.menu-search-row .input { flex: 1; }
.menu-search-row .btn { width: auto; min-height: 48px; padding: 0 14px; }
#search-status { color: var(--muted); font-size: 14px; margin-top: 8px; }
