/* ============================================================
   EGUN Concept Cafe — дизайн 2 (по референсу loona.rest)

   Шапка-полоса в фирменной терракоте: 3D-тур · знак · бургер.
   Первый экран — фото стола, белый логотип и кнопка «Меню» (QR-меню).
   Крупные заголовки антиквой (Lora), мелкие кнопки — Montserrat.
   Вместо листа из референса — полупрозрачная розетка из логотипа.
   ============================================================ */

:root {
  --blush:     #F7F0EB;   /* фон страницы */
  --blush-2:   #EFE3DB;   /* подложки */
  --clay:      #A45E4D;   /* логотип, шапка, кнопки */
  --clay-deep: #7B4536;   /* панель меню, наведение */
  --cocoa:     #5E4238;   /* заголовки */
  --text:      #6B5047;   /* основной текст */
  --muted:     #7C6259;   /* подписи */
  --wa-bg:     #EAD9CF;   /* подложка кнопки WhatsApp */

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Montserrat", "Segoe UI", system-ui, sans-serif;

  --bar-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

/* без синей вспышки при нажатии на телефоне — нажатие видно по своим состояниям кнопок */
* { -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar-h);
}

body {
  margin: 0;
  background: var(--blush);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, p, dl, dd { margin: 0; }

::selection { background: var(--clay); color: #fff; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--clay-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--clay-deep);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { left: 8px; }

/* ─────────────── шапка ─────────────── */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  background: var(--clay);
  color: #fff;
}
.bar :where(a, button):focus-visible { outline-color: #fff; }

.tour-btn {
  justify-self: start;
  padding: 10px 18px;
  border: 1.5px solid rgba(255, 255, 255, .92);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .3s var(--ease);
}
.tour-btn:hover { background: rgba(255, 255, 255, .14); }

.bar-mark img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1); /* терракотовая розетка → белая */
}

.burger {
  justify-self: end;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 0;
  background: none;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 36px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
}

