/* Ливский берег — стили сайта. Основа — «Дизайн-система Ливский берег v2.html».
   Шрифты подключаются отдельным файлом fonts.css (встроены в него, чтобы сайт открывался и с диска). */

:root {
  --pine: #2A5A25; --pine-dark: #1D4019; --moss: #E4EBDF;
  --deep: #16303F; --sea: #2E6280; --wave: #7FA3B6; --mist: #DDE8EE;
  --paper: #F6F7F4; --white: #FFFFFF; --ink: #17252C; --stone: #566169;
  --line: #D3DAD8; --line-strong: #7A858A; --error: #B3261E;
  --ribbon: linear-gradient(to bottom, var(--pine) 0 33.4%, var(--white) 33.4% 66.6%, var(--sea) 66.6% 100%);
  --ribbon-x: linear-gradient(to right, var(--pine) 0 33.4%, var(--white) 33.4% 66.6%, var(--sea) 66.6% 100%);

  --font-display: "Jost", "Futura", "Century Gothic", sans-serif;
  --font-text: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --fs-brand: clamp(3.5rem, 1.8rem + 7.6vw, 8.5rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);
  --fs-h2: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --fs-h3: clamp(1.5rem, 1.35rem + .6vw, 1.75rem);
  --fs-lead: clamp(1.1875rem, 1.12rem + .3vw, 1.3125rem);
  --fs-body: clamp(1.0625rem, 1.03rem + .15vw, 1.125rem);
  --fs-small: .9375rem; --fs-caption: .875rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section: clamp(72px, 40px + 6vw, 128px);
  --container: 1240px; --gutter: clamp(16px, 10px + 1vw, 24px); --margin: clamp(20px, 4vw, 40px); --measure: 34em;
  --radius: 2px; --hair: 1px; --touch: 48px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--sea);
  --shadow-pop: 0 18px 48px rgba(22, 48, 63, .18);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--font-text); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--pine); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--pine-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; color: var(--deep); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--white); color: var(--deep); padding: var(--s-3) var(--s-4); }
