:root {
  --bg: #0d0d0f;
  --bg-2: #151517;
  --bg-3: #1c1c1f;
  --line: rgb(255 255 255 / .1);
  --line-2: rgb(255 255 255 / .18);
  --text: #f3f1ed;
  --muted: #a6a39d;
  --font: 'Onest', system-ui, sans-serif;
  --pad: clamp(20px, 4.4vw, 64px);
  --max: 1312px;
  --led: #4fe3d6;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4.5rem); }
h3 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 6px; background: var(--text); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap, .doba, .house, .book, .footer { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border: 0; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 1.0625rem; text-decoration: none; cursor: pointer; transition: background-color .2s ease, transform .15s ease; }
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--wide { width: 100%; }
.btn--line { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn--line:hover { background: transparent; border-color: var(--text); }

/* ---------- Шапка ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; padding: 0 var(--pad); transition: background-color .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.header.is-solid { background: rgb(13 13 15 / .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: var(--line); }
.header.is-open { background: var(--bg); }
.logo { font-weight: 600; font-size: .9375rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: .9375rem; text-decoration: none; }
.nav a:not(.nav__cta) { color: rgb(243 241 237 / .82); transition: color .2s ease; }
.nav a:not(.nav__cta):hover { color: var(--text); }
.nav__cta { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 600; transition: background-color .2s ease; }
.nav__cta:hover { background: #fff; }
.burger { display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; }
.burger span, .burger span::before { display: block; width: 22px; height: 1.5px; margin: 0 auto; background: var(--text); transition: transform .3s ease; }
.burger span { position: relative; transform: translateY(-3.5px); }
.burger span::before { content: ''; position: absolute; left: 0; top: 7px; }
.is-open .burger span { transform: translateY(0) rotate(45deg); }
.is-open .burger span::before { top: 0; transform: rotate(-90deg); }

@media (max-width: 899px) {
  .header { height: 64px; }
  .burger { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 20px; background: var(--bg); border-bottom: 1px solid var(--line); visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility 0s .25s; }
  .is-open .nav { visibility: visible; opacity: 1; transition: opacity .25s ease; }
  .nav a:not(.nav__cta) { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; color: var(--text); }
  .nav__cta { justify-content: center; height: 54px; margin-top: 16px; font-size: 1.0625rem; }
}

/* ---------- Перший екран ---------- */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; max-height: 1000px; padding: 120px var(--pad) clamp(48px, 8vh, 88px); overflow: hidden; isolation: isolate; }
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg { z-index: -2; }
.hero__bg img { object-fit: cover; object-position: 62% 46%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(13 13 15 / .9) 0%, rgb(13 13 15 / .72) 34%, rgb(13 13 15 / .2) 62%, rgb(13 13 15 / 0) 80%), linear-gradient(0deg, rgb(13 13 15 / .9) 0%, rgb(13 13 15 / 0) 40%), linear-gradient(180deg, rgb(13 13 15 / .55) 0%, rgb(13 13 15 / 0) 22%), rgb(13 13 15 / .2); }
.hero__body { width: 100%; max-width: calc(var(--max)); margin: 0 auto; }
.hero h1 { text-wrap: balance; max-width: 12.5em; font-size: clamp(2.625rem, 1.3rem + 4.4vw, 5.5rem); line-height: .98; letter-spacing: -.045em; }
.hero__lead { max-width: 33em; margin-top: 26px; color: rgb(243 241 237 / .86); font-size: 1.1875rem; line-height: 1.55; }
.hero__act { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 36px; }
.hero__price { font-weight: 500; }

@media (max-width: 699px) {
  .hero { min-height: 100svh; max-height: none; padding-top: 96px; padding-bottom: 32px; }
  .hero__bg img { object-position: 50% 60%; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, rgb(13 13 15 / .86) 45%, rgb(13 13 15 / .2) 78%, rgb(13 13 15 / .4) 100%); }
  .hero h1 { font-size: 2.625rem; }
  .hero__lead { margin-top: 18px; font-size: 1.0625rem; }
  .hero__act { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 28px; }
  .hero__price { text-align: center; }
}

