/* Фаска — токени, база й лендінг (T1).
   Джерело: design/canvas/Main.dc.html, MobileHome.dc.html, StyleGuide.dc.html.
   Точки перелому: 1100 / 960 / 640 px. */

/* ---------- Шрифти (SPEC 14, рішення 011) ----------
   Діапазони font-weight і unicode-range — з @fontsource-variable 5.3.0 (wght.css, wght-italic.css). */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/manrope-latin-wght-normal.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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-latin-wght-normal.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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-cyrillic-wght-italic.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-latin-wght-italic.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 {
  /* Кольори дизайн-системи (HANDOFF, розділ 4). Назви фіксовані: ними користуються інші задачі. */
  --ground: #F3F0EA;
  --raised: #FAF8F4;
  --stage: #E7E1D6;
  --line: #D8D2C7;
  --ink: #1B1A17;
  --ink-soft: #5B564F;
  --accent: #6E5233;
  --ash: #CDB48C;
  --night: #171614;
  --on-night: #EDE9E2;
  --on-night-soft: #A39D93;
  --line-night: #36322D;

  /* Додаткові кольори, які трапляються в макеті */
  --line-on-stage: #CFC7B9;       /* лінії на тлі stage: рядки контактів; рамка кнопок ‹ › поверх фото (Work) */
  --ring-on-stage: #BDB3A3;       /* кружки іконок у контактах */
  --chip-line: #CFC8BC;           /* рамка неактивного фільтра */
  --chip-count-on-ink: #C9C2B6;   /* лічильник на активному (темному) фільтрі */
  --stage-guide: #A99D89;         /* пунктирний овал під моделлю */
  --thumb-bg: #EFEAE1;            /* тло мініатюр фото в картці роботи (Work) */
  --dialog-backdrop: #34312C;     /* тло під вікном картки роботи (Work) */
  --header-bg: rgba(243, 240, 234, 0.92);       /* напівпрозора шапка */
  --bar-bg: rgba(243, 240, 234, 0.96);          /* нижня панель картки роботи на телефоні (MobileWork) */
  --photo-button-bg: rgba(250, 248, 244, 0.7);  /* кнопки ‹ › поверх фото (Work) */
  --hint-bg: rgba(27, 26, 23, 0.84);            /* темна підказка поверх фото й моделі */

  /* Шрифти */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;

  /* Сітка й форма */
  --container: 1440px;
  --gutter: 48px;
  --header-h: 76px;
  --radius: 2px;
  --pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, p, blockquote, figure, ul, ol { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
button { font: inherit; color: inherit; }

/* Колір посилань без специфічності: класи компонентів його перекривають. */
:where(a) { color: var(--ink); }
:where(a:hover) { color: var(--accent); }

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

/* Відступ під липку шапку і для якорів меню, і для фокуса з клавіатури: браузер прокручує
   так, щоб елемент (разом з обведенням) не ховався під шапкою. Лише тут, без scroll-margin
   на розділах, бо обидва відступи додаються. */
html { scroll-padding-top: calc(var(--header-h) + 8px); }

.wrap {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: 128px; padding-bottom: 128px; }

/* Показ лише на телефоні (≤ 640 px) або всюди, крім телефона. */
.only-phone { display: none; }

/* ---------- Типографіка ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.split-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: end;
}
.section-title { display: flex; flex-direction: column; gap: 16px; }

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1;
}
.h2 em, .hero-title em { font-style: italic; font-weight: 400; }

.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 3.4vw, 50px);
  line-height: 1.04;
}

.section-intro { font-size: 17px; color: var(--ink-soft); }

/* ---------- Кнопки й посилання ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: var(--pill);
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-light { background: var(--raised); border: 1px solid var(--line); color: var(--ink); }
.btn-outline { background: transparent; border: 1px solid var(--ink); color: var(--ink); }

.btn-lg { height: 56px; padding: 0 28px; font-size: 15px; }
.btn-md { height: 52px; padding: 0 24px; font-size: 15px; }
.btn-sm { height: 44px; padding: 0 22px; font-size: 14px; gap: 10px; }

.btn-arrow .icon-arrow { transition: transform .25s; }
@media (hover: hover) {
  .btn-arrow:hover .icon-arrow { transform: translateX(4px); }
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  text-underline-offset: 6px;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.logo-word {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 44px;
  letter-spacing: 0.16em;
}
.logo-tagline { font-size: 12px; color: var(--ink-soft); }

.nav { display: flex; gap: 36px; font-size: 15px; font-weight: 500; }
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-icon {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--ground);
  align-items: center;
  justify-content: center;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.burger .burger-close { display: none; }
.burger[aria-expanded="true"] .burger-open { display: none; }
.burger[aria-expanded="true"] .burger-close { display: block; }

/* Меню для вузьких екранів: висне під шапкою поверх сторінки, тому нічого не зсуває. */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  flex-direction: column;
  padding: 8px var(--gutter) 24px;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.mobile-menu-link {
  padding: 12px 0;
  font-family: var(--serif);
  font-size: 30px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-cta { margin-top: 20px; height: 52px; font-size: 15px; }

/* ---------- Перший екран ---------- */

.hero { padding-top: 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 24px 0 8px;
}
.hero-intro { display: flex; flex-direction: column; gap: 28px; }

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 6.2vw, 90px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero-lead { max-width: 470px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.hero-figure {
  position: relative;
  height: clamp(440px, 46vw, 660px);
  background: var(--stage);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-caption {
  position: absolute;
  left: 28px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-caption-name { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.2; }
.hero-caption-meta { font-size: 13px; color: var(--ink-soft); }

.hero-3d {
  position: absolute;
  right: 24px;
  bottom: 24px;
  height: 48px;
  padding: 0 20px;
  gap: 10px;
  font-size: 14px;
}

/* Три переваги */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 56px;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.fact { display: flex; gap: 20px; }
.fact-num { font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--accent); }
.fact-title { margin-bottom: 6px; font-size: 16px; font-weight: 600; }
.fact-text { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Каталог ----------
   Розмітку фільтрів і карток малює main.js (T4) у [data-catalog-*]. Класи нижче — за макетом. */

.chips { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  height: 44px;
  padding: 0 18px;
  border-radius: var(--pill);
  border: 1px solid var(--chip-line);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip-count { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.chip[aria-pressed="true"] .chip-count { color: var(--chip-count-on-ink); }

.works-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px 32px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: var(--ink);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--stage);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }

.badge-3d {
  position: absolute;
  top: 16px;
  left: 16px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--pill);
  background: var(--raised);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.card-more {
  position: absolute;
  right: 16px;
  bottom: 16px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--ground);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}
.card:focus-visible .card-more { opacity: 1; transform: none; }
@media (hover: hover) {
  .card:hover .card-img { transform: scale(1.04); }
  .card:hover .card-more { opacity: 1; transform: none; }
}

.card-info { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card-text { display: flex; flex-direction: column; gap: 4px; }
.card-title { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.1; }
.card-line, .card-year { font-size: 14px; color: var(--ink-soft); }

.catalog-count { margin-top: 48px; font-size: 14px; color: var(--ink-soft); }

/* ---------- Як я працюю ---------- */

.section-raised {
  background: var(--raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps {
  margin-top: 56px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
}
.step {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-num { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--accent); }
.step-title { font-size: 18px; font-weight: 600; }
.step-text { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: center;
}

.model-block { margin-top: 96px; }
.model-text { display: flex; flex-direction: column; gap: 24px; }

.checklist {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
}
.checklist li { display: flex; align-items: center; gap: 12px; }
.check-icon { color: var(--accent); }

.model-link { align-self: flex-start; margin-top: 8px; }

/* Ілюстрація переглядача: уся картинка — посилання на модель «Вигину» (з клавіатури туди веде
   кнопка «Подивитися приклад»). Кнопки й підказка намальовані — це span, а не справжні кнопки. */
.model-demo {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  container-type: inline-size;
  aspect-ratio: 4 / 3;
  background: var(--stage);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-demo-ring {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 13%;
  height: 15%;
  border: 1px dashed var(--stage-guide);
  border-radius: 50%;
}
.model-demo-img {
  position: relative;
  width: 62%;
  height: 80%;
  object-fit: contain;
  transition: transform .9s var(--ease);
}
@media (hover: hover) {
  .model-demo:hover .model-demo-img { transform: scale(1.04); }
}
.model-demo-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--pill);
  background: var(--raised);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.model-demo-size { position: absolute; top: 26px; right: 24px; font-size: 13px; color: var(--ink-soft); }
.model-demo-hint {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  height: 36px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: var(--hint-bg);
  color: var(--ground);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.model-demo-tools {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--raised);
  border: 1px solid var(--line);
}
.model-demo-tool {
  height: 44px;
  padding: 0 16px;
  border-radius: var(--pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.model-demo-tool.is-on { background: var(--ink); color: var(--ground); }

/* У вузькій ілюстрації лишаємо в панелі тільки іконки. */
@container (max-width: 600px) {
  .model-demo-tool { width: 44px; padding: 0; justify-content: center; }
  .model-demo-tool-label { display: none; }
}
@container (max-width: 400px) {
  .model-demo-tag, .model-demo-size { top: 14px; }
  .model-demo-tag { left: 14px; }
  .model-demo-size { right: 14px; }
  .model-demo-hint { bottom: 76px; }
  .model-demo-tools { bottom: 14px; }
}

/* ---------- Ясен (темний розділ) ---------- */

.section-night { background: var(--night); color: var(--on-night); }
.section-night .eyebrow { color: var(--ash); }
.section-night .section-intro { color: var(--on-night-soft); }
.section-night :focus-visible { outline-color: var(--on-night); }

.props {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.prop {
  border-top: 1px solid var(--line-night);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prop-title { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.prop-text { font-size: 15px; line-height: 1.6; color: var(--on-night-soft); }

.section-night .swatches-label { margin: 80px 0 24px; color: var(--on-night-soft); }

.swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.swatch { display: flex; flex-direction: column; gap: 16px; }
.swatch-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.swatch-img-dark { outline: 1px solid var(--line-night); }
.swatch-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.swatch-name { font-family: var(--serif); font-size: 26px; }
.swatch-note { font-size: 14px; color: var(--on-night-soft); }

/* ---------- Майстер ---------- */

.portrait {
  aspect-ratio: 5 / 6;
  background: var(--stage);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-soft);
}
.portrait-title { font-size: 14px; font-weight: 600; }
.portrait-note { font-size: 13px; }

.master-text { display: flex; flex-direction: column; gap: 28px; }
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.15;
}
.master-about { max-width: 560px; }
.master-sign { font-size: 15px; font-weight: 600; }

/* ---------- Контакти ---------- */

.section-stage { background: var(--stage); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 72px;
}
.contact-intro { display: flex; flex-direction: column; gap: 24px; }
.contact-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 0.98;
}
.contact-lead { max-width: 460px; }

/* Дві рівноправні кнопки (рішення 008): однакова ширина, номер — поруч із Viber. */
.contact-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.contact-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.contact-btn { min-width: 264px; }
.contact-number { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* Номер текстом — лише на комп’ютері: ширина > 960 px або є мишка. */
@media (max-width: 960px) and (hover: none) {
  .contact-number { display: none; }
}

.contact-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-on-stage); }
.contact-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-on-stage);
  text-decoration: none;
  color: var(--ink);
  transition: padding .25s;
}
.contact-row-static { border-bottom: 0; }
@media (hover: hover) {
  a.contact-row:hover { padding-left: 12px; }
}
.contact-icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--pill);
  border: 1px solid var(--ring-on-stage);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-value {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* ---------- Підвал ---------- */

.site-footer {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.footer-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink-soft);
}
.footer-nav a:hover { color: var(--accent); }
.footer-nav .footer-top { color: var(--ink); font-weight: 600; }

/* ---------- ≤ 1100 px ---------- */

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 961–1100 px: повне меню ще видно, але шапка вже тісна. */
@media (min-width: 961px) and (max-width: 1100px) {
  .logo-tagline { display: none; }
  .nav { gap: 28px; }
}

/* ---------- ≤ 960 px: меню в бургер, одна колонка ---------- */

@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: flex; }

  .hero-grid, .split, .split-head, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .props { grid-template-columns: 1fr; }
}

/* Без JS бургер не працює, тому замість нього — рядок посилань під логотипом.
   Медіазапит scripting спрацьовує ще до першого малювання, тож верстка не стрибає. */
@media (scripting: none) and (max-width: 960px) {
  .site-header { position: static; }
  html { scroll-padding-top: 8px; }
  .burger, .mobile-menu { display: none; }
  .header-bar { height: auto; min-height: var(--header-h); flex-wrap: wrap; row-gap: 0; }
  .nav {
    display: flex;
    order: 3;
    width: calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 8px;
    gap: 24px;
    overflow-x: auto;
  }
}

/* ---------- ≤ 640 px: телефон (MobileHome) ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }

  body { font-size: 16px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .only-phone { display: inline; }
  .no-phone { display: none; }

  .logo-word { font-size: 21px; }
  .logo-tagline { display: none; }
  .header-icon { display: inline-flex; }

  .h2 { font-size: 42px; }
  .split-head, .section-title { gap: 12px; }
  .section-intro { font-size: 16px; }

  .hero { padding-top: 32px; }
  .hero-grid { gap: 28px; }
  .hero-text { padding: 0; gap: 24px; }
  .hero-intro { gap: 20px; }
  .hero-title { font-size: 46px; line-height: 1; letter-spacing: 0; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { width: 100%; }
  .hero-figure {
    height: 430px;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    border-radius: 0;
  }
  .hero-caption { left: 16px; bottom: 18px; gap: 0; }
  .hero-caption-name { font-size: 24px; }
  .hero-3d { right: 16px; bottom: 16px; height: 44px; padding: 0 16px; gap: 8px; font-size: 13px; }
  .hero-3d svg { width: 16px; height: 16px; }

  .facts { grid-template-columns: 1fr; gap: 0; margin-top: 8px; padding-top: 0; border-top: 0; }
  .fact { gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .fact-num { font-size: 22px; line-height: 1.1; }
  .fact-title { margin-bottom: 4px; font-size: 15px; }
  .fact-text { font-size: 14px; line-height: 1.5; }

  /* Фільтри гортаються вбік; відступи по вертикалі — щоб не обрізалась рамка фокуса. */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 19px calc(-1 * var(--gutter)) -5px;
    padding: 5px var(--gutter);
  }
  .chip { flex: none; padding: 0 16px; }
  .works-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 28px; }
  .card { gap: 14px; }
  .card-title { font-size: 30px; }
  .badge-3d { top: 14px; left: 14px; }
  .catalog-count { margin-top: 32px; }

  .steps, .swatches { grid-template-columns: 1fr; }
  .model-block { margin-top: 64px; }
  .model-demo { aspect-ratio: 1 / 1; }
  .model-demo-img { height: 70%; margin-bottom: 12%; }
  .section-night .swatches-label { margin-top: 56px; }

  .contact-actions { align-items: stretch; }
  .contact-action { flex-direction: column; align-items: stretch; text-align: center; }
  .contact-btn { width: 100%; min-width: 0; }
  .contact-value { font-size: 24px; }
}

/* ---------- Менше руху ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .card:hover .card-img, .model-demo:hover .model-demo-img { transform: none; }
}