.skip:focus { top: var(--s-4); }
.wrap { max-width: calc(var(--container) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.section { padding: var(--section) 0; }
.section--mist { background: var(--mist); }
.section--white { background: var(--white); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.ribbon { display: block; height: 6px; background: var(--ribbon); }
.h2 { font-size: var(--fs-h2); }
.h2::after { content: ""; display: block; width: 64px; height: 6px; margin-top: var(--s-4); background: var(--ribbon); }
.h2--center { text-align: center; }
.h2--center::after { margin-left: auto; margin-right: auto; }
.lead { font-size: var(--fs-lead); max-width: var(--measure); }
.muted { color: var(--stone); }
.head-row { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: end; margin-bottom: var(--s-7); }
.head-row p { color: var(--stone); max-width: var(--measure); }

/* ---------- Кнопки, ссылки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--touch); padding: 0 var(--s-5); border: var(--hair) solid transparent; border-radius: var(--radius);
  font: 500 1rem/1 var(--font-text); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--pine); color: var(--white); }
.btn--primary:hover { background: var(--pine-dark); color: var(--white); }
.btn--secondary { background: transparent; color: var(--deep); border-color: var(--deep); }
.btn--secondary:hover { background: var(--mist); color: var(--deep); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); border-color: var(--white); }
.btn--light { background: var(--white); color: var(--deep); }
.btn--light:hover { background: var(--mist); color: var(--deep); }
.btn--lg { min-height: 56px; padding: 0 var(--s-6); font-size: 1.0625rem; }
.btn[disabled] { background: var(--line); color: var(--stone); border-color: var(--line); cursor: not-allowed; }
.link-go { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; color: var(--pine); text-decoration: none; padding: var(--s-2) 0; border-bottom: var(--hair) solid var(--pine); min-height: 44px; }
.link-go .icon { width: 20px; height: 20px; transition: transform .15s; }
.link-go:hover .icon { transform: translate(2px, 2px); }
.link-go--light { color: var(--white); border-color: var(--wave); }
.link-go--light:hover { color: var(--white); }
.icon-btn { width: var(--touch); height: var(--touch); display: inline-grid; place-items: center; border: var(--hair) solid var(--line-strong); background: var(--white); color: var(--deep); border-radius: var(--radius); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--deep); background: var(--mist); }
.icon-btn[disabled] { color: var(--line-strong); border-color: var(--line); cursor: not-allowed; background: var(--white); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316303F' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 44px; }

/* ---------- Метки, списки ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s-3); border: var(--hair) solid var(--line-strong); border-radius: var(--radius); font-size: var(--fs-caption); font-weight: 500; color: var(--ink); background: var(--white); }
.chips--light .chip { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .5); }
.amenities { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.amenity { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; }
.amenity .icon { color: var(--pine); margin-top: 2px; }
.ticks { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--sea); }

/* ---------- Шапка ---------- */
.header { position: relative; z-index: 20; }
.header__in { display: flex; align-items: center; gap: var(--s-6); padding: var(--s-5) var(--margin); max-width: calc(var(--container) + 2 * var(--margin)); margin: 0 auto; }
.header--over { position: absolute; left: 0; right: 0; top: 0; color: var(--white); }
.header--solid { background: var(--paper); color: var(--deep); border-bottom: var(--hair) solid var(--line); }
.header--solid::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--ribbon); }
.logo { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; color: inherit; text-decoration: none; white-space: nowrap; }
.logo:hover { color: inherit; }
.logo svg { width: 30px; height: 30px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text small { font-size: .55em; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.lang-switch { display: flex; gap: var(--s-3); list-style: none; padding: 0; margin: 0; font-size: var(--fs-small); }
.lang-switch a { display: inline-block; padding: var(--s-2) 2px; color: inherit; text-decoration: none; opacity: .7; border-bottom: 2px solid transparent; }
.lang-switch a:hover { opacity: 1; color: inherit; }
.lang-switch a[aria-current] { opacity: 1; border-bottom-color: var(--wave); }
.menu-panel .lang-switch { display: flex; margin: 0 0 var(--s-6); gap: var(--s-5); }
/* узкий ноутбук: меню, языки и «Забронировать» в одну строку — сжимаем промежутки */
@media (max-width: 1279px) { .header__in, .nav { gap: var(--s-5); } }
.menu-panel .lang-switch a { font-size: 1.25rem; color: var(--white); }
.nav { display: flex; gap: var(--s-6); list-style: none; padding: 0; margin: 0 0 0 auto; }
.nav a { display: inline-block; padding: var(--s-2) 0; color: inherit; text-decoration: none; font-size: var(--fs-small); border-bottom: 2px solid transparent; }
.nav a:hover { color: inherit; border-bottom-color: var(--wave); }
.nav a[aria-current="page"] { border-bottom-color: var(--sea); }
.header__burger { display: none; margin-left: auto; background: transparent; color: inherit; border-color: currentColor; }
.menu-panel { position: fixed; inset: 0; z-index: 60; background: var(--deep); color: var(--white); display: none; flex-direction: column; padding: var(--s-5) var(--margin) var(--s-7); }
.menu-panel.is-open { display: flex; }
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ribbon); }
.menu-panel__top { display: flex; justify-content: space-between; align-items: center; }
.menu-panel__close { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .6); }
.menu-panel ul { list-style: none; padding: 0; margin: var(--s-8) 0 var(--s-7); display: grid; gap: var(--s-4); }
.menu-panel ul a { font-family: var(--font-display); font-size: 2rem; color: var(--white); text-decoration: none; }
.menu-panel__actions { margin-top: auto; display: grid; gap: var(--s-3); }

