/* Гранитная мастерская ПМ. Стили
   Палитра: пыль, плита, габбро, сланец, шов, туя */

@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --dust: #E6E7E3;
  --slab: #F4F4F1;
  --white: #FBFBF9;
  --gabbro: #1A1D1C;
  --gabbro-2: #262A28;
  --shale: #545A57;
  --seam: #C6C9C3;
  --seam-dark: #3A3F3D;
  --thuja: #2D4A3E;
  --thuja-2: #3B5E50;
  --mist: #B9BFBB;
  --error: #8E2F24;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(64px, 9vw, 128px);
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--dust);
  color: var(--gabbro);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
.card__media picture, .way__media picture, .ph picture, .chapter__media picture, .wide-photo picture, .hero__photo picture, .modal__media picture { width: 100%; height: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--thuja); }

:focus-visible { outline: 3px solid var(--thuja-2); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5vw, 4.3rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.25; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.prose { max-width: 66ch; }
.prose h2 { margin-bottom: .6em; }
.prose h3 { margin: 1.6em 0 .5em; }
.lead { font-size: clamp(1.2rem, 1.6vw, 1.4rem); line-height: 1.55; color: var(--gabbro-2); max-width: 36em; }
.muted { color: var(--shale); }
.small { font-family: var(--sans); font-size: .9375rem; line-height: 1.5; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gabbro); color: var(--white); padding: 10px 16px; font-family: var(--sans);
}
.skip:focus { top: 12px; }

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

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--gabbro); border-radius: 3px;
  background: var(--gabbro); color: var(--white);
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--thuja); border-color: var(--thuja); color: var(--white); }
.btn--line { background: transparent; color: var(--gabbro); }
.btn--line:hover { background: var(--gabbro); border-color: var(--gabbro); color: var(--white); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--gabbro); }
.btn--light:hover { background: var(--dust); border-color: var(--dust); color: var(--gabbro); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-more { font-family: var(--sans); font-weight: 600; font-size: 1rem; }

/* Шапка */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--dust) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--seam); }
.header__inner { display: flex; align-items: center; gap: 28px; min-height: 80px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gabbro); flex-shrink: 0; }
.brand svg { width: 42px; height: 42px; }
.brand__name { font-family: var(--serif); font-size: 1.125rem; line-height: 1.15; font-weight: 500; }
.brand__name span { display: block; font-family: var(--sans); font-size: .8125rem; color: var(--shale); font-weight: 400; margin-top: 2px; }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 10px 10px; font-family: var(--sans); font-size: 1rem;
  text-decoration: none; color: var(--gabbro); border-radius: 3px; white-space: nowrap;
}
.nav a:hover { color: var(--thuja); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gabbro); border-radius: 0; }

.header__contact { display: flex; align-items: center; gap: 16px; }
.header__phone { font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; text-decoration: none; white-space: nowrap; }
.header__phone small { display: block; font-weight: 400; font-size: .8125rem; color: var(--shale); }
.header .btn { min-height: 46px; padding: 0 20px; }

.menu-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; border: 0; background: transparent;
  color: var(--gabbro); cursor: pointer; padding: 0;
}
.menu-toggle svg { width: 28px; height: 28px; margin: auto; }

@media (max-width: 1280px) { .header .btn { display: none; } }
@media (max-width: 1180px) { .header__phone small { display: none; } .brand__name span { display: none; } }
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .header__contact { display: none; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; margin: 0; background: var(--dust);
    border-bottom: 1px solid var(--seam); padding: 8px var(--gutter) 24px;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: 14px 0; font-size: 1.1875rem; border-bottom: 1px solid var(--seam); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; font-weight: 600; }
  .nav .nav__phone { display: block; margin-top: 18px; border-bottom: 0; font-family: var(--sans); font-size: 1.25rem; font-weight: 700; text-decoration: none; }
  .header__inner { min-height: 72px; }
}
@media (min-width: 901px) { .nav .nav__phone { display: none; } }

/* Хлебные крошки */
.crumbs { font-family: var(--sans); font-size: .9375rem; color: var(--shale); padding-top: 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--mist); }
.crumbs a { color: var(--shale); }

