/* =========================================================================
   Тема «Московская икона»: переменные, база, компоненты, разделы, печать.
   ========================================================================= */

:root {
	--kumach: #b51f24;
	--kumach-2: #971519;
	--kumach-3: #c9343a;
	--kumach-soft: #f6e4e1;
	--flame: #f2b544;
	--room: #150e0b;
	--oak: #211610;
	--oak-2: #2c1d15;
	--oak-niche: #24170f;
	--linen: #f3efe7;
	--paper: #ffffff;
	--ink: #1d1613;
	--ink-2: #574a42;
	--ink-3: #6f625a;
	--rule: #e6dfd7;
	--on-dark: #f4eee7;
	--on-dark-2: #cdbdae;
	--on-red: #ffffff;
	--on-red-2: #fbe3df;

	--f-display: "Old Standard TT", "PT Serif", Georgia, "Times New Roman", serif;
	--f-text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--step: clamp(64px, 9vw, 120px);
	--shelf-h: clamp(180px, 21vw, 250px);
	--row-h: clamp(170px, 20vw, 270px);
	--ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- База ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
	scrollbar-color: #9c8a7d #f1ebe4;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.125rem/1.62 var(--f-text);
	font-feature-settings: "kern", "liga";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

@media (min-width: 1100px) {
	body { font-size: 1.1875rem; }
}

img, svg, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select { caret-color: var(--kumach); }

a {
	color: var(--kumach);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	transition: color .2s, text-decoration-thickness .2s;
}
a:hover { color: var(--kumach-2); text-decoration-thickness: 2px; }

::selection { background: var(--kumach); color: #fff; }

:focus-visible {
	outline: 3px solid var(--kumach-3);
	outline-offset: 3px;
	border-radius: 2px;
}

::-webkit-scrollbar { width: 12px; height: 10px; }
::-webkit-scrollbar-track { background: #f1ebe4; }
::-webkit-scrollbar-thumb { background: #9c8a7d; border: 3px solid #f1ebe4; border-radius: 2px; }

.i { width: 1.25em; height: 1.25em; flex: none; }

.sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.skip {
	position: absolute; left: 12px; top: -100px; z-index: 100;
	background: var(--kumach); color: #fff; padding: 12px 18px; text-decoration: none;
}
.skip:focus { top: 12px; }

.muted { color: var(--ink-3); }
.small { font-size: .95rem; }
.empty { color: var(--ink-2); font-size: 1.1rem; }

/* ---------- Типографика ---------- */

h1, h2, h3, h4 { margin: 0 0 .5em; color: inherit; }

h1, h2 {
	font-family: var(--f-display);
	font-weight: 700;
	letter-spacing: -.012em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 1.45rem + 3.4vw, 4.5rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 1.35rem + 1.9vw, 3rem); line-height: 1.08; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; }
b, strong { font-weight: 600; }

/* ---------- Раскладка ---------- */

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--text { max-width: 780px; }

.section { padding-block: var(--step); }
.section--tight { padding-block: calc(var(--step) * .5); }
.section__head { max-width: 780px; margin-bottom: clamp(28px, 4vw, 52px); }
.section__title { margin-bottom: .4em; }
.section__title .archive__count { vertical-align: .35em; }
.section__lead { font-size: clamp(1.1rem, 1rem + .3vw, 1.25rem); color: var(--ink-2); max-width: 62ch; margin: 0; }
.section__head--light .section__lead { color: var(--on-dark-2); }

/* ---------- Кнопки и ссылки ---------- */

.btn {
	--stitch: rgba(255, 255, 255, .55);
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: .6em;
	min-height: 54px; padding: .85em 1.55em;
	border: 0; border-radius: 2px;
	font: 600 1.0625rem/1.2 var(--f-text);
	text-decoration: none; text-align: center;
	cursor: pointer;
	transition: background-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), color .2s;
}
/* Строчка «вперёд иголку» по краю — кнопка как кусок кумача */
.btn::after {
	content: ""; position: absolute; inset: 5px;
	border: 1.5px dashed var(--stitch); border-radius: 1px;
	pointer-events: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--red { background: var(--kumach); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 10px 22px -12px rgba(20, 10, 6, .6); }
.btn--red:hover { background: var(--kumach-2); color: #fff; }
.btn--big { min-height: 62px; font-size: 1.125rem; padding-inline: 1.9em; }
.btn--small { min-height: 46px; font-size: 1rem; padding: .6em 1.15em; }
.btn--small::after { inset: 4px; }
.btn--light { --stitch: rgba(181, 31, 36, .45); background: #fff; color: var(--kumach); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); }
.btn--light:hover { background: #fff5f3; color: var(--kumach-2); }
.btn--ghost { --stitch: transparent; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--ghost-light { --stitch: transparent; background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 2px rgba(244, 238, 231, .6); }
.btn--ghost-light:hover { background: var(--on-dark); color: var(--oak); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.link-arrow {
	display: inline-flex; align-items: center; gap: .45em;
	font-weight: 600; text-decoration: none;
}
.link-arrow .i { transition: transform .3s var(--ease); }
.link-arrow:hover .i { transform: translateX(4px); }

.phone { font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.phone--big { font-size: 1.3rem; }
.phone--line { color: var(--ink); font-size: 1.15rem; }
.phone--line:hover { color: var(--kumach); }

.cta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 2em 0; }

/* ---------- Шапка: тёмная божница ---------- */

.head {
	position: relative; z-index: 40;
	background: var(--oak);
	color: var(--on-dark);
}
body:not(.is-home) .head::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
	background: url(../img/band-hem.svg) repeat-x 0 50% / auto 8px;
	pointer-events: none;
}
.head__bar { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); min-height: 78px; }

.topbar { background: #170f0b; color: var(--on-dark-2); font-size: .92rem; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.topbar__in { display: flex; justify-content: flex-end; align-items: center; gap: 8px 28px; min-height: 38px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar__item .i { width: 1.05em; height: 1.05em; color: var(--kumach-3); }
.topbar__phones { gap: 18px; }
.topbar .phone { color: #fff; }
.topbar .phone:hover { color: var(--flame); }

.brand { display: inline-flex; flex-direction: column; gap: 5px; color: #ead8c0; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand__mark {
	display: block; width: clamp(190px, 17vw, 250px); aspect-ratio: 325 / 26;
	background: currentColor;
	-webkit-mask: url(../img/wordmark.svg) no-repeat center / contain;
	mask: url(../img/wordmark.svg) no-repeat center / contain;
}
.brand__sub { font-size: .88rem; letter-spacing: .02em; color: var(--on-dark-2); line-height: 1; }
@media (max-width: 360px) {
	/* 320 px: знак и кнопка «Меню» помещаются в строку */
	.brand__mark { width: 160px; }
	.head__bar { gap: 12px; }
}

.nav { display: flex; align-items: center; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__list > li { position: relative; }
.nav__list a { color: var(--on-dark); text-decoration: none; }
.nav__list > li > a { display: block; padding: 12px 10px; font-size: 1rem; font-weight: 500; border-radius: 2px; white-space: nowrap; }
.nav__list > li > a:hover,
.nav__list > li.current-menu-item > a,
.nav__list > li.current-menu-ancestor > a { color: #fff; background: rgba(255, 255, 255, .06); }
.nav__list > li.menu-item-has-children > a::after {
	content: ""; display: inline-block; width: .42em; height: .42em; margin-left: .5em;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-.2em) rotate(45deg); opacity: .7;
}
.nav .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 50;
	min-width: 290px; margin: 0; padding: 10px 0; list-style: none;
	background: var(--oak-2); border: 1px solid rgba(244, 238, 231, .1);
	box-shadow: 0 24px 48px -18px rgba(0, 0, 0, .7);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { display: block; padding: 10px 20px; font-size: 1rem; }
.nav .sub-menu a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav__contacts { display: none; }

.head__cta { display: flex; align-items: center; gap: 18px; flex: none; }
.head__phone { color: var(--on-dark); font-size: 1.05rem; }
.head__phone:hover { color: #fff; }

.topbar__item:first-child { margin-right: auto; }
@media (max-width: 1180px) {
	.topbar { display: none; }
}

.burger {
	display: none; align-items: center; gap: 8px;
	margin-left: auto; padding: 10px 12px; min-height: 48px;
	background: transparent; border: 1px solid rgba(244, 238, 231, .3); border-radius: 2px;
	color: var(--on-dark); cursor: pointer;
}
.burger__close { display: none; }
.menu-open .burger__open { display: none; }
.menu-open .burger__close { display: block; }

@media (max-width: 1180px) {
	.burger { display: inline-flex; }
	.head__cta { display: none; }
	.nav {
		position: fixed; inset: 78px 0 0 0; z-index: 45;
		display: flex; flex-direction: column; align-items: stretch;
		margin: 0; padding: 16px var(--gutter) 120px;
		background: var(--oak); overflow-y: auto;
		visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
		transition: opacity .25s, transform .3s var(--ease), visibility .25s;
	}
	.menu-open .nav { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
	.menu-open { overflow: hidden; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__list > li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
	.nav__list > li > a { padding: 16px 4px; font-size: 1.2rem; }
	.nav__list > li.menu-item-has-children > a::after { display: none; }
	.nav .sub-menu {
		position: static; opacity: 1; visibility: inherit; transform: none;
		min-width: 0; padding: 0 0 12px 12px; border: 0; box-shadow: none; background: transparent;
	}
	.nav .sub-menu a { padding: 9px 4px; color: var(--on-dark-2); font-size: 1.05rem; }
	.nav__contacts { display: grid; gap: 6px; padding-top: 24px; }
	.nav__contacts .phone { color: #fff; }
	.nav__hours { color: var(--on-dark-2); font-size: .95rem; margin: 0; }
}

/* ---------- Хлебные крошки ---------- */

.crumbs { margin-bottom: clamp(18px, 2.5vw, 28px); font-size: .95rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin: 0 .55em; color: #c3b7ad; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--kumach); text-decoration: underline; }

/* ---------- Зоны нажатия: мелкие ссылки получают невидимое поле до ~44 px, раскладка не меняется ---------- */

.brand, .crumbs a, .link-arrow, .shelf__more, .kinds__more a, .map__open,
.phone--hero, .phone--line, .phone--big, .obrazy__t a { position: relative; }
.brand::after, .crumbs a::after, .link-arrow::after, .shelf__more::after, .kinds__more a::after, .map__open::after,
.phone--hero::after, .phone--line::after, .phone--big::after, .obrazy__t a::after {
	content: ""; position: absolute; inset: -8px -4px;
}
.brand--foot::after { inset: -14px -4px; }
@media (max-width: 900px), (pointer: coarse) {
	/* подвал и указатель имён: строки не ниже 40 px на касание */
	.foot__menu { gap: 0; }
	.foot__menu a { display: block; padding-block: 10px; }
	.names a { display: inline-block; padding: 8px 6px; margin-inline: -6px; }
	.names li { line-height: 1.35; }
}
.chips--wrap { flex-wrap: wrap; overflow: visible; margin-top: 20px; }

/* =========================================================================
   Красный угол
   ========================================================================= */

.corner {
	--band-h: clamp(58px, 6.2vw, 80px);
	--pad-b: clamp(64px, 6vw, 84px);
	--corner-max: 540px;
	--icon-max-h: 9999px;
	position: relative;
	display: flex; flex-direction: column; align-items: center;
	/* икона занимает 62% ширины угла: ширину считаем так, чтобы высота иконы не превысила --icon-max-h */
	width: min(100%, var(--corner-max), calc(var(--icon-max-h) * var(--ar, .75) / .62));
	margin: 0 auto;
	padding-bottom: var(--pad-b);
}
.corner--hero { --icon-max-h: clamp(300px, 100svh - 380px, 640px); }
.corner--page { --icon-max-h: clamp(280px, 100svh - 460px, 560px); }

/* Рушник: полотно поверх иконы и два конца по сторонам */
.corner__towel { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.corner__band {
	position: relative; z-index: 2;
	width: 88%; margin-inline: auto;
	height: var(--band-h);
	display: grid; place-items: center;
	background: url(../img/linen.webp) 0 0 / 256px 256px, var(--linen);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 22px -14px rgba(0, 0, 0, .75);
	border-radius: 1px;
}
.corner__band .stitch { height: calc(var(--band-h) * .66); width: auto; max-width: 90%; }
.corner__band--ornament {
	background:
		url(../img/band-romb.svg) repeat-x 50% 50% / auto 62%,
		url(../img/linen.webp) 0 0 / 256px 256px,
		var(--linen);
}
.corner__end {
	position: absolute; z-index: 3;
	top: calc(var(--band-h) - 6px); bottom: 34px;
	width: 9.5%;
	background:
		linear-gradient(90deg, rgba(70, 45, 30, .08) 0, rgba(255, 255, 255, 0) 22%, rgba(70, 45, 30, .05) 52%, rgba(255, 255, 255, 0) 60%, rgba(70, 45, 30, .10) 100%),
		url(../img/band-romb.svg) repeat-x 50% calc(100% - 26px) / auto 34px,
		url(../img/band-zigzag.svg) repeat-x 50% calc(100% - 68px) / auto 15px,
		url(../img/linen.webp) 0 0 / 256px 256px,
		var(--linen);
	outline: 1.5px dashed rgba(181, 31, 36, .45);
	outline-offset: -5px;
	box-shadow: 0 16px 20px -14px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .12);
}
/* бахрома */
.corner__end::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -19px; height: 20px;
	background: url(../img/fringe.webp) repeat-x 50% 0 / 128px 20px;
}
.corner__end--l { left: 12.5%; }
.corner__end--r { right: 12.5%; }

.corner__icon {
	position: relative; z-index: 2;
	width: 62%;
	margin-top: calc(var(--band-h) + clamp(8px, 1.2vw, 16px));
	filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55));
}
.corner__icon img { width: 100%; height: auto; border-radius: 2px; }
.corner__icon::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
	background: radial-gradient(58% 72% at 50% 100%, rgba(255, 196, 120, .34), rgba(255, 170, 90, .1) 55%, transparent 78%);
	mix-blend-mode: soft-light;
	pointer-events: none;
	animation: glow 3.4s ease-in-out infinite;
}
.corner__link { display: block; }
.corner__icon img { transition: opacity .45s var(--ease); }
.corner__icon.is-swapping img { opacity: 0; }

/* Божница — дубовая полка, на которой стоит икона */
.corner__shelf {
	position: relative; z-index: 4;
	width: 84%; height: 20px; margin-top: -3px;
	background: url(../img/oak-shelf.webp) repeat-x 0 50% / 512px 100%, var(--oak-niche);
	border-radius: 2px 2px 3px 3px;
	box-shadow: 0 18px 26px -12px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 214, 170, .22), inset 0 -2px 3px rgba(0, 0, 0, .45);
}
.corner__shelf::after {
	/* кронштейн под полкой — тот же дуб в тени */
	content: ""; position: absolute; left: 50%; top: 100%;
	width: 26%; height: 22px; transform: translateX(-50%);
	background: linear-gradient(rgba(0, 0, 0, .45), rgba(0, 0, 0, .7)), url(../img/oak-shelf.webp) 30% 0 / 512px 44px, #1a110c;
	clip-path: polygon(0 0, 100% 0, 60% 100%, 40% 100%);
}

/* Лампада: рубиновое стекло на ножке стоит на божнице перед иконой */
.corner__lampada {
	--glass-w: clamp(36px, 3.4vw, 48px);
	position: absolute; z-index: 5; left: 50%;
	bottom: calc(var(--pad-b) + 17px);
	transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center;
	pointer-events: none;
}
.corner__lampada::after {
	/* тень основания на полке */
	content: ""; width: 78%; height: 5px; margin-top: -4px;
	background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
}
.corner__glass {
	position: relative; display: block;
	width: var(--glass-w); aspect-ratio: 48 / 68;
	background: url(../img/lampada.webp) 50% 100% / contain no-repeat;
}
/* стекло светится изнутри и мерцает вместе с огоньком */
.corner__glass::before {
	content: ""; position: absolute; z-index: 1; left: 12%; right: 12%; top: 11%; height: 36%;
	background: radial-gradient(48% 60% at 50% 30%, rgba(255, 180, 100, .85), rgba(255, 100, 55, .3) 55%, transparent 80%);
	mix-blend-mode: screen;
	pointer-events: none;
	animation: glow 3.4s ease-in-out infinite;
}
/* передняя стенка стакана поверх огонька: низ пламени виден сквозь рубиновое стекло */
.corner__glass::after {
	content: ""; position: absolute; z-index: 3; inset: 0;
	background: url(../img/lampada-front.webp) 50% 100% / contain no-repeat;
	pointer-events: none;
}
.corner__flame {
	position: absolute; z-index: 2; left: 50%; bottom: 81.5%;
	width: 11px; height: 20px; margin-left: -5.5px;
	background: radial-gradient(ellipse at 50% 70%, #fff6d8 0, #ffd36b 35%, var(--flame) 60%, rgba(242, 110, 40, 0) 75%);
	border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
	filter: blur(.3px);
	transform-origin: 50% 90%;
	animation: flicker 3.4s ease-in-out infinite;
}
.corner__flame::after {
	content: ""; position: absolute; left: 50%; top: 50%;
	width: clamp(220px, 26vw, 360px); aspect-ratio: 1;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(242, 181, 68, .22), rgba(242, 181, 68, .06) 38%, transparent 66%);
	border-radius: 50%;
	pointer-events: none;
	animation: glow 3.4s ease-in-out infinite;
}
@keyframes flicker {
	0%, 100% { transform: scale(1, 1) rotate(0deg); }
	22% { transform: scale(.94, 1.05) rotate(-2deg); }
	47% { transform: scale(1.04, .95) rotate(1.5deg); }
	71% { transform: scale(.97, 1.03) rotate(-1deg); }
}
@keyframes glow {
	0%, 100% { opacity: 1; }
	47% { opacity: .82; }
	71% { opacity: .92; }
}

.corner__cap {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
	display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px;
	font-size: .92rem; color: var(--on-dark-2); text-align: center;
}
.corner__cap .work__title { color: var(--on-dark); font-weight: 600; }
@media (max-width: 480px) {
	.corner__cap { left: -25%; right: -25%; bottom: -6px; }
}
.corner__cap .work__facts, .corner__cap .work__n { color: var(--on-dark-2); }

/* Вышивка крестом */
.stitch path { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.stitch__under { stroke: var(--kumach); }
.stitch__over { stroke: var(--kumach-3); }
.stitch .x { stroke-dasharray: 11; stroke-dashoffset: 11; animation: sew .28s var(--ease) forwards; }
@keyframes sew { to { stroke-dashoffset: 0; } }

/* =========================================================================
   Главная: первый экран — вечер в комнате, горит лампада
   ========================================================================= */

.hero {
	--seam: 29%;
	position: relative; overflow: hidden;
	background: var(--oak-niche);
	color: var(--on-dark);
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(38% 52% at var(--seam) 62%, rgba(242, 181, 68, .11), transparent 72%),
		linear-gradient(90deg, rgba(0, 0, 0, .06) 0, rgba(0, 0, 0, 0) calc(var(--seam) - .1%), rgba(0, 0, 0, .16) var(--seam), rgba(0, 0, 0, .05) 58%),
		radial-gradient(115% 95% at var(--seam) 58%, transparent 42%, rgba(12, 7, 5, .72) 100%),
		url(../img/oak-panel.webp) 0 0 / 256px 256px,
		var(--oak-niche);
}
.hero::after {
	/* подгибка рушника по нижнему краю первого экрана */
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
	background: url(../img/band-hem.svg) repeat-x 0 50% / auto 8px;
	opacity: .9;
}
.hero__inner {
	position: relative;
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(28px, 4.5vw, 72px);
	align-items: start;
	min-height: min(90vh, 880px);
	padding-block: clamp(28px, 4vw, 56px) clamp(48px, 6vw, 88px);
}
.hero__title { color: #fff; margin-bottom: .32em; font-size: clamp(2.35rem, 1.3rem + 2.9vw, 4rem); }
.hero__lead { font-size: clamp(1.12rem, 1rem + .3vw, 1.2rem); color: var(--on-dark-2); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 24px 0 14px; }
.phone--hero { color: #fff; font-size: 1.4rem; }
.phone--hero:hover { color: var(--flame); }
.hero__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 0; padding: 0; list-style: none; font-size: 1.05rem; font-weight: 500; color: var(--on-dark); }
.hero__facts li { display: inline-flex; align-items: center; }
.hero__facts li + li::before {
	content: ""; flex: none; width: 9px; height: 9px; margin: 0 .85em;
	background:
		linear-gradient(45deg, transparent 40%, var(--kumach-3) 40% 60%, transparent 60%),
		linear-gradient(-45deg, transparent 40%, #e0575c 40% 60%, transparent 60%);
}
.hero :focus-visible { outline-color: var(--flame); }

.namefind { margin-top: clamp(20px, 1.8vw, 26px); padding-top: clamp(16px, 1.5vw, 22px); border-top: 1px solid rgba(244, 238, 231, .14); max-width: 480px; }
.namefind__label { display: block; font-family: var(--f-display); font-size: clamp(1.45rem, 1.2rem + .8vw, 1.9rem); font-weight: 700; color: #fff; margin-bottom: 10px; }
.namefind__row { display: flex; }
.namefind__input {
	flex: 1; min-width: 0; min-height: 58px; padding: 0 18px;
	background: rgba(244, 238, 231, .06); color: #fff;
	border: 1px solid rgba(244, 238, 231, .32); border-right: 0; border-radius: 2px 0 0 2px;
	font-size: 1.15rem;
}
.namefind__input::placeholder { color: #a8978a; }
.namefind__input:focus { outline: none; border-color: var(--flame); background: rgba(244, 238, 231, .1); }
.namefind__go { width: 60px; border: 0; border-radius: 0 2px 2px 0; background: var(--kumach); color: #fff; cursor: pointer; display: grid; place-items: center; }
.namefind__go:hover { background: var(--kumach-2); }
.namefind__out { margin: 12px 0 0; min-height: 3.2em; color: var(--on-dark-2); font-size: 1rem; }
.namefind__out a { color: #fff; font-weight: 600; }

.namefind__thumb { display: none; }
@media (max-width: 900px) {
	.hero { --seam: 50%; }
	/* по брифу: угол сверху примерно на 55% высоты экрана, под ним H1 и кнопка — всё в первом экране */
	.hero__inner { grid-template-columns: minmax(0, 1fr); row-gap: 0; min-height: 0; padding-top: 16px; }
	.hero__offer { display: contents; }
	.hero__corner { order: -3; max-width: 440px; width: 100%; margin: 0 auto 18px; }
	.hero .corner--hero { --icon-max-h: clamp(200px, 55svh - 150px, 460px); }
	.hero__title { order: -2; margin-bottom: 14px; }
	.hero__actions { order: -1; margin: 0 0 24px; }
	.hero__lead { max-width: none; }
	/* угол выше поля ввода и на телефоне не виден — показываем найденную икону рядом с ответом */
	.namefind__out.has-thumb { display: flex; align-items: center; gap: 14px; }
	.namefind__thumb { display: block; flex: none; width: 52px; height: 68px; object-fit: cover; object-position: 50% 12%; border-radius: 2px; box-shadow: 0 0 0 1px rgba(244, 238, 231, .25); }
}

/* =========================================================================
   Полки и работы
   ========================================================================= */

/* Полка: иконы разной ширины стоят на одной дубовой доске */
.shelf { position: relative; }
.shelf__row,
.kinds__row {
	--ledge: 16px;
	display: flex; align-items: flex-start; gap: clamp(18px, 2.4vw, 36px);
	margin: 0; padding: 0 var(--gutter) 8px;
	list-style: none;
	overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
	scroll-padding-inline: var(--gutter);
	background:
		linear-gradient(180deg, transparent var(--shelf-h), #4a3222 var(--shelf-h), #2a1b13 calc(var(--shelf-h) + var(--ledge)), transparent calc(var(--shelf-h) + var(--ledge))) local,
		linear-gradient(180deg, transparent calc(var(--shelf-h) + var(--ledge)), rgba(0, 0, 0, .12) calc(var(--shelf-h) + var(--ledge)), transparent calc(var(--shelf-h) + var(--ledge) + 14px)) local;
}
@media (min-width: 1320px) {
	.shelf__row, .kinds__row {
		padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
		scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
	}
}
.shelf__ledge { display: none; }
.shelf__more { display: inline-flex; align-items: center; gap: .45em; margin: 20px var(--gutter) 0; font-weight: 600; text-decoration: none; }
@media (min-width: 1320px) { .shelf__more { margin-left: calc((100vw - var(--wrap)) / 2); } }

.shelf .work { flex: none; scroll-snap-align: start; width: max(150px, calc(var(--shelf-h) * var(--ar))); }
.shelf .work__link { display: block; text-decoration: none; color: inherit; }
.shelf .work img {
	height: var(--shelf-h); width: auto; max-width: none; margin: 0 auto;
	object-fit: contain; object-position: 50% 100%;
	filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .28));
	transition: transform .35s var(--ease);
}
.shelf .work__link:hover img { transform: translateY(-4px); }
.shelf .work figcaption { margin-top: calc(var(--ledge, 16px) + 14px); }

.work figcaption { display: grid; gap: 2px; font-size: .95rem; line-height: 1.35; }
.work__title { font-weight: 600; color: var(--ink); }
.work__facts { color: var(--ink-2); }
.work__n { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.work__link:hover .work__title { color: var(--kumach); }

/* Галерея: ряды одной высоты, ширина — по пропорциям иконы */
.gallery { display: flex; flex-wrap: wrap; gap: clamp(14px, 1.8vw, 24px) clamp(10px, 1.4vw, 18px); }
.gallery .work { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row-h)); min-width: 150px; }
.gallery .work__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.gallery .work__facts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery .work__link { display: block; text-decoration: none; color: inherit; }
.gallery .work img {
	width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover;
	background: #efe9e2; border-radius: 2px;
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gallery .work__link:hover img { transform: translateY(-3px); box-shadow: 0 16px 28px -18px rgba(0, 0, 0, .6); }
.gallery .work figcaption { padding-top: 10px; }
.gallery__fill { flex: 1000000 1 0; }
@media (max-width: 560px) {
	.gallery { --row-h: 150px; }
	.gallery .work { min-width: 120px; }
	.gallery .work figcaption .work__facts { display: none; }
}

/* =========================================================================
   Разделы главной
   ========================================================================= */

.kinds { padding-bottom: calc(var(--step) * .8); }
.kind { flex: none; scroll-snap-align: start; }
.kind__link { display: grid; gap: 2px; width: max(150px, calc(var(--shelf-h) * .72)); text-decoration: none; color: var(--ink); }
.kind__img { display: flex; align-items: flex-end; justify-content: center; height: var(--shelf-h); }
.kind__img img { max-height: 100%; width: auto; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .3)); transition: transform .35s var(--ease); }
.kind__link:hover .kind__img img { transform: translateY(-5px); }
.kind__title { margin-top: 30px; font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; line-height: 1.15; }
.kind__link:hover .kind__title { color: var(--kumach); }
.kind__sub { color: var(--ink-2); font-size: .98rem; }
.kind__price { margin-top: 4px; color: var(--kumach); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 1280px) {
	.kinds__row { justify-content: space-between; gap: 20px; overflow-x: visible; }
	.kind__link { width: 150px; }
}
.kinds__more { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule); }
.kinds__more a { font-weight: 500; text-decoration-color: rgba(181, 31, 36, .35); }

/* Как заказать */
.how { background: var(--paper); padding-top: 0; }
.how__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.how__intro { position: sticky; top: 32px; }
.how__intro .btn { margin-top: 28px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps__item {
	position: relative; display: grid; grid-template-columns: 64px 1fr; column-gap: 20px;
	padding-bottom: 30px;
}
.steps__item:not(:last-child)::before {
	content: ""; position: absolute; left: 31px; top: 58px; bottom: 6px;
	border-left: 2px dashed rgba(181, 31, 36, .45);
}
.steps__n {
	grid-row: span 2;
	display: grid; place-items: center;
	width: 64px; height: 64px;
	font: 700 1.9rem/1 var(--f-display); color: var(--kumach);
	border: 2px solid var(--kumach); border-radius: 50%;
	background: #fff;
}
.steps__t { margin: 12px 0 4px; font-size: 1.3rem; }
.steps__item p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) {
	.how__grid { grid-template-columns: 1fr; }
	.how__intro { position: static; }
	.steps__item { grid-template-columns: 52px 1fr; column-gap: 16px; }
	.steps__n { width: 52px; height: 52px; font-size: 1.55rem; }
	.steps__item:not(:last-child)::before { left: 25px; top: 50px; }
}

/* Именная икона по имени — кумачовое поле рушника */
.names-home { position: relative; background: var(--kumach); color: var(--on-red); padding-top: calc(var(--step) + 30px); }
.names-home__band,
.lead__band {
	position: absolute; left: 0; right: 0; top: 0; height: 44px;
	background: url(../img/band-romb-light.svg) repeat-x 50% 50% / auto 44px;
	opacity: .9;
}
.names-home .section__title { color: #fff; }
.names-home .section__lead { color: var(--on-red-2); }
.names-home :focus-visible { outline-color: #fff; }

.names { columns: 150px auto; column-gap: clamp(16px, 3vw, 48px); }
.names__group { break-inside: avoid; display: grid; grid-template-columns: 2.1rem 1fr; margin-bottom: 18px; }
.names__letter { font: 700 1.6rem/1.1 var(--f-display); color: var(--kumach); }
.names__letter .stitch { display: block; width: auto; height: 1.95rem; margin-top: -.12rem; }
.names__letter .stitch path { stroke-width: 3.4; }
.names ul { list-style: none; margin: 0; padding: 0; }
.names li { line-height: 1.55; }
.names a { color: var(--ink); text-decoration: none; }
.names a:hover { color: var(--kumach); text-decoration: underline; }
.names--light .names__letter { color: rgba(255, 255, 255, .55); }
.names--light .names__letter .stitch__under { stroke: #f7e3df; }
.names--light .names__letter .stitch__over { stroke: #fff; }
.names--light a { color: #fff; }
.names--light a:hover { color: #fff; text-decoration-color: rgba(255, 255, 255, .6); }
.names-home__more { margin-top: 28px; }
.names-home__more a { color: #fff; font-weight: 600; }

/* Иконописцы */
.masters__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.masters__photo img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .55); }
.masters__photo figcaption { margin-top: 10px; font-size: .95rem; color: var(--ink-3); }
.masters__facts { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 12px; }
.masters__facts li,
.clients li,
.entry__body :is(ul:not([class]), ul.wp-block-list) > li {
	position: relative; padding-left: 28px;
}
.masters__facts li::before,
.clients li::before,
.entry__body :is(ul:not([class]), ul.wp-block-list) > li::before {
	content: ""; position: absolute; left: 2px; top: .45em;
	width: 12px; height: 12px;
	background:
		linear-gradient(45deg, transparent 43%, var(--kumach) 43% 57%, transparent 57%),
		linear-gradient(-45deg, transparent 43%, var(--kumach-3) 43% 57%, transparent 57%);
}
@media (max-width: 900px) {
	.masters__grid { grid-template-columns: 1fr; }
}

/* Стена работ на дубе */
.wall { background: var(--oak); color: var(--on-dark); }
.wall .section__title { color: #fff; }
.wall .work__title { color: var(--on-dark); }
.wall .work__facts { color: var(--on-dark-2); }
.wall .work__n { color: #a8978a; }
.wall .gallery .work img { background: var(--oak-2); }
.wall .work__link:hover .work__title { color: #fff; }
.wall :focus-visible { outline-color: var(--flame); }
.wall__more { margin: clamp(32px, 4vw, 48px) 0 0; }

/* Цены */
.prices-home__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.prices-home .link-arrow { margin-top: 24px; }
.prices { display: grid; gap: 28px; }
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table caption { text-align: left; font: 700 1.4rem/1.2 var(--f-display); padding-bottom: 12px; }
.price-table thead th { font-size: .9rem; font-weight: 500; color: var(--ink-3); text-align: left; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.price-table thead th:last-child { text-align: right; }
.price-table tbody th { text-align: left; font-weight: 500; padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); }
.price-table tbody th small { display: block; font-size: .88rem; color: var(--ink-3); font-weight: 400; }
.price-table td { text-align: right; white-space: nowrap; font-weight: 600; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.prices__note { margin-top: 18px; color: var(--ink-2); font-size: 1rem; max-width: 70ch; }
@media (max-width: 900px) {
	.prices-home__grid { grid-template-columns: 1fr; }
}

/* Отзывы */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(28px, 4vw, 56px) clamp(28px, 5vw, 72px); margin-bottom: 36px; }
.review { margin: 0; padding-top: 22px; background: url(../img/band-hem.svg) repeat-x 0 0 / auto 7px; }
.review p { font-family: var(--f-display); font-size: clamp(1.2rem, 1.05rem + .45vw, 1.45rem); line-height: 1.45; margin-bottom: .7em; }
.review footer { font-weight: 600; color: var(--ink); }
.review footer span { display: block; font-weight: 400; color: var(--ink-3); font-size: .95rem; }

/* Выставочный зал */
.visit { background: #f7f4f0; }
.visit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: stretch; }
.contacts__list { display: grid; gap: 18px; margin: 28px 0 20px; }
.contacts__list > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.contacts__list dt { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.contacts__list dt .i { color: var(--kumach); }
.contacts__list dd { margin: 0; }
.contacts__list .phone { color: var(--ink); font-size: 1.15rem; }
.contacts__list .phone:hover { color: var(--kumach); }
.contacts__route { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 900px) {
	.visit__grid { grid-template-columns: 1fr; }
	.contacts__list > div { grid-template-columns: 1fr; gap: 2px; }
}

.map {
	position: relative; min-height: 360px;
	display: grid; place-items: center; padding: 28px 20px;
	background:
		radial-gradient(55% 50% at 50% 46%, rgba(242, 181, 68, .1), transparent 72%),
		radial-gradient(120% 100% at 50% 50%, transparent 40%, rgba(12, 7, 5, .7) 100%),
		url(../img/oak-panel.webp) 0 0 / 256px 256px,
		var(--oak-niche);
	border-radius: 2px; overflow: hidden;
}
.map__card {
	position: relative; display: grid; justify-items: center; gap: 10px;
	width: min(100%, 340px); padding: 26px 22px 24px; text-align: center;
	background: url(../img/linen.webp) 0 0 / 256px 256px, var(--linen);
	color: var(--ink);
	box-shadow: 0 22px 34px -20px rgba(0, 0, 0, .9);
	outline: 1.5px dashed rgba(181, 31, 36, .5); outline-offset: -7px;
}
.map__pin .stitch { width: auto; height: 46px; }
.map__where { margin: 4px 0 0; font-size: 1.05rem; }
.map__addr { margin: 0 0 8px; font-size: .98rem; color: var(--ink-2); }
.map.is-loaded .map__card { display: none; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__load {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 54px; padding: 0 22px;
	background: var(--kumach); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
	font-weight: 600;
}
.map__load:hover { background: var(--kumach-2); }
.map__open { color: var(--kumach); font-size: .98rem; }
.map.is-loaded .map__load, .map.is-loaded .map__open { display: none; }

/* Заказчики */
.clients-home__grid { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.clients { list-style: none; margin: 0; padding: 0; columns: 2 260px; column-gap: 40px; }
.clients li { break-inside: avoid; margin-bottom: 12px; line-height: 1.4; }
@media (max-width: 900px) { .clients-home__grid { grid-template-columns: 1fr; } }

/* Статьи */
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 3vw, 44px); list-style: none; margin: 0 0 32px; padding: 0; }
.article-card a { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.article-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 18%; border-radius: 2px; background: #efe9e2; }
.article-card__d { font-size: .92rem; color: var(--ink-3); }
.article-card__t { font: 700 1.35rem/1.2 var(--f-display); }
.article-card a:hover .article-card__t { color: var(--kumach); }
.article-card__x { color: var(--ink-2); font-size: 1rem; }

/* =========================================================================
   Внутренние страницы
   ========================================================================= */

.phero { padding-block: clamp(32px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: clamp(32px, 5vw, 80px); row-gap: clamp(8px, 1.4vw, 16px); align-items: center; }
.phero__grid > .crumbs { grid-column: 1 / -1; margin-bottom: 0; }
.phero--simple .phero__grid { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
/* шапка без обложки на странице образа — по левому краю сетки, как разделы ниже */
.phero--solo .phero__grid { grid-template-columns: minmax(0, 1fr); }
.phero--solo .phero__text { max-width: 780px; }
.phero__title { margin-bottom: .35em; }
.phero__lead { font-size: clamp(1.12rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 58ch; }
.phero__price { font: 700 clamp(1.7rem, 1.4rem + 1vw, 2.2rem)/1.1 var(--f-display); color: var(--kumach); margin: 24px 0 0; }
.phero__price span { font: 400 1.05rem/1.4 var(--f-text); color: var(--ink-2); }
.phero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 28px; }
.phero__facts { display: grid; gap: 10px; margin: 24px 0 0; }
.phero__facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.phero__facts dt { color: var(--ink-3); }
.phero__facts dd { margin: 0; font-weight: 500; }
.phero__days { margin-top: 18px; font-size: 1.05rem; }
@media (max-width: 640px) { .phero__facts > div { grid-template-columns: 1fr; gap: 0; } }

/* Ниша красного угла на белой странице */
.phero__corner,
.phero__towel {
	position: relative; overflow: hidden;
	padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 36px) clamp(12px, 2vw, 20px);
	background:
		radial-gradient(60% 55% at 50% 64%, rgba(242, 181, 68, .1), transparent 72%),
		radial-gradient(120% 100% at 50% 56%, transparent 45%, rgba(12, 7, 5, .7) 100%),
		url(../img/oak-panel.webp) 0 0 / 256px 256px,
		var(--oak-niche);
	border-radius: 2px;
}
.phero__corner::after,
.phero__towel::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
	background: url(../img/band-hem.svg) repeat-x 0 50% / auto 7px;
}
.phero__corner .corner { --corner-max: 400px; }
.phero__photo { position: relative; }
.phero__photo img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 2px; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .55); }
.phero__photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 7px; background: url(../img/band-hem.svg) repeat-x 0 50% / auto 7px; }

.towel { position: relative; margin: 8px auto 20px; width: min(100%, 460px); }
.towel__band {
	display: grid; place-items: center; min-height: 150px; padding: 26px 22px;
	background:
		url(../img/band-romb.svg) repeat-x 50% 100% / auto 34px,
		url(../img/band-romb.svg) repeat-x 50% 0 / auto 34px,
		url(../img/linen.webp) 0 0 / 256px 256px,
		var(--linen);
	box-shadow: 0 20px 30px -18px rgba(0, 0, 0, .8);
}
.towel__band .stitch { width: auto; height: 66px; max-width: 100%; margin-block: 30px; }
.towel__hem { height: 20px; background: url(../img/fringe.webp) repeat-x 50% 0 / 128px 20px; }

@media (max-width: 900px) {
	.phero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
	.phero__text { display: contents; }
	.phero__grid > .crumbs { order: -3; }
	.phero__title { order: -2; }
	.phero__corner, .phero__towel, .phero__photo { order: -1; margin: 6px 0 24px; }
	.phero__corner .corner { --corner-max: 320px; --icon-max-h: clamp(220px, 100svh - 500px, 440px); }
}

/* Текст страниц и статей (блоки редактора) */
.entry { padding-block: 0 clamp(48px, 6vw, 88px); }
.entry__body { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
.entry__body > * + * { margin-top: 1em; }
.entry__body > :first-child { margin-top: 0; }
.entry__body h2 { margin-top: 1.9em; margin-bottom: .45em; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }
.entry__body h3 { margin-top: 1.6em; margin-bottom: .35em; font-size: 1.35rem; }
.entry__body h2 + *, .entry__body h3 + * { margin-top: 0; }
.entry__body p, .entry__body li { max-width: 68ch; }
.entry__body ul, .entry__body ol { padding-left: 0; margin-left: 0; }
.entry__body ul { list-style: none; }
.entry__body ol { padding-left: 1.4em; }
.entry__body :is(ul:not([class]), ul.wp-block-list, ol) > li + li { margin-top: .4em; }
.entry__body ol li::marker { color: var(--kumach); font-weight: 700; }
.entry__body img { border-radius: 2px; }
.entry__body figure { margin-block: 1.8em; }
.entry__body figcaption { margin-top: 8px; font-size: .95rem; color: var(--ink-3); }
.entry__body .alignwide { width: min(100vw - 2 * var(--gutter), 1100px); margin-inline: calc(50% - min(100vw - 2 * var(--gutter), 1100px) / 2); }
.entry__body .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.entry__body .shelf, .entry__body .gallery, .entry__body .prices, .entry__body .reviews, .entry__body .names, .entry__body .obrazy, .entry__body .contacts, .entry__body .map, .entry__body .steps { margin-block: 2em; }
.entry__body .shelf { width: 100vw; margin-inline: calc(50% - 50vw); }
.entry__body .gallery { width: min(100vw - 2 * var(--gutter), var(--wrap)); margin-inline: calc(50% - min(100vw - 2 * var(--gutter), var(--wrap)) / 2); }

.entry__body table:not(.price-table) { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry__body table:not(.price-table) th, .entry__body table:not(.price-table) td { padding: 11px 12px 11px 0; border: 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.entry__body .wp-block-table thead, .entry__body .wp-block-table tfoot { border: 0; }
.entry__body table:not(.price-table) thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.entry__body .wp-block-table { overflow-x: auto; }

.entry__body blockquote, .entry__body .wp-block-quote {
	margin: 2em 0; padding: 26px 0 8px;
	background: url(../img/band-hem.svg) repeat-x 0 0 / auto 7px;
}
.entry__body blockquote p { font: 400 clamp(1.25rem, 1.1rem + .5vw, 1.55rem)/1.45 var(--f-display); }
.entry__body blockquote cite { font-style: normal; color: var(--ink-3); font-size: .95rem; }

/* Вопросы и ответы — блок «Подробности» */
.entry__body details, .saints-more {
	border-bottom: 1px solid var(--rule);
	padding: 0;
}
.entry__body details + details { margin-top: 0; }
.entry__body details:first-of-type { border-top: 1px solid var(--rule); }
.entry__body summary, .saints-more summary {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 18px 0; cursor: pointer; list-style: none;
	font-weight: 600; font-size: 1.1rem;
}
.entry__body summary::-webkit-details-marker, .saints-more summary::-webkit-details-marker { display: none; }
.entry__body summary::after, .saints-more summary::after {
	content: ""; flex: none; width: 22px; height: 22px;
	background:
		linear-gradient(var(--kumach), var(--kumach)) center / 14px 2px no-repeat,
		linear-gradient(var(--kumach), var(--kumach)) center / 2px 14px no-repeat;
	transition: transform .3s var(--ease);
}
.entry__body details[open] > summary::after, .saints-more[open] > summary::after { transform: rotate(45deg); }
.entry__body details > :not(summary) { margin: 0 0 18px; color: var(--ink-2); }

/* Святые с именем */
.saints { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 1rem; }
.saints th, .saints td { text-align: left; vertical-align: top; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); }
.saints thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.saints tbody th { font-weight: 500; }
.saints td { color: var(--ink-2); }
.saints-more { margin-top: 8px; }

/* Образы */
.obrazy + .obrazy { margin-top: 48px; }
.obrazy__t { font-size: clamp(1.55rem, 1.2rem + 1vw, 2.1rem); }
.obrazy__t a { color: var(--ink); text-decoration: none; }
.obrazy__t a:hover { color: var(--kumach); }
.obrazy__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 20px; }
.obrazy__list a { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.obrazy__list img { height: 170px; width: auto; max-width: 100%; object-fit: contain; object-position: 0 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .22)); }
.obrazy__list span { font-weight: 600; line-height: 1.3; }
.obrazy__list small { color: var(--ink-3); font-size: .9rem; }
.obrazy__list a:hover span { color: var(--kumach); }

/* Работа */
.workp { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.workp__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.workp__photo a { position: relative; display: block; background: var(--room); border-radius: 2px; padding: clamp(16px, 3vw, 40px); }
.workp__photo img { margin-inline: auto; max-height: 82vh; width: auto; border-radius: 2px; box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .8); }
@media (max-width: 900px) {
	.workp__grid { row-gap: 0; }
	.workp__info { display: contents; }
	.workp__title { order: -1; margin-bottom: 16px; }
	.workp__photo { margin-bottom: 24px; }
	.workp__photo img { max-height: 58svh; }
}
.workp__zoom { position: absolute; right: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; color: var(--on-dark-2); }
.workp__title { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.3rem); }
.facts { display: grid; gap: 0; margin: 20px 0 28px; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 500; }
.workp__order { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 24px; background: var(--kumach-soft); border-radius: 2px; }
.workp__price { flex-basis: 100%; margin: 0; font: 700 1.5rem/1.2 var(--f-display); color: var(--kumach-2); }
.workp__note { flex-basis: 100%; margin: 0; color: var(--ink-2); font-size: 1rem; }
.workp__text { margin-top: 24px; color: var(--ink-2); }
.workp__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.workp__tags a { display: inline-block; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); text-decoration: none; font-size: .98rem; }
.workp__tags a:hover { border-color: var(--kumach); color: var(--kumach); }
@media (max-width: 900px) {
	.workp__grid { grid-template-columns: 1fr; }
	.facts > div { grid-template-columns: 140px 1fr; }
}

/* Архивы */
section.archive { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.archive__head { max-width: 860px; margin-bottom: 28px; }
.archive__title { margin-bottom: .3em; }
.archive__count { font-family: var(--f-text); font-weight: 500; font-size: max(.45em, .9rem); line-height: 1; color: var(--ink-3); vertical-align: .55em; margin-left: .2em; }
.archive__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.chips { display: flex; gap: 8px; margin: 0 0 32px; padding-bottom: 6px; overflow-x: auto; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.chip span { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--kumach); color: var(--kumach); }
.chip.is-current { background: var(--kumach); border-color: var(--kumach); color: #fff; }
.chip.is-current span { color: var(--on-red-2); }

.pager { margin-top: 44px; }
.pager ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pager a, .pager span { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a:hover { border-color: var(--kumach); color: var(--kumach); }
.pager .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .dots { border: 0; }

.search-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 18px; }
.search-list a { font-weight: 600; font-size: 1.15rem; }
.search-list span { display: block; color: var(--ink-2); }
.searchform { display: flex; max-width: 520px; margin-top: 20px; }
.searchform input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid #cfc5bb; border-right: 0; border-radius: 2px 0 0 2px; background: #fff; font-size: 1.05rem; }
.searchform button { width: 56px; border: 0; border-radius: 0 2px 2px 0; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; }

/* Статья */
.post__head { padding-top: clamp(28px, 4vw, 48px); }
.post__title { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem); }
.post__lead { font-size: clamp(1.15rem, 1rem + .45vw, 1.35rem); color: var(--ink-2); }
.post__meta { font-size: .95rem; color: var(--ink-3); margin-bottom: 28px; }
.post__cover { margin-bottom: 36px; }
.post__cover img { width: 100%; border-radius: 2px; }

/* =========================================================================
   Заявка — кумачовое полотно
   ========================================================================= */

.lead {
	position: relative;
	background: var(--kumach);
	color: var(--on-red);
	padding-block: calc(var(--step) + 30px) var(--step);
}
.lead__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.lead__title { color: #fff; }
.lead__text { font-size: 1.15rem; color: var(--on-red-2); max-width: 44ch; }
.lead__call { margin-top: 28px; font-size: 1.05rem; color: var(--on-red-2); }
.lead__call .phone { color: #fff; }
.lead__call .phone--big { font-size: 1.6rem; }
.lead :focus-visible { outline-color: #fff; }

.lead__form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: grid; gap: 6px; }
.field--wide, .lead__form > .field:first-of-type, .consent, .lead__form .btn, .lead__status { grid-column: 1 / -1; }
.field label { font-size: 1rem; font-weight: 500; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.req { font-weight: 400; color: var(--on-red-2); font-size: .92rem; }
.field input, .field select, .field textarea {
	width: 100%; min-height: 54px; padding: 12px 14px;
	background: #fff; color: var(--ink);
	border: 2px solid transparent; border-radius: 2px;
	font-size: 1.05rem;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%231d1613' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--flame); box-shadow: 0 0 0 3px rgba(242, 181, 68, .35); }
.field input::placeholder, .field textarea::placeholder { color: #8b7c72; }
.field--file input { min-height: 0; padding: 10px; background: rgba(255, 255, 255, .12); color: #fff; border: 1px dashed rgba(255, 255, 255, .6); font-size: .95rem; }
.field--file input::file-selector-button {
	margin-right: 10px; padding: 10px 14px; min-height: 44px;
	border: 0; border-radius: 2px; background: #fff; color: var(--kumach);
	font: 600 1rem/1.2 var(--f-text); cursor: pointer;
}
.field--file input::file-selector-button:hover { background: #fff5f3; color: var(--kumach-2); }
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: #ffd27a; }
.field__err { color: #ffe3a8; font-size: .95rem; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; color: var(--on-red-2); cursor: pointer; }
.consent input { flex: none; width: 24px; height: 24px; margin-top: 1px; accent-color: #fff; }
.consent a { color: #fff; }
.consent.is-error span { color: #ffe3a8; }
.lead__form .btn { justify-self: start; min-width: 280px; }
.lead__status { min-height: 1.6em; margin: 0; font-size: 1.05rem; font-weight: 500; }
.lead__status.is-ok { padding: 16px 18px; background: #fff; color: var(--ink); border-radius: 2px; }
.lead__status.is-err { color: #ffe3a8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) {
	.lead__inner { grid-template-columns: 1fr; }
	.lead__form { grid-template-columns: 1fr; }
	.lead__form .btn { width: 100%; min-width: 0; }
}

/* =========================================================================
   Подвал — тёмная божница
   ========================================================================= */

.foot { position: relative; background: var(--oak); color: var(--on-dark-2); padding-top: clamp(56px, 7vw, 88px); font-size: 1rem; }
.foot a { color: var(--on-dark); }
.foot a:hover { color: #fff; }
.foot__inner { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); padding-bottom: 48px; }
.foot__brand p { margin-top: 18px; max-width: 36ch; }
.brand--foot .brand__mark { width: 230px; }
.foot__t { font: 700 1.25rem/1.2 var(--f-display); color: #fff; margin-bottom: 16px; }
.foot__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot__menu a { text-decoration: none; }
.foot__menu a:hover { text-decoration: underline; }
.foot__contacts p { margin-bottom: .6em; }
.foot__phones .phone { color: #fff; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 24px 32px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .92rem; color: #a8978a; }
.foot__legal p { margin: 0; max-width: 90ch; }
.foot :focus-visible { outline-color: var(--flame); }
@media (max-width: 1000px) { .foot__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
	.foot__inner { grid-template-columns: 1fr 1fr; column-gap: 20px; }
	.foot__brand, .foot__contacts { grid-column: 1 / -1; }
}
.foot__hours { white-space: nowrap; }

/* Нижняя панель на телефоне */
.dock { display: none; }
@media (max-width: 900px) {
	.foot { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
	.dock {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
		display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
		background: rgba(33, 22, 16, .97);
		box-shadow: 0 -10px 24px -12px rgba(0, 0, 0, .6);
	}
	.dock__btn {
		display: flex; align-items: center; justify-content: center; gap: 8px;
		min-height: 52px; border-radius: 2px;
		font-weight: 600; font-size: 1.02rem; text-decoration: none;
		color: #fff; border: 1px solid rgba(244, 238, 231, .35);
	}
	.dock__btn--red { background: var(--kumach); border-color: var(--kumach); }
	.dock { transition: transform .3s var(--ease), visibility 0s; }
	.dock-away .dock { transform: translateY(110%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
	.menu-open .dock,
	body:has(:is(input, textarea, select):focus) .dock { display: none; }
}
@media (max-width: 360px) {
	.dock__btn .i { display: none; }
}

/* Просмотр иконы */
.lightbox {
	width: 100vw; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: rgba(12, 8, 6, .96); color: var(--on-dark);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__fig { display: grid; justify-items: center; gap: 14px; padding: 56px 16px 24px; max-height: 100dvh; }
.lightbox__fig img { max-height: calc(100dvh - 140px); width: auto; max-width: 100%; border-radius: 2px; }
.lightbox__fig figcaption { font-size: 1rem; color: var(--on-dark-2); text-align: center; max-width: 60ch; }
.lightbox__close { position: fixed; top: 12px; right: 12px; width: 52px; height: 52px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(244, 238, 231, .35); border-radius: 2px; color: #fff; cursor: pointer; }

/* =========================================================================
   Движение и печать
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.stitch .x { stroke-dashoffset: 0; }
}

@media print {
	.head, .foot, .lead, .dock, .namefind, .map, .phero__actions, .hero__actions { display: none !important; }
	body { font-size: 12pt; }
	.hero, .wall { background: #fff; color: #000; }
}