/* ---------- Первый экран ---------- */
.hero { position: relative; color: var(--white); min-height: min(92vh, 860px); display: flex; flex-direction: column; background: var(--deep); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(22, 48, 63, .86) 0%, rgba(22, 48, 63, .55) 42%, rgba(22, 48, 63, .05) 75%), linear-gradient(to top, rgba(22, 48, 63, .6), transparent 40%); }
.hero__body { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: calc(var(--container) + 2 * var(--margin)); margin: 0 auto; padding: 140px var(--margin) var(--s-10); }
.hero__brand { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-brand); line-height: .9; text-transform: uppercase; letter-spacing: .02em; color: var(--white); margin: 0; }
.hero__brand span { display: block; }
.hero__brand span + span { padding-left: 1.6em; }
.hero__brand small { display: block; margin-top: .9em; font-size: clamp(1rem, .85rem + .7vw, 1.5rem); font-weight: 400; line-height: 1.3; letter-spacing: .18em; }
.hero__rule { width: 120px; margin: var(--s-6) 0 var(--s-5); }
.hero__text { font-size: var(--fs-lead); max-width: 26em; color: #EEF3F5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.hero__bar { position: relative; z-index: 3; width: 100%; max-width: calc(var(--container) + 2 * var(--margin)); margin: 0 auto -40px; padding: 0 var(--margin); }
.hero-gap { height: 40px; }
/* Невысокий экран ноутбука (1366×768 и т. п.): первый экран ниже, чтобы строка брони была видна без прокрутки */
@media (min-width: 768px) and (max-height: 820px) {
  .hero--home .hero__body { padding-top: 104px; padding-bottom: 64px; }
  .hero--home .hero__brand { font-size: min(var(--fs-brand), 13vh); }
  .hero--home .hero__brand:has(small) { font-size: min(var(--fs-brand), 11.5vh); }
  .hero--home .hero__brand small { margin-top: .5em; font-size: 1rem; }
  .hero--home .hero__rule { margin: var(--s-4) 0; }
  .hero--home .hero__text { max-width: 34em; }
  .hero--home .hero__actions { margin-top: var(--s-4); }
}
/* Главная: фон — настоящий сосновый лес. Сверху затемнение, чтобы меню читалось на светлых стволах */
.hero--home::before { background: linear-gradient(to bottom, rgba(22, 48, 63, .6) 0%, transparent 22%), linear-gradient(90deg, rgba(22, 48, 63, .86) 0%, rgba(22, 48, 63, .55) 42%, rgba(22, 48, 63, .05) 75%), linear-gradient(to top, rgba(22, 48, 63, .6), transparent 40%); }
/* Полоса с морем на главной: слева светлая вуаль с надписью, справа море видно ясно; сверху ливская лента */
.sea-band { position: relative; display: flex; align-items: center; min-height: clamp(280px, 32vw, 460px); overflow: hidden; isolation: isolate; }
.sea-band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ribbon); z-index: 1; }
/* светлая вуаль только под надписью — не гуще, чтобы море не выглядело блёклым (жалоба 27.10) */
.sea-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(246, 247, 244, .8) 0%, rgba(246, 247, 244, .5) 28%, rgba(246, 247, 244, 0) 52%); }
.sea-band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; z-index: -2; }
.sea-band .wrap { width: 100%; }
.sea-band__text { margin: 0; max-width: 13em; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.2; color: var(--deep); }
@media (max-width: 767px) {
  .sea-band { align-items: flex-start; min-height: 300px; }
  .sea-band::after { background: linear-gradient(to bottom, rgba(246, 247, 244, .85) 0%, rgba(246, 247, 244, .4) 40%, transparent 62%); }
  .sea-band__text { padding-top: var(--s-7); }
}

