/* =========================================================================
   МИ-ЛЯ — кафе. Тема для MODX Revolution.
   Самостоятельный CSS, без Bootstrap/Tailwind.
   ========================================================================= */

:root {
	--cream: #FFF9E6;
	--cream-dark: #FFF3CC;
	--orange: #F5A000;
	--orange-hover: #E58E00;
	--orange-light: #FFF0C2;
	--text: #252525;
	--text-light: #777777;
	--white: #FFFFFF;
	--border: #F0E5C8;

	--container: 1200px;
	--radius: 8px;
	--shadow: 0 6px 18px rgba(37, 37, 37, .06);
	--shadow-hover: 0 10px 26px rgba(37, 37, 37, .10);
	--font: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--cream);
	-webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

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

a { color: var(--orange-hover); text-decoration: none; }
a:hover { color: var(--orange); }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; color: var(--text); }

p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 200;
	background: var(--text); color: #fff; padding: 8px 16px; border-radius: var(--radius);
}
.skip-link:focus { left: 12px; color: #fff; }

/* ------------------------------------------------------------- Кнопки --- */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1;
	padding: 13px 24px; border-radius: var(--radius); border: 2px solid transparent;
	cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
	text-align: center;
}
.btn--primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn--primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: #fff; }
.btn--outline { background: var(--white); color: var(--orange-hover); border-color: var(--orange); }
.btn--outline:hover { background: var(--orange-light); color: var(--orange-hover); }
.btn--white { background: #fff; color: var(--orange-hover); border-color: #fff; }
.btn--white:hover { background: var(--cream-dark); color: var(--orange-hover); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------- Верхняя панель - */

.topbar {
	background: var(--orange);
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
}
.topbar__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 36px; padding-top: 4px; padding-bottom: 4px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--cream-dark); }
.topbar__group { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; }
.topbar__item svg { width: 15px; height: 15px; }

/* -------------------------------------------------------------- Header -- */

