/* ============================================================================
   Salazkin — стили меню
   Палитра под печатный буклет: тёплый фон, бордово-красный акцент, графит-чёрный.
   ========================================================================== */

:root {
	--c-bg:      #fbf7ee;       /* тёплая бумага */
	--c-paper:   #ffffff;
	--c-ink:     #1f1c19;       /* почти-чёрный */
	--c-muted:   #6f655a;
	--c-line:    rgba(31, 28, 25, 0.12);
	--c-accent:  #a01f1f;       /* бордово-красный */
	--c-accent-soft: #c95151;
	--c-shadow:  rgba(60, 30, 20, 0.08);

	--f-display: "Yeseva One", "PT Serif", Georgia, serif;
	--f-body:    "PT Serif", Georgia, "Times New Roman", serif;

	--max:    1480px;
	--gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	color: var(--c-ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
}
/* Тёплый виньетный фон: светлее в центре, темнее по краям */
body {
	background:
		radial-gradient(ellipse 90% 80% at 50% -10%, #fefcf6 0%, transparent 50%),
		radial-gradient(ellipse 100% 70% at 100% 100%, #f3ebd8 0%, transparent 60%),
		radial-gradient(ellipse 100% 70% at 0% 100%, #f6efde 0%, transparent 60%),
		linear-gradient(180deg, #fbf7ee 0%, #f5ecda 100%);
	background-attachment: fixed;
	position: relative;
}
/* Paper-noise — лёгкая зернистость для бумажного ощущения */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0.045 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
	opacity: 0.85;
	mix-blend-mode: multiply;
}
/* Контент над текстурой */
.site-main, .site-footer { position: relative; z-index: 2; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

button { font: inherit; }

/* ---------- Main wrapper ---------- */
.site-main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 80px; }

.menu-page { padding: 0; }

/* ---------- Sticky-полоса (на всю ширину окна, одна строка) ---------- */
.menu-stickybar {
	position: sticky;
	top: 0;
	z-index: 50;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	background: rgba(254, 252, 246, 0.78);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: box-shadow 0.2s ease, background 0.2s ease;
}
.menu-stickybar.is-stuck {
	box-shadow: 0 6px 22px rgba(60, 30, 20, 0.1);
	background: rgba(254, 252, 246, 0.92);
}
.menu-stickybar__row {
	max-width: var(--max);
	margin: 0 auto;
	padding: 12px var(--gutter);
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 64px;
}


/* ---------- Якоря разделов (горизонтальный скролл с пилюлями) ---------- */
.menu-anchors-wrap {
	flex: 1;
	min-width: 0;
	width: 100%;
	position: relative;
	display: block;
}
/* Fade-маски по краям, чтобы пилюли мягко уходили в градиент при скролле */
.menu-anchors-wrap::before,
.menu-anchors-wrap::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0;
	width: clamp(24px, 4vw, 56px);
	pointer-events: none;
	z-index: 2;
}
.menu-anchors-wrap::before {
	left: 0;
	background: linear-gradient(to right, rgba(254,252,246,0.95) 0%, rgba(254,252,246,0) 100%);
}
.menu-anchors-wrap::after {
	right: 0;
	background: linear-gradient(to left, rgba(254,252,246,0.95) 0%, rgba(254,252,246,0) 100%);
}
.menu-anchors {
	display: none;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 10px var(--gutter);
	gap: 6px;
}
.menu-anchors::-webkit-scrollbar { display: none; }
.menu-anchors.is-active {
	display: flex;
	animation: anchors-in 0.22s ease;
}
@keyframes anchors-in {
	from { opacity: 0; transform: translateY(-3px); }
	to   { opacity: 1; transform: translateY(0); }
}
.menu-anchors a {
	flex-shrink: 0;
	padding: 8px 16px;
	font-family: var(--f-body);
	font-size: 13px;
	color: var(--c-muted);
	background: var(--c-paper);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	letter-spacing: 0.04em;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.menu-anchors a:hover  { background: rgba(160, 31, 31, 0.06); color: var(--c-accent); text-decoration: none; }
.menu-anchors a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.menu-anchors a.is-current {
	background: var(--c-accent);
	color: #fff;
	border-color: var(--c-accent);
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(160, 31, 31, 0.25);
}
/* Group-лейбл (название кухни) внутри полосы якорей */
.menu-anchors__group {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 0 6px;
	font-family: var(--f-display);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--c-accent);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}
.menu-anchors__group:not(:first-child) {
	margin-left: 8px;
	padding-left: 16px;
	border-left: 1px solid var(--c-line);
}

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
	.menu-stickybar__row { padding: 0; min-height: 0; }
	.menu-anchors { padding: 8px var(--gutter); gap: 5px; }
	.menu-anchors a { padding: 6px 12px; font-size: 12px; }
	.menu-anchors__group {
		font-size: 11px;
		letter-spacing: 0.12em;
		padding: 0 4px;
	}
	.menu-anchors__group:not(:first-child) {
		margin-left: 4px;
		padding-left: 10px;
	}
}

/* ---------- Cuisine block ---------- */
.cuisine { display: block; }
.cuisine + .cuisine { margin-top: 64px; }

.cuisine__head {
	text-align: center;
	margin: 24px 0 8px;
	padding: 20px 0 16px;
}
.cuisine__title {
	font-family: var(--f-display);
	font-weight: 400;
	font-size: clamp(32px, 4.5vw, 50px);
	color: var(--c-accent);
	letter-spacing: 0.1em;
	margin: 0;
	position: relative;
}

/* ---------- Section ---------- */
.section { margin: 40px 0 24px; scroll-margin-top: 120px; }
.section + .section { margin-top: 56px; }
.section__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin-bottom: 24px;
}
.section__title {
	font-family: var(--f-display);
	font-weight: 400;
	font-size: clamp(22px, 2.8vw, 30px);
	letter-spacing: 0.24em;
	color: var(--c-ink);
	margin: 4px 0 0;
	text-align: center;
}
.section__rule {
	width: min(360px, 80%);
	height: 1px;
	margin-top: 14px;
	background: var(--c-accent);
	position: relative;
}
.section__rule::before,
.section__rule::after {
	content: "";
	position: absolute;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--c-accent);
	top: 50%; transform: translateY(-50%);
}
.section__rule::before { left:  -3px; }
.section__rule::after  { right: -3px; }

