/* LUMEN v2 — тёплый почти-чёрный + свечное золото + бархатный зелёный.
   Структура гастро: тикер, пять актов, печатная карта, цитата, резервация-композер. */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-normal.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-italic.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #0A0806;
  --panel: #14100B;
  --hairline: rgba(243, 237, 226, .13);
  --accent: #C89B3C;        /* свечное золото */
  --green: #2E5C46;         /* бархатный зелёный */
  --ivory: #F0E9DB;         /* бумага карты */
  --ink: #F3EDE2;
  --muted: #9C937F;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Archivo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* smooth-скролл делает Lenis */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-stretch: 100%;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-anchor: none; /* браузерное якорение скролла дёргает страницу при пине */
}

::selection { background: var(--accent); color: #14100B; }

/* ---------- Прелоадер ---------- */
#loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  transition: opacity .7s ease, visibility .7s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: var(--serif);
  font-size: 42px; font-weight: 500;
  color: var(--ink);
  border: 1.5px solid var(--accent); border-radius: 50%;
  width: 84px; height: 84px;
  display: grid; place-items: center;
}
.loader-bar { width: min(320px, 60vw); height: 1.5px; background: #201A12; }
.loader-fill { width: 0%; height: 100%; background: var(--accent); transition: width .2s; }
.loader-pct { font-size: 12px; letter-spacing: .25em; color: var(--muted); }

/* ---------- Шапка ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 4vw, 56px);
}
#topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(10,8,6,.74), rgba(10,8,6,.36) 60%, transparent);
  pointer-events: none;
}
.wordmark {
  color: var(--ink); text-decoration: none;
  font-family: var(--serif);
  font-weight: 550; letter-spacing: .3em; font-size: 17px;
  text-shadow: 0 1px 14px rgba(0,0,0,.65);
}
.wordmark span {
  display: block; font-family: var(--sans); font-weight: 400;
  letter-spacing: .42em; font-size: 8px; color: var(--accent);
  margin-top: 3px;
}
.mainnav {
  display: flex; gap: clamp(18px, 2.6vw, 40px);
  position: absolute; left: 50%; transform: translateX(-50%);
}
.mainnav a {
  color: var(--ink); text-decoration: none;
  font-size: 13px; letter-spacing: .04em;
  opacity: .85; transition: opacity .25s, color .25s;
  text-shadow: 0 1px 14px rgba(0,0,0,.65);
}
.mainnav a:hover, .mainnav a:focus-visible { opacity: 1; color: #fff; }
@media (max-width: 960px) { .mainnav { display: none; } }

.cta-mini {
  color: #14100B; background: var(--ink);
  text-decoration: none; font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 11px 20px; border-radius: 100px;
  transition: background .25s, transform .25s;
}
.cta-mini:hover, .cta-mini:focus-visible { background: #fff; transform: translateY(-1px); }

/* ---------- Скролл-сцена ---------- */
#stage { position: relative; height: 820vh; }
/* svh: всегда видимая высота — подписи не прячутся за адресной строкой телефона */
#viewport { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#dim {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(75deg, rgba(6,4,3,.88) 0%, rgba(6,4,3,.5) 45%, rgba(6,4,3,.08) 100%);
}

