/* Mr. Loft — апарт-отель на Верейской, 29. Дизайн-система сайта.
   Светлая тема — по умолчанию; тёмная — атрибут data-theme="dark" на <html>
   (кнопка в шапке, выбор хранится в localStorage). */

/* Светлая тема — по умолчанию: посуточная аренда читается как «чисто и светло»,
   и это совпадает с ожиданием гостя от Букинга. Тёмная включается атрибутом
   data-theme="dark" (кнопка в шапке). */
:root{
  --bg:#f7f6f3;
  --surface:#efeee9;
  --surface-2:#ffffff;
  --line:#e3e0d9;
  --line-hover:#c9c3b6;
  --text:#15171b;
  --text-soft:#3d434d;
  --muted:#6b727d;
  --scrim:16,18,22;
  --hero-panel:rgba(255,255,255,.94);
  --topbar-bg:rgba(247,246,243,.92);
  --footer-bg:#efeee9;
  --field:#fbfaf8;
  --card-shadow:0 1px 2px rgba(20,22,26,.06),0 10px 30px rgba(20,22,26,.05);
  --accent:#A70006;
  --accent-2:#cf1119;
  --on-accent:#ffffff;
  --badge:rgba(14,15,17,.86);
  --radius:18px;
  --radius-sm:12px;
  --wrap:1180px;
  --shadow:0 18px 50px rgba(0,0,0,.18);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,"Helvetica Neue",Arial,sans-serif;
}

/* Тёмная тема */
[data-theme="dark"]{
  --bg:#0e0f11;
  --surface:#16181c;
  --surface-2:#1d2026;
  --line:#2a2e36;
  --line-hover:#3a3f49;
  --text:#f2f3f5;
  --text-soft:#d9dce1;
  --muted:#a3a8b0;
  --hero-panel:rgba(22,24,28,.92);
  --topbar-bg:rgba(14,15,17,.86);
  --footer-bg:#0a0b0d;
  --field:#101216;
  --card-shadow:none;
  --shadow:0 18px 50px rgba(0,0,0,.45);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg);color:var(--text);font-family:var(--font);
  font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;height:auto}
a{color:var(--text);text-decoration:none}
a:hover{color:var(--accent-2)}
h1,h2,h3{line-height:1.15;margin:0 0 .6em;letter-spacing:-.02em}
h1{font-size:clamp(2rem,4.4vw,3.4rem);font-weight:800}
h2{font-size:clamp(1.5rem,2.6vw,2.2rem);font-weight:750}
h3{font-size:1.15rem;font-weight:700}
p{margin:0 0 1em}
.muted{color:var(--muted)}
.wrap{width:min(var(--wrap),92vw);margin:0 auto}
.skip{position:absolute;left:-9999px}
.skip:focus{left:12px;top:12px;background:var(--accent);padding:10px 14px;border-radius:8px;z-index:99;color:#fff}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Кнопки */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5em;
  padding:.72em 1.15em;border-radius:999px;border:1px solid transparent;
  font-weight:650;font-size:.98rem;cursor:pointer;transition:transform .15s,background .15s,color .15s;
}
.btn:hover{transform:translateY(-1px)}
.btn--accent{background:var(--accent);color:var(--on-accent)}
.btn--accent:hover{background:var(--accent-2);color:var(--on-accent)}
.btn--ghost{border-color:var(--line);color:var(--text);background:transparent}
.btn--ghost:hover{border-color:var(--accent);color:var(--text)}
.btn--lg{padding:.95em 1.5em;font-size:1.05rem}

/* Верхняя панель */
.topbar{
  position:sticky;top:0;z-index:20;background:var(--topbar-bg);
  backdrop-filter:blur(14px);border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex;align-items:center;gap:1.2rem;padding:.7rem 0}