/* ---------- Сетка блюд ---------- */
.dishes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 32px 28px;
}

/* ---------- Карточка блюда ---------- */
.dish {
	background: var(--c-paper);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	outline: none;
	box-shadow: 0 1px 3px rgba(60, 30, 20, 0.04);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dish:hover,
.dish:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 18px 38px rgba(60, 30, 20, 0.12), 0 4px 10px rgba(60, 30, 20, 0.05);
}
.dish:focus-visible {
	box-shadow: 0 0 0 2px var(--c-accent), 0 18px 38px rgba(60, 30, 20, 0.12);
}
.dish__photo {
	aspect-ratio: 4 / 3;
	background: #f5efe1;
	overflow: hidden;
	position: relative;
}
.dish__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,0.08));
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.dish:hover .dish__photo::after { opacity: 1; }
.dish__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dish:hover .dish__img { transform: scale(1.06); }
.dish__img--placeholder {
	display: flex; align-items: center; justify-content: center;
	color: var(--c-accent-soft);
	background: #f5efe1;
}
.dish__placeholder-svg { width: 55%; height: 55%; opacity: 0.4; }

.dish__body {
	padding: 18px 22px 20px;
	display: flex; flex-direction: column;
	flex: 1;
	min-height: 0;
}
.dish__name {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: 19px;
	letter-spacing: 0.01em;
	margin: 0 0 10px;
	line-height: 1.3;
	color: var(--c-ink);
}
.dish__desc { display: none; }  /* состав показываем только в лайтбоксе */
.dish__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid rgba(31, 28, 25, 0.06);
}
.dish__weight {
	font-size: 13px;
	color: var(--c-muted);
	letter-spacing: 0.04em;
}
.dish__price {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: 22px;
	color: var(--c-accent);
	white-space: nowrap;
	letter-spacing: 0.01em;
}