/* ---------- Доба: колір підсвітки міняється разом з фото ---------- */
.doba { padding-top: clamp(80px, 11vw, 150px); }
.doba h2 { margin-bottom: clamp(36px, 5vw, 64px); }
.doba__wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 104px); }
.doba__frame { position: sticky; top: 100px; height: min(calc(100vh - 140px), 660px); border-radius: 4px; overflow: hidden; background: var(--bg-2); box-shadow: 0 40px 140px -50px var(--led); transition: box-shadow .9s ease; }
.doba__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.doba__frame img.is-on { opacity: 1; }
.doba__steps { padding-bottom: 10vh; }
.step { --c: var(--text); display: flex; flex-direction: column; justify-content: center; min-height: min(48vh, 430px); opacity: .22; transition: opacity .5s ease; }
.step.is-on { opacity: 1; }
.step:nth-child(1) { --c: #b9d4ff; }
.step:nth-child(2) { --c: #4fe3d6; }
.step:nth-child(3) { --c: #ff8a4c; }
.step:nth-child(4) { --c: #ff6b7d; }
.step:nth-child(5) { --c: #8f9bff; }
.step:nth-child(6) { --c: #7fd0ff; }
.step__pic { display: none; }
.step__time { color: var(--c); font-weight: 600; font-size: clamp(3.25rem, 2rem + 3.4vw, 5.75rem); line-height: 1; letter-spacing: -.04em; }
.step h3 { margin-top: 14px; }
.step h3 + p { max-width: 25em; margin-top: 8px; color: rgb(243 241 237 / .8); font-size: 1.125rem; }
.step:first-child { min-height: min(36vh, 330px); justify-content: flex-start; }

@media (max-width: 999px) {
  .doba__wrap { display: block; }
  .doba__frame { display: none; }
  .doba h2 { margin-bottom: 28px; }
  .doba__steps { display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 440px); gap: 14px; margin-inline: calc(var(--pad) * -1); padding: 0 var(--pad) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .doba__steps::-webkit-scrollbar { display: none; }
  .step, .step:first-child { min-height: 0; justify-content: flex-start; opacity: 1; scroll-snap-align: start; }
  .step__pic { display: block; margin-bottom: 16px; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
  .step__pic img { width: 100%; height: 100%; object-fit: cover; }
  .step__time { font-size: 2.75rem; }
  .step h3 { margin-top: 8px; }
  .step h3 + p { font-size: 1.0625rem; }
}

/* ---------- Будинок ---------- */
.house { padding-top: clamp(88px, 11vw, 150px); }
.house__head { max-width: 760px; }
.house__head p { margin-top: 22px; color: rgb(243 241 237 / .86); font-size: 1.25rem; line-height: 1.55; }
.gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(2, clamp(200px, 21vw, 300px)); gap: 8px; margin-top: clamp(36px, 4.5vw, 56px); }
.shot { position: relative; display: block; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.shot:hover img { transform: scale(1.03); }
.shot--a { grid-column: 1; grid-row: 1 / 3; }
.shot--b { grid-column: 2; grid-row: 1; }
.shot--c { grid-column: 3; grid-row: 1 / 3; }
.shot--d { grid-column: 2; grid-row: 2; }
.shot.is-extra { display: none; }
.shot__more { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px 18px; background: linear-gradient(0deg, rgb(13 13 15 / .8), rgb(13 13 15 / .1) 60%); font-weight: 600; }
@media (max-width: 999px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .shot--a { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 11; }
  .shot--b, .shot--c { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 4; }
  .shot--d { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .house__head p { font-size: 1.125rem; }
}

/* ---------- Ціни і форма ---------- */
.book { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 104px); padding-top: clamp(88px, 11vw, 150px); padding-bottom: clamp(88px, 10vw, 140px); }
.prices { margin-top: clamp(28px, 3.5vw, 44px); border-top: 1px solid var(--line-2); }
.prices div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.prices dt { font-size: 1.125rem; font-weight: 500; }
.prices small { display: block; color: var(--muted); font-size: .9375rem; font-weight: 400; }
.prices dd { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 600; letter-spacing: -.035em; white-space: nowrap; }
.book__note { margin-top: 18px; color: var(--muted); }
.book__sub { margin-top: 44px; font-size: 1.125rem; letter-spacing: -.01em; }
.incl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin-top: 12px; }
.incl li { padding: 12px 0; border-bottom: 1px solid var(--line); color: rgb(243 241 237 / .86); }
.incl li::first-letter { text-transform: uppercase; }
.book__season { margin-top: 28px; font-weight: 500; }
.book__form { align-self: start; padding: clamp(24px, 3vw, 40px); border-radius: 8px; background: var(--bg-2); }
.form { display: grid; gap: 18px; }
.form__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { display: block; margin-bottom: 8px; padding: 0; color: var(--muted); font-size: .9375rem; }
.field input:not([type="radio"]) { width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color-scheme: dark; transition: border-color .2s ease; }
.field input:hover { border-color: rgb(255 255 255 / .32); }
.field input:focus { outline: none; border-color: var(--text); }
.field input[aria-invalid="true"] { border-color: #ff8a73; }
.err { margin-top: 6px; color: #ff9f8a; font-size: .875rem; }
.err:empty { display: none; }
.estimate { color: var(--muted); font-size: .9375rem; }
.estimate b { color: var(--text); font-weight: 600; font-size: 1.125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 6px; font-size: .9375rem; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.chip span:hover { border-color: rgb(255 255 255 / .4); }
.chip input:checked + span { border-color: var(--text); background: var(--text); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; height: 54px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); overflow: hidden; }
.stepper button { border: 0; background: transparent; font-size: 1.375rem; cursor: pointer; transition: background-color .2s ease; }
.stepper button:hover { background: rgb(255 255 255 / .06); }
.field .stepper input { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form__alt { color: var(--muted); font-size: .9375rem; text-align: center; }
.form__alt a { color: var(--text); text-underline-offset: 3px; }
.done { display: grid; justify-items: start; gap: 12px; }
.done:focus { outline: none; }
.done p:not(.form__title) { color: var(--muted); }
.done .btn { margin-top: 10px; }
@media (max-width: 999px) {
  .book { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .incl { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .book__form { margin-inline: calc(var(--pad) * -1); padding: 28px var(--pad); border-radius: 0; }
}

/* ---------- Підвал ---------- */
.footer { padding-top: 36px; padding-bottom: 40px; }
.footer__top, .footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 32px; }
.footer__top { padding-top: 36px; border-top: 1px solid var(--line); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer__nav a { color: rgb(243 241 237 / .82); font-size: .9375rem; text-decoration: none; }
.footer__nav a:hover { color: var(--text); }
.footer__bottom { margin-top: 28px; color: var(--muted); font-size: .9375rem; }
@media (max-width: 599px) {
  .footer { padding-bottom: 100px; }
  .footer__top, .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Кнопка знизу на телефоні ---------- */
.sticky { position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 15; display: none; align-items: center; justify-content: center; height: 54px; border-radius: 6px; background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; box-shadow: 0 12px 32px -10px rgb(0 0 0 / .7); transform: translateY(90px); transition: transform .35s ease; }
.sticky.is-shown { transform: none; }
@media (max-width: 899px) { .sticky { display: flex; } }

/* ---------- Перегляд фото ---------- */
.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(8 8 9 / .97); color: var(--text); }
.viewer::backdrop { background: rgb(8 8 9 / .7); }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-width: min(92vw, 1400px); max-height: 82dvh; width: auto; border-radius: 4px; }
.viewer__count { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: var(--muted); font-size: .9375rem; }
.viewer button { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line-2); border-radius: 6px; background: rgb(13 13 15 / .6); font-size: 1.5rem; cursor: pointer; }
.viewer__close { top: 18px; right: 18px; }
.viewer__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.viewer__next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 599px) {
  .viewer__prev, .viewer__next { top: auto; bottom: 10px; transform: none; }
}

/* ---------- 404 ---------- */
.lost { display: grid; place-content: center; justify-items: start; gap: 18px; min-height: 100svh; padding: var(--pad); }
.lost h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.lost p { max-width: 460px; color: var(--muted); }

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