.brand{display:flex;align-items:center;gap:.7rem}
.brand img{border-radius:10px}
.brand__name{font-weight:800;letter-spacing:-.02em;display:flex;flex-direction:column;line-height:1.1}
.brand__name small{color:var(--muted);font-weight:500;font-size:.7rem;letter-spacing:0;white-space:nowrap}
.nav{display:flex;gap:1rem;margin-left:auto;font-size:.95rem}
.nav a{white-space:nowrap}
.nav a{color:var(--muted)}
.nav a:hover{color:var(--text)}
.topbar__cta{display:flex;align-items:center;gap:.9rem}
.rating{font-size:.85rem;color:#c98a12;white-space:nowrap}
.rating span{color:var(--muted)}
.topbar__phone{white-space:nowrap}
.topbar__phone-short{display:none}

/* Кнопки шапки: меню и переключение темы */
.nav-toggle,.theme-btn{
  display:none;width:42px;height:42px;border-radius:12px;border:1px solid var(--line);
  background:transparent;padding:0;place-items:center;gap:4px;cursor:pointer;color:var(--text);
}
.nav-toggle span{display:block;width:18px;height:2px;background:var(--text);border-radius:2px;transition:transform .2s,opacity .2s}
.nav-toggle[aria-expanded="true"]{border-color:var(--accent)}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.theme-btn{display:grid;font-size:1.05rem;line-height:1}
.theme-btn:hover{border-color:var(--accent)}

/* Первый экран.
   Важно: url() внутри --hero разрешается относительно ЭТОГО файла
   (dist/assets/style.css), поэтому путь начинается с photos/, а не с assets/.
   Абсолютный путь из корня сайта здесь не сработает.
   Текст на фото всегда белый, поэтому затемнение строится на --scrim,
   одинаковом в обеих темах. */
.hero{
  position:relative;min-height:min(88vh,760px);display:flex;align-items:center;
  background:
    linear-gradient(90deg,rgba(var(--scrim),.90) 0%,rgba(var(--scrim),.66) 45%,rgba(var(--scrim),.28) 100%),
    linear-gradient(180deg,rgba(var(--scrim),.30) 0%,rgba(var(--scrim),.72) 58%,rgba(var(--scrim),1) 100%),
    var(--hero,url('photos/фасад_дома.jpg')) center/cover no-repeat;
  padding:5rem 0 3rem;color:#fff;
}
.hero__inner{max-width:760px;margin:0 auto;text-align:center}
.hero__kicker{text-transform:uppercase;letter-spacing:.16em;font-size:.76rem;color:rgba(255,255,255,.74);margin-bottom:1rem}
.hero h1{max-width:24ch;color:#fff;margin-left:auto;margin-right:auto}
.hero__lead{font-size:1.12rem;color:rgba(255,255,255,.93);max-width:60ch;margin-left:auto;margin-right:auto}
.hero__lead.muted{color:rgba(255,255,255,.8);max-width:54ch}
.hero__actions{display:flex;gap:.8rem;flex-wrap:wrap;justify-content:center;margin:1.6rem 0 2.4rem}
.hero__facts{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;
  background:var(--line);border-radius:var(--radius);overflow:hidden;margin:0;
}
.hero__facts>div{background:var(--hero-panel);padding:1rem 1.1rem;color:var(--text);text-align:left}
.hero__facts dt{font-size:.74rem;text-transform:uppercase;letter-spacing:.12em;color:var(--muted)}
.hero__facts dd{margin:.35rem 0 0;font-weight:750;font-size:1.15rem;color:var(--text)}
/* На фото первый экран всегда тёмный, поэтому вторичная кнопка в нём остаётся белой
   и в светлой теме — иначе текст сливается с фотографией. */
.hero .btn--ghost{color:#fff;border-color:rgba(255,255,255,.55)}
.hero .btn--ghost:hover{color:#fff;border-color:#fff;background:rgba(255,255,255,.1)}

/* Секции */
.section{padding:4.5rem 0}
/* Липкая шапка не должна закрывать заголовок блока при переходе по ссылке из меню */
section[id]{scroll-margin-top:86px}
.section--alt{background:var(--surface)}
.section__lead{color:var(--muted);max-width:75ch;margin-bottom:2rem}
.section__title{text-align:center}
.section>.wrap>.section__lead{text-align:center;max-width:66ch;margin-left:auto;margin-right:auto}

.note{color:var(--muted);font-size:.88rem}
.note--legal{border-left:3px solid var(--accent);padding-left:.9rem;margin:1.2rem 0}

/* Сетка и карточки */
.grid{display:grid;gap:1.4rem}
.grid--cards{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
.card{
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--card-shadow);
  transition:border-color .2s,transform .2s;
}
.card:hover{border-color:var(--line-hover);transform:translateY(-3px)}
.card__media{position:relative;aspect-ratio:4/3;overflow:hidden;display:block}
.card__media img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.card:hover .card__media img{transform:scale(1.04)}
.card__price{
  position:absolute;left:.8rem;bottom:.8rem;background:var(--badge);
  padding:.35em .7em;border-radius:999px;font-weight:700;font-size:.92rem;color:#fff;
}
.card__price small{color:rgba(255,255,255,.72);font-weight:500}
.card__body{padding:1.2rem 1.2rem 1.4rem;display:flex;flex-direction:column;gap:.5rem}
.card__body h3{margin:0}
.card__body h3 a{color:var(--text)}
.card__meta{color:var(--muted);font-size:.88rem;margin:0}
.card__body p{margin:0;font-size:.97rem;color:var(--text-soft)}
.card__body .btn{margin-top:.6rem;align-self:flex-start}

/* Таблицы и списки */
.table{width:100%;border-collapse:collapse;font-size:.98rem}
.table caption{text-align:left;color:var(--muted);font-size:.85rem;padding-bottom:.6rem}
.table th,.table td{padding:.75rem .2rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.table th{font-weight:600;color:var(--text)}
.table td{color:var(--muted);text-align:right;white-space:nowrap}
.ticks{list-style:none;padding:0;margin:0;display:grid;gap:.6rem}
.ticks li{position:relative;padding-left:1.7rem;color:var(--text-soft)}
.ticks li::before{content:"✓";position:absolute;left:0;color:var(--accent-2);font-weight:800}
.ticks--small{font-size:.9rem;gap:.4rem}
.cols{display:grid;grid-template-columns:1.1fr 1fr;gap:2rem;align-items:start}
.gallery-strip{display:grid;grid-template-columns:repeat(2,1fr);gap:.6rem}
.gallery-strip img{border-radius:var(--radius-sm);aspect-ratio:4/3;object-fit:cover}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.2rem;margin-bottom:2rem}
.info{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem;box-shadow:var(--card-shadow)}
.info h3{margin:0 0 .5rem;font-size:1rem}
.info p{margin:0;font-size:.95rem;color:var(--text-soft)}

/* Вопросы */
.faq{display:grid;gap:.6rem;max-width:900px}
.faq__item{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius-sm);padding:.2rem 1rem}
.faq__item summary{cursor:pointer;font-weight:650;padding:.9rem 0;list-style:none}
.faq__item summary::-webkit-details-marker{display:none}
.faq__item summary::after{content:"+";float:right;color:var(--accent-2);font-weight:800}
.faq__item[open] summary::after{content:"–"}
.faq__answer p{color:var(--muted);margin:0 0 1rem}

/* Бронирование */
.booking{background:linear-gradient(180deg,var(--surface) 0%,var(--bg) 100%)}
.booking__inner{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:start}
.booking__phone a{font-size:1.6rem;font-weight:800}
.form{display:grid;gap:.9rem;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:var(--card-shadow)}
.form label{display:grid;gap:.35rem;font-size:.9rem;color:var(--muted)}
.form input,.form textarea{
  background:var(--field);border:1px solid var(--line);border-radius:var(--radius-sm);
  color:var(--text);padding:.7em .9em;font:inherit;
}
.form input:focus,.form textarea:focus{outline:2px solid var(--accent);border-color:transparent}
.form .check{display:flex;gap:.6rem;align-items:flex-start;font-size:.85rem}
.form .check span{flex:1;min-width:0;line-height:1.45}
.form .check input{width:auto;margin-top:.25rem}
.form button{justify-self:start}
.form button[disabled]{opacity:.6;cursor:default}
/* ловушка для автозаполнителей: поле есть в разметке, но человек его не видит */
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.form__status{margin:0;font-size:.92rem;line-height:1.45;min-height:1.3em}
.form__status--ok{color:#1f7a3d}
.form__status--err{color:var(--accent)}
[data-theme="dark"] .form__status--ok{color:#7ad39a}

/* Страница апартамента */
.flat{padding:2.5rem 0 1rem}
.crumbs{color:var(--muted);font-size:.85rem;margin-bottom:1.2rem}
.flat__head{margin-bottom:2rem;text-align:center}
.flat__head .note{max-width:52ch;margin-left:auto;margin-right:auto}
.flat__meta{color:var(--muted);margin:0 0 .4rem}
.flat__price{font-size:1.7rem;font-weight:800;margin:0 0 1rem}
.flat__price small{font-size:.55em;color:var(--muted);font-weight:500}
.flat__hero{margin:0 0 1rem}
.flat__hero img{border-radius:var(--radius);aspect-ratio:16/9;object-fit:cover}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.6rem;margin-bottom:2rem}
.thumb img{border-radius:var(--radius-sm);aspect-ratio:4/3;object-fit:cover;opacity:.85;transition:opacity .2s}
.thumb:hover img{opacity:1}
.flat__grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:3rem;align-items:start}
.flat__aside{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;position:sticky;top:90px;box-shadow:var(--card-shadow)}
.flat__aside h2{font-size:1.05rem;margin:0 0 .8rem}
.flat__aside h2:not(:first-child){margin-top:1.6rem}

/* Тексты */
.prose{max-width:72ch}
.prose p{color:var(--text-soft)}
.prose h2{margin-top:1.8em}
.prose a{color:var(--text);text-decoration:underline;text-decoration-color:var(--accent)}

/* Подвал */
.footer{background:var(--footer-bg);border-top:1px solid var(--line);padding:3rem 0 2rem;font-size:.92rem}
.footer__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2rem}
.footer__brand{font-size:1.3rem;font-weight:800;margin-bottom:.6rem}
.footer__title{font-weight:700;margin-bottom:.7rem}
.footer__list{list-style:none;padding:0;margin:0;display:grid;gap:.4rem}
.footer__list a{color:var(--muted)}
.footer__list a:hover{color:var(--text)}
.footer__bottom{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-top:2.5rem;padding-top:1.4rem;border-top:1px solid var(--line);color:var(--muted);font-size:.85rem}

/* Лайтбокс для галереи (добавляет app.js) */
.lightbox{position:fixed;inset:0;background:rgba(8,9,11,.94);display:none;align-items:center;justify-content:center;z-index:80;padding:3vh 3vw}
.lightbox[data-open="1"]{display:flex}
.lightbox img{max-width:92vw;max-height:88vh;border-radius:12px;box-shadow:var(--shadow)}
.lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.1);border:0;color:#fff;font-size:2rem;width:56px;height:56px;border-radius:50%;cursor:pointer}
.lightbox__nav[data-dir="prev"]{left:2vw}
.lightbox__nav[data-dir="next"]{right:2vw}
.lightbox__close{position:absolute;top:2vh;right:2vw;background:rgba(255,255,255,.1);border:0;color:#fff;font-size:1.1rem;padding:.6em 1em;border-radius:999px;cursor:pointer}

/* Ноутбуки и планшеты в ландшафте: шапка не должна ломаться между 900 и 1180 px */
@media (max-width:1180px){
  .brand__name small{display:none}
  .nav{gap:.8rem;font-size:.9rem}
  .rating{display:none}
  .topbar__phone-full{display:none}
  .topbar__phone-short{display:inline}
}

@media (min-width:901px){
  .theme-btn{display:grid;order:3}
  .topbar__cta{order:4}
}
/* На телефоне заголовок чуть меньше — тогда адрес укладывается в две строки */
@media (max-width:600px){
  .hero h1{font-size:1.7rem;max-width:26ch}
}

@media (max-width:900px){
  .topbar__inner{gap:.55rem;flex-wrap:nowrap}
  .brand img{width:34px;height:34px}
  .brand__name{font-size:.95rem}
  .brand__name small{display:none}
  .rating{display:none}
  .nav{display:none;margin-left:0}
  .nav-toggle{display:grid;margin-left:0;flex:0 0 auto}
  .theme-btn{display:grid;flex:0 0 auto;margin-left:auto}
  .topbar__cta{margin-left:0;flex:0 0 auto}
  .topbar__phone{padding:.55em .9em;font-size:.9rem}
  .topbar__phone-full{display:none}
  .topbar__phone-short{display:inline}
  .topbar--open .nav{
    display:flex;position:absolute;left:0;right:0;top:100%;flex-direction:column;
    gap:.9rem;background:var(--surface-2);border-bottom:1px solid var(--line);
    padding:1rem 5vw 1.3rem;font-size:1.05rem;
  }
  .topbar--open .nav a{color:var(--text);padding:.45rem 0;border-bottom:1px solid var(--line)}
  .topbar--open .nav a:last-child{border-bottom:0}
  .cols,.booking__inner,.flat__grid{grid-template-columns:1fr}
  .flat__aside{position:static}
  .section{padding:3rem 0}
  .hero{min-height:auto;padding:3.2rem 0 2.4rem}
  .hero__lead{font-size:1.02rem}
  .hero__facts{grid-template-columns:repeat(2,1fr)}
  .thumbs{grid-template-columns:repeat(3,1fr)}
  .table td{white-space:normal}
  .form{padding:1.1rem}
  .footer__bottom{flex-direction:column;gap:.5rem}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
  html{scroll-behavior:auto}
}

/* Номер на компьютере: вместо случайного приложения — карточка с номером */
.callbox{position:fixed;inset:0;z-index:80;display:none;place-items:center;padding:1.2rem;background:rgba(8,9,11,.55)}
.callbox.is-open{display:grid}
.callbox__card{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.8rem 1.5rem 1.4rem;max-width:22rem;width:100%;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.callbox__title{margin:0 0 .5rem;color:var(--muted);font-size:.85rem;text-transform:uppercase;letter-spacing:.12em}
.callbox__number{margin:0 0 1.1rem;font-size:1.55rem;font-weight:750;color:var(--text);letter-spacing:.01em}
.callbox__copy{width:100%}
.callbox__app{display:inline-block;margin-top:.9rem;color:var(--muted);font-size:.9rem;text-decoration:underline;text-underline-offset:.25em}
.callbox__hint{margin:1rem 0 0;color:var(--muted);font-size:.82rem}
.callbox__close{position:absolute;top:.6rem;right:.6rem;width:2rem;height:2rem;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--text-soft);font-size:1.1rem;line-height:1;cursor:pointer}
.callbox__close:hover{border-color:var(--line-hover)}
/* Реквизиты: подписи в таблице не должны переноситься на две строки */
@media (min-width:700px){
  .table--requisites th{white-space:nowrap;width:35%}
}

/* Уведомление о cookie: пока согласия нет, счётчик не загружается */
.consent{position:fixed;left:50%;transform:translateX(-50%);bottom:1rem;z-index:75;width:calc(100% - 2rem);max-width:46rem;display:flex;gap:1rem;align-items:center;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.1rem;box-shadow:0 18px 50px rgba(0,0,0,.18)}
.consent p{margin:0;flex:1 1 18rem;font-size:.88rem;line-height:1.45;color:var(--text-soft)}
.consent a{color:var(--text)}
.consent__actions{display:flex;gap:.5rem;flex-wrap:wrap}
.consent .btn{font-size:.86rem;padding:.6em 1em}
@media (max-width:600px){
  .consent{bottom:.6rem;padding:.85rem .9rem;gap:.7rem}
  .consent__actions{width:100%}
  .consent__actions .btn{flex:1 1 auto}
}
.booking__actions{display:flex;gap:.7rem;flex-wrap:wrap;margin:1rem 0 .9rem}
.contact-card{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);padding:1.4rem;box-shadow:var(--card-shadow);align-self:start}
.contact-card h3{margin:0 0 1rem;font-size:1.05rem}
.contact-card dl{margin:0;display:grid;gap:.9rem}
.contact-card__row{display:grid;gap:.15rem}
.contact-card__row dt{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.contact-card__row dd{margin:0;font-size:.97rem;line-height:1.45}
.contact-card .note{margin:1.1rem 0 0}
@media (max-width:640px){.booking__actions .btn{width:100%;justify-content:center}}
/* Ссылки на другие проекты Mr. Loft */
.links-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;margin-top:1.4rem}
.link-card{display:flex;flex-direction:column;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);text-decoration:none;color:inherit;transition:border-color .15s ease,transform .15s ease}
.link-card__media{aspect-ratio:16/9;overflow:hidden;background:var(--surface-2)}
.link-card__media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.link-card:hover .link-card__media img{transform:scale(1.03)}
.link-card__media--empty{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#2b2d33,#4a1d20 70%,#7d1a1f);color:rgba(255,255,255,.55);font-size:.82rem;letter-spacing:.14em;text-transform:uppercase}
.link-card__body{display:grid;gap:.45rem;align-content:start;padding:1.1rem 1.3rem 1.3rem}
.link-card:hover{border-color:var(--accent);transform:translateY(-2px)}
.link-card__label{font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.link-card__title{font-size:1.05rem;font-weight:600;line-height:1.3}
.link-card__text{color:var(--muted);font-size:.92rem;line-height:1.45}
.link-card__arrow{color:var(--accent);font-size:.92rem;font-weight:600;margin-top:.2rem}

.link-card--soon{opacity:.72;cursor:default}
.link-card--soon:hover{transform:none;border-color:var(--line)}
.link-card__soon{color:var(--muted);font-size:.92rem;font-weight:600;margin-top:.2rem}

/* На телефоне крупные кнопки не рвут номер по слогам, а показывают его отдельной строкой */
.btn__phone{font-weight:500}
@media (max-width:640px){
  .theme-btn{display:none}
  .btn--lg{text-align:center;justify-content:center;white-space:nowrap;gap:.35em;
    font-size:min(.95rem, 3.7vw);padding:.9em 1em}
  .btn__phone{display:inline;font-size:1em;margin:0;opacity:1;font-weight:500}
}

/* Видео апартамента */
.flat__videos{margin:2rem 0 1.5rem}
.flat__videos h2{font-size:1.35rem;margin:0 0 1rem}
.flat__video{margin:0 0 1.4rem}
.flat__video video{display:block;width:100%;max-width:900px;border-radius:var(--radius);background:#000;aspect-ratio:16/9;object-fit:cover}
.flat__video figcaption{color:var(--muted);font-size:.88rem;margin-top:.5rem}

/* --- Дом на Верейской: блок на главной и страница «О доме» --- */
.section--house .section__title{text-align:center}
.house-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin:1.6rem 0 0}
.house__item{margin:0}
.house-grid img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);display:block}
.house-grid figcaption{margin-top:.55rem;color:var(--muted);font-size:.9rem;line-height:1.45}
.house__more{margin-top:1.6rem;text-align:center}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.1rem;margin:2rem 0 2.6rem}
.photo-item{margin:0}
.photo-grid img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);display:block}
.photo-grid figcaption{margin-top:.55rem;color:var(--muted);font-size:.9rem;line-height:1.45}
.house__cta{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:2rem}
@media (max-width:900px){.house-grid,.photo-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.house-grid,.photo-grid{grid-template-columns:1fr}}
.section>.wrap>.section__lead--left{text-align:left;margin-left:0;margin-right:0;max-width:52rem}
.article>.section__lead--left,.article .section__lead--left{text-align:left}
.house-grid figcaption{text-align:center}
.hero__facts dd{white-space:nowrap}
@media (max-width:600px){.hero__facts dd{font-size:1rem}}
@media (min-width:601px) and (max-width:900px){
  .house-grid .house__item:last-child{grid-column:span 2}
  .house-grid .house__item:last-child img{aspect-ratio:16/9}
}