/* страница квартиры */
.apt-hero { min-height: min(80vh, 760px); }
.apt-hero .hero__body { padding-bottom: var(--s-9); }
.apt-hero h1 { font-weight: 300; font-size: clamp(3rem, 2rem + 5vw, 6.5rem); color: var(--white); line-height: .95; }
.apt-hero__sub { font-family: var(--font-display); font-size: var(--fs-h3); color: #E3ECF0; margin: var(--s-4) 0 var(--s-5); max-width: 22em; }
.crumbs { font-size: var(--fs-small); margin-bottom: var(--s-5); color: #DDE8EE; }
.crumbs a { color: #DDE8EE; }

/* ---------- Строка бронирования ---------- */
.bookbar { position: relative; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.bookbar::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px; background: var(--ribbon); }
.bookbar__seg { display: grid; align-content: center; gap: 2px; min-height: 76px; padding: var(--s-3) var(--s-5); border: 0; border-right: var(--hair) solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.bookbar__seg:hover { background: var(--paper); }
.bookbar__seg small { font-size: var(--fs-caption); color: var(--stone); }
.bookbar__seg strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookbar__seg .select { border: 0; padding: 0 28px 0 0; min-height: 0; background-position: right 0 center; font: 500 var(--fs-body)/1.6 var(--font-text); color: var(--ink); background-color: transparent; cursor: pointer; width: 100%; }
.bookbar__go { margin: var(--s-3); }

/* ---------- Вступление и расстояния ---------- */
.intro { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; }
.intro__text p { max-width: var(--measure); }
.distances { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--mist); margin-top: var(--s-8); }
.dist { padding: var(--s-6) var(--s-5); }
.dist + .dist { border-left: var(--hair) solid rgba(46, 98, 128, .25); }
.dist__num { font-family: var(--font-display); font-size: clamp(2.25rem, 1.8rem + 1.8vw, 3.25rem); line-height: 1; color: var(--deep); }
.dist__text { margin-top: var(--s-2); font-size: var(--fs-small); }
.dist .icon { color: var(--sea); margin-bottom: var(--s-4); width: 28px; height: 28px; }

/* ---------- Карточки апартаментов ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7) var(--gutter); }
.card { display: grid; gap: var(--s-4); align-content: start; }
.card__photo { position: relative; display: block; }
.card__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--moss); }
.card__photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: var(--ribbon); }
.card__tone { position: absolute; left: var(--s-4); top: var(--s-4); padding: 4px 10px; font-size: var(--fs-caption); font-weight: 500; background: rgba(255, 255, 255, .92); color: var(--deep); }
.card__title { font-size: var(--fs-h2); margin-top: var(--s-4); }
.card__title a { color: inherit; text-decoration: none; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-3); border-top: var(--hair) solid var(--line); }
.cards--stagger .card:nth-child(2) { margin-top: var(--s-9); }

/* ---------- Почему возвращаются ---------- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--hair) solid var(--line); }
.why__item { padding: var(--s-6) var(--s-5) var(--s-6) 0; display: grid; gap: var(--s-6); align-content: space-between; min-height: 200px; border-bottom: var(--hair) solid var(--line); }
.why__item:not(:nth-child(4n+1)) { padding-left: var(--s-5); border-left: var(--hair) solid var(--line); }
.why__item .icon { width: 36px; height: 36px; color: var(--pine); stroke-width: 1.25; }
.why__item--sea .icon { color: var(--sea); }

/* ---------- Окно в лес ---------- */
.forest-band { position: relative; color: var(--white); padding: var(--section) 0; overflow: hidden; background: var(--deep); }
.forest-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.forest-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(22, 48, 63, .92) 0%, rgba(22, 48, 63, .72) 50%, rgba(22, 48, 63, .38) 100%); }
.forest-band .wrap { position: relative; z-index: 2; }
.forest-band__grid { display: grid; grid-template-columns: 6fr 5fr; gap: var(--s-8); align-items: center; }
.forest-band h2 { font-size: var(--fs-h2); color: var(--white); margin-bottom: var(--s-5); }
.forest-band p { color: #E3ECF0; max-width: 30em; }
.forest-band .amenities { margin-top: var(--s-5); }
.forest-band .amenity .icon { color: var(--wave); }
.forest-band .mat { transform: rotate(1.2deg); }

/* ---------- Паспарту и галерея ---------- */
.mat { background: var(--white); padding: 18px; margin: 0; box-shadow: 0 1px 2px rgba(22, 48, 63, .08), 0 10px 30px rgba(22, 48, 63, .08); }
.mat__inner { position: relative; display: block; }
.mat__inner img { width: 100%; object-fit: cover; }
.mat__inner::after { content: ""; position: absolute; inset: 8px; border: var(--hair) solid rgba(255, 255, 255, .8); pointer-events: none; }
.mat figcaption { font-family: var(--font-display); font-size: .95rem; color: var(--stone); margin-top: 12px; }
.mat--sm { padding: 12px; }
.mat--sm .mat__inner::after { inset: 6px; }
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; }
.mosaic .mat:nth-child(1) { grid-column: 1 / span 5; }
.mosaic .mat:nth-child(2) { grid-column: 6 / span 4; margin-top: var(--s-8); }
.mosaic .mat:nth-child(3) { grid-column: 10 / span 3; }
.mosaic .mat:nth-child(4) { grid-column: 2 / span 4; }
.mosaic .mat:nth-child(5) { grid-column: 6 / span 3; }
.mosaic .mat:nth-child(6) { grid-column: 9 / span 4; margin-top: calc(-1 * var(--s-5)); }
.mosaic .mat:nth-child(1) img, .mosaic .mat:nth-child(4) img, .mosaic .mat:nth-child(6) img { aspect-ratio: 4 / 3; }
.mosaic .mat:nth-child(2) img { aspect-ratio: 1; }
.mosaic .mat:nth-child(3) img, .mosaic .mat:nth-child(5) img { aspect-ratio: 3 / 4; }
.more-link { margin-top: var(--s-7); text-align: center; }

.gallery-nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); }
.gallery-nav a { font-family: var(--font-display); font-size: 1.125rem; color: var(--deep); text-decoration: none; padding: var(--s-2) 0; border-bottom: 2px solid var(--line); }
.gallery-nav a:hover { border-bottom-color: var(--sea); }
.gallery-sec + .gallery-sec { margin-top: var(--s-9); }
.gallery-sec h2 { font-size: var(--fs-h2); margin-bottom: var(--s-6); }
.masonry { columns: 3 300px; column-gap: var(--gutter); }
.masonry .mat { break-inside: avoid; margin-bottom: var(--gutter); }
.masonry .mat__inner img { height: auto; }
.zoom { display: block; padding: 0; border: 0; background: none; width: 100%; cursor: zoom-in; }

