/* ============================================================
   assets/css/app.css — дизайн-система appart (тёмный лакшери)
   Спека §6.1. Токены, шрифты, компоненты всех страниц.

   Шрифты: Google Fonts (утверждённое решение MVP).
   АЛЬТЕРНАТИВА по 152-ФЗ (см. спек §13, риск №7): self-host
   локальных woff2 (уже есть в C:\landing\vereshagina\fonts\),
   заменить @import ниже на @font-face с локальными путями.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Josefin+Sans:wght@300;400;600&display=swap');

:root {
  /* Токены (§6.1) */
  --bg: #0C0A09;
  --bg-card: #1C1917;
  --bg-muted: #292524;
  --gold: #A16207;
  --gold-light: #CA8A04;
  --text: #F5F5F4;
  --text-muted: #A8A29E;
  --text-dim: #78716C;
  --border: #44403C;
  --status-done: #16A34A;
  --status-building: #A16207;

  /* Шрифты (§6.1: системный fallback Times New Roman / Segoe UI) */
  --font-heading: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Josefin Sans', 'Segoe UI', sans-serif;

  /* Эффекты (§6.1): переходы 200ms transform/opacity */
  --transition: 200ms ease;
  --radius: 8px;
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* ── Reset / base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
}

input:focus, select:focus, textarea:focus { outline: none; }

/* Доступность (§6.1): видимый фокус */
:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* Скрытие без удаления из DOM (прогрессивное улучшение, §6.2/6.3) */
.is-hidden { display: none !important; }

main { padding-top: 4.25rem; } /* под фиксированный хедер */

/* ── Кнопки ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.4rem;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: var(--gold-light); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Хедер (фиксированный, §6.2) ────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: rgba(12, 10, 9, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.site-header__logo {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--gold-light);
}
.site-header__nav { display: flex; gap: 1.25rem; }
.site-header__nav a { color: var(--text-muted); transition: color var(--transition); }
.site-header__nav a:hover { color: var(--gold-light); }

/* ── Hero (градиентный фон, §6.2) ───────────────────────────── */
.hero {
  padding: 4.5rem 1.25rem 3.5rem;
  text-align: center;
  background: linear-gradient(180deg, #1C1917 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem); /* §6.1 */
  max-width: 900px;
  margin: 0 auto 1rem;
}
.hero__subtitle {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── Секции ─────────────────────────────────────────────────── */
.section { padding: 3rem 1.25rem; }
.section__title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.5rem; } /* §6.1 h2 */

/* ── Панель поиска/сортировки главной (§6.2) ────────────────── */
.regions { padding: 3rem 1.25rem; }
.regions__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.regions__search { flex: 1 1 240px; }
.regions__sort { min-width: 220px; }
.regions__count { color: var(--text-dim); font-size: 0.9rem; }

/* ── Сетка регионов (§6.2: крупные фото-карточки) ───────────── */
.regions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.region-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.region-card:hover {
  transform: translateY(-2px); /* §6.1 */
  box-shadow: var(--shadow-card);
}
/* Золотая акцентная линия поверх карточки (§6.1) */
.region-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  z-index: 3;
}
.region-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition);
}
.region-card:hover .region-card__bg { transform: scale(1.04); }
.region-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,10,9,0.05) 30%, rgba(12,10,9,0.9) 100%);
}
.region-card__content { position: relative; z-index: 2; padding: 1.25rem; }
.region-card__name { font-size: 1.5rem; margin-bottom: 0.25rem; }
.region-card__tagline { color: var(--text-muted); font-size: 0.95rem; }
.region-card__count {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: 0.85rem;
}
.regions__empty { color: var(--text-muted); padding: 2rem 0; }

/* ── О проекте (§6.2) ───────────────────────────────────────── */
.about { padding: 3rem 1.25rem; color: var(--text-muted); }
.about p { max-width: 720px; }

/* ── Шапка страницы региона (§6.3) ──────────────────────────── */
.region-page { padding: 3rem 1.25rem; }
.region-hero {
  position: relative;
  padding: 4rem 1.25rem;
  background-color: var(--bg-card);
  background-size: cover;
  background-position: center;
}
.region-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,10,9,0.55), rgba(12,10,9,0.92));
}
.region-hero > * { position: relative; z-index: 2; }
.region-hero__name { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.35rem; }
.region-hero__tagline { color: var(--gold-light); margin-bottom: 0.75rem; }
.region-hero__description { color: var(--text-muted); max-width: 760px; }

/* ── Панель фильтров (§6.3) ─────────────────────────────────── */
.filters {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}
.filters__field { display: flex; flex-direction: column; gap: 0.35rem; }
.filters__label { color: var(--text-dim); font-size: 0.85rem; }
.filters__group { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.filters__checkbox {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); font-size: 0.9rem;
}
.filters__actions {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 1rem;
}
.filters__reset {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  transition: border-color var(--transition), color var(--transition);
}
.filters__reset:hover { border-color: var(--gold-light); color: var(--gold-light); }
.filters__count { color: var(--text-dim); font-size: 0.9rem; margin-left: auto; }

