/* ==========================================================================
   Главная страница: гранит, свет, гравировка
   ========================================================================== */

/* ---------- Гранит: общий материал ---------- */
.granite {
	--base: #14181a;
	--lite: .8;   /* светлые крапинки */
	--dark: .0;    /* тёмные крапинки */
	--mot: .35;    /* облачные разводы */
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--base);
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.32' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 9 -5.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='.28'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.011' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.7 -.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='.55'/%3E%3C/svg%3E");
}
.granite::before,
.granite::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.granite::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 16 -11.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
	opacity: var(--lite);
}
.granite::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 -11'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
	opacity: var(--dark);
}
.granite[data-stone="black"],   .granite--black   { --base: #14181a; --lite: .55; --dark: 0;   }
.granite[data-stone="graphite"]                    { --base: #3b4448; --lite: .5;  --dark: .4; }
.granite[data-stone="red"]                         { --base: #6a2a26; --lite: .5;  --dark: .45; }
.granite[data-stone="gray"]                        { --base: #8d9699; --lite: .35; --dark: .6; }

/* ---------- Надпись, выбитая в камне ---------- */
@keyframes carve {
	0%   { color: transparent; text-shadow: none; }
	30%  { color: #fff6e3; text-shadow: 0 0 16px rgba(255, 214, 150, .95); }
	100% { color: var(--ink, #c8d0d1); text-shadow: var(--engrave, 0 -1px 0 rgba(0, 0, 0, .75), 0 1px 0 rgba(255, 255, 255, .16)); }
}

/* ==========================================================================
   Шапка поверх первого экрана
   ========================================================================== */
body.has-hero .site-header {
	position: fixed; left: 0; right: 0;
	background: transparent; border-bottom-color: transparent;
	transition: background-color .3s, border-color .3s;
}
body.has-hero .site-header.is-scrolled { background: rgba(231, 234, 233, .96); border-bottom-color: var(--line); backdrop-filter: blur(6px); }
body.has-hero .site-header:not(.is-scrolled) .brand__link,
body.has-hero .site-header:not(.is-scrolled) .brand__name,
body.has-hero .site-header:not(.is-scrolled) .nav__list a,
body.has-hero .site-header:not(.is-scrolled) .nav__phone { color: #eef2f2; }
body.has-hero .site-header:not(.is-scrolled) .brand__city { color: #aab5b8; }
body.has-hero .site-header:not(.is-scrolled) .custom-logo { filter: brightness(0) invert(1); }
body.has-hero .site-header:not(.is-scrolled) .btn--outline { border-color: #eef2f2; color: #eef2f2; }
body.has-hero .site-header:not(.is-scrolled) .btn--outline:hover { background: #eef2f2; color: var(--ink); }
body.has-hero .site-header:not(.is-scrolled) .nav-toggle { border-color: rgba(255, 255, 255, .4); }
body.has-hero .site-header:not(.is-scrolled) .nav-toggle__bars,
body.has-hero .site-header:not(.is-scrolled) .nav-toggle__bars::before,
body.has-hero .site-header:not(.is-scrolled) .nav-toggle__bars::after { background: #fff; }
body.has-hero .site-header:not(.is-scrolled) .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
body.has-hero .site-header:not(.is-scrolled) :focus-visible { outline-color: #fff; }

/* ==========================================================================
   Первый экран: свет памяти
   ========================================================================== */
.hero {
	--mx: 68%; --my: 38%; --fl: 1;
	display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 100vh; min-height: 100svh;
	padding-top: clamp(120px, 24vh, 220px);
	color: #dfe5e6;
}
.hero__vignette { position: absolute; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 50% 30%, transparent 35%, rgba(0, 0, 0, .6) 100%); pointer-events: none; }
.hero__light {
	position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen;
	background:
		radial-gradient(calc(120px * var(--fl)) circle at var(--mx) var(--my), rgba(255, 238, 205, .28), transparent 100%),
		radial-gradient(calc(480px * var(--fl)) circle at var(--mx) var(--my), rgba(255, 205, 140, .20), rgba(255, 205, 140, .05) 55%, transparent 100%);
}
.hero__dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero__in, .hero > .wrap { position: relative; z-index: 2; }

.hero__title {
	position: relative; max-width: 11em; margin: 0 0 .35em;
	font-size: clamp(2.7rem, 8.4vw, 6.6rem); line-height: 1.02; letter-spacing: .005em;
	color: #7f8d92;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .08);
}
/* освещённая копия надписи проявляется в пятне света */
.hero__title::after {
	content: attr(data-text);
	content: attr(data-text) / "";
	position: absolute; inset: 0; pointer-events: none;
	color: #fff3dc; text-shadow: 0 0 30px rgba(255, 205, 140, .5);
	-webkit-mask-image: radial-gradient(circle calc(360px * var(--fl)) at var(--tx, 62%) var(--ty, 40%), #000 0%, rgba(0, 0, 0, .8) 38%, transparent 100%);
	mask-image: radial-gradient(circle calc(360px * var(--fl)) at var(--tx, 62%) var(--ty, 40%), #000 0%, rgba(0, 0, 0, .8) 38%, transparent 100%);
	transition: opacity 1s;
}
.js .hero__title:not(.is-ready)::after { opacity: 0; }
.hero__title .w { display: inline-block; white-space: nowrap; }
.hero__title .ch { display: inline-block; animation: chisel 1.1s calc(var(--i) * 48ms + 350ms) both; }
@keyframes chisel {
	0%   { color: #14181a; text-shadow: none; }
	35%  { color: #fff4de; text-shadow: 0 0 18px rgba(255, 210, 150, .95); }
	100% { color: #7f8d92; text-shadow: 0 -1px 0 rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .08); }
}
.hero__lead { max-width: 32em; margin-bottom: 0; font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: #d5dcdd; }
.hero .actions { margin-top: 28px; }
.hero :focus-visible { outline-color: #fff; }

.hero__facts {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
	margin: clamp(32px, 7vh, 72px) 0 0; padding: 20px 0 28px; border-top: 1px solid rgba(200, 208, 209, .22);
}
.hero__facts dt { font-size: .85rem; color: #98a5a8; margin-bottom: 2px; }
.hero__facts dd { margin: 0; color: #eef2f2; }
.hero__facts a { color: #eef2f2; }
.hero__facts a:hover { color: #fff; }
@media (max-width: 720px) { .hero__facts { grid-template-columns: 1fr; gap: 12px; } }

@media (prefers-reduced-motion: reduce) {
	.hero__title .ch { animation: none; }
	.hero__title::after { -webkit-mask-image: none; mask-image: none; color: #e9eeef; text-shadow: none; }
	.hero__title { color: #e9eeef; }
}

/* ==========================================================================
   Макет памятника
   ========================================================================== */
.maket__head { max-width: 40em; margin-bottom: clamp(24px, 4vw, 40px); }
.maket__head p { color: var(--muted); font-size: 1.1rem; }

.maket__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .maket__grid { grid-template-columns: 1fr; } }

.maket__stage {
	position: sticky; top: 92px; padding: clamp(20px, 4vw, 44px) 0 0;
	perspective: 1000px;
}
@media (max-width: 900px) { .maket__stage { position: static; } }
.maket__stage::before {
	content: ''; position: absolute; left: 6%; right: 6%; bottom: 52px; height: 36px;
	background: radial-gradient(50% 50% at 50% 50%, rgba(30, 39, 43, .35), transparent 100%); filter: blur(6px);
}

.stela {
	--rx: 0deg; --ry: 0deg; --sx: 30%; --sy: 18%;
	--ink: #cfd6d8; --ink-hi: rgba(255, 255, 255, .22);
	--engrave: 0 -1px 0 rgba(0, 0, 0, .8), 0 1px 0 var(--ink-hi);
	--name: 8.6cqw; --fscale: 1;
	container-type: inline-size;
	position: relative; width: min(100%, 380px); margin: 0 auto; aspect-ratio: 3 / 4.3;
	transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out;
	filter: drop-shadow(0 22px 22px rgba(20, 28, 32, .35));
}
.stela[data-ink="silver"] { --ink: #cfd6d8; --ink-hi: rgba(255, 255, 255, .22); }
.stela[data-ink="gold"]   { --ink: #d9b66f; --ink-hi: rgba(255, 236, 190, .3); }
.stela[data-ink="white"]  { --ink: #f4f3ef; --ink-hi: rgba(255, 255, 255, .35); }
.stela[data-font="script"] { --fscale: 1.2; }

.stela__stone {
	position: absolute; inset: 0; height: 100%;
	transition: background-color .5s, border-radius .4s, clip-path .4s;
	border-radius: 3px;
}
.stela[data-shape="arch"] .stela__stone { border-radius: 50% 50% 3px 3px / 24% 24% 3px 3px; }
.stela[data-shape="chamfer"] .stela__stone { clip-path: polygon(0 13%, 13% 0, 87% 0, 100% 13%, 100% 100%, 0 100%); border-radius: 0; }

.stela__text {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 14cqw 9cqw 12cqw; text-align: center; gap: 4cqw;
	color: var(--ink); text-shadow: var(--engrave);
	font-family: var(--font-display);
}
.stela[data-shape="arch"] .stela__text { padding-top: 22cqw; }
.stela[data-font="script"] .stela__text { font-family: 'Marck Script', 'Forum', cursive; }
.stela__text p { margin: 0; text-wrap: balance; overflow-wrap: anywhere; transition: opacity .3s; }
.stela__name { font-size: calc(var(--name) * var(--fscale)); line-height: 1.12; }
.stela__dates { font-size: calc(6.4cqw * var(--fscale)); letter-spacing: .06em; }
.stela__epitaph { font-size: calc(4.8cqw * var(--fscale)); line-height: 1.3; margin-top: 2cqw !important; }
.stela__text .is-sample { opacity: .5; }
.stela__text .is-carving { animation: carve .9s ease-out; }

.stela__sheen {
	position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
	background:
		radial-gradient(70% 55% at var(--sx) var(--sy), rgba(255, 255, 255, .55), transparent 70%),
		linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .18) 48%, transparent 60%);
}

.maket__note { margin: 18px auto 0; max-width: 24em; text-align: center; font-size: .9rem; color: var(--muted); }

.maket__form fieldset { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.maket__form legend { padding: 0; margin-bottom: 8px; font-size: .95rem; color: var(--muted); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sw { position: relative; display: block; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw__body {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 16px 5px 6px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .98rem;
	transition: border-color .15s, box-shadow .15s;
}
.sw__body--classic { font-family: var(--font-display); font-size: 1.1rem; padding-left: 16px; }
.sw__body--script { font-family: 'Marck Script', cursive; font-size: 1.2rem; padding-left: 16px; }
.sw input:checked + .sw__body { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: #fff; }
.sw input:focus-visible + .sw__body { outline: 3px solid var(--focus); outline-offset: 2px; }
.sw:hover .sw__body { border-color: var(--ink); }
.sw__chip { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), inset 3px 4px 6px rgba(255, 255, 255, .22); flex: none; }
.sw__shape { width: 20px; height: 28px; margin-left: 6px; background: var(--ink); flex: none; }
.sw__shape--rect { border-radius: 2px; }
.sw__shape--arch { border-radius: 50% 50% 2px 2px / 34% 34% 2px 2px; }
.sw__shape--chamfer { clip-path: polygon(0 18%, 18% 0, 82% 0, 100% 18%, 100% 100%, 0 100%); }
.maket__hint { margin: 14px 0 0; font-size: .95rem; color: var(--muted); }

/* ==========================================================================
   История: камень на экране меняется вместе с прокруткой
   ========================================================================== */
.story { padding: clamp(40px, 7vw, 88px) 0; background: var(--paper); border-block: 1px solid var(--line); }
.story__title { margin-bottom: clamp(16px, 3vw, 32px); }
.story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 80px); align-items: start; }

.story__stage-wrap { position: sticky; top: 92px; }
.story__stage {
	position: relative; aspect-ratio: 4 / 4.6; overflow: hidden; border-radius: 3px;
	background: radial-gradient(90% 70% at 50% 30%, #2c363b, #14181a);
}
.story__sky { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s; background: linear-gradient(180deg, #a9bcc6 0%, #e6d6bd 58%, #efe3cd 100%); }
.story__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; opacity: 0; transition: opacity 1.2s; background: linear-gradient(180deg, #8c9a8a, #667563); }
.story__stage[data-step="4"] .story__sky,
.story__stage[data-step="4"] .story__ground { opacity: 1; }

.slab-obj {
	position: absolute; left: 50%; bottom: 14%; width: 54%; aspect-ratio: 3 / 4.1; transform: translateX(-50%);
	filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .4));
	transition: bottom 1s cubic-bezier(.2, .7, .2, 1), width 1s cubic-bezier(.2, .7, .2, 1);
	container-type: inline-size;
}
.slab-obj__stone {
	position: absolute; inset: 0; --lite: .8; --dark: 0;
	clip-path: polygon(3% 9%, 20% 2%, 38% 6%, 56% 1%, 76% 5%, 97% 10%, 94% 34%, 99% 60%, 95% 92%, 70% 98%, 40% 94%, 14% 99%, 2% 86%);
	filter: saturate(.6) brightness(.8) contrast(1.15);
	transition: clip-path 1s cubic-bezier(.2, .7, .2, 1), filter 1s;
	background-color: #3a4448;
}
.slab-obj__text {
	position: absolute; inset: 0; display: grid; place-items: center; padding: 8cqw; text-align: center;
	font: 400 11cqw/1.1 var(--font-display); color: transparent; opacity: 0; transition: opacity .6s;
}
.slab-obj__sheen {
	position: absolute; inset: 0; opacity: 0; mix-blend-mode: soft-light; pointer-events: none;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .6) 48%, transparent 66%);
	background-size: 250% 100%; background-position: 130% 0;
}

/* 2. макет: ровные края, надпись лишь намечена */
.story__stage[data-step="2"] .slab-obj__stone,
.story__stage[data-step="3"] .slab-obj__stone,
.story__stage[data-step="4"] .slab-obj__stone {
	clip-path: polygon(0 0, 20% 0, 38% 0, 56% 0, 76% 0, 100% 0, 100% 34%, 100% 60%, 100% 100%, 70% 100%, 40% 100%, 14% 100%, 0 100%);
	border-radius: 3px;
}
.story__stage[data-step="2"] .slab-obj__stone { filter: saturate(.8) brightness(.9); }
.story__stage[data-step="2"] .slab-obj__text { opacity: 1; color: transparent; -webkit-text-stroke: 1px rgba(200, 208, 209, .55); }

/* 3. изготовление: полировка и гравировка */
.story__stage[data-step="3"] .slab-obj__stone,
.story__stage[data-step="4"] .slab-obj__stone { filter: none; --lite: .55; --base: #14181a; background-color: #14181a; }
.story__stage[data-step="3"] .slab-obj__text,
.story__stage[data-step="4"] .slab-obj__text { opacity: 1; -webkit-text-stroke: 0; color: #cfd6d8; text-shadow: 0 -1px 0 rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .2); }
.story__stage[data-step="3"] .slab-obj__text { --ink: #cfd6d8; animation: carve 1.4s .5s ease-out both; }
.story__stage[data-step="3"] .slab-obj__sheen { opacity: 1; animation: sweep 1.8s ease-out both; }
@keyframes sweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* 4. доставка: камень «на месте» в утреннем свете */
.story__stage[data-step="4"] .slab-obj { bottom: 18%; width: 46%; }

.story__steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.story__steps li { counter-increment: s; min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .45; transition: opacity .4s; }
.story__steps li.is-active { opacity: 1; }
.story__steps li::before { content: counter(s); font: 400 4rem/1 var(--font-display); color: #98a5a8; margin-bottom: 8px; }
.story__steps h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.story__steps p { max-width: 30em; color: var(--muted); }
.no-js .story__steps li, .story__steps.no-anim li { opacity: 1; }

@media (max-width: 860px) {
	.story__grid { grid-template-columns: 1fr; }
	.story__stage-wrap { top: 70px; z-index: 2; margin: 0 calc(var(--gap) * -1); padding: 0 var(--gap); background: var(--paper); }
	.story__stage { aspect-ratio: 16 / 10; }
	.slab-obj { width: 30%; bottom: 10%; }
	.story__stage[data-step="4"] .slab-obj { width: 26%; bottom: 16%; }
	.story__steps li { min-height: 46vh; }
}
@media (prefers-reduced-motion: reduce) {
	.story__steps li { opacity: 1; }
	.story__stage * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Доверие и отзывы
   ========================================================================== */
.trust__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .trust__grid { grid-template-columns: 1fr; } }
.trust__lead h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.18; }
.trust__rating { color: var(--muted); }
.trust__list { margin: 0; border-top: 1px solid var(--line); }
.trust__list > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.trust__list dt { font: 400 1.35rem/1.2 var(--font-display); margin-bottom: 4px; }
.trust__list dd { margin: 0; color: var(--muted); }

.reviews__title { margin-top: clamp(40px, 6vw, 64px); }
.reviews { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 400px); gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.review { margin: 0; padding-top: 18px; border-top: 2px solid var(--ink); scroll-snap-align: start; }
.review__text { font: 400 1.2rem/1.45 var(--font-display); }
.review__text p { margin-bottom: .6em; }
.review footer { font-size: .95rem; color: var(--muted); }
.review__src { display: block; font-size: .88rem; }

/* ==========================================================================
   Вопросы
   ========================================================================== */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
	display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer;
	padding: 18px 0; list-style: none; font: 400 1.35rem/1.25 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 300 1.8rem/1 var(--font-body); color: var(--accent); flex: none; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; max-width: 40em; color: var(--muted); }

/* ==========================================================================
   Призыв позвонить
   ========================================================================== */
.callout { --lite: .5; color: #dfe5e6; padding: clamp(56px, 10vw, 120px) 0; }
.callout__light {
	position: absolute; inset: 0; z-index: 0; pointer-events: none; mix-blend-mode: screen;
	background: radial-gradient(520px circle at 78% 30%, rgba(255, 205, 140, .22), transparent 100%);
	animation: flicker 5s ease-in-out infinite alternate;
}
@keyframes flicker { from { opacity: .8; } to { opacity: 1; } }
.callout__in { position: relative; z-index: 1; }
.callout h2 { max-width: 16em; color: #b4bfc1; text-shadow: 0 -1px 0 rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .12); font-size: clamp(2rem, 5vw, 3.6rem); }
.callout p { max-width: 34em; color: #cdd5d6; font-size: 1.1rem; }
.callout :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) { .callout__light { animation: none; } }
