/* ==========================================================================
   La Veranda — основной файл стилей публичной части
   ========================================================================== */

:root {
  --green-900: #0f1f17;
  --green-800: #14261c;
  --green-700: #1e3a2c;
  --green-600: #2b5140;
  --cream:     #f7f2e8;
  --cream-2:   #efe6d5;
  --gold:      #c19a53;
  --gold-2:    #d9bd86;
  --ink:       #1b1b1a;
  --muted:     rgba(27, 27, 26, .62);
  --line:      rgba(15, 31, 23, .12);
  --danger:    #b4482f;
  --ok:        #3f7a58;
  --radius:    16px;
  --shadow:    0 24px 60px -30px rgba(15, 31, 23, .45);
  --ease:      cubic-bezier(.22, .61, .36, 1);
  --f-serif:   'Playfair Display', Georgia, serif;
  --f-sans:    'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --head-h:    76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-serif); font-weight: 600; line-height: 1.18; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 3px; border: 1px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .25s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: var(--green-900); }
.btn--primary:hover { background: var(--gold-2); }
.btn--dark { background: var(--green-700); color: var(--cream); }
.btn--dark:hover { background: var(--green-600); }
.btn--outline { border-color: rgba(247, 242, 232, .45); color: var(--cream); }
.btn--outline:hover { background: rgba(247, 242, 232, .1); border-color: var(--cream); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green-700); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--green-800); color: var(--cream);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.site-header__inner {
  display: flex; align-items: center; gap: 26px; min-height: var(--head-h);
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand__mark { width: 38px; height: 38px; color: var(--gold); flex: none; }
.brand__name { font-family: var(--f-serif); font-size: 20px; letter-spacing: .02em; display: block; }
.brand__tag { display: block; font-size: 8.5px; letter-spacing: .32em; text-transform: uppercase; opacity: .55; }

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__link {
  display: block; padding: 9px 13px; position: relative;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(247, 242, 232, .78);
  transition: color .25s var(--ease);
}
.nav__link:hover { color: var(--cream); }
.nav__link.is-active { color: var(--gold-2); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 1px; background: var(--gold);
}
.header__phone {
  font-size: 13px; letter-spacing: .04em; color: var(--cream);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.header__phone svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 1.6; }

.burger { display: none; width: 34px; height: 28px; position: relative; padding: 0; }
.burger span { position: absolute; left: 3px; width: 26px; height: 1.6px; background: var(--cream); transition: .3s var(--ease); }
.burger span:nth-child(1) { top: 6px; }
.burger span:nth-child(2) { top: 13px; }
.burger span:nth-child(3) { top: 20px; }
.burger.is-open span:nth-child(1) { top: 13px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 13px; transform: rotate(-45deg); }

/* ---------- первый экран ---------- */
.hero {
  position: relative; min-height: 620px; min-height: 78vh;
  display: flex; align-items: center; color: var(--cream); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(10, 20, 15, .88) 10%, rgba(10, 20, 15, .55) 55%, rgba(10, 20, 15, .3) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 90px 0; }
.hero__kicker { font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 18px; }
.hero__title { font-size: clamp(38px, 5.4vw, 68px); margin-bottom: 20px; max-width: 16ch; }
.hero__text { max-width: 480px; color: rgba(247, 242, 232, .8); margin-bottom: 32px; font-size: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- секции ---------- */
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--sand { background: var(--cream-2); }
.section--dark { background: var(--green-900); color: var(--cream); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.section-head--center .kicker::before { display: none; }
.h2 { font-size: clamp(28px, 3.4vw, 44px); }
.h3 { font-size: 22px; }
.lead { font-size: 16px; color: var(--muted); }
.section--dark .lead { color: rgba(247, 242, 232, .7); }

/* ---------- сетка преимуществ ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  padding: 30px 26px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
}
.feature svg { width: 30px; height: 30px; stroke: var(--gold); fill: none; stroke-width: 1.4; margin-bottom: 16px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- блюда ---------- */
.dishes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.dish-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.dish-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.dish-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-2); position: relative; }
.dish-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.dish-card:hover .dish-card__media img { transform: scale(1.05); }
.dish-card__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #f2ebdd, #f2ebdd 10px, #ece2d0 10px, #ece2d0 20px);
  font-family: var(--f-serif); font-size: 30px; color: rgba(30, 58, 44, .28);
}
.dish-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dish-card__title { font-size: 18px; }
.dish-card__desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.dish-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.dish-card__price { font-family: var(--f-serif); font-size: 18px; color: var(--green-700); }
.dish-card__weight { font-size: 12px; color: var(--muted); }

