/* БРУС — ательє меблів на замовлення (демонстраційний проєкт).
   Система: тепле біле тло, графіт, відтінки дерева; легка крупна типографіка; прямі кути; тонкі лінії. */
:root {
  --paper: #f5f2ec;
  --white: #fbfaf7;
  --graphite: #2a2c2e;
  --graphite-2: #3b3e41;
  --oak: #b08a5b;
  --walnut: #6b4a30;
  --stone: #dcd6ca;
  --muted: #6c675f;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --m: clamp(1.25rem, 4vw, 3.5rem);
  --head: 4.25rem;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--graphite);
  font-family: var(--sans); font-size: 1rem; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--walnut); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; padding: 0.7rem 1rem; background: var(--graphite); color: var(--paper); }
.skip:focus { top: 0.75rem; }

.wrap { width: 100%; max-width: 92rem; margin-inline: auto; padding-inline: var(--m); }
.label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.display { font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; }

/* ---------- Кнопки й посилання ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0 1.6rem;
  background: var(--graphite); color: var(--paper); border: 1px solid var(--graphite); border-radius: 2px;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn:hover { background: var(--walnut); border-color: var(--walnut); }
.btn--ghost { background: transparent; color: var(--graphite); }
.btn--ghost:hover { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.btn--light { background: var(--paper); color: var(--graphite); border-color: var(--paper); }
.btn--light:hover { background: var(--white); color: var(--walnut); border-color: var(--white); }
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none;
}
.arrow-link::after { content: ""; width: 1.6rem; height: 1px; background: currentColor; transition: width 0.3s var(--ease); }
.arrow-link:hover::after { width: 2.6rem; }

/* ---------- Шапка ---------- */
.site-head { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.site-head.is-scrolled { border-bottom-color: var(--stone); }
.site-head__bar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: var(--head); }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.1; min-height: 44px; justify-content: center; }
.brand__name { font-size: 1.375rem; font-weight: 600; letter-spacing: 0.28em; }
.brand__sub { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.2rem; }
.nav { display: none; }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none; color: var(--graphite-2);
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.55rem; height: 1px; background: var(--walnut); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--graphite); }
.site-head__cta { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 0.7rem; min-height: 44px; padding: 0 0.25rem;
  background: none; border: 0; cursor: pointer; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.menu-btn__bars { display: grid; gap: 5px; width: 1.4rem; }
.menu-btn__bars i { display: block; height: 1px; background: currentColor; }
.menu-btn__bars i:last-child { width: 60%; justify-self: end; }
@media (min-width: 960px) {
  .nav { display: flex; gap: 2.25rem; margin-left: auto; margin-right: 2rem; }
  .site-head__cta { display: inline-flex; }
  .menu-btn { display: none; }
}

/* ---------- Повноекранне меню (телефон і планшет) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: var(--graphite); color: var(--paper);
  padding: 0 var(--m) 2rem; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-1.5rem);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}
.overlay.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.overlay__bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--head); }
.overlay__bar .brand__sub { color: #a7a29a; }
.overlay__close { min-height: 44px; padding: 0 0.25rem; background: none; border: 0; cursor: pointer; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--paper); }
.overlay__list { margin-top: clamp(1.5rem, 6vh, 3rem); counter-reset: n; }
.overlay__list a {
  display: flex; align-items: baseline; gap: 1.25rem; padding: 0.7rem 0;
  font-size: clamp(2rem, 1.2rem + 4vw, 3.5rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; text-decoration: none;
  border-bottom: 1px solid #44474a;
}
.overlay__list a::before { counter-increment: n; content: "0" counter(n); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; color: var(--oak); min-width: 1.6rem; }
.overlay__list a[aria-current="page"] { color: var(--oak); }
.overlay__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: 0.5rem; font-size: 0.875rem; color: #b8b3aa; }
.overlay__foot .btn { width: 100%; margin-bottom: 0.75rem; }

/* ---------- Головна: перший екран ---------- */
.hero { position: relative; display: grid; padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero__media { margin-left: auto; width: 100%; position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 50%; background: var(--stone); }
.hero__credit { position: absolute; right: 0.75rem; bottom: 0.6rem; font-size: 0.6875rem; color: rgba(255,255,255,0.85); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.hero__panel { background: var(--graphite); color: var(--paper); padding: clamp(1.75rem, 4vw, 3.25rem); }
.hero__panel .label { color: #b8b3aa; }
.hero h1 { margin-top: 1rem; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem); }
.hero__lead { margin-top: 1.25rem; max-width: 30rem; color: #d9d4ca; font-size: 1.0625rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; margin-top: 2rem; }
.hero__actions .arrow-link { color: var(--paper); }
@media (min-width: 900px) {
  .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-bottom: clamp(3rem, 6vw, 6rem); }
  .hero__media { grid-column: 4 / 13; grid-row: 1; margin-right: calc(var(--m) * -1); width: auto; }
  .hero__media img { aspect-ratio: auto; height: min(82vh, 50rem); min-height: 30rem; }
  .hero__panel { grid-column: 1 / 7; grid-row: 1; align-self: end; margin-bottom: clamp(-3rem, -4vw, -1rem); position: relative; z-index: 2; margin-right: -2rem; }
}
@media (min-width: 1500px) { .hero__media { margin-right: 0; } }

/* ---------- Секції головної ---------- */
.block { padding-block: clamp(3.5rem, 8vw, 7rem) 0; }
.statement { display: grid; gap: 1.5rem; }
.statement__text { font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; max-width: 28ch; }
.statement .arrow-link { color: var(--walnut); }
@media (min-width: 900px) { .statement { grid-template-columns: 3fr 9fr; gap: 3rem; align-items: start; } }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.section-head .arrow-link { color: var(--walnut); }

.pick { display: grid; gap: 2.5rem; }
.piece { display: block; text-decoration: none; }
.piece__img { overflow: hidden; background: var(--stone); }
.piece__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.piece:hover .piece__img img, .piece:focus-visible .piece__img img { transform: scale(1.035); }
.piece__cap { display: grid; gap: 0.15rem; margin-top: 0.9rem; }
.piece__cat { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.piece__name { font-size: 1.25rem; font-weight: 400; line-height: 1.3; }
.piece__price { font-size: 0.875rem; color: var(--muted); }
.piece:hover .piece__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
@media (min-width: 900px) {
  .pick { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem 2rem; align-items: start; }
  .pick .piece:nth-child(1) { grid-column: 1 / 8; grid-row: 1 / 3; }
  .pick .piece:nth-child(1) .piece__img { aspect-ratio: 1 / 1; }
  .pick .piece:nth-child(2) { grid-column: 9 / 13; grid-row: 1; margin-top: 4rem; }
  .pick .piece:nth-child(2) .piece__img { aspect-ratio: 4 / 5; }
  .pick .piece:nth-child(3) { grid-column: 9 / 13; grid-row: 2; align-self: end; }
  .pick .piece:nth-child(3) .piece__img { aspect-ratio: 4 / 3; }
}
@media (max-width: 899px) {
  .piece__img { aspect-ratio: 4 / 3; }
}

.band { margin-top: clamp(3.5rem, 8vw, 7rem); }
.band__img { width: 100%; height: clamp(18rem, 48vw, 36rem); object-fit: cover; object-position: 50% 45%; background: var(--stone); }
.band__cap { display: grid; gap: 1rem 3rem; padding-top: 1.5rem; }
.band__cap h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; max-width: 18ch; }
.band__cap p { max-width: 34rem; color: var(--graphite-2); }
.band__cap .arrow-link { color: var(--walnut); margin-top: 0.5rem; }
@media (min-width: 900px) { .band__cap { grid-template-columns: 5fr 5fr; padding-left: calc((100% - 0px) * 0.25); } }

.closer { padding-block: clamp(4rem, 9vw, 8rem); }
.closer a {
  display: block; text-decoration: none; max-width: 22ch;
  font-size: clamp(1.8rem, 1rem + 3.2vw, 3.5rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1;
  transition: color 0.3s;
}
.closer a span { display: inline-block; color: var(--walnut); transition: transform 0.4s var(--ease); }
.closer a:hover { color: var(--walnut); }
.closer a:hover span { transform: translateX(0.4rem); }

/* ---------- Заголовок внутрішніх сторінок ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1rem 3rem; }
.page-head h1 { font-size: clamp(2.25rem, 1.3rem + 3.2vw, 3.75rem); }
.page-head p { max-width: 36rem; color: var(--graphite-2); }
@media (min-width: 900px) { .page-head { grid-template-columns: 5fr 5fr; align-items: end; } .page-head > :first-child { grid-column: 1; } }
.note { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Каталог ---------- */
.filters { position: sticky; top: var(--head); z-index: 40; background: var(--paper); border-block: 1px solid var(--stone); }
.filters__row { display: flex; gap: 0.25rem 2rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-inline: var(--m); margin-inline: calc(var(--m) * -1); }
.filters__row::-webkit-scrollbar { display: none; }
.filter {
  position: relative; flex: none; min-height: 52px; padding: 0 0.1rem;
  background: none; border: 0; cursor: pointer; font-size: 0.9375rem; font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: color 0.2s;
}
.filter sup { font-size: 0.6875rem; margin-left: 0.2rem; letter-spacing: 0.05em; }
.filter::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--walnut); transform: scaleX(0); transition: transform 0.3s var(--ease); }
.filter:hover { color: var(--graphite); }
.filter[aria-pressed="true"] { color: var(--graphite); font-weight: 600; }
.filter[aria-pressed="true"]::after { transform: scaleX(1); }
.catalog-meta { padding-block: 1.25rem 1.5rem; color: var(--muted); font-size: 0.875rem; }
.grid { display: grid; gap: 2.75rem 1.5rem; grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(3rem, 8vw, 6rem); }
.grid .piece { animation: rise 0.55s var(--ease) both; }
.grid .piece__img { aspect-ratio: var(--ratio, 4 / 5); }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4rem 2rem; } .grid .piece:nth-child(3n + 2) { margin-top: 3.5rem; } }
.empty { padding: 3rem 0; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Сторінка виробу ---------- */
.crumbs { padding-block: 1.25rem; font-size: 0.8125rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin-inline: 0.5rem; }
.item { display: grid; gap: 2rem; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.gallery__main { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--stone); cursor: zoom-in; }
.gallery__main img { width: 100%; height: auto; }
.gallery__count { position: absolute; left: 0.75rem; bottom: 0.75rem; padding: 0.2rem 0.6rem; background: var(--paper); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; }
.gallery__thumbs { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.gallery__thumb { flex: 0 0 5.5rem; padding: 0; border: 0; background: var(--stone); cursor: pointer; opacity: 0.6; outline-offset: 2px; transition: opacity 0.2s; }
.gallery__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--walnut); }
.gallery__thumb:hover { opacity: 1; }
.gallery__credit { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--muted); }
.item__info h1 { margin-top: 0.6rem; font-size: clamp(2rem, 1.2rem + 2.8vw, 3.25rem); }
.item__short { margin-top: 1rem; font-size: 1.125rem; color: var(--graphite-2); }
.specs { margin-top: 1.75rem; border-top: 1px solid var(--stone); }
.specs > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--stone); font-size: 0.9375rem; }
.specs dt { color: var(--muted); }
.item__price { margin-top: 1.5rem; font-size: 1.375rem; font-weight: 300; }
.item__actions { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.item__note { margin-top: 1rem; }
@media (min-width: 560px) { .item__actions { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .item { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3rem 2rem; }
  .gallery { grid-column: 1 / 8; }
  .item__info { grid-column: 9 / 13; position: sticky; top: calc(var(--head) + 1.5rem); align-self: start; }
  .item__actions { grid-template-columns: 1fr; }
}
.detail { display: grid; gap: 2rem 3rem; padding-block: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--stone); }
.detail h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.detail__text { display: grid; gap: 1rem; max-width: 40rem; }
.detail__list { display: grid; gap: 0.6rem; max-width: 40rem; }
.detail__list li { padding-left: 1.25rem; position: relative; }
.detail__list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.6rem; height: 1px; background: var(--walnut); }
@media (min-width: 1000px) { .detail { grid-template-columns: 3fr 9fr; } }
.neighbors { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid var(--stone); }
.similar { padding-block: 2rem clamp(3rem, 7vw, 6rem); }
.similar__grid { display: grid; gap: 2rem 1.5rem; }
.similar .piece__img { aspect-ratio: 4 / 3; }
@media (min-width: 700px) { .similar__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Лайтбокс ---------- */

/* ---------- Проєкти ---------- */
.mosaic { display: grid; gap: 2.5rem 1.5rem; padding-bottom: clamp(3rem, 8vw, 6rem); }
.shot { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.shot__img { overflow: hidden; background: var(--stone); }
.shot__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.shot:hover .shot__img img { transform: scale(1.03); }
.shot figcaption, .shot__cap { display: grid; gap: 0.1rem; margin-top: 0.8rem; }
.shot__cap b { font-size: 1.125rem; font-weight: 400; }
.shot__cap span { font-size: 0.8125rem; color: var(--muted); }
.mosaic > :nth-child(n) .shot__img { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4rem 2rem; align-items: start; }
  .mosaic > :nth-child(1) { grid-column: 1 / 9; }
  .mosaic > :nth-child(1) .shot__img { aspect-ratio: 4 / 3; }
  .mosaic > :nth-child(2) { grid-column: 10 / 13; align-self: end; }
  .mosaic > :nth-child(2) .shot__img { aspect-ratio: 3 / 4; }
  .mosaic > :nth-child(3) { grid-column: 2 / 6; }
  .mosaic > :nth-child(3) .shot__img { aspect-ratio: 4 / 5; }
  .mosaic > :nth-child(4) { grid-column: 7 / 13; margin-top: 5rem; }
  .mosaic > :nth-child(4) .shot__img { aspect-ratio: 3 / 2; }
  .mosaic > :nth-child(5) { grid-column: 1 / 8; }
  .mosaic > :nth-child(5) .shot__img { aspect-ratio: 3 / 2; }
}

/* ---------- Про майстерню ---------- */
.about { display: grid; gap: 2rem 3rem; padding-block: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--stone); }
.about__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
.about__text { display: grid; gap: 1.1rem; max-width: 40rem; }
.about__text p { color: var(--graphite-2); }
.about__text .lead { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); font-weight: 300; line-height: 1.4; color: var(--graphite); }
@media (min-width: 900px) { .about { grid-template-columns: 4fr 8fr; } .about__title { position: sticky; top: calc(var(--head) + 1.5rem); align-self: start; } }
.about-photos { display: grid; gap: 1rem; margin-block: clamp(2rem, 5vw, 4rem); }
.about-photos img { width: 100%; height: 100%; object-fit: cover; background: var(--stone); }
.about-photos figure { margin: 0; }
.about-photos .a img { aspect-ratio: 4 / 3; object-position: 50% 30%; }
.about-photos .b img { aspect-ratio: 4 / 3; object-position: 50% 55%; }
@media (min-width: 800px) { .about-photos { grid-template-columns: 7fr 5fr; align-items: end; } .about-photos .a img { aspect-ratio: 3 / 2; } .about-photos .b img { aspect-ratio: 4 / 5; } }
.materials { display: grid; gap: 1.5rem; }
.material { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.material__swatch { width: 3.25rem; height: 3.25rem; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.material h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.material p { margin-top: 0.25rem; color: var(--graphite-2); }

/* ---------- Контакти ---------- */
.contacts-layout { display: grid; gap: 3rem; padding-bottom: clamp(3rem, 8vw, 6rem); }
.steps { margin-top: 1.5rem; border-top: 1px solid var(--stone); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0.5rem 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--stone); }
.steps__n { font-size: 1.75rem; font-weight: 200; line-height: 1; color: var(--walnut); letter-spacing: -0.02em; }
.steps h3 { font-size: 1.125rem; font-weight: 500; }
.steps p { margin-top: 0.3rem; font-size: 0.9375rem; color: var(--muted); max-width: 34ch; }
.form { display: grid; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--white); border: 1px solid var(--stone); }
.form h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.85rem; font: inherit; color: var(--graphite);
  background: var(--paper); border: 1px solid #b9b3a6; border-radius: 2px;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--walnut); outline-offset: 1px; border-color: var(--walnut); }