/* --- Статьи --- */
.article{max-width:780px}
.article h1{margin:0 0 .8rem}
.article__kicker{margin:0 0 .6rem;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.article__cover{margin:1.8rem 0 2.2rem}
.article__cover img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:var(--radius);display:block}
.article__cover figcaption,.article__photo figcaption{margin-top:.55rem;color:var(--muted);font-size:.88rem;line-height:1.45}
.article__body{font-size:1.05rem;line-height:1.7}
.article__body h2{margin:2.4rem 0 .8rem;font-size:1.42rem;line-height:1.3}
.article__body h3{margin:1.8rem 0 .6rem;font-size:1.12rem}
.article__body p{margin:0 0 1rem}
.article__body ul,.article__body ol{margin:0 0 1.2rem;padding-left:1.25rem}
.article__body li{margin-bottom:.45rem}
.article__photo{margin:1.8rem 0}
.article__photo img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:var(--radius);display:block}
.article__note{margin:1.4rem 0;padding:1rem 1.2rem;border-left:3px solid var(--accent);background:var(--surface);border-radius:var(--radius-sm)}
.article__cta{margin:2.6rem 0;padding:1.4rem 1.5rem;background:var(--surface);border-radius:var(--radius)}
.article__cta p:first-child{margin-top:0}
.article-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin-top:1.6rem}
.article-card{display:block;text-decoration:none;color:inherit}
.article-card img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:var(--radius);display:block}
.article-card__date{display:block;margin-top:.6rem;font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.article-card__title{display:block;margin-top:.3rem;font-weight:700;font-size:1.02rem;line-height:1.35}
.article-card__lead{display:block;margin-top:.35rem;color:var(--muted);font-size:.9rem;line-height:1.45}
.article-card:hover .article-card__title{text-decoration:underline}
@media (max-width:900px){.article-cards{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.article-cards{grid-template-columns:1fr}.article__body{font-size:1rem}}