/* фильтр меню */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.tab {
  padding: 10px 20px; border-radius: 40px; border: 1px solid var(--line);
  font-size: 12px; letter-spacing: .06em; color: var(--muted); background: #fff;
  transition: .25s var(--ease);
}
.tab:hover { border-color: var(--gold); color: var(--green-800); }
.tab.is-active { background: var(--green-800); border-color: var(--green-800); color: var(--cream); }

/* ---------- карта зала ---------- */
.hall-map {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.hall-map svg { width: 100%; height: auto; display: block; }
.hall-map__legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.hall-map__legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot--free { background: #eaf1e6; border: 1px solid #b6c9ae; }
.dot--busy { background: #efe2d4; border: 1px solid #d6bda3; }
.dot--sel  { background: var(--gold); border: 1px solid #a9803a; }
.dot--small { background: #f5f0e6; border: 1px dashed #cfc3ad; }

.tbl { cursor: pointer; }
.tbl__shape { fill: #eaf1e6; stroke: #b6c9ae; stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.tbl__label { font-family: var(--f-sans); font-size: 13px; font-weight: 600; fill: #46543f; pointer-events: none; }
.tbl__seats { font-family: var(--f-sans); font-size: 10px; fill: #7d8a75; pointer-events: none; }
.tbl:hover .tbl__shape { fill: #dfead9; stroke: var(--green-600); }
.tbl--busy { cursor: not-allowed; }
.tbl--busy .tbl__shape { fill: #efe2d4; stroke: #d6bda3; stroke-dasharray: 4 3; }
.tbl--busy .tbl__label { fill: #a89680; }
.tbl--small .tbl__shape { fill: #f5f0e6; stroke: #cfc3ad; stroke-dasharray: 2 3; }
.tbl--small { cursor: not-allowed; }
.tbl--selected .tbl__shape { fill: var(--gold); stroke: #a9803a; }
.tbl--selected .tbl__label { fill: #3a2a10; }

.plan-caption { font-size: 10px; fill: #b0a48f; letter-spacing: 2px; text-transform: uppercase; font-family: var(--f-sans); }
.plan-furniture { fill: #eee7da; }

/* ---------- шаги бронирования ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 30px; counter-reset: step; }
.step {
  flex: 1; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px;
  transition: .3s var(--ease);
}
.step__num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--cream-2);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex: none;
}
.step.is-active { border-color: var(--gold); color: var(--green-800); background: #fffdf7; }
.step.is-active .step__num { background: var(--gold); color: var(--green-900); }
.step.is-done .step__num { background: var(--green-700); color: var(--cream); }

/* ---------- панели бронирования ---------- */
.booking-grid { display: grid; grid-template-columns: 1fr 380px; gap: 30px; align-items: start; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.panel + .panel { margin-top: 20px; }
.panel__title { font-size: 20px; margin-bottom: 4px; }
.panel__hint { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.date-row, .time-row { display: flex; flex-wrap: wrap; gap: 8px; }
.date-chip, .time-chip {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 13px; transition: .2s var(--ease); text-align: center; min-width: 62px;
}
.date-chip small { display: block; font-size: 10px; color: var(--muted); }
.date-chip:hover, .time-chip:hover { border-color: var(--gold); }
.date-chip.is-active, .time-chip.is-active { background: var(--green-800); border-color: var(--green-800); color: var(--cream); }
.date-chip.is-active small { color: rgba(247, 242, 232, .65); }
.time-chip:disabled { opacity: .4; cursor: not-allowed; }

.guests-row { display: flex; align-items: center; gap: 14px; }
.stepper { display: flex; align-items: center; gap: 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  font-size: 17px; line-height: 1; transition: .2s;
}
.stepper button:hover { background: var(--gold); color: #fff; }
.stepper__value { min-width: 26px; text-align: center; font-weight: 600; font-size: 16px; }

/* сводка */
.summary { position: sticky; top: 96px; }
.summary__row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 0; }
.summary__row span { color: var(--muted); }
.summary__row b { font-weight: 600; }
.summary__divider { border-top: 1px dashed var(--line); margin: 10px 0; }
.summary__total { display: flex; justify-content: space-between; font-size: 17px; padding-top: 8px; }
.summary__total b { font-family: var(--f-serif); font-size: 20px; color: var(--green-700); }

/* выбранные блюда */
.cart-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.cart-item:last-child { border-bottom: 0; }
.cart-item__name { flex: 1; }
.cart-item__qty { color: var(--muted); font-size: 12.5px; }
.cart-item__sum { font-weight: 600; }
.cart-item__del { color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; }
.cart-item__del:hover { color: var(--danger); }
.cart-empty { font-size: 13px; color: var(--muted); }

/* меню в бронировании */
.mini-menu { max-height: 340px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.mini-dish { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(15,31,23,.07); }
.mini-dish:last-child { border-bottom: 0; }
.mini-dish__body { flex: 1; min-width: 0; }
.mini-dish__name { font-size: 14px; font-weight: 500; }
.mini-dish__meta { font-size: 12px; color: var(--muted); }
.mini-dish__price { font-size: 13.5px; color: var(--green-700); white-space: nowrap; }
.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-ctrl button {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); color: var(--green-700);
  font-size: 15px; line-height: 1; transition: .2s;
}
.qty-ctrl button:hover { border-color: var(--gold); background: var(--gold); color: #fff; }
.qty-ctrl__num { min-width: 18px; text-align: center; font-size: 13px; }

/* ---------- формы ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 14.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 78px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(193, 154, 83, .16);
}
.field input.is-error { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- сообщения ---------- */
.alert {
  padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 22px;
  border: 1px solid transparent;
}
.alert--error { background: #fbeeea; border-color: #f0cfc4; color: #8c3a23; }
.alert--ok { background: #eef6f0; border-color: #c8e0d0; color: #2b5b41; }
.alert--info { background: #f4f1e9; border-color: #e6ddca; color: #6b5c3d; }

/* ---------- карточка успеха ---------- */
.success-card {
  max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); text-align: center;
}
.success-card__icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--green-700); color: var(--gold);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 22px;
}
.success-card__icon svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.receipt { text-align: left; margin: 26px 0; border: 1px dashed var(--line); border-radius: 12px; padding: 18px 20px; }
.receipt__row { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; padding: 6px 0; }
.receipt__row span { color: var(--muted); }
.receipt__code { font-family: 'Consolas', monospace; letter-spacing: .08em; font-weight: 700; color: var(--green-700); }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: #faf7f1; font-weight: 600; }
table.data tbody tr:hover { background: #fbf8f2; }
table.data tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 30px;
  font-size: 11.5px; font-weight: 500;
}
.badge--new { background: #fdf2dd; color: #8a6420; }
.badge--confirmed { background: #e9f3ec; color: #2f6244; }
.badge--cancelled { background: #fbeae5; color: #8c3a23; }
.badge--done { background: #eef0f2; color: #4a5560; }

/* ---------- подвал ---------- */
.site-footer { background: var(--green-900); color: rgba(247, 242, 232, .66); padding: 56px 0 0; font-size: 14px; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 40px; }
.site-footer h4 { font-family: var(--f-sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cream); margin-bottom: 16px; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer li { margin-bottom: 9px; }
.site-footer .brand__name { color: var(--cream); }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12.5px;
}

/* ---------- лайтбокс ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(9, 16, 12, .94); padding: 5vh 4vw;
  opacity: 0; visibility: hidden; transition: .35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 4px; }
.lightbox__close {
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 26px; line-height: 1;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .14); }

/* ---------- появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* ---------- адаптивность ---------- */
@media (max-width: 1024px) {
  .booking-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .dishes { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header__phone { display: none; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; background: var(--green-900); z-index: 95;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: .35s var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; gap: 4px; text-align: center; }
  .nav__link { font-size: 17px; padding: 13px 20px; }
  .nav__link.is-active::after { left: 50%; right: auto; width: 40px; margin-left: -20px; bottom: 6px; }
  .hero { min-height: 560px; }
  .dishes { grid-template-columns: 1fr 1fr; }
  .steps { flex-wrap: wrap; }
  .step { flex: 1 1 45%; }
  .section { padding: 60px 0; }
  .site-header__inner { gap: 12px; }
  .site-header .btn { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .dishes { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px; }
  .success-card { padding: 26px 18px; }
  .step { flex: 1 1 100%; }
  .hero__text { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
