/*
Theme Name: Затишна оселя
Description: Тема для zatishnaosela.com.ua — натяжні стелі, Луцьк. Напрям A «Вапно і лампа».
Version: 1.7.4
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: zatishna
*/

/* Затишна оселя — прототип редизайну, напрям A «Вапно і лампа» */

/* Шрифти на власному сервері (раніше — Google Fonts): без сторонніх запитів, швидший перший екран. */
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/commissioner-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/commissioner-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("assets/fonts/literata-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("assets/fonts/literata-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F7F6F2;          /* вапно */
  --linen: #ECE7DD;       /* льон */
  --paper: #FFFFFF;
  --ink: #24272B;         /* графіт */
  --ink-2: #4B5056;       /* другорядний текст, 7.4:1 на --bg */
  --pine: #2E4B40;        /* хвоя: кнопки, посилання */
  --pine-deep: #203730;
  --lamp: #F0C36A;        /* світло лампи: лише акценти */
  --lamp-soft: #FBEBC6;
  --line: #D9D3C7;
  --error: #A3261B;
  --success: #2E6B45;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Commissioner", "Segoe UI", Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-4: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --wrap: 76rem;
  --radius: 6px;
  --header-h: 4.25rem;
  --bar-h: 0px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(46, 75, 64, 0.15); scroll-padding-top: calc(var(--header-h) + 1rem); scroll-padding-bottom: calc(var(--bar-h) + 1rem); }
/* ціль skip-link: не інтерактивна, рамка на весь main лише заважає */
#main:focus { outline: none; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--bar-h);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--pine); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pine-deep); text-decoration-thickness: 2px; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--lamp); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--pine); color: #fff; padding: 0.75rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.measure { max-width: 38rem; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* Помітний плейсхолдер фактів, які треба уточнити */
.todo {
  background: var(--lamp-soft);
  color: #5A3E00;
  border: 1px dashed #B98A1E;
  border-radius: 3px;
  padding: 0 0.3em;
  font-size: 0.92em;
  font-family: var(--font-body);
  font-weight: 500;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.4rem;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.is-busy { cursor: progress; }
.btn.is-busy::before { content: ""; width: 1em; height: 1em; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: zo-spin .7s linear infinite; }
@keyframes zo-spin { to { transform: rotate(360deg); } }
.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { background: var(--pine-deep); color: #fff; }
.btn--ghost { border-color: var(--pine); color: var(--pine); background: transparent; }
.btn--ghost:hover { background: var(--pine); color: #fff; }
.btn--lamp { background: var(--lamp); color: var(--ink); }
.btn--lamp:hover { background: #E8B24B; color: var(--ink); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.tel {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-height: 2.75rem; /* ціль ≥ 44px */
}
.tel:hover { color: var(--pine); text-decoration: underline; }
.tel svg { width: 1.1em; height: 1.1em; color: var(--pine); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 3.25rem; height: auto; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1; }
.brand:hover { color: var(--ink); }

.nav { display: none; margin-left: auto; }
.nav > ul { display: flex; align-items: center; gap: 0.25rem; list-style: none; padding: 0; margin: 0; }
.nav a, .nav__toggle {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0.7rem; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.975rem;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav__toggle:hover { background: var(--linen); color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--lamp); }
.nav__toggle svg { width: 0.9em; height: 0.9em; transition: transform .15s ease; }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__sub { position: relative; }
.nav__menu {
  position: absolute; top: calc(100% + 0.4rem); left: 0; min-width: 15rem;
  list-style: none; margin: 0; padding: 0.4rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px -12px rgba(36, 39, 43, 0.25);
}
.nav__menu[hidden] { display: none; }
.nav__menu a { display: flex; width: 100%; }

.header-cta { display: none; align-items: center; gap: 1.25rem; flex: none; }
.burger {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.5rem 0.8rem;
  background: none; border: 1.5px solid var(--line); border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
}
.burger svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 374.98px) {
  .burger { padding-inline: 0.7rem; }
  .burger__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand img { width: 2.6rem; }
}

@media (min-width: 1200px) {
  .nav, .header-cta { display: flex; }
  .burger { display: none; }
}

/* Мобільне меню */
.mobile-menu {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); border-bottom: 1px solid var(--line); }
.mobile-menu nav { padding-block: 1rem; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li a {
  display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); text-decoration: none;
}
.mobile-menu li a[aria-current="page"] { color: var(--pine); }
.mobile-menu .sub a { font-family: var(--font-body); font-size: 1.05rem; padding-left: 1rem; }
.mobile-menu__contacts { display: grid; gap: 0.75rem; padding-block: 1.25rem 2rem; }

/* ---------- Секції ---------- */
.section { padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.section--linen { background: var(--linen); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.section__head { display: grid; gap: 0.9rem; margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); max-width: 44rem; }
.section__head--row { max-width: none; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section__head--row { grid-template-columns: 1fr auto; gap: 2rem; } }

/* ---------- Перший екран ---------- */
.hero { padding-block: clamp(1.5rem, 1rem + 3vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
/* Мобільний порядок: заголовок → фото → дії; десктоп: текст ліворуч, фото праворуч */
.hero__grid { display: grid; gap: 1.25rem; grid-template-areas: "intro" "media" "cta"; }
.hero__intro { grid-area: intro; }
.hero__media { grid-area: media; }
.hero__cta { grid-area: cta; }
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "intro media" "cta media";
    column-gap: clamp(2rem, 1rem + 3vw, 4rem); row-gap: 0;
    align-items: center;
  }
  .hero__intro { align-self: end; }
  .hero__cta { align-self: start; }
}
.hero h1 { max-width: 18ch; }
@media (min-width: 900px) { .hero h1 { font-size: clamp(2.5rem, 1.2rem + 2.6vw, 3.25rem); } }
@media (max-width: 599.98px) { .hero h1 { font-size: 2rem; } }
.hero__lead { margin-top: 1rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 30rem; }
@media (max-width: 599.98px) { .hero__lead { font-size: 1.0625rem; } }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
@media (min-width: 900px) { .hero__actions { margin-top: 1.75rem; } }
@media (max-width: 599.98px) { .hero__media img { aspect-ratio: 16 / 10; } }
.hero__actions .tel { font-size: 1.125rem; }
.hero__or { display: block; font-size: var(--step--1); color: var(--ink-2); font-weight: 400; }
.facts {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  list-style: none; padding: 1.25rem 0 0; margin: 2rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--ink-2);
}
.facts li { display: inline-flex; align-items: center; gap: 0.5rem; }
.facts li::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 3px var(--lamp-soft); flex: none; }