/* ── Сетка отелей (§6.3) ────────────────────────────────────── */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.hotel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hotel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.hotel-card__photo {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hotel-card__badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.hotel-card__body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.hotel-card__type { color: var(--gold-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hotel-card__name { font-size: 1.2rem; }
.hotel-card__city { color: var(--text-muted); font-size: 0.9rem; }
.hotel-card__meta { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.4rem; }
.hotel-card__meta div { color: var(--text); font-size: 0.95rem; }
.hotel-card__meta span { color: var(--text-dim); font-size: 0.85rem; }
.hotel-card__rooms { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.6rem; }

/* ── Чипы и бейджи ──────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--done { background: rgba(22, 163, 74, 0.18); color: var(--status-done); border: 1px solid var(--status-done); }
.badge--building { background: rgba(161, 98, 7, 0.18); color: var(--gold-light); border: 1px solid var(--gold); }

/* ── Страница отеля ─────────────────────────────────────────── */
.hotel-page { padding: 3rem 1.25rem; }

/* Галерея (§6.4) */
.gallery { position: relative; margin-bottom: 1.5rem; }
.gallery__main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
}
.gallery__img { width: 100%; height: 100%; object-fit: cover; }
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.7);
  color: var(--text);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.gallery__arrow:hover { border-color: var(--gold-light); color: var(--gold-light); }
.gallery__arrow--prev { left: 0.75rem; }
.gallery__arrow--next { right: 0.75rem; }
.gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  scrollbar-width: thin;
}
.gallery__thumb {
  flex: 0 0 84px;
  width: 84px; height: 56px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  opacity: 0.6;
  transition: opacity var(--transition), border-color var(--transition);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active, .gallery__thumb:hover { opacity: 1; border-color: var(--gold-light); }

/* Ключевые факты (§6.4) */
.facts { margin: 1.5rem 0; }
.facts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.fact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.fact__label { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.fact__value { color: var(--text); margin-top: 0.3rem; font-size: 1.05rem; }

/* Описание (§6.4) */
.description { margin: 1.5rem 0; color: var(--text-muted); }
.description p { margin-bottom: 1rem; }
.description p:last-child { margin-bottom: 0; }

/* Планировки (§6.4) */
.floorplans { margin: 2rem 0; }
.floorplans__filters { margin-bottom: 1.25rem; }
.floorplans__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.plan-card__photo { aspect-ratio: 4 / 3; background-size: cover; background-position: center; position: relative; }
.plan-card__badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.plan-card__body { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.plan-card__title { font-size: 1.05rem; }
.plan-card__area { color: var(--text-muted); }
.plan-card__price { color: var(--text); font-weight: 600; }
.plan-card__price--request { color: var(--text-dim); font-style: italic; } /* «по запросу» §6.4 */

/* Удобства (§6.4) */
.amenities { margin: 1.5rem 0; }
.amenities__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Форма заявки (§6.4, §9.3) */
.lead-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 560px;
  margin: 2rem 0;
}
.lead-form__title { font-size: 1.35rem; margin-bottom: 1rem; }
.lead-form__field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.lead-form__label { color: var(--text-dim); font-size: 0.9rem; }
.lead-form__input { width: 100%; }
.lead-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.lead-form__consent input { margin-top: 0.2rem; }
.lead-form__consent a { color: var(--gold-light); text-decoration: underline; }
.lead-form__status {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.lead-form__status--error { background: rgba(220, 38, 38, 0.15); color: #F87171; border: 1px solid #DC2626; }
.lead-form__status--success { background: rgba(22, 163, 74, 0.15); color: var(--status-done); border: 1px solid var(--status-done); }
.lead-form__status[hidden] { display: none; }

/* Блок «Источник» (§6.4) */
.source {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.source a { color: var(--gold-light); text-decoration: underline; }

/* Пустое состояние (§6.3) */
.empty-state { color: var(--text-muted); padding: 2rem 0; }

/* ── Футер (§6.2) ───────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  background: #090807;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.site-footer__note { margin-bottom: 0.75rem; color: var(--text-muted); }
.site-footer__sources { list-style: none; margin-bottom: 0.75rem; }
.site-footer__sources li { margin-bottom: 0.25rem; }
.site-footer__sources a { color: var(--text-dim); text-decoration: underline; }
.site-footer__policy { color: var(--gold-light); text-decoration: underline; }
.site-footer__copyright { margin-top: 1rem; }

/* ── Адаптивность (§6.1: без горизонтального скролла) ───────── */
@media (max-width: 900px) {
  .regions__grid, .hotel-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .filters__grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 600px) {
  main { padding-top: 3.75rem; }
  .site-header { flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 1rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .regions__grid, .hotel-grid, .floorplans__grid { grid-template-columns: 1fr; }
  .region-card { min-height: 260px; }
  .gallery__main { aspect-ratio: 4 / 3; }
  .filters__count { margin-left: 0; }
}

/* ── prefers-reduced-motion (§6.1) ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .region-card:hover .region-card__bg { transform: none; }
}