/* Первый экран главной */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 3.9vw, 3.5rem); }
.hero__text h1 { margin-bottom: .45em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }
.hero__note { font-family: var(--sans); font-size: 1rem; color: var(--shale); max-width: 30em; }
.hero__figure { margin: 0; }
.hero__photo { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--gabbro); aspect-ratio: 5 / 4; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__figure figcaption { font-family: var(--sans); font-size: .9375rem; color: var(--shale); margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero__photo img { clip-path: inset(0 0 100% 0); transform: scale(1.04); }
  .js .hero__photo.is-in img {
    clip-path: inset(0 0 0 0); transform: none;
    transition: clip-path 1.3s cubic-bezier(.22,.7,.2,1), transform 2.4s cubic-bezier(.22,.7,.2,1);
  }
  @view-transition { navigation: auto; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { order: -1; }
  .hero__photo { aspect-ratio: 16 / 10; }
}

/* Заголовки страниц разделов */
.page-head { padding-top: 20px; padding-bottom: clamp(36px, 5vw, 56px); }
.page-head h1 { margin: 18px 0 .4em; max-width: 16em; }

/* Направления на главной */
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); margin-top: 40px; }
.way {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--slab); border-radius: var(--radius); overflow: hidden; min-height: 340px;
}
.way__media { background: var(--white); display: flex; align-items: flex-end; justify-content: center; }
.way__media img { width: 100%; height: 100%; object-fit: cover; }
.way__media--mon img { object-fit: contain; padding: 18px 10px 0; }
.way__body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; }
.way__body h3 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); margin-bottom: .5em; }
.way__body p { color: var(--gabbro-2); font-size: 1.0625rem; }
.way__price { margin-top: auto; padding-top: 18px; font-size: 1.3rem; }
.way__link { font-family: var(--sans); font-weight: 600; margin-top: 6px; text-decoration: none; }
.way__link::after { content: ""; position: absolute; inset: 0; }
.way:hover .way__link { text-decoration: underline; color: var(--thuja); }
@media (max-width: 960px) { .ways { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .way { grid-template-columns: 1fr; } .way__media { aspect-ratio: 4 / 3; } }

/* Каталог */
.catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.catalog--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .catalog, .catalog--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .catalog, .catalog--3 { grid-template-columns: 1fr; } }

.card { position: relative; display: flex; flex-direction: column; background: var(--slab); border-radius: var(--radius); overflow: hidden; }
.card__media { aspect-ratio: 4 / 5; background: var(--white); }
.card--complex .card__media { aspect-ratio: 1 / 1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.3; font-weight: 500; }
.card__more {
  all: unset; cursor: pointer; display: inline;
}
.card__more::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__more:focus-visible { outline: 3px solid var(--thuja-2); outline-offset: 2px; }
.card:hover .card__title { color: var(--thuja); }
.card__spec { font-family: var(--sans); font-size: .9375rem; color: var(--shale); line-height: 1.4; margin: 0; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px 18px; flex-wrap: wrap; }
.card__price { font-size: 1.25rem; font-weight: 600; margin: 0; white-space: nowrap; }
.card__sku { font-family: var(--sans); font-size: .8125rem; color: var(--shale); margin: 0; letter-spacing: .01em; }
.card__order { position: relative; z-index: 2; min-height: 46px; padding: 0 16px; font-size: .9375rem; width: 100%; margin-top: 4px; }
@media (max-width: 520px) {
  .card__body { padding: 12px 12px 4px; }
  .card__foot { padding: 8px 12px 14px; }
  .card__order { width: 100%; }
  .card__price { font-size: 1.125rem; }
}

.catalog-note { font-family: var(--sans); font-size: 1rem; color: var(--shale); margin-top: 22px; max-width: 60em; }