/* ─────────────── панель меню ─────────────── */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(247, 240, 235, .6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(380px, 86vw);
  display: flex;
  flex-direction: column;
  padding: 40px 40px 32px;
  background: var(--clay-deep);
  color: #fff;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .45s var(--ease), visibility .45s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer :where(a, button):focus-visible { outline-color: #fff; }

.drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.drawer-logo {
  align-self: flex-start; /* иначе флекс растягивает логотип на всю ширину */
  width: auto;
  height: 44px;
  margin: 2px 0 36px;
  filter: brightness(0) invert(1);
}

.drawer-nav a {
  display: block;
  padding: 6px 0;
  font-size: 1.75rem;
  line-height: 1.3;
  text-decoration: none;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
.drawer-nav a:hover { text-decoration: underline; }

.drawer-lang { display: flex; gap: 4px; margin-top: auto; }
.lang-btn {
  padding: 8px 8px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .78);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
}
.lang-btn:hover { color: #fff; }
.lang-btn.is-active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ─────────────── первый экран ─────────────── */

.hero {
  position: relative;
  margin-top: var(--bar-h);
  height: calc(100vh - var(--bar-h));
  height: calc(100svh - var(--bar-h));
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-photo,
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-photo { z-index: 0; }
.hero-photo img { object-fit: cover; object-position: 50% 45%; }

/* затемнение под белый логотип */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(32, 20, 16, .42);
}

/* плёночное зерно, как на staticpalms.com: живёт внутри слоя фото
   (isolation), поэтому не попадает на логотип, подпись и кнопки */
.hero-photo { isolation: isolate; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("../img/grain.svg") 0 0 / 220px 220px repeat;
  mix-blend-mode: overlay;
  opacity: .35;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 20px max(6vh, 96px);
}

.hero-logo img {
  width: min(92vw, 532px);
  filter: brightness(0) invert(1) drop-shadow(0 2px 18px rgba(0, 0, 0, .3));
}

.hero-place {
  margin-top: 16px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .1em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}

.menu-btn {
  margin-top: 34px;
  min-width: 190px;
  padding: 10px 40px 12px;
  border-radius: 10px;
  background: var(--clay);
  color: #fff;
  font-size: 1.75rem;
  letter-spacing: .08em;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .55);
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.menu-btn:hover { background: var(--clay-deep); transform: translateY(-2px); }
.hero :where(a):focus-visible { outline-color: #fff; }

/* «Вниз»: прячется через полсекунды после начала прокрутки, возвращается наверху */
.hero-scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .16em;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}
.hero-scroll i {
  display: block;
  width: 2px;
  height: 48px;
  background: linear-gradient(#fff 50%, transparent 50%) 0 0 / 2px 200%;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .45));
  animation: drip 1.6s var(--ease) infinite;
}
.hero-scroll > * { transition: opacity .6s var(--ease); }
.hero-scroll.is-hidden { pointer-events: none; }
.hero-scroll.is-hidden > * { opacity: 0; }
@keyframes drip { from { background-position: 0 100%; } to { background-position: 0 -100%; } }

/* ─────────────── общие для секций ─────────────── */

.col {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-inline: auto;
  padding-inline: 20px;
}

.title {
  margin-bottom: 24px;
  color: var(--cocoa);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 1.05;
}

.lead {
  max-width: 36em;
  color: var(--cocoa);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  line-height: 1.45;
}

.body {
  max-width: 44em;
  margin-top: 22px;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.75;
}

.rule {
  width: min(620px, 72%);
  height: 2px;
  margin: 44px 0 0;
  border: 0;
  background: linear-gradient(90deg, var(--clay-deep), rgba(123, 69, 54, 0));
}

/* розетка вместо листа из референса; на file:// маска не грузится — тогда её просто нет */
.rosette {
  position: absolute;
  z-index: 0;
  width: min(600px, 80vw);
  aspect-ratio: 1;
  background: var(--clay);
  opacity: .13;
  pointer-events: none;
  /* второй слой маски гасит низ розетки — без жёсткого среза у края секции */
  -webkit-mask: url("../img/egun-logo.png") center / contain no-repeat,
                linear-gradient(#000 25%, transparent 70%);
  -webkit-mask-composite: source-in;
          mask: url("../img/egun-logo.png") center / contain no-repeat,
                linear-gradient(#000 25%, transparent 70%);
          mask-composite: intersect;
}
.rosette--about { right: -22vw; top: 40px; }
.rosette--visit { right: -26vw; bottom: -80px; }

/* ─────────────── о нас ─────────────── */

.about {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
}

/* ─────────────── кухня: карусель ─────────────── */

.kitchen { padding: 32px 0 96px; }

.carousel {
  --slide: 86vw;
  --ratio: 1.25;        /* высота карточки / ширина: 4:5 на телефоне */
  --gap: 12px;
  position: relative;
  margin-top: 12px;
}

.track {
  display: flex;
  gap: var(--gap);
  padding: 6px calc(50% - var(--slide) / 2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -2px; }

.slide {
  flex: 0 0 var(--slide);
  margin: 0;
  scroll-snap-align: center;
}

.card {
  position: relative;
  height: calc(var(--slide) * var(--ratio));
  overflow: hidden;
  border-radius: 22px;
  background: var(--cocoa);
  color: #fff;
  opacity: .45;
  transform: scale(.94);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.slide.is-active .card { opacity: 1; transform: none; }
.slide:not(.is-active) { cursor: pointer; }

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

/* затемнение сверху под название и снизу под метку и кнопку */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(28, 16, 12, .55) 0%, rgba(28, 16, 12, 0) 70%),
    linear-gradient(180deg, rgba(28, 16, 12, .6) 0%, rgba(28, 16, 12, .2) 38%, rgba(28, 16, 12, 0) 60%),
    linear-gradient(0deg, rgba(28, 16, 12, .5) 0%, rgba(28, 16, 12, 0) 34%);
}

.card-text,
.card-foot {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  padding: 0 clamp(20px, 2.8vw, 44px);
}
.card-text { top: clamp(20px, 2.6vw, 40px); }
.card-name {
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 3rem);
  line-height: 1.1;
  /* двойная тень: плотная у букв + мягкий ореол — читается и на светлом фото */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 2px 24px rgba(0, 0, 0, .55);
}
.card-desc {
  max-width: 34em;
  margin-top: 12px;
  color: #fff;
  font-weight: 500;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 12px rgba(0, 0, 0, .75), 0 0 28px rgba(0, 0, 0, .5);
}

.card-foot {
  bottom: clamp(18px, 2.4vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(40, 26, 22, .55);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.3;
}
.card-cta {
  padding: 16px 34px;
  border-radius: 18px;
  background: var(--blush);
  color: var(--cocoa);
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .3s var(--ease);
}
.card-cta:hover { background: #fff; }
.card :where(a):focus-visible { outline-color: #fff; }

/* стрелки — круглые, внутри краёв центральной карточки */
.arrow {
  position: absolute;
  top: calc(6px + var(--slide) * var(--ratio) / 2);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .3s var(--ease), opacity .3s var(--ease);
}
.arrow:hover { background: rgba(255, 255, 255, .45); }
.arrow--prev { left: calc(50% - var(--slide) / 2 + 10px); }
.arrow--next { right: calc(50% - var(--slide) / 2 + 10px); }
.arrow[disabled] { opacity: 0; pointer-events: none; }

/* ─────────────── адрес ─────────────── */

.visit {
  position: relative;
  overflow: hidden;
  padding: 40px 0 96px;
}


.facts > div {
  padding: 18px 0 16px;
  background: linear-gradient(90deg, rgba(123, 69, 54, .4), rgba(123, 69, 54, 0)) 0 0 / 100% 1px no-repeat;
}
.facts > div:first-child { background: none; padding-top: 4px; }
.facts dt { color: var(--cocoa); font-weight: 600; font-size: 1.0625rem; }
.facts dd { margin-top: 4px; font-size: 1.0625rem; line-height: 1.65; }
.facts a { text-decoration: none; }
.facts a:hover { color: var(--clay-deep); text-decoration: underline; text-underline-offset: 4px; }
.facts .link {
  display: inline-block;
  margin-top: 4px;
  color: var(--clay-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ─────────────── подвал ─────────────── */

.foot {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 48px 20px 96px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.foot-logo { width: auto; height: 52px; }

/* ─────────────── окно 3D-тура ─────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(32, 20, 16, .6);
}
.modal[hidden] { display: none; }
.modal-box {
  width: min(1000px, 100%);
  overflow: hidden;
  border-radius: 14px;
  background: var(--blush);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 22px;
  border-bottom: 1px solid rgba(123, 69, 54, .18);
}
.modal-head h2 { color: var(--cocoa); font-weight: 400; font-size: 1.35rem; }
.modal-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--cocoa);
  cursor: pointer;
}
.modal-body iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.modal-soon { padding: 56px 28px; text-align: center; color: var(--cocoa); font-size: 1.2rem; }

/* ─────────────── широкие экраны ─────────────── */

@media (min-width: 700px) {
  :root { --bar-h: 92px; }
  .bar { padding: 0 36px; }
  .tour-btn { width: clamp(170px, 14vw, 216px); padding: 13px 0; font-size: 16px; }
  .bar-mark img { width: 62px; height: 62px; }
  .burger span { width: 42px; }
  .burger { gap: 8px; }

  .hero-logo img { width: clamp(532px, 56vw, 840px); }
  .hero-place { font-size: 17px; letter-spacing: .2em; }
  .menu-btn { min-width: 220px; padding: 12px 46px 14px; font-size: 2rem; }


  .col { padding-inline: 32px; }
  .about { padding: 112px 0 104px; }
  .rosette--about { right: -8vw; top: 60px; width: min(620px, 52vw); }
  .rosette--visit { right: -10vw; bottom: -120px; width: min(620px, 52vw); }

  .carousel { --slide: 66.7vw; --ratio: .5; --gap: 24px; }
  .card { border-radius: 32px; }
  .arrow { width: 64px; height: 64px; }
  .arrow svg { width: 24px; height: 24px; }
  .arrow--prev { left: calc(50% - var(--slide) / 2 + 14px); }
  .arrow--next { right: calc(50% - var(--slide) / 2 + 14px); }
}

/* сетка референса (loona.rest, макет 1440): левый край текста 264px = 18,3vw,
   правая колонка декора 852–1428px = 59,2vw … до края */
@media (min-width: 900px) {
  .col { max-width: none; margin: 0; padding: 0 6vw 0 18.3vw; }
  .lead { max-width: 59.3vw; }
  .body { max-width: 68.5vw; }
  .rule { width: 43.3vw; }

  /* как «Контакты» на loona.rest: колонка 430/1440, справа декор до края */
  .visit-info { max-width: 30vw; min-width: 340px; }
  .rosette--visit { right: .8vw; top: 90px; bottom: auto; width: 40vw; }
}

/* ─────────────── доступность ─────────────── */

@media (prefers-reduced-motion: reduce) {
  html, .track { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* подпись разработчика */
.legal, .credit { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-size: 14px; }
.credit a { font-family: "Montserrat", "Segoe UI", sans-serif; color: #0B5CC7; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.credit a:hover { text-decoration: underline; text-underline-offset: 3px; }