.overlay {
  position: absolute; z-index: 5;
  left: clamp(22px, 6vw, 96px);
  bottom: clamp(70px, 14vh, 160px);
  max-width: 640px;
  opacity: 0;
}
.overlay.hero {
  opacity: 1;
  left: 0; right: 0; bottom: auto; top: 0; height: 100%;
  max-width: none;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  padding-top: 13vh;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px; font-weight: 600;
  letter-spacing: .42em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7.8vw, 118px);
  font-weight: 420;
  letter-spacing: .005em;
  line-height: 1.04;
  color: #FBF7EE;
  text-shadow: 0 8px 60px rgba(0,0,0,.55);
}
.hero h1 em { font-style: italic; font-weight: 340; color: #EFD9A8; }
.hero-sub {
  margin-top: 22px;
  font-size: clamp(14px, 1.6vw, 19px);
  letter-spacing: .04em; color: #CEC5B4;
  text-shadow: 0 2px 24px rgba(0,0,0,.85);
}
.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.scroll-hint span {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(#EFD9A8, transparent);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); } 100% { opacity: 0; transform: scaleY(1); } }

.caption h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.8vw, 82px);
  font-weight: 380;
  line-height: 1.06; letter-spacing: .01em;
  color: #F5EFE3;
}
.caption h2 em { font-style: italic; font-weight: 320; color: #EFD9A8; }
.cap-text {
  margin-top: 18px; color: #B0A791;
  font-size: clamp(14px, 1.4vw, 17px); max-width: 460px;
}

.btn-solid {
  display: inline-block; margin-top: 28px;
  background: var(--ink); color: #14100B;
  text-decoration: none; font-weight: 650;
  font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  padding: 18px 36px; border-radius: 100px;
  transition: transform .25s cubic-bezier(.2,.9,.3,1.4), background .3s, box-shadow .3s;
}
.btn-solid:hover, .btn-solid:focus-visible {
  background: #fff; transform: translateY(-2px);
  box-shadow: 0 12px 44px rgba(255,232,170,.16);
}
.btn-solid.big { font-size: 16px; padding: 22px 48px; }

.cta-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; color: var(--ink); text-decoration: none;
  font-size: clamp(15px, 1.5vw, 18px); letter-spacing: .02em;
  border-bottom: 1px solid rgba(243,237,226,.35);
  padding-bottom: 6px;
  transition: color .25s, border-color .25s, gap .25s;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
}
.cta-link:hover, .cta-link:focus-visible { color: #fff; border-color: var(--accent); gap: 16px; }
.cta-link .arr { font-size: .85em; color: var(--accent); }

/* ---------- Тикер: блюда вечера ---------- */
.ticker {
  position: relative; z-index: 6; background: var(--bg);
  border-top: 1px solid rgba(243,237,226,.07);
  border-bottom: 1px solid rgba(243,237,226,.07);
  overflow: hidden; white-space: nowrap;
  padding: 22px 0;
}
.ticker-track {
  display: inline-flex; align-items: baseline; gap: 34px;
  animation: tick 46s linear infinite;
  will-change: transform;
}
.ticker-track span {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 1.9vw, 24px); font-weight: 340;
  color: #CDC3AC; letter-spacing: .02em;
}
.ticker-track i { color: var(--accent); font-style: normal; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section {
  position: relative; z-index: 6;
  background: var(--bg);
  padding: clamp(90px, 13vh, 170px) clamp(22px, 6vw, 96px);
  max-width: 1440px; margin: 0 auto;
}
.sec-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5.2vw, 72px);
  font-weight: 420;
  line-height: 1.05; letter-spacing: .005em;
  color: #F6F0E4;
  margin-bottom: 18px;
}
.sec-title em { font-style: italic; font-weight: 330; color: #EFD9A8; }
.sec-sub { color: var(--muted); max-width: 520px; }

/* ---------- Пять актов ---------- */
.acts { margin-top: clamp(50px, 8vh, 100px); display: grid; gap: clamp(70px, 11vh, 130px); }
.act {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.act:nth-child(even) .act-img { order: 2; }
.act::before {
  /* большая римская цифра позади текста */
  content: attr(data-act);
  position: absolute; z-index: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(120px, 17vw, 260px);
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(200, 155, 60, .22);
  top: 50%; transform: translateY(-52%);
  pointer-events: none;
}
.act:nth-child(odd)::before { right: -1vw; }
.act:nth-child(even)::before { left: -1vw; }
.act-img {
  position: relative; z-index: 1;
  overflow: hidden; border-radius: 6px;
  aspect-ratio: 16/10;
  box-shadow: 0 40px 90px rgba(0,0,0,.55);
}
.act-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.06);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.act.in .act-img img { transform: scale(1); }
.act-text { position: relative; z-index: 1; max-width: 480px; }
.act-no {
  font-size: 11px; letter-spacing: .42em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.act-text h3 {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(28px, 3.4vw, 46px);
  color: #F2EBDD; line-height: 1.08;
}
.act-dish {
  font-family: var(--serif); font-style: italic; font-weight: 340;
  color: #EFD9A8; font-size: clamp(15px, 1.6vw, 19px);
  margin: 10px 0 14px;
}
.act-text > p:last-child { color: var(--muted); font-size: 14.5px; }
/* появление по скроллу */
.act { opacity: 0; transform: translateY(46px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.act.in { opacity: 1; transform: none; }

/* ---------- Печатная карта ---------- */
.karte-sec { text-align: center; }
.karte-sec .sec-sub { margin: 0 auto; }
.karte {
  margin: clamp(44px, 7vh, 80px) auto 0;
  max-width: 740px;
  aspect-ratio: 210 / 297;      /* лист A4 */
  display: flex; flex-direction: column;
  background: var(--ivory);
  color: #221B12;
  border-radius: 4px;
  padding: clamp(34px, 5vw, 60px) clamp(24px, 5vw, 68px) clamp(28px, 4vw, 46px);
  box-shadow: 0 50px 110px rgba(0,0,0,.6), inset 0 0 0 1px rgba(34,27,18,.06), inset 0 0 60px rgba(160,130,70,.08);
  text-align: left;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  will-change: transform;
}
.karte-tabs {
  display: flex; justify-content: center; gap: clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(34,27,18,.18);
  padding-bottom: 18px; margin-bottom: 26px;
}
.ktab {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 650;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(34,27,18,.45);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color .25s, border-color .25s;
}
.ktab.active { color: #221B12; border-color: var(--accent); }
.ktab:hover { color: #221B12; }
.kpage { display: none; }
.kpage.on { display: flex; flex-direction: column; flex: 1; animation: kfade .5s ease; }
@keyframes kfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kpage-head {
  font-family: var(--serif); font-style: italic; font-weight: 350;
  text-align: center; color: rgba(34,27,18,.6);
  margin-bottom: 24px; font-size: clamp(15px, 1.7vw, 18px);
}
.krow {
  display: flex; align-items: baseline; gap: 12px;
  padding: 13px 0;
}
.kname {
  font-family: var(--serif); font-weight: 440;
  font-size: clamp(16px, 1.9vw, 20px); color: #221B12;
}
.kname i { font-style: italic; font-weight: 340; color: rgba(34,27,18,.55); font-size: .85em; }
.kdots {
  flex: 1; min-width: 30px;
  border-bottom: 1.5px dotted rgba(34,27,18,.35);
  transform: translateY(-4px);
}
.kprice {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(16px, 1.9vw, 20px); color: #221B12; white-space: nowrap;
}
.kfoot {
  margin-top: auto; padding-top: 24px; text-align: center;
  font-size: 12px; letter-spacing: .06em;
  color: rgba(34,27,18,.5);
}

/* строки дегустации по центру + группы + орнамент */
.kcourse {
  text-align: center;
  font-family: var(--serif); font-weight: 430;
  font-size: clamp(16px, 1.9vw, 20px); color: #221B12;
  padding: 8px 0;
  transition: color .25s, letter-spacing .3s;
}
.kgroup {
  margin: 20px 0 6px; text-align: center;
  font-size: 10.5px; font-weight: 650;
  letter-spacing: .32em; text-transform: uppercase;
  color: rgba(34,27,18,.48);
}
.kdivider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0 8px;
}
.kdivider span { flex: 1; border-top: 1px solid rgba(34,27,18,.18); }
.kdivider i { font-style: normal; color: var(--accent); font-size: 13px; }

/* строки с фото: курсор-лупа + подсветка */
@media (hover: hover) {
  .krow[data-img], .kcourse[data-img] { cursor: zoom-in; }
  .krow[data-img]:hover .kname, .kcourse[data-img]:hover { color: #6B4A12; }
}

/* всплывающее фото у курсора */
.kpreview {
  position: fixed; z-index: 300;
  width: min(300px, 26vw); aspect-ratio: 16/9;
  object-fit: cover;
  border: 5px solid #FDFBF5; border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  pointer-events: none;
  opacity: 0; transform: scale(.86) rotate(var(--rot, -3deg));
  transition: opacity .22s ease, transform .3s cubic-bezier(.2,.8,.25,1.2);
  left: 0; top: 0;
}
.kpreview.show { opacity: 1; transform: scale(1) rotate(var(--rot, -3deg)); }

/* ---------- Философия ---------- */
.philo { text-align: center; padding-top: clamp(70px, 10vh, 130px); }
.quote-mark {
  font-family: var(--serif); font-size: clamp(70px, 8vw, 120px);
  line-height: 1; height: .52em; overflow: hidden;
  color: var(--accent); opacity: .85;
  margin-bottom: 22px;
}
.philo blockquote {
  font-family: var(--serif); font-weight: 350;
  font-size: clamp(26px, 4vw, 54px);
  line-height: 1.25; color: #F2EBDD;
  max-width: 1000px; margin: 0 auto;
}
.philo blockquote em { font-style: italic; color: #EFD9A8; }
.philo-sig {
  margin-top: 26px;
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Резервация-композер ---------- */
.resv {
  margin-top: clamp(44px, 7vh, 80px);
  max-width: 720px;
  display: grid; gap: 30px;
}
.resv-label {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.resv-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.ropt {
  background: none; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 100px;
  color: var(--muted);
  font-family: var(--sans); font-size: 14.5px; font-weight: 550;
  padding: 12px 24px; min-width: 62px;
  transition: color .25s, border-color .25s, background .25s, transform .2s;
}
.ropt:hover { color: var(--ink); border-color: rgba(243,237,226,.4); transform: translateY(-1px); }
.ropt.active {
  background: var(--accent); border-color: var(--accent);
  color: #14100B;
}
.resv-preview {
  font-family: var(--serif); font-style: italic; font-weight: 350;
  font-size: clamp(18px, 2.2vw, 24px); color: #EFD9A8;
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
}
.resv .btn-solid.big { justify-self: start; margin-top: 4px; }
.resv-note { font-size: 13px; color: var(--muted); }

.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; margin-top: clamp(60px, 9vh, 100px);
}
.contact-grid h4 {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; font-weight: 600;
}
.contact-grid p { color: var(--muted); font-size: 15px; }

footer {
  border-top: 1px solid rgba(243,237,226,.08);
  padding: 36px clamp(22px, 6vw, 96px) 44px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 12.5px;
}
footer .builder a { color: var(--ink); }

/* Зерно */
#grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .13; mix-blend-mode: overlay;
  animation: grain 900ms steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 25% { transform: translate(-2%,3%); }
  50% { transform: translate(3%,-2%); } 75% { transform: translate(-3%,-3%); } 100% { transform: translate(2%,2%); }
}

@media (prefers-reduced-motion: reduce) {
  #grain, .scroll-hint span, .ticker-track { animation: none; }
  .act { opacity: 1; transform: none; }
}

/* ---------- Мобилка ---------- */
@media (max-width: 860px) {
  .overlay { left: 22px; right: 22px; bottom: 84px; }
  footer { flex-direction: column; }
  .act { grid-template-columns: 1fr; gap: 20px; }
  .act:nth-child(even) .act-img { order: 0; }
  .act::before { display: none; }
  .act-text { max-width: none; }
  .karte { padding: 30px 20px 26px; aspect-ratio: auto; transform: none; }
  .kpreview { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .resv .btn-solid.big { justify-self: stretch; text-align: center; }
}

/* ---------- Тач-правки (html.mstatic ставит JS; пролёт НЕ трогаем) ---------- */
/* фикс чёрного мигания на стыке пин-зоны и секций: секции живут в своих слоях */
html.mstatic .ticker,
html.mstatic .section,
html.mstatic footer {
  transform: translateZ(0);
  backface-visibility: hidden;
}