/* Тёмный блок: производство */
.dark { background: var(--gabbro); color: #E4E6E2; }
.dark a { color: #fff; }
.dark a:hover { color: var(--mist); }
.dark .muted { color: #A5ACA8; }
.dark :focus-visible { outline-color: #9FC3B2; }

.stone-path__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.stone-path__head p { color: #C9CDCA; font-size: 1.1875rem; }
@media (max-width: 860px) { .stone-path__head { grid-template-columns: 1fr; } }

.steps-photo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); counter-reset: step; }
.steps-photo li { counter-increment: step; }
.steps-photo li:nth-child(even) { margin-top: clamp(24px, 4vw, 56px); }
.steps-photo figure { margin: 0; }
.steps-photo .ph { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: var(--gabbro-2); }
.steps-photo img { width: 100%; height: 100%; object-fit: cover; }
.steps-photo figcaption { padding-top: 14px; }
.steps-photo h3 { font-size: 1.25rem; display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; color: #fff; }
.steps-photo h3::before { content: counter(step); font-family: var(--sans); font-size: .875rem; font-weight: 600; color: #8E9692; min-width: 1em; }
.steps-photo p { font-family: var(--sans); font-size: .9875rem; line-height: 1.55; color: #B9BFBB; }
.stone-path__more { margin-top: clamp(32px, 4vw, 48px); }
@media (max-width: 900px) {
  .steps-photo { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; }
  .steps-photo li { scroll-snap-align: start; }
  .steps-photo li:nth-child(even) { margin-top: 0; }
}

/* Процесс заказа */
.process { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: p; border-top: 1px solid var(--seam); }
.process li { counter-increment: p; padding: 24px 24px 8px 0; }
.process li + li { padding-left: 24px; border-left: 1px solid var(--seam); }
.process h3 { font-size: 1.3rem; margin-bottom: .5em; }
.process h3::before { content: counter(p); display: block; font-family: var(--sans); font-size: .9375rem; font-weight: 600; color: var(--shale); margin-bottom: 14px; }
.process p { font-size: 1.0625rem; color: var(--gabbro-2); }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; }
  .process li:nth-child(3) { padding-left: 0; border-left: 0; }
  .process li:nth-child(n+3) { border-top: 1px solid var(--seam); }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .process li, .process li + li { padding: 20px 0 8px; border-left: 0; }
  .process li + li { border-top: 1px solid var(--seam); }
}

/* Две колонки текста */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.split--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
@media (max-width: 860px) { .split, .split--rev { grid-template-columns: 1fr; } }

.plain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--seam); }
.plain-list li { padding: 14px 0; border-bottom: 1px solid var(--seam); }
.plain-list b { font-weight: 600; }

.materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin-top: 28px; }
.materials div { padding: 18px 0; border-top: 1px solid var(--seam); }
.materials dt { font-weight: 600; font-size: 1.1875rem; margin-bottom: 4px; display: flex; align-items: center; gap: 12px; }
.materials dt i { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.materials dd { margin: 0; color: var(--gabbro-2); font-size: 1.0625rem; }
@media (max-width: 700px) { .materials { grid-template-columns: 1fr; } }

.band { background: var(--slab); }

/* Вопросы */
.faq { max-width: 860px; margin-top: 32px; border-top: 1px solid var(--seam); }
.faq details { border-bottom: 1px solid var(--seam); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem); font-weight: 500; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--thuja); }
.faq .faq__a { padding: 0 0 24px; max-width: 64ch; color: var(--gabbro-2); }