/* лента фото квартиры */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 34%); gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px var(--s-5); scrollbar-width: thin; }
.strip .mat { scroll-snap-align: start; }
.strip .mat__inner img { aspect-ratio: 4 / 3; }
.strip-nav { display: flex; gap: var(--s-2); margin-top: var(--s-4); }

/* просмотр фото */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgba(10, 22, 30, .92); }
.lightbox__in { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-4); padding: var(--s-4); color: var(--white); }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.lightbox__img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.lightbox__bottom { display: flex; justify-content: center; gap: var(--s-3); }
.lightbox .icon-btn { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Бронирование ---------- */
.booking { display: grid; grid-template-columns: 1fr 340px; gap: var(--gutter); align-items: start; }
.cal { background: var(--white); border: var(--hair) solid var(--line); padding: var(--s-5); position: relative; }
.cal::before { content: ""; position: absolute; left: -1px; right: -1px; top: -6px; height: 6px; background: var(--ribbon); }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.cal__months { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); }
.cal__title { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; margin-bottom: var(--s-3); color: var(--deep); }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__dow { font-size: var(--fs-caption); color: var(--stone); text-align: center; padding: var(--s-2) 0; }
.cal__day { position: relative; height: 46px; border: 0; background: none; font: 400 1rem/1 var(--font-text); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.cal__day:hover:not([disabled]) { background: var(--mist); }
.cal__day[disabled] { color: #A0A9AD; cursor: not-allowed; }
.cal__day.is-range { background: var(--mist); }
.cal__day.is-start, .cal__day.is-end { background: var(--pine); color: var(--white); font-weight: 600; }
.cal__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sea); }
.cal__legend { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-5); padding-top: var(--s-4); border-top: var(--hair) solid var(--line); font-size: var(--fs-caption); color: var(--stone); }
.cal__legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.cal__legend i { width: 16px; height: 16px; border: var(--hair) solid var(--line); display: inline-block; }
.cal__legend .l-sel { background: var(--pine); border-color: var(--pine); }
.cal__legend .l-range { background: var(--mist); }
/* занятая ночь (данные Beds24): зачёркнутое число, как и в легенде */
.cal__day.is-busy { text-decoration: line-through; text-decoration-thickness: 1px; }
/* внутри выбранных дат число не бледнеет, даже если с этого дня нельзя начать новую бронь */
.cal__day.is-range[disabled] { color: var(--ink); cursor: default; }
.cal__legend .l-busy { background: linear-gradient(to top right, transparent calc(50% - 0.5px), #A0A9AD calc(50% - 0.5px), #A0A9AD calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.summary { background: var(--white); border: var(--hair) solid var(--deep); padding: var(--s-5); display: grid; gap: var(--s-4); }
.summary__apt { display: grid; gap: var(--s-2); }
.summary__apt label { font-size: var(--fs-caption); color: var(--stone); }
.summary__apt .select { width: 100%; min-height: var(--touch); padding-left: var(--s-4); border: var(--hair) solid var(--line-strong); border-radius: var(--radius); background-color: var(--white); font: 500 1.125rem/1.4 var(--font-display); color: var(--deep); }
.summary dl { margin: 0; display: grid; }
.summary dl div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: var(--hair) solid var(--line); font-size: var(--fs-small); }
.summary dt { color: var(--stone); }
.summary dd { margin: 0; text-align: right; font-weight: 500; }
.summary__guests { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.stepper { display: inline-flex; align-items: center; gap: var(--s-3); }
.stepper__value { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-size: 1.125rem; font-weight: 500; }
.summary__terms { font-size: var(--fs-small); }

/* Окно брони: шапка, календарь с условиями (прокручивается), внизу всегда видна кнопка отправки */
.book { width: min(1120px, calc(100% - 2 * var(--margin))); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop); overflow: hidden; }
.book[open] { display: flex; flex-direction: column; }
.book::backdrop { background: rgba(22, 48, 63, .62); }
.book__head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-5); padding: calc(var(--s-4) + 6px) var(--s-6) var(--s-4); background: var(--white); border-bottom: var(--hair) solid var(--line); }
.book__head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ribbon); }
.book__title { font-size: var(--fs-h3); color: var(--deep); }
.book__text { margin-top: var(--s-1); font-size: var(--fs-small); color: var(--stone); }
.book__body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--s-5) var(--s-6); }
.book__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding: var(--s-4) var(--s-6); background: var(--white); border-top: var(--hair) solid var(--line); }
.book__sum small { display: block; font-size: var(--fs-caption); color: var(--stone); }
.book__sum strong { font-weight: 500; }
.book__act { display: flex; align-items: center; gap: var(--s-5); }
.book__alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 var(--s-4); font-size: var(--fs-small); color: var(--stone); }
.book__alt a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; color: var(--pine); }
.book .summary__terms { font-size: var(--fs-caption); gap: var(--s-1); }
/* невысокий экран ноутбука: календарь плотнее, чтобы месяц помещался целиком */
@media (min-width: 768px) and (max-height: 820px) {
  .book { max-height: calc(100dvh - 24px); }
  .book__body { padding: var(--s-4) var(--s-6); }
  .book .cal { padding: var(--s-4); }
  .book .cal__head { margin-bottom: var(--s-2); }
  .book .cal__day { height: 38px; }
  .book .cal__legend { display: none; }
}