/* ---------- Lightbox ---------- */
.dish-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 24px;
	animation: lb-fade 0.25s ease;
}
.dish-lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.dish-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, rgba(38, 22, 16, 0.78), rgba(15, 8, 5, 0.92));
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.dish-lightbox__panel {
	position: relative;
	max-width: 1040px;
	width: 100%;
	max-height: calc(92vh - 80px);  /* запас под ряд стрелок снизу */
	background: var(--c-paper);
	border-radius: 12px;
	box-shadow: 0 40px 100px rgba(0,0,0,0.5);
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	overflow: hidden;
	animation: lb-pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes lb-pop {
	from { transform: translateY(12px) scale(0.96); opacity: 0; }
	to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Закрытие лайтбокса */
.dish-lightbox.is-closing { animation: lb-fade-out 0.22s ease forwards; }
.dish-lightbox.is-closing .dish-lightbox__panel,
.dish-lightbox.is-closing .dish-lightbox__nav-row {
	animation: lb-pop-out 0.22s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes lb-fade-out { to { opacity: 0; } }
@keyframes lb-pop-out {
	to { transform: translateY(10px) scale(0.96); opacity: 0; }
}

/* Переключение между блюдами */
.dish-lightbox__photo,
.dish-lightbox__body {
	will-change: transform, opacity;
}
.dish-lightbox__panel.is-switch-out-next .dish-lightbox__photo,
.dish-lightbox__panel.is-switch-out-next .dish-lightbox__body {
	animation: switch-out-left 0.18s ease-in forwards;
}
.dish-lightbox__panel.is-switch-out-prev .dish-lightbox__photo,
.dish-lightbox__panel.is-switch-out-prev .dish-lightbox__body {
	animation: switch-out-right 0.18s ease-in forwards;
}
.dish-lightbox__panel.is-switch-in-next .dish-lightbox__photo,
.dish-lightbox__panel.is-switch-in-next .dish-lightbox__body {
	animation: switch-in-from-right 0.26s cubic-bezier(0.2, 0.8, 0.3, 1.05);
}
.dish-lightbox__panel.is-switch-in-prev .dish-lightbox__photo,
.dish-lightbox__panel.is-switch-in-prev .dish-lightbox__body {
	animation: switch-in-from-left  0.26s cubic-bezier(0.2, 0.8, 0.3, 1.05);
}
@keyframes switch-out-left  { to { opacity: 0; transform: translateX(-22px); } }
@keyframes switch-out-right { to { opacity: 0; transform: translateX(22px); } }
@keyframes switch-in-from-right {
	from { opacity: 0; transform: translateX(22px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes switch-in-from-left {
	from { opacity: 0; transform: translateX(-22px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* Анимация скрытия фото при сбросе src — без mig блика */
.dish-lightbox__panel.is-switching .dish-lightbox__photo img {
	animation: none;
}

/* Кнопка «Закрыть» — внутри панели, на фото */
.dish-lightbox__close {
	position: absolute;
	top: 16px; right: 16px;
	width: 40px; height: 40px;
	border: 0;
	background: rgba(255,255,255,0.92);
	border-radius: 999px;
	color: var(--c-ink);
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.2);
	z-index: 4;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.dish-lightbox__close:hover {
	background: var(--c-accent);
	color: #fff;
	transform: rotate(90deg);
}

/* Ряд стрелок — снаружи панели, по центру снизу */
.dish-lightbox__nav-row {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 14px;
	flex-shrink: 0;
}
.dish-lightbox__nav {
	width: 48px; height: 48px;
	border: 0;
	background: rgba(255,255,255,0.95);
	border-radius: 999px;
	color: var(--c-ink);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,0.25);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.dish-lightbox__nav:hover {
	background: var(--c-accent);
	color: #fff;
	transform: scale(1.08);
}
.dish-lightbox__nav[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* Фото */
.dish-lightbox__photo {
	background: #f5efe1;
	overflow: hidden;
	position: relative;
}
.dish-lightbox__photo img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	animation: lb-img-in 0.5s ease;
}
@keyframes lb-img-in {
	from { opacity: 0; transform: scale(1.04); }
	to   { opacity: 1; transform: scale(1); }
}
/* Тело */
.dish-lightbox__body {
	padding: 44px 44px 40px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.dish-lightbox__head {
	display: flex; flex-direction: column; gap: 14px;
}
.dish-lightbox__title {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: clamp(28px, 3vw, 38px);
	color: var(--c-ink);
	margin: 0;
	line-height: 1.15;
	letter-spacing: 0.005em;
}
.dish-lightbox__rule {
	display: block;
	width: 56px; height: 2px;
	background: var(--c-accent);
}

.dish-lightbox__desc {
	color: var(--c-ink);
	font-style: italic;
	font-size: 15.5px;
	line-height: 1.65;
	margin: 0;
	opacity: 0.78;
}

/* Мета: «Выход — 250 г», «Цена — 480 ₽» */
.dish-lightbox__meta {
	display: flex;
	flex-direction: column;
	gap: 0;
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
}
.dish-lightbox__meta-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
}
.dish-lightbox__meta-row + .dish-lightbox__meta-row {
	border-top: 1px dashed var(--c-line);
}
.dish-lightbox__meta-label {
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--c-muted);
}
.dish-lightbox__meta-value {
	font-family: var(--f-body);
	font-size: 16px;
	color: var(--c-ink);
}
.dish-lightbox__price {
	font-family: var(--f-display) !important;
	font-weight: 500;
	font-size: 26px !important;
	color: var(--c-accent) !important;
	letter-spacing: 0.01em;
}

/* КБЖУ — элегантная inline-полоса */
.dish-lightbox__kbju {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 4px 0 0;
}
.dish-lightbox__kbju[hidden] { display: none; }
.dish-lightbox__kbju > div {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 4px;
	position: relative;
}
.dish-lightbox__kbju > div + div::before {
	content: "";
	position: absolute;
	left: 0; top: 18%;
	width: 1px; height: 64%;
	background: var(--c-line);
}
.dish-lightbox__kbju > div[hidden] { display: none; }
.dish-lightbox__kbju dt {
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--c-muted);
	margin: 0;
}
.dish-lightbox__kbju dd {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 500;
	font-size: 24px;
	color: var(--c-ink);
	line-height: 1;
}

@media (max-width: 760px) {
	.dish-lightbox { padding: 12px; gap: 12px; }
	.dish-lightbox__panel { grid-template-columns: 1fr; max-height: calc(96vh - 72px); border-radius: 10px; }
	.dish-lightbox__photo { aspect-ratio: 4/3; }
	.dish-lightbox__body  { padding: 28px 24px; gap: 18px; }
	.dish-lightbox__nav { width: 42px; height: 42px; }
	.dish-lightbox__close { width: 36px; height: 36px; top: 12px; right: 12px; }
}

/* ---------- Empty state ---------- */
.menu-empty {
	max-width: 640px;
	margin: 60px auto;
	padding: 32px;
	background: var(--c-paper);
	border: 1px dashed var(--c-line);
	border-radius: 6px;
	text-align: center;
	color: var(--c-muted);
}

/* ---------- Анимация появления карточек при скролле ---------- */
.dish.fade-in-init {
	opacity: 0;
	transform: translateY(14px);
}
.dish.fade-in-on {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.5s ease, transform 0.5s ease;
}


/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--c-line);
	background: var(--c-bg);
	margin-top: 80px;
}
.site-footer__inner {
	max-width: var(--max);
	margin: 0 auto;
	padding: 36px var(--gutter);
	text-align: center;
	color: var(--c-muted);
	font-size: 14px;
}
.site-footer__brand {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: 24px;
	color: var(--c-accent);
	margin: 0 0 8px;
}
.site-footer__brand span {
	display: block;
	font-family: var(--f-body);
	font-size: 11px;
	color: var(--c-muted);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	margin-bottom: 4px;
}
.site-footer__note { max-width: 640px; margin: 12px auto; }
.site-footer__copy { margin-top: 20px; font-size: 12px; opacity: 0.8; }

/* ---------- Простая страница (О нас и т.п.) ---------- */
.page-shell { max-width: 760px; margin: 60px auto; padding: 0 var(--gutter); }
.page-shell__title {
	font-family: var(--f-display);
	font-weight: 400;
	font-size: clamp(36px, 5.5vw, 56px);
	color: var(--c-accent);
	text-align: center;
	margin-bottom: 32px;
}

/* ---------- Респонсив ---------- */
@media (max-width: 700px) {
	.cuisine__head { margin: 14px 0 4px; padding: 12px 0 10px; }
	.cuisine + .cuisine { margin-top: 36px; }
	.section { margin: 26px 0 18px; scroll-margin-top: 80px; }
	.section + .section { margin-top: 38px; }
	.section__head { margin-bottom: 18px; gap: 4px; }
	.section__rule { margin-top: 10px; }
	.dishes {
		grid-template-columns: 1fr 1fr;
		gap: 14px 10px;
	}
	.dish { border-radius: 8px; }
	.dish__body { padding: 12px 12px 14px; min-height: 0; }
	.dish__name { font-size: 14px; line-height: 1.25; margin: 0 0 6px; }
	.dish__leader { width: 22px; height: 4px; margin: 0 0 6px; }
	.dish__desc {
		font-size: 11.5px;
		line-height: 1.4;
		margin: 0 0 10px;
		-webkit-line-clamp: 2;
	}
	.dish__meta { padding-top: 8px; gap: 6px; }
	.dish__weight { font-size: 11px; }
	.dish__price { font-size: 16px; }
	.dish__price-rub { padding-left: 4px; margin-left: 4px; }
	.dish__vignette { width: 14px; height: 14px; right: 6px; bottom: 6px; }
}

