/* GV-Kuhni демо. Палітра взята з фасадів і стільниць їхніх кухонь */
:root {
  --stone: #ecedea;      /* фон: світлий кварц */
  --paper: #f8f8f6;      /* світлі поверхні */
  --ink: #23262a;        /* графіт, основний текст */
  --ink-2: #5d6168;      /* другорядний текст */
  --emerald: #16704c;    /* смарагдовий фасад, акцент */
  --emerald-d: #0f5639;
  --walnut: #7a4e33;     /* горіх */
  --line: #d3d5d0;

  --font: "Commissioner", system-ui, sans-serif;
  --quote: "Literata", Georgia, serif;

  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--font);
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--emerald); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* Демо-плашка */
.demo-bar {
  background: var(--ink); color: #c9ccd1;
  font-size: 13px; text-align: center; padding: 7px var(--pad);
}

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--stone) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__in { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: -0.03em; text-decoration: none;
}
/* Знак: три фасади різної висоти, як шафи над стільницею */
.logo__mark {
  width: 22px; height: 22px; border-radius: 3px;
  background:
    linear-gradient(var(--emerald), var(--emerald)) 0 0 / 6px 100% no-repeat,
    linear-gradient(var(--emerald), var(--emerald)) 8px 0 / 6px 62% no-repeat,
    linear-gradient(var(--walnut), var(--walnut)) 16px 0 / 6px 100% no-repeat;
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.header-phone { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: var(--r);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.btn--main { background: var(--emerald); color: #fff; }
.btn--main:hover { background: var(--emerald-d); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--stone); }

/* Перший екран */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 7vw, 96px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px); align-items: stretch;
}
.hero__text { display: flex; flex-direction: column; padding-top: clamp(8px, 3vw, 40px); }
.hero__title {
  font-size: clamp(42px, 5.1vw, 74px);
  font-weight: 800; letter-spacing: -0.045em; line-height: 0.95;
}
.hero__lead { margin-top: 24px; font-size: 19px; color: var(--ink-2); max-width: 30em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.rating {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 24px;
  font-size: 15px; color: var(--ink-2); text-decoration: none; align-self: flex-start;
}
.rating b { color: var(--ink); }
.rating:hover span:last-child { text-decoration: underline; }
.rating__stars {
  position: relative; display: inline-block; width: 86px; height: 16px;
  background: var(--line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 16'%3E%3Cg%3E%3Cpath id='s' d='M8 0l2.4 5 5.6.6-4.2 3.7 1.2 5.5L8 12l-5 2.8 1.2-5.5L0 5.6 5.6 5z'/%3E%3Cuse href='%23s' x='17.5'/%3E%3Cuse href='%23s' x='35'/%3E%3Cuse href='%23s' x='52.5'/%3E%3Cuse href='%23s' x='70'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 16'%3E%3Cg%3E%3Cpath id='s' d='M8 0l2.4 5 5.6.6-4.2 3.7 1.2 5.5L8 12l-5 2.8 1.2-5.5L0 5.6 5.6 5z'/%3E%3Cuse href='%23s' x='17.5'/%3E%3Cuse href='%23s' x='35'/%3E%3Cuse href='%23s' x='52.5'/%3E%3Cuse href='%23s' x='70'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100%;
}
.rating__stars span { position: absolute; inset: 0 auto 0 0; background: #e8a317; }

/* Вибір фасаду: головна "фішка" сторінки */
.facades { margin-top: auto; padding-top: 40px; }
.facades__label { font-size: 14px; color: var(--ink-2); }
.facades__row { display: flex; gap: 10px; margin-top: 12px; }
.swatch {
  width: 58px; height: 74px; padding: 0; cursor: pointer;
  border-radius: 4px; border: 1px solid rgb(0 0 0 / .12);
  background: var(--c);
  /* ручка-профіль, як на фасаді */
  background-image: linear-gradient(rgb(0 0 0 / .28), rgb(0 0 0 / .28));
  background-size: 2px 26px; background-position: 82% 50%; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 0 var(--ink);
  transition: transform .2s, box-shadow .2s;
}
.swatch:hover { transform: translateY(-3px); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--stone), 0 0 0 4px var(--ink); }
.facades__name { margin-top: 14px; font-weight: 600; }

.hero__photo {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--r); background: #d9dbd6;
  min-height: min(78vh, 720px);
}
.hero__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .35s ease;
}
.hero__photo img.is-fading { opacity: 0; }

/* Секції */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section__head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px;
  align-items: end; margin-bottom: 40px;
}
.section__head h2 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.04em; }
.section__head p { color: var(--ink-2); max-width: 34em; }
.section__head a { color: var(--emerald); font-weight: 600; }

/* Фільтр робіт */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button {
  font: 500 15px/1 var(--font); padding: 11px 18px; border-radius: 99px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-selected="true"] { background: var(--ink); color: var(--stone); border-color: var(--ink); }