.field__err { color: #8e2f1d; font-size: 0.8125rem; }
.field__err[hidden] { display: none; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.result { display: grid; gap: 1rem; padding: 1.25rem; background: var(--paper); border-left: 3px solid var(--walnut); }
.result[hidden] { display: none; }
.result pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 0.9375rem; }
.result__actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
@media (min-width: 1000px) { .contacts-layout { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; } }

/* ---------- Підвал ---------- */
.site-foot { margin-top: clamp(2rem, 5vw, 4rem); background: var(--graphite); color: var(--paper); padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.site-foot__top { display: grid; gap: 2rem 3rem; }
.site-foot .brand__sub { color: #a7a29a; }
.site-foot__nav { display: grid; gap: 0; }
.site-foot__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: #d9d4ca; }
.site-foot__nav a:hover { color: var(--oak); }
.site-foot__demo { max-width: 34rem; font-size: 0.875rem; color: #b8b3aa; }
.site-foot__demo strong { color: var(--paper); font-weight: 600; }
.site-foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #44474a; font-size: 0.8125rem; color: #a7a29a; }
.site-foot__bottom a { display: inline-flex; align-items: center; min-height: 44px; color: #d9d4ca; }
@media (min-width: 800px) { .site-foot__top { grid-template-columns: 4fr 3fr 5fr; } }

/* ---------- Поява ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Допоміжне */
.btn--sm { min-height: 44px; padding: 0 1.2rem; font-size: 0.875rem; }
.overlay[hidden] { display: none; }
/* Хлібні крихти: зручна висота для дотику */
.crumbs { padding-block: 0.25rem; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs span { align-self: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; }
/* ---------- Бігуча стрічка й карусель (motion.js) ---------- */
.mq { position: relative; overflow: hidden; }
.mq__track { display: flex; width: max-content; animation: mq var(--mq-dur, 40s) linear infinite; will-change: transform; }
.mq__group { display: flex; flex: none; align-items: center; }
.mq.is-reverse .mq__track { animation-direction: reverse; }
.mq.is-paused .mq__track, .mq:hover .mq__track, .mq.is-hover .mq__track { animation-play-state: paused; }
.mq.is-static { overflow-x: auto; }
.mq.is-static .mq__track { animation: none; }
.mq.is-static .mq__btn { display: none; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq__btn { position: absolute; right: var(--m); bottom: 0.5rem; z-index: 2; min-height: 2.25rem; padding: 0 0.8rem; border: 1px solid var(--graphite); background: var(--paper); color: var(--graphite); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.mq__btn:hover { background: var(--graphite); color: var(--paper); }
.mq--mat { padding-block: clamp(1rem, 3vw, 2rem); border-block: 1px solid var(--graphite); background: var(--white); }
.mq--mat li { display: flex; align-items: center; white-space: nowrap; font-size: clamp(2.6rem, 1rem + 7vw, 7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px var(--graphite); transition: color 0.3s; }
.mq--mat li:nth-child(3n) { color: var(--oak); -webkit-text-stroke-color: var(--oak); }
.mq--mat li::after { content: ""; flex: none; width: clamp(2.5rem, 6vw, 5rem); height: 2px; margin-inline: clamp(1rem, 3vw, 2.5rem); background: var(--graphite); }

/* карусель-«рулетка»: смуга прогресу з поділками */
.works { padding-block: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.works__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.works__head h2 { font-size: clamp(1.8rem, 1rem + 2.6vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.works__ctrl { display: flex; align-items: center; gap: 0.4rem; }
.works__count { margin-right: 0.75rem; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; color: var(--muted); }
.works__btn { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--graphite); background: transparent; cursor: pointer; font-size: 1.1rem; transition: background-color 0.2s, color 0.2s; }
.works__btn:hover:not(:disabled) { background: var(--graphite); color: var(--paper); }
.works__btn:disabled { opacity: 0.3; cursor: default; }
.works__track { display: flex; gap: clamp(0.75rem, 2vw, 1.5rem); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--m); scroll-padding-inline: var(--m); cursor: grab; }
.works__track::-webkit-scrollbar { display: none; }
.works__track.is-drag { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.works__track.is-drag .work { pointer-events: none; }
.works__track:focus-visible { outline-offset: -3px; }
.work { flex: none; width: min(78vw, 26rem); scroll-snap-align: start; display: grid; gap: 0.75rem; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: inherit; }
.work__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.work:hover .work__img img { transform: scale(1.05); }
.work__cap { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.75rem; align-items: baseline; }
.work__cap i { grid-row: 1 / 3; font-style: normal; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; color: var(--oak); }
.work__cap b { font-size: 1.0625rem; letter-spacing: -0.01em; }
.work__cap span { font-size: 0.875rem; color: var(--muted); }
.works__ruler { position: relative; height: 1.1rem; margin-top: 1.5rem; border-bottom: 2px solid var(--graphite); background: repeating-linear-gradient(90deg, var(--graphite) 0 1px, transparent 1px 0.75rem) bottom / 100% 0.55rem no-repeat, repeating-linear-gradient(90deg, var(--graphite) 0 1px, transparent 1px 3.75rem) bottom / 100% 0.95rem no-repeat; }
.works__ruler i { position: absolute; left: 0; right: 0; bottom: -2px; height: 4px; background: var(--oak); transform-origin: left; transform: scaleX(0.04); transition: transform 0.25s linear; }
@media (prefers-reduced-motion: reduce) { .mq__track { animation: none; } .mq { overflow-x: auto; } .mq__btn { display: none; } }

/* Карусель «Роботи»: вирівнювання по сітці сайту й ширші картки, щоб на великих екранах було що гортати */
.works__track { padding-inline: max(var(--m), calc((100vw - 92rem) / 2 + var(--m))); scroll-padding-inline: max(var(--m), calc((100vw - 92rem) / 2 + var(--m))); }
.work { width: min(78vw, clamp(18rem, 24vw, 34rem)); }
.works__btn { width: 3.25rem; height: 3.25rem; }

/* Карусель «Роботи»: вікно в межах сітки сайту (краї збігаються із заголовком), 3 / 2 / 1,2 картки в кадрі */
.works { --gap: clamp(0.75rem, 1.6vw, 1.5rem); }
.works__track { width: calc(min(100%, 92rem) - var(--m) * 2); margin-inline: auto; padding-inline: 0; scroll-padding-inline: 0; gap: var(--gap); }
.work { width: calc((100% - var(--gap) * 2) / 3); }
.work__img { aspect-ratio: 4 / 3; }
@media (max-width: 1099px) { .work { width: calc((100% - var(--gap)) / 2); } }
@media (max-width: 640px) {
  .works__track { width: auto; margin-left: var(--m); margin-right: 0; padding-right: var(--m); }
  .work { width: 78%; }
  .work__img { aspect-ratio: 4 / 5; }
}
.works__count { white-space: nowrap; margin-right: 0.4rem; }
@media (max-width: 640px) { .works__head { align-items: center; } .works__head h2 { font-size: 1.75rem; } }

/* Стрілки по боках каруселі, поверх фото */
.works__stage { position: relative; width: calc(min(100%, 92rem) - var(--m) * 2); margin-inline: auto; }
.works__stage .works__track { width: 100%; margin: 0; }
.works__btn--prev, .works__btn--next { position: absolute; z-index: 3; top: calc(50% - 2rem); width: 3.5rem; height: 3.5rem; border: 1px solid var(--graphite); background: var(--paper); color: var(--graphite); box-shadow: 0 6px 18px rgba(30, 30, 30, 0.22); }
.works__btn--prev { left: 0.6rem; }
.works__btn--next { right: 0.6rem; }
.works__btn--prev:hover:not(:disabled), .works__btn--next:hover:not(:disabled) { background: var(--graphite); color: var(--paper); }
.works__btn:disabled { opacity: 0; pointer-events: none; }
.works__btn:active:not(:disabled) { transform: scale(0.92); }
.works__play { min-height: 2.5rem; padding: 0 0.9rem; border: 1px solid var(--graphite); background: transparent; cursor: pointer; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.works__play:hover { background: var(--graphite); color: var(--paper); }
@media (max-width: 640px) { .works__stage { width: auto; margin-left: var(--m); margin-right: 0; } .works__stage .works__track { padding-right: var(--m); } .works__btn--prev, .works__btn--next { width: 3rem; height: 3rem; top: calc(35% ); } .works__btn--next { right: 0.5rem; } }

/* Перегляд фото: рамка точно по фото, стрілки по краях фото, «Закрити» у верхньому куті фото, підпис нижче */
.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: rgba(24, 25, 26, 0.97); color: #f5f2ec; }
.lightbox::backdrop { background: rgba(24, 25, 26, 0.97); }
.lightbox .lightbox__stage { position: static; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.75rem; touch-action: pan-y; }
.lightbox .lb-frame { position: relative; margin: 0; max-width: 100%; min-width: min(17rem, calc(100vw - 1rem)); display: flex; justify-content: center; line-height: 0; background: #000; }
.lightbox .lb-frame img { display: block; width: auto; height: auto; max-width: calc(100vw - 1.5rem); max-height: calc(100dvh - 5.25rem); object-fit: contain; }
.lightbox .lb-bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.6rem; line-height: 1.2; background: linear-gradient(rgba(0, 0, 0, 0.55), transparent); }
.lightbox .lb-count { padding: 0.25rem 0.6rem; background: rgba(0, 0, 0, 0.6); color: #f5f2ec; font-size: 0.875rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lightbox .lb-close { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 2.75rem; height: 2.75rem; padding: 0 0.9rem; border: 1px solid #f5f2ec; border-radius: 0; background: #f5f2ec; color: rgba(24, 25, 26, 0.97); cursor: pointer; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; transition: transform 0.15s, background-color 0.2s; }
.lightbox .lb-close:hover { background: #b08a5b; border-color: #b08a5b; }
.lightbox .lb-arrow { position: absolute; z-index: 2; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; min-width: 0; min-height: 0; padding: 0; border: 1px solid #f5f2ec; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #f5f2ec; cursor: pointer; font-size: 1.35rem; line-height: 1; transition: transform 0.15s, background-color 0.2s, color 0.2s; }
.lightbox .lb-arrow:hover { background: #f5f2ec; color: rgba(24, 25, 26, 0.97); }
.lightbox .lb-arrow:active { transform: scale(0.9); }
.lightbox .lb-close:active { transform: scale(0.95); }
.lightbox .lb-arrow--prev { left: 0.6rem; }
.lightbox .lb-arrow--next { right: 0.6rem; }
.lightbox .lb-arrow[hidden] { display: none; }
.lightbox .lightbox__cap { position: static; margin: 0; max-width: 60rem; text-align: center; font-size: 0.875rem; line-height: 1.35; color: #cfc9bd; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .lightbox .lb-close__t { display: none; } .lightbox .lb-arrow { width: 2.9rem; height: 2.9rem; } .lightbox .lightbox__stage { padding: 0.5rem; } .lightbox .lb-frame img { max-width: calc(100vw - 1rem); } }
@media (max-height: 560px) { .lightbox .lb-close__t { display: none; } .lightbox .lb-frame img { max-height: calc(100dvh - 4rem); } .lightbox .lightbox__cap { -webkit-line-clamp: 1; } }

/* Скруглення */
.lightbox .lb-frame { border-radius: 16px; overflow: hidden; }
.lightbox .lb-frame img { border-radius: 0; }
.lightbox .lb-count { border-radius: 10px; }
.lightbox .lb-close { border-radius: 12px; }
.lightbox .lightbox__stage .lightbox__cap { border-radius: 0; }
.works__btn--prev, .works__btn--next { border-radius: 50%; }
.works__play { border-radius: 10px; }
.work__img { border-radius: 14px; }

/* Скруглення */
.btn, .field input, .field select, .field textarea, .site-head__cta, .menu-btn, .mq__btn { border-radius: 10px; }
.piece__img, .shot__img, .about-photos img, .band__img, .hero__panel, .form { border-radius: 14px; overflow: hidden; }

/* Стрічка матеріалів: менший розмір на телефоні й планшеті, кнопка паузи не перекриває слова */
.mq--mat li { font-size: clamp(1.35rem, 0.65rem + 1.9vw, 2.1rem); -webkit-text-stroke-width: 1px; }
.mq--mat { padding-block: clamp(0.6rem, 1.5vw, 1.1rem); }
.mq--mat li::after { width: clamp(1.75rem, 4vw, 3.5rem); margin-inline: clamp(0.85rem, 2.2vw, 1.9rem); }
.mq--mat .mq__btn { top: 50%; bottom: auto; transform: translateY(-50%); right: 0.6rem; min-height: 2rem; padding: 0 0.7rem; border-radius: 99px; background: var(--paper); font-size: 0.6875rem; }
@media (min-width: 1100px) { .mq--mat li { font-size: clamp(1.95rem, calc(7.6vw - 52px), 3.9rem); } }

/* Перемикач мови в підвалі — праворуч */
a[data-lang-link] { margin-left: auto; }
