/* ===== PORTO Maltese ===== */
/* Единственный шрифт сайта — Proxima Nova, только Regular (400) и Bold (700). */
@font-face {
  font-family: 'Proxima Nova';
  src: url("../assets/fonts/proxima-nova-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Proxima Nova';
  src: url("../assets/fonts/proxima-nova-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #FAFAF8;
  --ink: #111111;
  --muted: #6B6B6B;
  --line: #E5E5E0;
  --ph: #E9E8E3;
  --dark: #111111;
  --dark-muted: #9C9C96;
  --dark-line: #2A2A27;
  --font: 'Proxima Nova', Arial, sans-serif;
  --container: 1280px;
  --pad: 24px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }

.section { padding: 130px 0; scroll-margin-top: var(--header-h); }

.section-label {
  font-family: var(--font);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--muted);
  vertical-align: middle;
  margin-right: 14px;
  opacity: .6;
}

/* ===== Skip link (видна только при фокусе с клавиатуры) ===== */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--bg); font-size: 14px; padding: 12px 20px; }
.skip-link:focus { left: 0; }
main:focus { outline: none; }

/* Сохранённый EN: прячем страницу до подстановки перевода (см. скрипт в <head>). */
html.i18n-pending body { visibility: hidden; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 16px 34px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: background .3s var(--ease), color .3s var(--ease);
}

.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:disabled:hover { background: var(--ink); color: var(--bg); }

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(250, 250, 248, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .3s, box-shadow .3s;
}

.header.is-scrolled { box-shadow: 0 1px 0 var(--line); }

body.nav-open .header {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 40px; }
.header__logo img { height: 30px; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 30px; }

.nav__link {
  white-space: nowrap;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width .3s var(--ease);
}

.nav__link:hover::after { width: 100%; }

.nav__langs { display: flex; margin-left: 8px; border: 1px solid var(--ink); }

.nav__lang {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  padding: 7px 12px;
  color: var(--ink);
  transition: background .3s, color .3s;
}

.nav__lang.is-active { background: var(--ink); color: var(--bg); }

.nav__cta { padding: 12px 24px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: #E4E4E6;
  overflow: hidden;
}

.hero__media, .hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Текст и кнопки привязаны к краям экрана и масштабируются вместе с фото (как на макете). */
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: var(--header-h) 3.6vw 0;
}

.hero__title {
  max-width: 13.5em;
  font-size: max(16px, 1.6vw);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.hero__actions { display: flex; flex-direction: column; gap: max(10px, 1.1vw); }

.btn--line {
  width: max(150px, 12.6vw);
  padding: .75em 1em;
  font-size: max(13px, 1.2vw);
  letter-spacing: .04em;
  text-align: center;
  background: rgba(255, 255, 255, .15);
  color: var(--ink);
}

.btn--line:hover { background: var(--ink); color: var(--bg); }

/* ===== Про ресторан ===== */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about__text { font-size: 19px; max-width: 54ch; }
.about__media { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; display: block; background: var(--ph); }

/* ===== Меню ===== */
.menu__lead { max-width: 60ch; color: var(--muted); }

.menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
}

.menu-card {
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  padding: 38px 34px;
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  transition: background .35s var(--ease);
}

.menu-card:hover { background: #F1F0EB; }

.menu-card__title {
  font-family: var(--font);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.menu-card--photo { padding: 0; flex-direction: column; align-items: stretch; }
/* Фото с фиксированной пропорцией: длинное название растит подпись, а не сжимает фото. */
.menu-card--photo .menu-card__media { flex: none; aspect-ratio: 2 / 3; width: 100%; height: auto; object-fit: cover; display: block; }
.menu-card--photo .menu-card__title { display: flex; align-items: center; flex: 1; padding: 20px 34px 22px; }

.menu__actions { margin-top: 36px; }

/* ===== Винна карта ===== */
.wine__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.wine__carousel { aspect-ratio: 4 / 5; }
.wine__text { font-size: 19px; max-width: 52ch; }
.wine__accent {
  font-family: var(--font);
  font-weight: 700;
  font-size: 21px;
  margin: 30px 0 38px;
}

/* ===== Карусель (вина, простір) ===== */
.carousel { position: relative; overflow: hidden; background: var(--ph); }

.carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s var(--ease);
}

.carousel__slide.is-active { opacity: 1; }

.carousel__dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 1; display: flex; justify-content: center; gap: 4px; }

.carousel__dot { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }

.carousel__dot::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid #FFFFFF;
  box-shadow: 0 0 4px rgba(0, 0, 0, .35);
  transition: background .3s;
}

.carousel__dot[aria-current="true"]::before { background: #FFFFFF; }
.carousel__dot:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -4px; }