.hero__media { position: relative; margin: 0; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--linen); }
.hero__media figcaption { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-2); }
/* Лінія підсвітки — фірмовий прийом */
.glow-line { position: relative; }
.glow-line::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: -1px; height: 3px; border-radius: 3px;
  background: var(--lamp);
  box-shadow: 0 0 14px 2px rgba(240, 195, 106, 0.75), 0 0 36px 6px rgba(240, 195, 106, 0.35);
  z-index: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .hero .glow-line::before { animation: switch-on 1.1s 0.3s ease-out both; }
  @keyframes switch-on {
    0% { opacity: 0; transform: scaleX(0.2); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: scaleX(1); }
  }
}

/* ---------- Типи стель ---------- */
.types { display: grid; gap: 2.5rem 2rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.type { display: grid; gap: 0.85rem; align-content: start; }
.type img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--linen); }
.type h3 { font-size: var(--step-2); }
.type h3 a { color: var(--ink); text-decoration: none; }
.type h3 a:hover { text-decoration: underline; }
.type__fit { font-size: 0.95rem; color: var(--ink-2); }
.type__fit b { color: var(--ink); font-weight: 600; }
.type__more { font-weight: 600; }

/* ---------- Портфоліо ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  min-height: 2.75rem; padding: 0.5rem 1rem;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 500; cursor: pointer; touch-action: manipulation;
  transition: border-color .15s ease, background-color .15s ease;
}
.chip:hover { border-color: var(--pine); }
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 3px 0 -1px var(--lamp);
}
.chip .count { font-variant-numeric: tabular-nums; opacity: 0.7; margin-left: 0.25rem; }

.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; } }
@media (min-width: 1200px) { .works { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.works li[hidden] { display: none; }
.work {
  display: block; width: 100%; padding: 0; border: 0; background: var(--linen);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in; position: relative;
}
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
@media (hover: hover) { .work:hover img { transform: scale(1.03); } }
.work:focus-visible { outline-offset: 2px; }
/* Анімації галереї (класи ставить JS, лише без «зменшити рух»; без JS усе видно одразу) */
@media (prefers-reduced-motion: no-preference) {
  .works.is-anim > li:not(.is-in) .work { opacity: 0; transform: translateY(14px) scale(0.98); }
  .works.is-anim > li .work { transition: opacity .5s ease var(--d, 0s), transform .6s cubic-bezier(.23, 1, .32, 1) var(--d, 0s); }
  .works > li.is-pop .work { animation: zo-tile .45s cubic-bezier(.23, 1, .32, 1) var(--d, 0s) both; }
  @keyframes zo-tile { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
  .work::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: linear-gradient(to top, rgba(240, 195, 106, 0.28), transparent 45%); }
  @media (hover: hover) { .work:hover::after { opacity: 1; } }
  .lightbox[open] { animation: zo-fade .25s ease both; }
  .lightbox[open]::backdrop { animation: zo-fade .25s ease both; }
  .lightbox[open] .lightbox__stage img { animation: zo-zoom .35s cubic-bezier(.23, 1, .32, 1) both; }
  .lightbox .lightbox__stage img.is-next { animation: zo-slide-l .3s cubic-bezier(.23, 1, .32, 1) both; }
  .lightbox .lightbox__stage img.is-prev { animation: zo-slide-r .3s cubic-bezier(.23, 1, .32, 1) both; }
  @keyframes zo-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes zo-zoom { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
  @keyframes zo-slide-l { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  @keyframes zo-slide-r { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
}
.works__status { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-2); }
.works__more { margin-top: 2rem; }

/* Перегляд фото */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20, 22, 24, 0.94); color: #fff;
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(20, 22, 24, 0.94); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem var(--gutter); gap: 1rem; }
.lightbox__count { font-variant-numeric: tabular-nums; color: #D8D8D8; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lightbox__stage { height: 100%; overflow: hidden; }
.lightbox__stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--gutter) max(1rem, env(safe-area-inset-bottom)); }
.lightbox__caption { color: #EDEDED; font-size: 0.95rem; text-align: center; flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; flex: none;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.35); background: transparent; color: #fff; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }
.icon-btn svg { width: 1.3rem; height: 1.3rem; }
.lightbox :focus-visible { outline-color: var(--lamp); }

/* ---------- Смуга заклику ---------- */
.cta-band { background: var(--pine); color: #fff; border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); display: grid; gap: 1.25rem; align-items: center; margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; gap: 2rem; } }
.cta-band h2, .cta-band h3 { font-size: var(--step-2); color: #fff; }
.cta-band p { color: #DCE6E1; margin-top: 0.4rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.cta-band .tel { color: #fff; }
.cta-band .tel svg { color: var(--lamp); }

/* ---------- Як ми працюємо ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; } }
.step { counter-increment: step; position: relative; padding: 0 0 2rem 3.5rem; }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink);
  font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums;
}
.step::after { content: ""; position: absolute; left: 1.2rem; top: 2.8rem; bottom: 0.3rem; width: 1.5px; background: var(--line); }
.step:last-child::after { display: none; }
.step:last-child::before { background: var(--lamp); border-color: var(--lamp); }
@media (min-width: 900px) {
  .step { padding: 3.75rem 0 0; }
  .step::after { left: 3.25rem; right: -1.75rem; top: 1.25rem; bottom: auto; width: auto; height: 1.5px; }
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--ink-2); font-size: 0.975rem; }
/* Поява етапів по черзі (клас is-anim ставить JS, лише без «зменшити рух»; без JS усе видно одразу) */
@media (prefers-reduced-motion: no-preference) {
  .steps.is-anim .step::before { transform: scale(0.8); transition: transform .4s cubic-bezier(.34, 1.45, .64, 1), background-color .3s ease, border-color .3s ease, box-shadow .5s ease; }
  .steps.is-anim .step::after { transform: scaleY(0); transform-origin: top; transition: transform .55s cubic-bezier(.23, 1, .32, 1) .15s; }
  .steps.is-anim .step > * { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .45s cubic-bezier(.23, 1, .32, 1); }
  .steps.is-anim .step:last-child:not(.is-on)::before { background: var(--paper); border-color: var(--ink); }
  .steps.is-anim .step.is-on::before, .steps.is-anim .step.is-on::after, .steps.is-anim .step.is-on > * { opacity: 1; transform: none; }
  .steps.is-anim .step:last-child.is-on::before { box-shadow: 0 0 14px 2px rgba(240, 195, 106, 0.65), 0 0 32px 6px rgba(240, 195, 106, 0.3); }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .steps.is-anim .step::after { transform: scaleX(0); transform-origin: left; }
}

/* ---------- Палітра ---------- */
.palette { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
.palette > * { min-width: 0; }
@media (min-width: 900px) { .palette { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; } }
.room { display: grid; gap: 0.9rem; }
@media (min-width: 900px) { .room { position: sticky; top: calc(var(--header-h) + 1rem); } }
.room svg { width: 100%; height: auto; border-radius: var(--radius); background: #E9E4DA; }
.room__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; align-items: center; }
.room__name { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--paper); }
.seg button { min-height: 2.75rem; padding: 0.35rem 1rem; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.room__note { font-size: var(--step--1); color: var(--ink-2); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr)); gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.swatches li[hidden] { display: none; }
.swatch {
  width: 100%; aspect-ratio: 1; border-radius: 4px; border: 1px solid rgba(36,39,43,0.12);
  cursor: pointer; position: relative; padding: 0;
  display: grid; align-items: end; justify-items: start;
}
.swatch span { font-size: 0.7rem; font-weight: 600; padding: 0.05rem 0.25rem; margin: 0.15rem; border-radius: 2px; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, 0.88); color: var(--ink); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 20% -9px; height: 3px; border-radius: 3px; background: var(--lamp); }
.palette__filters { margin-bottom: 1rem; }
/* Анімації палітри (лише без «зменшити рух») */
@media (prefers-reduced-motion: no-preference) {
  .ceiling-fill { transition: fill .45s ease; }
  .room .sheen.is-run { animation: zo-sheen .9s cubic-bezier(.4, 0, .2, 1); }
  @keyframes zo-sheen { 0% { opacity: 0; transform: translateX(0) skewX(-20deg); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(980px) skewX(-20deg); } }
  .swatch { transition: transform .15s ease, box-shadow .15s ease; }
  @media (hover: hover) { .swatch:hover { transform: translateY(-2px); box-shadow: 0 6px 14px -8px rgba(33, 37, 41, 0.5); } }
  .swatch.is-picked { animation: zo-pick .4s cubic-bezier(.34, 1.56, .64, 1); }
  @keyframes zo-pick { 0% { transform: scale(0.9); } 100% { transform: scale(1); } }
  .swatch[aria-pressed="true"]::after { animation: zo-under .3s cubic-bezier(.23, 1, .32, 1); }
  @keyframes zo-under { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .room__name.is-swap { animation: zo-name .3s cubic-bezier(.23, 1, .32, 1); }
  @keyframes zo-name { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .swatches > li.is-pop .swatch { animation: zo-tile .35s cubic-bezier(.23, 1, .32, 1) var(--d, 0s) both; }
}
.palette--compact .swatches { grid-template-columns: repeat(auto-fill, minmax(2.9rem, 1fr)); }
/* На телефоні кольори й групи гортаються вбік, щоб кімната лишалась на екрані */
@media (max-width: 899.98px) {
  .palette { gap: 1.25rem; }
  .palette__filters, .palette .swatches { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .palette__filters { flex-wrap: nowrap; margin-inline: calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 0.5rem; }
  .palette__filters .chip { flex: none; }
  .palette .swatches, .palette--compact .swatches {
    grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, 3.25rem); grid-auto-columns: 3.25rem;
    margin-inline: calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 0.75rem;
  }
}

/* ---------- Чому ми ---------- */
.why { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; } }
.why li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.3rem; }
.why h3 { font-size: 1.15rem; }
.why p { color: var(--ink-2); font-size: 0.975rem; }

/* ---------- Відгуки ---------- */
.reviews { display: grid; gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.review { background: var(--paper); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; align-content: space-between; border: 1px solid var(--line); }
.review blockquote { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.55; }
.review figcaption { font-size: 0.95rem; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 0.7rem; height: 0.7rem; margin-top: -0.5rem;
  border-right: 2px solid var(--pine); border-bottom: 2px solid var(--pine); transform: rotate(45deg); transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -0.15rem; }
.faq summary:hover { color: var(--pine); }
.faq__body { padding: 0 0 1.25rem; color: var(--ink-2); display: grid; gap: 0.75rem; max-width: 44rem; }
.faq__body ul { padding-left: 1.2rem; }

/* ---------- Заявка і контакти ---------- */
.order { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .order { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4rem; } }
.form-card { background: var(--paper); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); border: 1px solid var(--line); }
.form-card h2 { font-size: var(--step-3); }
.form-card > p { margin-top: 0.6rem; color: var(--ink-2); }
.form { display: grid; gap: 1.15rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem;
  border: 1.5px solid #858074; border-radius: var(--radius); background: #fff;
  font-size: 1rem; /* ≥16px: без автозуму в iOS */
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--pine); outline-offset: 1px; border-color: var(--pine); }
.field input[aria-invalid="true"] { border-color: var(--error); background: #FFF7F6; }
.field__hint { font-size: var(--step--1); color: var(--ink-2); }
.field__error { font-size: 0.95rem; color: var(--error); font-weight: 500; display: flex; gap: 0.4rem; align-items: flex-start; }
.field__error[hidden] { display: none; }
.field__error svg { width: 1.1em; height: 1.1em; flex: none; margin-top: 0.2em; }
.form .btn { width: 100%; }
@media (min-width: 600px) { .form .btn { width: auto; justify-self: start; } }
.form__legal { font-size: var(--step--1); color: var(--ink-2); }
.form-success { display: grid; gap: 0.9rem; }
.form-success[hidden] { display: none; }
.form-success__icon { width: 3rem; height: 3rem; border-radius: 50%; background: #E3F0E7; color: var(--success); display: grid; place-items: center; }
.form-success__icon svg { width: 1.6rem; height: 1.6rem; }
.form-success h2 { font-size: var(--step-2); }
@media (prefers-reduced-motion: no-preference) {
  .form-success.is-in .form-success__icon { animation: zo-pop .45s cubic-bezier(.34, 1.45, .64, 1) both; }
  .form-success.is-in .form-success__icon path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: zo-draw .4s .25s ease-out forwards; }
  .form-success.is-in > :not(.form-success__icon) { animation: zo-rise .45s .2s cubic-bezier(.23, 1, .32, 1) both; }
  @keyframes zo-pop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes zo-draw { to { stroke-dashoffset: 0; } }
  @keyframes zo-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

.contacts { display: grid; gap: 1.5rem; align-content: start; }
.contacts h2 { font-size: var(--step-2); }
.contacts dl { display: grid; gap: 1.1rem; }
.contacts dt { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.15rem; }
.contacts dd { margin: 0; display: grid; gap: 0.2rem; justify-items: start; }
.aside-card dd { display: block; }
.contacts .tel { font-size: 1.2rem; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 1rem; font-variant-numeric: tabular-nums; }

/* ---------- Внутрішні сторінки ---------- */
.page-head { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.crumbs { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-top: 1rem; max-width: 40rem; }
.page-head__actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }

.split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }
.prose { display: grid; gap: 1rem; max-width: 40rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 0.6rem; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before { content: ""; position: absolute; left: 0.2rem; top: 0.5rem; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 3px var(--lamp-soft); }
.aside-card { background: var(--linen); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 0.75rem; }
.aside-card h2 { font-size: var(--step-1); }

.related { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 600px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.related a { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: center; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.related a:hover { border-color: var(--pine); }
.related img { width: 7rem; aspect-ratio: 4 / 3; object-fit: cover; }
.related span { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; padding-right: 1rem; }

/* Відео */
.videos { display: grid; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.video { display: grid; gap: 0.6rem; }
.video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.video__frame iframe, .video__frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video__play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.video__play span { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--lamp); display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(240,195,106,0.3); }
.video__play svg { width: 1.6rem; height: 1.6rem; margin-left: 0.2rem; color: var(--ink); }
.video h2 { font-size: 1.15rem; }

/* Новини */
.news { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--line); max-width: 52rem; }
.news li { border-bottom: 1px solid var(--line); padding: 1.25rem 0; display: grid; gap: 0.35rem; }
@media (min-width: 768px) { .news li { grid-template-columns: 9rem 1fr; gap: 1.5rem; } }
.news time { color: var(--ink-2); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.news h2 { font-size: 1.25rem; }
.news h2 a { color: var(--ink); text-decoration: none; }
.news h2 a:hover { text-decoration: underline; color: var(--pine); }
.news p { color: var(--ink-2); margin-top: 0.3rem; }
.article { max-width: 42rem; display: grid; gap: 1.1rem; }
.article h2 { font-size: var(--step-2); margin-top: 1rem; }
.article ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }

/* ---------- Підвал ---------- */
.site-footer { background: var(--ink); color: #D7D9DB; padding-block: 3rem 2rem; }
.site-footer a { color: #fff; }
.site-footer .tel { color: #fff; }
.site-footer .tel svg { color: var(--lamp); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-brand { display: grid; gap: 0.75rem; max-width: 22rem; }
.footer-brand .brand { color: #fff; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #3A3E43; font-size: var(--step--1); color: #A9ADB1; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }

/* ---------- Липка панель на мобільному ---------- */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1.35fr; gap: 0.5rem;
  padding: 0.6rem var(--gutter) max(0.6rem, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -16px rgba(36, 39, 43, 0.35);
}
.call-bar .btn { min-height: 3rem; padding-inline: 0.75rem; font-size: 0.975rem; }
@media (max-width: 1199.98px) { :root { --bar-h: calc(4.25rem + env(safe-area-inset-bottom)); } }
@media (min-width: 1200px) { .call-bar { display: none; } }
.mobile-menu-open .call-bar { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media print { .site-header, .call-bar, .site-footer, .lightbox { display: none !important; } body { padding: 0; } }

/* ---------- Доповнення для WordPress ---------- */
.section__title { display: grid; gap: 0.9rem; max-width: 44rem; }
.section__cta { margin-top: 1.5rem; }
.section__after { margin-top: 2.5rem; }
.h-sub { font-size: var(--step-2); margin-bottom: 1.25rem; }
.footer-nav { margin-top: 2rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.article__nav { display: grid; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.article img { border-radius: var(--radius); }
.article figure, .article .wp-caption { max-width: 100%; }
.alignleft, .alignright, .aligncenter { display: block; margin: 1rem auto; }
.wp-caption-text, figcaption { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.5rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.nav-links .page-numbers { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--paper); }
.nav-links .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.prose > * + * { margin-top: 0; }
.prose h2:first-child { margin-top: 0; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0px); }

/* ---------- Ціни й калькулятор ---------- */
.prices { display: grid; gap: 1.75rem; }
.prices__intro { display: grid; gap: 0.75rem; max-width: 44rem; }
.price-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { text-align: left; vertical-align: top; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-table th { font-weight: 600; width: 30%; }
.price-table th span { display: block; font-weight: 400; font-size: var(--step--1); color: var(--ink-2); margin-top: 0.15rem; }
.price-table__price { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.price-table td:last-child { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 699.98px) {
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; width: auto; }
  .price-table tr { border-bottom: 1px solid var(--line); padding: 0.9rem 1rem; }
  .price-table th, .price-table td { border: 0; padding: 0.1rem 0; }
  .price-table__price { white-space: normal; margin-top: 0.25rem; }
}
.prices__more { margin: 0; }
.calc { background: var(--linen); border-radius: var(--radius); padding: clamp(1.25rem, 1rem + 2vw, 2rem); display: grid; gap: 1rem; }
.calc h2 { font-size: var(--step-2); }
.calc__fields { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 700px) { .calc__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 700px) { .calc__fields { grid-template-rows: auto auto auto; } .calc__fields > .field { grid-row: span 3; grid-template-rows: subgrid; align-content: start; } }
@media (min-width: 980px) { .calc__fields:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.calc__result { font-size: var(--step-1); }
.calc__result output { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.calc__note { font-size: var(--step--1); color: var(--ink-2); max-width: 44rem; }
.calc .btn { justify-self: start; }
.calc__tween { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.price-table tbody tr { transition: background-color .2s ease; }
@media (hover: hover) { .price-table tbody tr:hover { background: var(--linen); } }
/* Анімації сторінки цін (класи ставить JS, лише без «зменшити рух») */
@media (prefers-reduced-motion: no-preference) {
  .price-table.is-anim tr { opacity: 0; transform: translateY(10px); transition: opacity .45s ease var(--d, 0s), transform .5s cubic-bezier(.23, 1, .32, 1) var(--d, 0s), background-color .2s ease; }
  .price-table.is-anim tr.is-in { opacity: 1; transform: none; }
  .calc__result.is-bump .calc__tween { animation: zo-bump .6s ease; }
  @keyframes zo-bump { 30% { color: var(--pine); text-shadow: 0 0 18px rgba(240, 195, 106, 0.6); } }
}

/* Меню шапки: пункти не переносяться; на вужчих екранах — бургер */
.nav a, .nav__toggle { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1319.98px) {
  .site-header__inner { gap: 1rem; }
  .nav a, .nav__toggle { padding-inline: 0.5rem; font-size: 0.94rem; }
  .header-cta { gap: 0.85rem; }
}

/* ---------- Регіони ---------- */
.regions { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .regions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.regions a { display: grid; gap: 0.3rem; height: 100%; padding: 1rem 1.15rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.regions a:hover { border-color: var(--pine); }
.regions span { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.regions small { color: var(--ink-2); font-size: var(--step--1); line-height: 1.45; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }

/* Текстові секції вирівняні з заголовком сторінки (ліворуч), ширина рядка — до 40rem */
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: 40rem; }
.wrap.prose > .regions, .wrap.prose > .faq { max-width: 52rem; }

/* Галерея: нові об’єкти */
.object + .object { margin-top: clamp(2rem, 5vw, 3.5rem); padding-top: clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
.object h3 { margin: 0 0 0.4rem; }
.object__desc { max-width: 68ch; color: var(--ink-2); margin: 0 0 1.25rem; }
#objects-title, #all-title { margin-bottom: 1.5rem; }

/* Відео з об’єктів: вертикальні картки 9:16, програвач вантажиться після натискання */
.reels { display: grid; gap: 2rem 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .reels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .reels { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.reel { display: grid; gap: 0.6rem; align-content: start; }
.reel--wide { grid-column: span 2; }
.reel__frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: var(--linen); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(33, 37, 41, 0.06), 0 8px 24px -12px rgba(33, 37, 41, 0.25); }
.reel--wide .reel__frame { aspect-ratio: 16 / 9; }
.reel__play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; display: block; }
.reel__play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.reel__play::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 22, 25, 0.55), rgba(20, 22, 25, 0) 45%); pointer-events: none; }
.reel__play:hover img, .reel__play:focus-visible img { transform: scale(1.04); }
.reel__play:focus-visible { outline: 3px solid var(--pine); outline-offset: -3px; }
.reel__icon { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1; width: 3.75rem; height: 3.75rem; border-radius: 50%; background: var(--lamp); display: grid; place-items: center; box-shadow: 0 0 0 7px rgba(240, 195, 106, 0.32); transition: transform 0.2s ease; }
.reel__icon svg { width: 1.4rem; height: 1.4rem; margin-left: 0.18rem; color: var(--ink); }
.reel__play:hover .reel__icon { transform: scale(1.08); }
.reel__time { position: absolute; right: 0.6rem; bottom: 0.6rem; z-index: 1; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(20, 22, 25, 0.72); color: #fff; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.reel__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.reel__title { font-size: 1.05rem; line-height: 1.3; }
.reel__desc { margin: 0; color: var(--ink-2); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.videos__head { margin: clamp(2.5rem, 6vw, 4rem) 0 1.25rem; }
.video h3 { font-size: 1.15rem; }
@media (prefers-reduced-motion: reduce) { .reel__play img, .reel__icon { transition: none; } }
/* Анімації сторінки відео (класи ставить JS, лише без «зменшити рух») */
@media (prefers-reduced-motion: no-preference) {
  .reels.is-anim > li:not(.is-in), .videos.is-anim > li:not(.is-in) { opacity: 0; transform: translateY(18px); }
  .reels.is-anim > li, .videos.is-anim > li { transition: opacity .5s ease var(--d, 0s), transform .6s cubic-bezier(.23, 1, .32, 1) var(--d, 0s); }
  .reel__icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lamp); opacity: 0; pointer-events: none; }
  .reel__play:hover .reel__icon::after, .reel__play:focus-visible .reel__icon::after { animation: zo-ring 1.4s cubic-bezier(.23, 1, .32, 1) infinite; }
  @keyframes zo-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
  .reel__frame video.is-new { animation: zo-reveal .35s ease both; }
  @keyframes zo-reveal { from { opacity: .35; } to { opacity: 1; } }
}
@media (max-width: 599px) { .reel__title { font-size: 0.95rem; } .reel__desc { -webkit-line-clamp: 2; } .reel__icon { width: 3rem; height: 3rem; } }

/* Фото в статтях: вертикальні кадри не на весь екран */
.article figure img { width: auto; max-width: 100%; max-height: min(34rem, 75vh); margin-inline: auto; display: block; border-radius: var(--radius); }
.article figure figcaption { text-align: center; color: var(--ink-2); font-size: var(--step--1); margin-top: 0.5rem; }

/* ===== Конструктор стелі ===== */
.ctor { display: grid; gap: 1.5rem; }
@media (min-width: 980px) { .ctor { grid-template-columns: minmax(0, 1.6fr) minmax(20rem, 1fr); align-items: start; } }
.ctor__stage { display: grid; gap: 0.75rem; }
@media (min-width: 980px) { .ctor__stage { position: sticky; top: 5.5rem; } }
.ctor__canvas-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--linen); border: 1px solid var(--line); }
.ctor__canvas { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.ctor:not(.is-ready) .ctor__canvas { visibility: hidden; position: absolute; }
.ctor__empty { position: relative; min-height: min(26rem, 70vw); display: grid; place-content: center; justify-items: center; gap: 0.85rem; padding: 1.5rem; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, var(--lamp-soft), var(--linen) 60%); }
.ctor__empty-title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; max-width: 24ch; margin: 0; }
.ctor__upload { cursor: pointer; }
.ctor__upload:focus-within, .ctor__actions label:focus-within { outline: 3px solid var(--pine); outline-offset: 2px; }
.ctor__privacy { margin: 0; max-width: 34ch; font-size: var(--step--1); color: var(--ink-2); }
.ctor__hint { margin: 0; min-height: 1.5em; color: var(--ink-2); font-size: 0.95rem; }
.ctor__compare { display: flex; align-items: center; gap: 0.75rem; }
.ctor__compare label { font-weight: 600; white-space: nowrap; }
.ctor__compare input { flex: 1; accent-color: var(--pine); min-height: 2.75rem; }
.ctor__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn--sm { min-height: 2.75rem; padding: 0.45rem 0.9rem; font-size: 0.95rem; }
.ctor__actions label { cursor: pointer; }
.ctor:not(.is-ready) .ctor__compare, .ctor:not(.is-ready) .ctor__actions { display: none; }

.ctor__panel { display: grid; gap: 1rem; }
.ctor__group { margin: 0; padding: 1rem 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.ctor__group legend { display: flex; align-items: center; gap: 0.55rem; padding: 0 0.35rem; font-weight: 600; font-size: 1.05rem; }
.ctor__step { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--pine); color: #fff; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ctor__tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.ctor__tool { min-height: 2.75rem; padding: 0.45rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.95rem; cursor: pointer; touch-action: manipulation; }
.ctor__tool:hover { border-color: var(--pine); }
.ctor__tool[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }
.ctor__tool:focus-visible, .ctor__swatch:focus-visible, .ctor__more-btn:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; }
.ctor__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.4rem; }
.ctor__seg--col { grid-template-columns: 1fr; }
.ctor__seg label { position: relative; cursor: pointer; }
.ctor__seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.ctor__seg span { display: block; min-height: 2.75rem; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: center; }
.ctor__seg--col span { text-align: left; }
.ctor__seg small { display: block; color: var(--ink-2); font-size: var(--step--1); }
.ctor__seg input:checked + span { border-color: var(--pine); box-shadow: inset 0 0 0 1px var(--pine); background: var(--lamp-soft); }
.ctor__seg input:focus-visible + span { outline: 3px solid var(--pine); outline-offset: 2px; }
.ctor__label { margin: 0.85rem 0 0.4rem; font-size: 0.95rem; }
.ctor__swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ctor__swatches--all { margin-top: 0.6rem; max-height: 14rem; overflow-y: auto; padding: 0.2rem; }
.ctor__swatch { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); background: var(--sw); cursor: pointer; padding: 0; touch-action: manipulation; }
.ctor__swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--pine); }
.ctor__more-btn { margin-top: 0.6rem; background: none; border: 0; padding: 0.3rem 0; color: var(--pine); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 2.75rem; }
.ctor__dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.4rem; }
.ctor__note, .ctor__small { margin: 0.6rem 0 0; font-size: var(--step--1); color: var(--ink-2); }
.ctor__sum { padding: 1.1rem 1.15rem 1.2rem; border-radius: var(--radius); background: var(--ink); color: #fff; }
.ctor__total { margin: 0; font-size: 1rem; }
.ctor__total output { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 600; color: var(--lamp); }
.ctor__rows { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.ctor__rows li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed rgba(255,255,255,.18); padding-bottom: 0.3rem; }
.ctor__rows span { color: rgba(255,255,255,.82); }
.ctor__ask { margin: 0.75rem 0 0; font-size: 0.9rem; color: rgba(255,255,255,.82); }
.ctor__send { width: 100%; margin-top: 1rem; }
.ctor__sum .ctor__small, .ctor__sent { color: rgba(255,255,255,.75); }
.ctor__sent { margin: 0.6rem 0 0; font-weight: 600; color: var(--lamp); }
.ctor__how { display: grid; gap: 1rem; padding-left: 1.2rem; max-width: 60rem; }
@media (min-width: 900px) { .ctor__how { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-left: 1.2rem; } }
.ctor__sum .btn--primary { background: var(--lamp); color: var(--ink); } .ctor__sum .btn--primary:hover { background: #F5D48E; color: var(--ink); }
.ctor-teaser { display: grid; gap: 1.25rem; align-items: center; padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius); background: radial-gradient(120% 140% at 0% 0%, var(--lamp-soft), var(--linen) 70%); border: 1px solid var(--line); }
.ctor-teaser h2 { margin: 0 0 0.4rem; }
.ctor-teaser p { margin: 0; color: var(--ink-2); max-width: 52ch; }
@media (min-width: 800px) { .ctor-teaser { grid-template-columns: 1fr auto; } }

.articles-block { margin-block: 2rem 1rem; }