/* Цена за ночь: в карточках, на первом экране квартиры и в приглашении к брони */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); margin: var(--s-4) 0 0; }
.price strong { font-family: var(--font-display); font-size: 1.375rem; font-weight: 500; color: var(--deep); }
.price span { font-size: var(--fs-small); color: var(--stone); }
.price--light strong { color: var(--white); }
.price--light span { color: #DDE8EE; }
.book-cta { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--s-6); }
.book-cta__text { margin-top: var(--s-4); max-width: 40em; color: var(--stone); }
.book-cta__also { margin-top: var(--s-3); font-size: var(--fs-caption); color: var(--stone); }
.book-cta__also a { color: var(--sea); }

/* ---------- Рядом ---------- */
.nearby { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-8); background: var(--white); padding: var(--s-7); margin-top: var(--s-6); border: var(--hair) solid var(--line); }
.nearby__foot { margin-top: var(--s-6); color: var(--sea); font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.review { background: var(--white); border: var(--hair) solid var(--line); padding: var(--s-6) var(--s-6) var(--s-6) calc(var(--s-6) + 6px); display: grid; gap: var(--s-5); align-content: space-between; margin: 0; position: relative; }
.review::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 6px; background: var(--ribbon-x); }
.review blockquote { margin: 0; }
.review figcaption { font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; color: var(--deep); }
.review figcaption span { display: block; font-family: var(--font-text); font-size: var(--fs-caption); font-weight: 400; color: var(--stone); }