/* Производство: страница «О нас» */
.chapter { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: clamp(28px, 4vw, 48px); counter-increment: ch; }
.chapter:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.chapter:nth-child(even) .chapter__media { order: 2; }
.chapters { counter-reset: ch; }
.chapter__media { margin: 0; border-radius: 4px; overflow: hidden; background: var(--gabbro-2); aspect-ratio: 16 / 10; }
.chapter__media img { width: 100%; height: 100%; object-fit: cover; }
.chapter__text h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: .55em; }
.chapter__text h2::before { content: counter(ch); display: block; font-family: var(--sans); font-size: .9375rem; font-weight: 600; color: #8E9692; margin-bottom: 14px; }
.chapter__text p { color: #C9CDCA; }
.chapter--noimg { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) !important; }
@media (max-width: 860px) {
  .chapter, .chapter:nth-child(even), .chapter--noimg { grid-template-columns: 1fr !important; }
  .chapter:nth-child(even) .chapter__media { order: 0; }
}

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 36px; }
.principles h3 { margin-bottom: .45em; }
.principles p { color: var(--gabbro-2); font-size: 1.0625rem; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

.wide-photo { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; background: var(--gabbro-2); }
.wide-photo img { width: 100%; height: 100%; object-fit: cover; }
.wide-photo + figcaption, .photo-caption { font-family: var(--sans); font-size: .9375rem; color: var(--shale); margin-top: 10px; }
@media (max-width: 700px) { .wide-photo { aspect-ratio: 4 / 3; } }

/* Контакты */
.contacts { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); }
.contacts dl { margin: 0; border-top: 1px solid var(--seam); }
.contacts dl div { padding: 18px 0; border-bottom: 1px solid var(--seam); display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; }
.contacts dt { font-family: var(--sans); color: var(--shale); font-size: 1rem; }
.contacts dd { margin: 0; font-size: 1.1875rem; }
.contacts dd a { text-decoration: none; font-weight: 600; }
.contacts dd a:hover { text-decoration: underline; }
@media (max-width: 860px) { .contacts { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .contacts dl div { grid-template-columns: 1fr; gap: 2px; } }

.map {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--slab);
  min-height: 420px; display: grid; place-items: center; text-align: center;
  background-image:
    linear-gradient(90deg, rgba(26,29,28,.05) 1px, transparent 1px),
    linear-gradient(rgba(26,29,28,.05) 1px, transparent 1px);
  background-size: 36px 36px;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__inner { padding: 28px; }
.map__inner p { font-family: var(--sans); color: var(--shale); font-size: 1rem; margin: 10px 0 18px; }

.requisites { font-family: var(--sans); font-size: 1rem; color: var(--shale); line-height: 1.7; }

/* Форма заявки */
.lead-band { background: var(--slab); }
.lead-band__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .lead-band__grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 16px; font-family: var(--sans); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.field label span { font-weight: 400; color: var(--shale); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: inherit; font-size: 1.0625rem; color: var(--gabbro);
  background: var(--white); border: 1.5px solid var(--seam); border-radius: 3px;
  transition: border-color .15s;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--mist); }
.field input:focus, .field textarea:focus { border-color: var(--gabbro); outline: none; box-shadow: 0 0 0 3px rgba(45,74,62,.18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); }
.field__error { display: none; color: var(--error); font-size: .9375rem; margin-top: 6px; }
.field.is-invalid .field__error { display: block; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: .9375rem; line-height: 1.45; color: var(--gabbro-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gabbro); }
.check.is-invalid { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: 1rem; line-height: 1.5; min-height: 1.5em; }
.form__status.is-ok { color: var(--thuja); font-weight: 600; }
.form__status.is-error { color: var(--error); }
.form__product { font-size: .9375rem; color: var(--shale); padding: 12px 14px; background: var(--dust); border-radius: 3px; }
.form__product b { color: var(--gabbro); font-weight: 600; }

