/* Сайт для гостей — «тёплый бутик». Сначала телефон.
   Заголовки — Playfair Display, текст и цены — Onest (в нём есть знак ₸).
   Один акцент — терракота; тени и серые тона тёплые, одного оттенка. */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/static/fonts/playfair-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/static/fonts/playfair-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f7f2ea;
  --surface: #fffcf7;
  --sunk: #efe6d9;
  --text: #2b2520;
  --muted: #75695d;
  --line: #e2d6c6;
  --accent: #b4552f;
  --accent-hover: #9a4526;
  --accent-ink: #fff;
  --accent-soft: #f2dfd2;
  --shadow: 0 1px 2px rgb(74 48 28 / .06), 0 12px 32px -12px rgb(74 48 28 / .18);
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1714;
    --surface: #241f1b;
    --sunk: #211c18;
    --text: #f2ebe2;
    --muted: #b0a396;
    --line: #3a322b;
    --accent: #e08a64;
    --accent-hover: #ec9d7a;
    --accent-ink: #1b1714;
    --accent-soft: #3a2a21;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
[id] { scroll-margin-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* Лёгкое «зерно», как у бумаги: фон не выглядит стерильно-плоским */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::after { opacity: .07; mix-blend-mode: soft-light; } }

a { color: var(--accent); }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.s-wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
.s-muted { color: var(--muted); }
.s-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.s-ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.s-skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--r-sm); }
.s-skip:focus { top: 12px; }

/* Кнопки */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), transform .15s var(--ease), border-color .2s;
}
.s-btn:active { transform: scale(.98); }
.s-btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px rgb(180 85 47 / .7); }
.s-btn-accent:hover { background: var(--accent-hover); }
.s-btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.s-btn-ghost:hover { border-color: var(--muted); }
.s-btn-wide { width: 100%; }

/* Шапка */
.s-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; }
.s-header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.s-brand { font: 600 1.2rem/1.1 var(--serif); color: inherit; text-decoration: none; letter-spacing: -.01em; }
.s-nav { display: flex; gap: 22px; }
.s-nav a { white-space: nowrap; color: inherit; text-decoration: none; font-size: .95rem; opacity: .85; transition: opacity .2s; }
.s-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
/* На главной шапка лежит поверх фото первого экрана */
.s-header-over { position: absolute; inset: 0 0 auto; background: transparent; border-color: transparent; }
body:has(.s-hero.has-photo) .s-header-over { color: #fff; border-color: rgb(255 255 255 / .18); }

/* Первый экран */
.s-hero { position: relative; display: flex; align-items: flex-end; min-height: min(80svh, 720px); padding: 120px 0 52px; overflow: hidden; isolation: isolate; }
.s-hero picture { position: absolute; inset: 0; z-index: -2; }
.s-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.s-hero.has-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(24 16 10 / .84) 0%, rgb(24 16 10 / .5) 42%, rgb(24 16 10 / .12) 72%, rgb(24 16 10 / .4) 100%);
}
.s-hero.has-photo { color: #fff; background: #2b2520; }
.s-hero-inner { width: 100%; }
.s-eyebrow { margin: 0 0 14px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.s-hero h1 { font-size: clamp(2.7rem, 10vw, 5.4rem); line-height: 1.02; letter-spacing: -.025em; max-width: 13ch; }
.s-lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); max-width: 34rem; margin: 18px 0 0; opacity: .92; }
.s-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.s-hero-meta { font-size: .95rem; opacity: .9; font-variant-numeric: tabular-nums; }

/* Список квартир */
.s-list { padding-top: 56px; padding-bottom: 72px; }
.s-h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.s-h3 { font-size: 1.45rem; margin-bottom: 18px; }
.s-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 32px; }
.s-filters { display: flex; flex-wrap: wrap; gap: 14px 28px; min-width: 0; }
.s-filter { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.s-filter-label { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.s-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px; padding: 4px; }
.s-chips::-webkit-scrollbar { display: none; }
.s-chip {
  white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text);
  background: var(--surface); text-decoration: none; font-size: .92rem; transition: border-color .2s, background-color .2s, color .2s;
}
.s-chip:hover { border-color: var(--muted); }
.s-chip[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }

.s-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 44px 28px; }
.s-card { display: block; color: inherit; text-decoration: none; }
.s-card-img { aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--sunk); box-shadow: var(--shadow); }
.s-card-img { position: relative; }
/* Статус: зелёная точка — свободна, терракотовая — занята */
.s-status {
  display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 5px 12px 5px 10px; border-radius: 999px;
  background: rgb(255 252 247 / .94); color: #2b2520; font-size: .85rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.s-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3f8f5a; box-shadow: 0 0 0 3px rgb(63 143 90 / .18); }
.s-status.is-busy::before { background: var(--accent); box-shadow: 0 0 0 3px rgb(180 85 47 / .18); }
.s-card-img .s-status { position: absolute; top: 12px; left: 12px; z-index: 1; box-shadow: var(--shadow); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.s-status-inline { background: var(--surface); color: var(--text); border: 1px solid var(--line); margin-top: 14px; }
.s-book-status { display: none; }
.s-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.s-card:hover .s-card-img img { transform: scale(1.04); }
.s-card-body { padding: 16px 4px 0; }
.s-card-district { margin: 0 0 6px; color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.s-card h3 { font-size: 1.4rem; transition: color .2s; }
.s-card:hover h3 { color: var(--accent); }
.s-card-facts { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.s-card-price { margin: 10px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-card-price strong { color: var(--text); font-size: 1.1rem; font-weight: 600; }

.s-empty { text-align: center; padding: 56px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.s-empty p { margin: 0; font-size: 1.05rem; }
.s-error { padding-top: 96px; padding-bottom: 96px; }
.s-error h1 { color: var(--text); font-size: clamp(2rem, 6vw, 3rem); }

/* Как забронировать */
.s-how { background: var(--sunk); padding: 72px 0 80px; }
.s-how-inner { display: grid; gap: 32px; }
.s-how-inner > div > p { margin: 14px 0 0; max-width: 26rem; }
.s-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.s-steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: 16px; align-items: start; }
.s-step-n { font: 600 2.6rem/1 var(--serif); color: var(--accent); }
.s-steps h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 600; letter-spacing: 0; padding-top: 6px; }
.s-steps p { margin: 6px 0 0; color: var(--muted); max-width: 34rem; }

/* Страница квартиры */
.s-back { display: inline-flex; align-items: center; gap: 4px; margin: 22px 0 14px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.s-back:hover { color: var(--text); }
.s-title h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.s-title-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; color: var(--muted); }
.s-title-meta span { display: inline-flex; align-items: center; gap: 6px; }

.s-gallery-wrap { position: relative; margin-top: 24px; }
.s-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.s-gallery::-webkit-scrollbar { display: none; }
.s-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; max-height: 74svh; background: var(--sunk); border-radius: var(--r-lg); overflow: hidden; cursor: zoom-in; }
.s-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s; }
.s-counter { position: absolute; bottom: 14px; right: 30px; padding: 4px 12px; border-radius: 999px; font-size: .85rem; background: rgb(24 16 10 / .55); color: #fff; pointer-events: none; font-variant-numeric: tabular-nums; }
.s-all-photos {
  position: absolute; bottom: 16px; right: 44px; display: none; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: rgb(255 252 247 / .94); color: #2b2520; font-size: .9rem; font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.s-all-photos:active { transform: scale(.98); }

.s-detail { display: grid; gap: 8px 56px; padding-top: 8px; padding-bottom: 64px; }
.s-section { border-top: 1px solid var(--line); padding: 32px 0 0; margin-top: 32px; }
.s-desc { border-top: 0; margin-top: 8px; }
.s-desc p { margin: 0; font-size: 1.08rem; max-width: 65ch; }
.s-amenities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 24px; }
.s-amenities li { display: flex; align-items: center; gap: 12px; }
.s-amenities .s-ico { width: 1.5em; height: 1.5em; color: var(--accent); }
.s-rules { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 32px; }
.s-rules div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.s-rules dt { color: var(--muted); }
.s-rules dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.s-rules-note { margin: 18px 0 0; max-width: 65ch; }
.s-prices { margin: 0; max-width: 520px; }
.s-prices div { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.s-prices dt { flex: 0 1 auto; }
.s-prices div::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.s-prices dd { order: 2; margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-prices div:first-child dd { color: var(--accent); }
.s-card-more { color: var(--accent); }

.s-book { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.s-price { margin: 0 0 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-price strong { color: var(--text); font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; }
.s-book-note { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

.s-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); }
.s-footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.s-footer .s-brand { color: var(--text); }
.s-footer p { margin: 0; font-size: .92rem; }
.s-footer .s-credit { flex-basis: 100%; font-size: .78rem; opacity: .75; }

/* Просмотр фото во весь экран (site.js) */
.s-lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #120d0a; color: #fff; overflow: hidden; }
.s-lb::backdrop { background: rgb(16 11 8 / .6); }
.s-lb-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.s-lb-track::-webkit-scrollbar { display: none; }
.s-lb-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 68px 12px 32px; }
.s-lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.s-lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 12px 20px; font-variant-numeric: tabular-nums; }
.s-lb-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgb(255 255 255 / .12); color: #fff; cursor: pointer; transition: background-color .2s;
}
.s-lb-btn:hover { background: rgb(255 255 255 / .22); }
.s-lb-btn .s-ico { width: 22px; height: 22px; }
.s-lb-prev, .s-lb-next { position: absolute; top: 50%; transform: translateY(-50%); display: none; }
.s-lb-prev { left: 16px; }
.s-lb-next { right: 16px; }
html.s-lb-open { overflow: hidden; }

/* Узкий телефон: в шапке только название — к списку ведут кнопки на страницах */
@media (max-width: 559px) { .s-nav { display: none; } }

/* Планшет и компьютер */
@media (min-width: 700px) {
  .s-wrap { padding-inline: 28px; }
  .s-how-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .s-steps { gap: 36px; }
}
@media (min-width: 900px) {
  .s-hero { min-height: min(84svh, 780px); padding-bottom: 80px; }
  .s-list { padding-top: 88px; padding-bottom: 104px; }
  .s-how { padding: 104px 0 112px; }
  .s-detail { grid-template-columns: minmax(0, 1fr) 360px; padding-top: 16px; }
  .s-book { position: sticky; top: 24px; align-self: start; margin-top: 40px; }
  .s-book-status { display: inline-flex; align-self: flex-start; margin: 0 0 4px; }
  .s-lb-prev, .s-lb-next { display: inline-flex; }

  /* Мозаика: первое фото крупно, остальные рядом. Вертикальные снимки в высоких ячейках обрезаются меньше. */
  .s-gallery { display: grid; overflow: visible; gap: 10px; height: min(560px, 68svh); grid-template-rows: 1fr 1fr; }
  .s-gallery[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .s-gallery[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .s-gallery[data-count="3"] { grid-template-columns: 3fr 2fr; }
  .s-gallery[data-count="4"], .s-gallery[data-count="5"] { grid-template-columns: 2fr 1fr 1fr; }
  .s-slide { aspect-ratio: auto; max-height: none; min-height: 0; border-radius: var(--r-sm); }
  .s-slide:first-child { grid-row: 1 / -1; border-radius: var(--r-lg) var(--r-sm) var(--r-sm) var(--r-lg); }
  .s-gallery[data-count="4"] .s-slide:nth-child(2) { grid-column: span 2; }
  .s-gallery[data-count="2"] .s-slide:first-child { grid-row: auto; }
  .s-gallery[data-count="1"] .s-slide:first-child { border-radius: var(--r-lg); }
  .s-slide:nth-child(n+6) { display: none; }
  .s-slide:hover img { transform: scale(1.03); filter: brightness(.94); }
  .s-counter { display: none; }
  .s-all-photos { display: inline-flex; }
}
@media (min-width: 1100px) {
  .s-cards { grid-template-columns: repeat(3, 1fr); }
}

/* Телефон: фото от края до края, цена и WhatsApp всегда внизу экрана */
@media (max-width: 899px) {
  .s-gallery-wrap { padding: 0; }
  .s-gallery { padding: 0 16px; scroll-padding: 0 16px; }
  .s-slide { flex-basis: calc(100% - 28px); }
  .s-counter { right: 24px; }
  .s-book {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-radius: 20px 20px 0 0; margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px;
  }
  .s-book .s-btn { min-height: 48px; padding: 10px 16px; }
  .s-book .s-book-note { display: none; }
  .s-price { margin: 0; }
  .s-price strong { display: block; font-size: 1.2rem; }
  .s-price span { font-size: .8rem; }
  body:has(.s-book) .s-footer { padding-bottom: 120px; }
  .s-brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .s-list-head { flex-direction: column; align-items: stretch; }
  .s-filters { flex-direction: column; }
}