/* ---------- Квартира: планировка и удобства ---------- */
.idea { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; }
.rooms { margin: 0; display: grid; border-top: var(--hair) solid var(--deep); }
.rooms div { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-5); padding: var(--s-4) 0; border-bottom: var(--hair) solid var(--line); }
.rooms dt { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 500; color: var(--deep); }
.rooms dd { margin: 0; }
.lists { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); margin-top: var(--s-8); }
.lists h3 { font-size: 1.375rem; margin-bottom: var(--s-4); }
.lists .ticks { font-size: var(--fs-small); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
.two > * { min-width: 0; }
.box { background: var(--white); border: var(--hair) solid var(--line); padding: var(--s-6); }
.box h3 { font-size: var(--fs-h3); margin-bottom: var(--s-4); }

/* ---------- Связаться и подвал ---------- */
.contact { position: relative; color: var(--white); background: var(--deep); overflow: hidden; }
.contact > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; z-index: 0; }
.contact::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ribbon); z-index: 1; }
.contact .wrap { position: relative; z-index: 2; }
.contact__cta { padding: var(--section) 0 var(--s-8); max-width: 40em; }
.contact__cta h2 { color: var(--white); font-size: var(--fs-h2); margin-bottom: var(--s-4); }
.contact__cta p { color: #DDE8EE; }
.contact__btns { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.footer__grid { display: grid; grid-template-columns: 4fr 3fr 3fr 3fr 3fr; gap: var(--s-6); padding: var(--s-7) 0; border-top: var(--hair) solid rgba(255, 255, 255, .2); }
.footer__grid a { color: var(--white); }
.footer__label { font-size: var(--fs-caption); color: var(--wave); margin-bottom: var(--s-2); }
.footer__about { color: #DDE8EE; margin-top: var(--s-4); max-width: 22em; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0 var(--s-6); border-top: var(--hair) solid rgba(255, 255, 255, .2); font-size: var(--fs-caption); color: #C9D9E1; }
.footer__bottom a { color: #C9D9E1; }

/* ---------- Текстовая страница ---------- */
.page-head { padding-top: var(--s-9); padding-bottom: var(--s-6); }
.page-head h1 { font-size: clamp(2rem, 1.2rem + 4vw, 4rem); overflow-wrap: break-word; hyphens: auto; }
.page-head h1::after { content: ""; display: block; width: 64px; height: 6px; margin-top: var(--s-4); background: var(--ribbon); }
.page-head .lead { margin-top: var(--s-5); color: var(--stone); }
.prose { max-width: 44em; }
.prose h2 { font-size: var(--fs-h3); margin: var(--s-7) 0 var(--s-3); }
.prose h2:first-child { margin-top: 0; }

/* ---------- Телефон: панель бронирования ---------- */
.mobile-book { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1023px) {
  .head-row, .intro, .idea, .two, .forest-band__grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .nav, .header__cta, .header .lang-switch { display: none; }
  .header__burger { display: inline-grid; }
  .header--solid .header__burger { color: var(--deep); }
  .bookbar { grid-template-columns: 1fr 1fr; }
  .bookbar__seg { border-bottom: var(--hair) solid var(--line); }
  .bookbar__seg:nth-child(2n) { border-right: 0; }
  .bookbar__go { grid-column: 1 / -1; }
  .booking { grid-template-columns: 1fr; }
  .distances { grid-template-columns: 1fr 1fr; }
  .dist:nth-child(3) { border-left: 0; }
  .dist:nth-child(n+3) { border-top: var(--hair) solid rgba(46, 98, 128, .25); }
  .why { grid-template-columns: 1fr 1fr; }
  .why__item:not(:nth-child(4n+1)) { padding-left: 0; border-left: 0; }
  .why__item:nth-child(2n) { padding-left: var(--s-5); border-left: var(--hair) solid var(--line); }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic .mat:nth-child(n) { grid-column: auto; margin-top: 0; }
  .lists { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .strip { grid-auto-columns: minmax(240px, 70%); }
}
@media (max-width: 767px) {
  .hero__body { padding: 120px var(--margin) var(--s-8); }
  .hero::before { background: linear-gradient(to top, rgba(22, 48, 63, .92) 0%, rgba(22, 48, 63, .6) 55%, rgba(22, 48, 63, .4) 100%); }
  .hero__bar { margin-bottom: 0; padding-bottom: var(--s-5); }
  .hero-gap { height: 0; }
  .bookbar__seg { padding: var(--s-3) var(--s-4); }
  .bookbar__seg .select { font-size: 1rem; padding-right: 20px; background-size: 16px; }
  .header__in { padding: var(--s-4) var(--margin); }
  .cards, .reviews, .nearby, .lists, .mosaic { grid-template-columns: 1fr; }
  .cards--stagger .card:nth-child(2) { margin-top: 0; }
  .distances, .why { grid-template-columns: 1fr; }
  .dist + .dist { border-left: 0; border-top: var(--hair) solid rgba(46, 98, 128, .25); }
  .why__item, .why__item:nth-child(2n) { min-height: 0; padding: var(--s-5) 0; border-left: 0; }
  .forest-band .mat { transform: none; }
  .nearby { padding: var(--s-5); }
  .rooms div { grid-template-columns: 1fr; gap: var(--s-1); }
  .cal { padding: var(--s-4); }
  /* окно брони на телефоне — на весь экран; внизу даты, кнопка WhatsApp и ссылка на почту */
  .book { width: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .book__head { padding: calc(var(--s-3) + 6px) var(--margin) var(--s-3); }
  .book__body { padding: var(--s-4) var(--margin); }
  .book__foot { flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-3) var(--margin) calc(var(--s-2) + env(safe-area-inset-bottom)); }
  .book__act { flex-direction: column; align-items: stretch; gap: 0; }
  .book-cta { grid-template-columns: 1fr; align-items: start; }
  .cal__months { grid-template-columns: 1fr; }
  .cal__months > div + div { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .strip { grid-auto-columns: 85%; }
  .mobile-book { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--margin) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--white); border-top: 3px solid var(--sea); }
  .mobile-book small { display: block; font-size: var(--fs-caption); color: var(--stone); }
  .mobile-book strong { font-weight: 500; }
  .mobile-book > div { min-width: 0; }
  .mobile-book .btn { flex-shrink: 0; padding: 0 var(--s-4); }
  body.has-mobile-book { padding-bottom: 76px; }
}