/* Модальное окно */
dialog.modal {
  width: min(1040px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 8px; background: var(--white); color: var(--gabbro);
  overscroll-behavior: contain;
}
dialog.modal::backdrop { background: rgba(20, 23, 22, .62); }
@media (prefers-reduced-motion: no-preference) {
  dialog.modal[open] { animation: modal-in .22s ease-out; }
  @keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
.modal__close {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: var(--white); color: var(--gabbro); cursor: pointer;
  display: grid; place-items: center;
}
.modal__close:hover { background: var(--dust); }
.modal__close svg { width: 22px; height: 22px; }
.modal__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.modal__grid.no-product { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
.modal__media { background: var(--slab); display: flex; align-items: flex-start; justify-content: center; }
.modal__media picture { height: auto; position: sticky; top: 0; }
.modal__media img { width: 100%; height: auto; object-fit: contain; }
dialog.modal.is-narrow { width: min(620px, calc(100% - 32px)); }
.modal__body { padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.modal__body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); padding-right: 40px; }
.modal__meta { font-family: var(--sans); font-size: .9375rem; color: var(--shale); }
.modal__price { font-size: 1.6rem; font-weight: 600; }
.modal__desc { font-size: 1.0625rem; color: var(--gabbro-2); }
.modal__note { font-family: var(--sans); font-size: .9375rem; color: var(--shale); border-left: 2px solid var(--seam); padding-left: 12px; }
.modal__form h3 { font-size: 1.25rem; margin: 10px 0 12px; }
@media (max-width: 760px) {
  .modal__grid { grid-template-columns: 1fr; }
  .modal__media { max-height: 46vh; overflow: hidden; align-items: center; }
  .modal__media picture { position: static; }
  .modal__media img { max-height: 46vh; width: auto; margin: 0 auto; }
  dialog.modal { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
}

/* Подвал */
.footer { background: var(--gabbro); color: #C9CDCA; padding: clamp(48px, 6vw, 80px) 0 32px; font-family: var(--sans); font-size: 1rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; color: #fff; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.6fr)); gap: 32px; }
.footer .brand { color: #fff; }
.footer .brand__name span { color: #A5ACA8; }
.footer h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__phone { font-size: 1.25rem; font-weight: 700; }
.footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--seam-dark); display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; font-size: .875rem; color: #8E9692; }
.footer__legal a { color: #B9BFBB; text-decoration: underline; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* Нижняя панель на телефоне */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--dust); border-top: 1px solid var(--seam);
  }
  .mobile-bar .btn { min-height: 50px; padding: 0 10px; }
  body { padding-bottom: 72px; }
}

/* Cookies */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 420px;
  background: var(--gabbro); color: #E4E6E2; border-radius: 6px; padding: 18px 20px;
  font-family: var(--sans); font-size: .9375rem; line-height: 1.5; display: none;
}
.cookie.is-shown { display: block; }
.cookie a { color: #fff; }
.cookie .btn { margin-top: 12px; min-height: 44px; }
@media (max-width: 720px) { .cookie { left: 8px; right: 8px; bottom: 80px; max-width: none; } }

/* Юридические тексты */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.5rem; margin: 1.8em 0 .6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; }

@media print {
  .header, .footer, .mobile-bar, .cookie, .card__order { display: none !important; }
  body { background: #fff; }
}

.chapters-tail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 72px); padding-top: clamp(28px, 4vw, 48px); margin-top: clamp(12px, 2vw, 24px); border-top: 1px solid var(--seam-dark); }
.chapters-tail .chapter__text { counter-increment: ch; }
@media (max-width: 860px) { .chapters-tail { grid-template-columns: 1fr; } }

.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 5vw, 80px); align-items: start; }
.faq-grid .faq { margin-top: 0; max-width: none; }
.faq-grid h2 { position: sticky; top: 110px; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } .faq-grid h2 { position: static; } }
.dark .btn--light { color: var(--gabbro); }
.dark .btn--light:hover { color: var(--gabbro); background: var(--dust); }
.steps-photo img[src*="raspil-kanat"] { object-position: 78% 50%; }
.chapter__media img[src*="raspil-kanat"] { object-position: 70% 50%; }

.nowrap { white-space: nowrap; }

/* Витрина на первом экране */
.showcase__item[hidden] { display: none; }
.showcase__stage {
  aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, #FDFDFB 0%, var(--slab) 58%, #E2E3DE 100%);
}
.showcase__stage picture { width: 100%; height: 100%; }
.showcase__stage img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; padding-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .showcase__stage img { animation: showcase-in .7s cubic-bezier(.22,.7,.2,1) both; }
  @keyframes showcase-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
.showcase__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; align-items: baseline; padding-top: 16px; }
.showcase__name { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; margin: 0; }
.showcase__price { font-size: clamp(1.2rem, 1.7vw, 1.45rem); font-weight: 600; white-space: nowrap; margin: 0; }
.showcase__spec { grid-column: 1 / -1; font-family: var(--sans); font-size: .9375rem; color: var(--shale); margin: 2px 0 0; }
.showcase__foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--seam); }
.showcase__text { font-family: var(--sans); font-size: 1rem; line-height: 1.5; color: var(--gabbro-2); margin-bottom: 14px; }
.showcase__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) {
  .showcase { order: -1; }
  .showcase__stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .showcase__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .showcase__actions .btn { white-space: normal; text-align: center; padding: 6px 10px; font-size: .9375rem; min-height: 50px; }
  .showcase__info { grid-template-columns: 1fr; }
  .showcase__text { font-size: .9375rem; }
}
.card__price--ask { font-size: 1.0625rem; white-space: normal; font-weight: 500; }

.card-cta { grid-column: 1 / -1; background: var(--gabbro); color: #E4E6E2; border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.card-cta h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); color: #fff; }
.card-cta p { color: #C9CDCA; font-size: 1.0625rem; max-width: 36em; margin: 0; }
.card-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 8px !important; }
.card-cta .btn--light { color: var(--gabbro); }
.card-cta__phone { color: #fff; font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; text-decoration: none; }
.card-cta__phone:hover { color: #fff; text-decoration: underline; }
@media (min-width: 1081px) { .card-cta { grid-column: span 2; } }