/* Галерея */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 210px; grid-auto-flow: dense; gap: 14px;
}
.g { position: relative; grid-row: span 1; }
.g--wide { grid-column: span 2; grid-row: span 2; }
.g--tall { grid-row: span 2; }
.g[hidden] { display: none; }
.g button {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in;
  border-radius: var(--r); overflow: hidden; background: #d9dbd6;
}
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g button:hover img { transform: scale(1.03); }
.g p {
  position: absolute; left: 10px; bottom: 10px; right: 10px; pointer-events: none;
  width: fit-content; max-width: calc(100% - 20px);
  font-size: 13px; line-height: 1.35; padding: 6px 10px; border-radius: 4px;
  background: rgb(248 248 246 / .92); color: var(--ink);
}

/* Як працюємо */
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .section__head p { color: #a9adb3; }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid #3a3e44;
}
.steps li { counter-increment: s; padding: 28px 24px 8px 0; position: relative; }
.steps li + li { padding-left: 24px; border-left: 1px solid #3a3e44; }
.steps li::before {
  content: counter(s); display: block; margin-bottom: 40px;
  font-size: 56px; font-weight: 300; line-height: 1; color: #6fb894; letter-spacing: -0.04em;
}
.steps h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.steps p { margin-top: 10px; font-size: 15px; color: #b6bac0; }

/* Відгуки */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review {
  margin: 0; padding: 28px; border-radius: var(--r);
  background: var(--paper); display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
}
.review p { font: italic 400 18px/1.6 var(--quote); }
.review footer { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.review--big { grid-column: span 3; background: var(--emerald); color: #fff; padding: clamp(28px, 4vw, 52px); }
.review--big p { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.45; max-width: 36em; }
.review--big footer { color: #bfe3cf; }

/* Контакти */
.section--contact { padding-bottom: 0; background: var(--paper); }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); }
.contact h2 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.04em; }
.contact__lead { margin-top: 18px; color: var(--ink-2); max-width: 28em; }
.contact__phone {
  display: inline-block; margin-top: 28px; text-decoration: none;
  font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.contact__phone:hover { color: var(--emerald); }
.contact address { margin-top: 20px; font-style: normal; line-height: 1.5; }
.link { display: inline-block; margin-top: 10px; color: var(--emerald); font-weight: 600; }

.form { display: grid; gap: 18px; align-content: start; padding-top: 8px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.form input, .form select {
  font: 400 17px var(--font); color: var(--ink);
  height: 52px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid #c4c7c1; background: #fff;
}
.form input:focus-visible, .form select:focus-visible { outline: 2px solid var(--emerald); outline-offset: 0; border-color: var(--emerald); }
.form input[aria-invalid="true"] { border-color: #b3261e; }
.form .btn { margin-top: 6px; justify-self: start; }
.form__msg { font-size: 15px; padding: 14px 16px; border-radius: var(--r); background: #e3efe8; color: var(--emerald-d); }
.form__msg.is-error { background: #f6e3e1; color: #8c1d18; }

.map { height: 380px; filter: grayscale(.35); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.site-footer { background: var(--ink); color: #a9adb3; font-size: 14px; }
.site-footer__in { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 24px; }
.site-footer a { text-decoration: none; color: var(--paper); }

/* Перегляд фото */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgb(20 22 25 / .88); }
.lightbox img { max-height: 84vh; width: auto; border-radius: 4px; }
.lightbox__cap { color: #e6e7e4; margin-top: 12px; font-size: 15px; }
.lightbox__close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; cursor: pointer;
  font-size: 28px; line-height: 1; color: #fff; background: transparent; border: 1px solid rgb(255 255 255 / .4); border-radius: 50%;
}

.call-fab { display: none; }

/* Планшет */
@media (max-width: 1020px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
  .steps li:nth-child(4) { border-left: 0; padding-left: 0; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review--big { grid-column: span 2; }
  .review:last-child { grid-column: span 2; }
}

/* Телефон */
@media (max-width: 860px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .nav { display: none; }
  .header-phone { margin-left: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  /* на телефоні фасади одразу під фото, щоб було видно, що вони перемикають */
  .hero__grid { gap: 0; }
  .hero__text { display: contents; }
  .hero__title { order: 1; }
  .hero__photo { order: 2; min-height: 0; aspect-ratio: 4 / 3.2; margin-top: 22px; }
  .facades { order: 3; margin-top: 0; padding-top: 14px; }
  .facades__label { display: none; }
  .facades__row { margin-top: 0; }
  .facades__name { margin-top: 8px; font-size: 15px; }
  .hero__lead { order: 4; margin-top: 22px; }
  .hero__actions { order: 5; margin-top: 24px; }
  .hero__actions .btn--ghost { display: none; }
  .rating { order: 6; }
  .swatch { width: 54px; height: 48px; flex: 1; }
  .section__head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 28px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px; }
  .g p { font-size: 12px; left: 6px; bottom: 6px; padding: 4px 8px; max-width: calc(100% - 12px); }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li, .steps li + li { border-left: 0; padding: 20px 0; border-top: 1px solid #3a3e44; display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
  .steps li::before { grid-row: span 2; margin: 0; font-size: 40px; }
  .reviews { grid-template-columns: 1fr; }
  .review--big, .review:last-child { grid-column: auto; }
  .contact { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .site-footer__in { flex-direction: column; }

  .call-fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 30; height: 54px;
    border-radius: var(--r); background: var(--emerald); color: #fff;
    font-weight: 600; text-decoration: none; box-shadow: 0 6px 20px rgb(15 86 57 / .35);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