.header {
	position: sticky; top: 0; z-index: 100;
	background: var(--cream);
	border-bottom: 1px solid var(--border);
}
.header__inner {
	display: flex; align-items: center; gap: 24px;
	min-height: 72px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__logo { width: 52px; height: 52px; flex: 0 0 52px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.brand__name em { font-style: normal; color: var(--orange); }
.brand__tagline { font-size: 12px; color: var(--text-light); font-weight: 600; margin-top: 2px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list a {
	display: block; padding: 10px 14px; border-radius: var(--radius);
	color: var(--text); font-weight: 700; font-size: 15px;
}
.nav__list a:hover { background: var(--orange-light); color: var(--orange-hover); }
.nav__list .active a { color: var(--orange-hover); }

.header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
	background: var(--white); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--orange); color: var(--orange-hover); }

.burger {
	display: none; width: 44px; height: 44px; border: 1px solid var(--border);
	border-radius: var(--radius); background: var(--white); cursor: pointer;
	padding: 0; position: relative;
}
.burger span, .burger span::before, .burger span::after {
	content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s;
}
.burger span::before { transform: translate(-50%, -8px); }
.burger span::after { transform: translate(-50%, 6px); }

/* ---------------------------------------------------------------- Hero -- */

.hero { padding: 40px 0 48px; }
.hero__grid {
	display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
	position: relative;
}
.hero__label {
	display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .12em;
	color: var(--orange-hover); text-transform: uppercase; margin-bottom: 14px;
}
.hero__title { font-size: 44px; line-height: 1.08; margin-bottom: 14px; }
.hero__subtitle { font-size: 19px; color: var(--text); margin-bottom: 12px; font-weight: 600; }
.hero__text { color: var(--text-light); font-size: 16px; margin-bottom: 24px; max-width: 46ch; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__media { position: relative; }
.hero__img {
	width: 100%; aspect-ratio: 16 / 12; object-fit: cover;
	border-radius: 16px; box-shadow: var(--shadow);
}
.hero__decor { position: absolute; pointer-events: none; opacity: .5; }
.hero__decor--1 { top: -14px; right: 8%; width: 64px; color: var(--orange); }
.hero__decor--2 { bottom: -10px; left: -8px; width: 52px; color: var(--orange); }

/* ------------------------------------------------------------- Секции --- */

.section { padding: 44px 0; }
.section--tint { background: var(--cream-dark); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.section__title { font-size: 30px; margin-bottom: 8px; }
.section__subtitle { color: var(--text-light); font-size: 16px; margin: 0; }
.section__title--line { position: relative; display: inline-block; padding-bottom: 12px; }
.section__title--line::after {
	content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
	width: 54px; height: 3px; background: var(--orange); border-radius: 3px;
}

/* --------------------------------------------------------- Сетка карт --- */

.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
	background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
	overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-dark); }
.card__img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.card:hover .card__img { transform: scale(1.04); }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1 1 auto; }
.card__title { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--orange-hover); }
.card__desc { color: var(--text-light); font-size: 14px; margin: 0 0 14px; flex: 1 1 auto; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__meta { font-size: 12.5px; color: var(--text-light); }
.card__price { font-size: 18px; font-weight: 800; color: var(--orange); white-space: nowrap; }

/* ------------------------------------------------------- Преимущества --- */

.adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.adv__item { text-align: center; }
.adv__icon {
	width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%;
	background: var(--white); border: 1px solid var(--border);
	display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.adv__icon svg { width: 38px; height: 38px; }
.adv__title { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.adv__text { color: var(--text-light); font-size: 14px; margin: 0; }

/* --------------------------------------------------- Категории меню ---- */

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
	display: flex; align-items: center; gap: 12px; padding: 16px 18px;
	background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
	color: var(--text); font-weight: 700; box-shadow: var(--shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--orange-hover); }
.cat-card__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: 0 0 10px; }
.cat-card small { display: block; color: var(--text-light); font-weight: 600; font-size: 12.5px; }

/* --------------------------------------------------------------- CTA ---- */

.cta { background: var(--orange); }
.cta__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding: 26px 0; min-height: 110px;
}
.cta__title { color: #fff; margin: 0; font-size: 24px; }
.cta__sub { color: #fff; margin: 4px 0 0; font-weight: 600; opacity: .95; }

/* --------------------------------------------------------- Страница ---- */

.page { padding: 40px 0 56px; }
.page__head { text-align: center; margin-bottom: 34px; }
.page__title { font-size: 36px; margin-bottom: 8px; }
.page__subtitle { color: var(--text-light); font-size: 17px; max-width: 640px; margin: 0 auto; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 24px; margin: 1.4em 0 .5em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ------------------------------------------------------- Инфо-блоки ----- */

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0; }
.info-card {
	background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 20px 22px; box-shadow: var(--shadow);
}
.info-card h3 { font-size: 17px; margin: 0 0 6px; color: var(--orange-hover); }
.info-card p { margin: 0; color: var(--text-light); }

/* --------------------------------------------------- Контакты / карта --- */

.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contacts-list { list-style: none; margin: 0 0 20px; padding: 0; }
.contacts-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.contacts-list li:last-child { border-bottom: 0; }
.contacts-list b { min-width: 92px; color: var(--text); }
.map-placeholder {
	position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
	background:
		repeating-linear-gradient(0deg, var(--cream-dark) 0 22px, var(--cream) 22px 24px),
		repeating-linear-gradient(90deg, var(--cream-dark) 0 22px, var(--cream) 22px 24px);
	aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
}
.map-placeholder__pin {
	background: var(--white); border: 1px solid var(--border); border-radius: 40px;
	padding: 10px 18px; font-weight: 700; color: var(--text); box-shadow: var(--shadow);
	display: inline-flex; align-items: center; gap: 8px;
}
.map-placeholder__pin svg { width: 18px; height: 18px; color: var(--orange); }

/* ----------------------------------------------------- Меню (фильтр) ---- */

.menu-filter { position: sticky; top: 72px; z-index: 40; background: var(--cream); padding: 12px 0; border-bottom: 1px solid var(--border); }
.menu-filter__scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.menu-filter__btn {
	flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--border); background: var(--white);
	color: var(--text); font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 40px;
	cursor: pointer; transition: .15s;
}
.menu-filter__btn:hover { border-color: var(--orange); color: var(--orange-hover); }
.menu-filter__btn.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }

.menu-cuisine { margin-top: 34px; }
.menu-cuisine__title {
	font-size: 26px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 2px solid var(--orange);
}
.menu-category { margin: 28px 0; }
.menu-category__title { font-size: 20px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.menu-category__title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.menu-empty { text-align: center; color: var(--text-light); padding: 40px 0; }

/* ------------------------------------------------- Страница блюда ------- */

.crumbs { font-size: 13px; color: var(--text-light); margin-bottom: 18px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #c9bd9c; }
.crumbs a { color: var(--text-light); }
.crumbs a:hover { color: var(--orange-hover); }

.dish { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.dish__media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.dish__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dish__cat { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--orange-hover); margin-bottom: 8px; }
.dish__title { font-size: 32px; margin: 0 0 14px; }
.dish__desc { color: var(--text-light); font-size: 16px; margin-bottom: 20px; }
.dish__meta { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.dish__price { font-size: 30px; font-weight: 800; color: var(--orange); }
.dish__weight { color: var(--text-light); font-weight: 600; }

/* -------------------------------------------------------------- Modal --- */

.modal { position: fixed; inset: 0; z-index: 300; display: none; }
.modal.is-open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(37, 37, 37, .5); }
.modal__dialog {
	position: relative; z-index: 1; width: min(520px, calc(100% - 32px));
	margin: 6vh auto; max-height: 88vh; overflow: auto;
	background: var(--white); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
	padding: 26px 26px 28px;
}
.modal__close {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
	border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 18px; line-height: 1; color: var(--text);
}
.modal__close:hover { border-color: var(--orange); color: var(--orange-hover); }
.modal__title { font-size: 22px; margin: 0 0 4px; }
.modal__subtitle { color: var(--text-light); margin: 0 0 18px; font-size: 14px; }

.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
label.field-label span { color: var(--orange); }
.field {
	width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
	padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--cream);
}
.field:focus { outline: none; border-color: var(--orange); background: #fff; }
textarea.field { min-height: 84px; resize: vertical; }
.field-error { color: #c0392b; font-size: 12.5px; margin-top: 4px; display: none; }
.field.has-error { border-color: #c0392b; }
.form-note { font-size: 12px; color: var(--text-light); margin: 10px 0 0; }
.form-success {
	display: none; text-align: center; padding: 20px 8px;
}
.form-success svg { width: 54px; height: 54px; color: var(--orange); margin: 0 auto 12px; }
.modal.is-success .modal__form { display: none; }
.modal.is-success .form-success { display: block; }

/* ------------------------------------------------------------- Footer --- */

.footer { background: var(--cream); border-top: 3px solid var(--orange); padding: 40px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer__brand .brand { margin-bottom: 12px; }
.footer__contact { list-style: none; margin: 0; padding: 0; color: var(--text-light); font-size: 14px; }
.footer__contact li { margin-bottom: 6px; }
.footer__contact a { color: var(--text-light); }
.footer__contact a:hover { color: var(--orange-hover); }
.footer__col h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 8px; }
.footer__col a { color: var(--text); font-size: 14px; }
.footer__col a:hover { color: var(--orange-hover); }
.footer__bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; color: var(--text-light); font-size: 13px; }

/* ---------------------------------------------------- Мобильное меню ---- */

.mobile-menu { position: fixed; inset: 0; z-index: 200; display: none; }
.mobile-menu.is-open { display: block; }
.mobile-menu__overlay { position: absolute; inset: 0; background: rgba(37,37,37,.5); }
.mobile-menu__panel {
	position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 84%);
	background: var(--cream); box-shadow: -10px 0 30px rgba(0,0,0,.15);
	padding: 20px; overflow-y: auto; transform: translateX(100%); transition: transform .22s ease;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-menu__list { list-style: none; margin: 0 0 20px; padding: 0; }
.mobile-menu__list a { display: block; padding: 12px 8px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--text); }
.mobile-menu__list a:hover { color: var(--orange-hover); }

/* ----------------------------------------------------------- Адаптив ---- */

@media (max-width: 1024px) {
	.hero__title { font-size: 36px; }
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
	.adv { grid-template-columns: repeat(2, 1fr); }
	.cats { grid-template-columns: repeat(2, 1fr); }
	.nav { display: none; }
	.burger { display: inline-block; }
	.header__actions .btn { display: none; }
}

@media (max-width: 768px) {
	.hero { padding: 26px 0 34px; }
	.hero__grid { grid-template-columns: 1fr; gap: 26px; }
	.hero__media { order: -1; }
	.hero__title { font-size: 32px; }
	.dish { grid-template-columns: 1fr; gap: 24px; }
	.contacts-grid { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__brand { grid-column: 1 / -1; }
	.cta__inner { flex-direction: column; text-align: center; align-items: center; }
	.info-grid { grid-template-columns: 1fr; }
	.topbar__group--addr { display: none; }
	.menu-filter { top: 64px; }
}

@media (max-width: 480px) {
	.grid--4, .grid--3 { grid-template-columns: 1fr; }
	.adv { grid-template-columns: 1fr; }
	.cats { grid-template-columns: 1fr; }
	.form-grid { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr; }
	.hero__title { font-size: 28px; }
	.section__title, .page__title { font-size: 26px; }
	.topbar { font-size: 12.5px; }
	.topbar__item--clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}