/* ===== Простор і тераса ===== */
.space__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.space__carousel { aspect-ratio: 3 / 4; }
.space__text { font-size: 19px; }
.space__note {
  margin-top: 30px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2.2;
}


/* ===== Галерея ===== */
.gallery__grid {
  counter-reset: gitem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 56px;
}

.gallery__item { position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: zoom-in; }
.gallery__item:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.gallery__item::before {
  counter-increment: gitem;
  content: counter(gitem, decimal-leading-zero);
  position: absolute;
  z-index: 2;
  left: 18px; bottom: 14px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--muted);
}

.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }

/* ===== Бронирование ===== */
.booking__lead { max-width: 60ch; color: var(--muted); }

.booking__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 90px; align-items: start; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.form__field { display: flex; flex-direction: column; gap: 10px; }

.form__label {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.input {
  font: inherit;
  font-weight: 400;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  border-radius: 0;
  transition: border-color .3s;
}

.input:focus { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
textarea.input { resize: vertical; min-height: 90px; }

.form__status { margin-top: 20px; font-size: 15px; min-height: 24px; }
.form__status.is-ok { color: #2E7D4F; }
.form__status.is-error { color: #B3402E; }

.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.booking__aside { border-left: 1px solid var(--line); padding-left: 50px; }

/* ===== Просмотр фото галереи ===== */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 12, 12, .94);
  color: #FFFFFF;
  overflow: hidden;
}

.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: backdrop-in .3s var(--ease); }
.lightbox::backdrop { background: transparent; }

.lightbox__img {
  max-width: calc(100vw - 180px);
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.lightbox__counter {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .7);
}

.lightbox__btn {
  position: fixed;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  color: rgba(255, 255, 255, .75);
  transition: color .3s var(--ease);
}

.lightbox__btn:hover { color: #FFFFFF; }
.lightbox__btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -4px; }
.lightbox__close { top: 16px; right: 16px; font-size: 38px; }

/* Режим документа (меню): все страницы в одной колонке, непрерывный скролл
   снизу вверх. «Назад» вверху, «вперёд» внизу, счётчик справа вверху */
.lightbox--doc[open] { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
.lightbox--doc .lightbox__img { display: none; }
.lightbox__doc { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 76px 0 96px; }
.lightbox__doc img { display: block; width: min(calc(100vw - 180px), 900px); height: auto; background: #FFFFFF; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox--doc .lightbox__btn, .lightbox--doc .lightbox__counter { background: rgba(12, 12, 12, .7); }
.lightbox--doc .lightbox__counter { padding: 6px 12px; top: 16px; right: 84px; bottom: auto; left: auto; transform: none; }
.lightbox--doc .lightbox__prev { left: 50%; right: auto; top: 10px; bottom: auto; transform: translateX(-50%); }
.lightbox--doc .lightbox__next { left: 50%; right: auto; bottom: 10px; top: auto; transform: translateX(-50%); }
.lightbox--doc .lightbox__prev span { display: inline-block; transform: rotate(90deg); }
.lightbox--doc .lightbox__next span { display: inline-block; transform: rotate(-90deg); }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ===== Окно бронирования ===== */
body.modal-open { overflow: hidden; }

.modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal::backdrop { background: rgba(17, 17, 17, .6); }

.modal[open] { animation: modal-in .35s var(--ease); }
.modal[open]::backdrop { animation: backdrop-in .35s var(--ease); }

@keyframes modal-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes backdrop-in { from { opacity: 0; } }

.modal__inner { position: relative; padding: 56px 56px 44px; }

.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 44px; height: 44px;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  color: var(--muted);
  transition: color .3s var(--ease);
}

.modal__close:hover { color: var(--ink); }
.modal__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.modal__logo { height: 28px; width: auto; margin-bottom: 28px; }

.modal__title {
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .34em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modal__lead { color: var(--muted); margin-bottom: 32px; }

.modal__phone {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.modal__phone a { color: var(--ink); border-bottom: 1px solid var(--line); }
.modal__phone a:hover { border-color: var(--ink); }

.booking__phone-label {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.booking__phone {
  display: block;
  font-family: var(--font);
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: .14em;
  margin-top: 16px;
}

.booking__phone:hover { color: var(--muted); }

/* ===== Контакты (тёмная секция) ===== */
.contacts { background: var(--dark); color: #F3F2EE; }
.contacts .section-label { color: var(--dark-muted); }
.contacts .section-label::before { background: var(--dark-muted); }

.contacts__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.contacts__logo { height: 64px; width: auto; margin-bottom: 44px; }
.contacts__list { display: flex; flex-direction: column; gap: 26px; }

.contacts__item-label {
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 6px;
}

.contacts__item-value { font-size: 18px; }
.contacts__item a:hover { text-decoration: underline; text-underline-offset: 4px; }

.contacts__map-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.contacts__map-link:hover { color: #FFFFFF; }

.contacts__iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  filter: grayscale(1) contrast(1.02);
}

/* ===== Footer ===== */
.footer { background: var(--dark); color: var(--dark-muted); border-top: 1px solid var(--dark-line); padding: 34px 0; }

.footer__inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.footer__logo { height: 20px; width: auto; opacity: .8; }

.footer__ig {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.footer__ig:hover { color: #FFFFFF; }
.footer__copy { font-size: 13px; margin-left: auto; }
.footer__dev { font-size: 13px; }
.footer__dev a { color: #FFFFFF; font-weight: 700; letter-spacing: .08em; border-bottom: 1px solid var(--dark-line); transition: border-color .3s; }
.footer__dev a:hover { border-color: #FFFFFF; }

/* ===== Reveal-анимации (гейтинг за html.js: без JS контент виден сразу) ===== */
.reveal { transition: opacity .55s var(--ease), transform .55s var(--ease); }
html.js .reveal { opacity: 0; transform: translateY(18px); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

html.js .stagger > .reveal:nth-child(2) { transition-delay: .06s; }
html.js .stagger > .reveal:nth-child(3) { transition-delay: .12s; }
html.js .stagger > .reveal:nth-child(4) { transition-delay: .18s; }
html.js .stagger > .reveal:nth-child(5) { transition-delay: .24s; }
html.js .stagger > .reveal:nth-child(6) { transition-delay: .30s; }
html.js .stagger > .reveal:nth-child(7) { transition-delay: .36s; }
html.js .stagger > .reveal:nth-child(8) { transition-delay: .42s; }
html.js .stagger > .reveal:nth-child(9) { transition-delay: .48s; }

/* ===== Адаптив ===== */
@media (max-width: 1180px) and (min-width: 769px) {
  .header__inner { gap: 24px; }
  .nav { gap: 18px; }
  .nav__link { font-size: 12px; letter-spacing: .08em; }
  .nav__langs { margin-left: 0; }
  .nav__cta { padding: 11px 16px; letter-spacing: .14em; }
}

@media (max-width: 1024px) {
  .about__grid, .wine__grid, .space__grid, .booking__grid, .contacts__grid { grid-template-columns: 1fr; gap: 48px; }
  .booking__aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 40px; }
  .menu__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 90px 0; }
}

@media (max-width: 768px) {
  .header__inner { gap: 16px; }

  .nav-toggle { display: flex; z-index: 60; position: relative; }

  html:not(.js) .nav-toggle { display: none; }

  .nav { flex-direction: column; align-items: center; gap: 26px; margin-left: 0; padding: 20px 0; }

  html.js .nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--bg);
    justify-content: center;
    margin-left: 0;
    padding: 20px 0;
    transform: translateY(-100%);
    visibility: hidden;
    overflow-y: auto;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
  }

  html.js body.nav-open .nav { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav__link { font-size: 15px; }
  .nav__langs { margin: 18px 0 0; }
  .nav__cta { margin-top: 8px; }

  .form__row { grid-template-columns: 1fr; }
  .menu__grid { grid-template-columns: 1fr; }
  .menu-card--photo .menu-card__media { aspect-ratio: 4 / 5; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero { align-items: stretch; }
  .hero__content {
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: calc(var(--header-h) + 36px) var(--pad) 48px;
  }
  .hero__title { font-size: 16px; max-width: 15em; }
  .hero__actions { flex-direction: row; justify-content: center; gap: 12px; width: 100%; }
  .btn--line { width: auto; flex: 1; max-width: 150px; padding: 9px 8px; font-size: 13px; }
  .section { padding: 70px 0; }
  .contacts__iframe { height: 320px; }
  .footer__copy { margin-left: 0; width: 100%; }
  .footer__dev { width: 100%; }
  .modal__inner { padding: 52px 20px 28px; }
  .lightbox__img { max-width: 100vw; max-height: calc(100dvh - 150px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
  .lightbox__counter { bottom: 26px; }
  .lightbox__doc { gap: 6px; padding: 72px 0 84px; }
  .lightbox__doc img { width: 100vw; }
  .modal .form__row { gap: 16px; margin-bottom: 16px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html.js .stagger > .reveal { transition-delay: 0s; }
  .carousel__slide { transition: none; }
  .gallery__item img { transition: none; }
  html.js body.nav-open .nav, html.js .nav { transition: none; }
  .modal[open], .modal[open]::backdrop, .lightbox[open] { animation: none; }
}
