/* ==========================================================================
   HouseIQ - Премиальный дизайн-код и система стилей
   Шрифтовая пара: Playfair Display / Manrope
   ========================================================================== */

:root {
  /* Палитра */
  --bg-main: #f6f3eb;
  --bg-surface: #ffffff;
  --bg-subtle: #ede8dc;
  --bg-card: #fdfbf7;
  --bg-dark: #141816;

  --ink-primary: #181613;
  --ink-secondary: #4a453c;
  --ink-muted: #797163;
  --ink-faint: #a8a092;

  --brand-deep: #0b4538;
  --brand: #0f5c4d;
  --brand-hover: #147260;
  --brand-light: #e6f1ee;
  --brand-subtle: rgba(15, 92, 77, 0.08);

  --brick: #9e3f1b;
  --brick-hover: #b84c22;
  --brick-light: #faece6;

  --warn: #b07817;
  --warn-light: #fbf4e7;

  --ok: #2e6634;
  --ok-light: #eaf3ec;

  --line-main: #ded7c8;
  --line-subtle: #eae4d8;
  --line-dark: #272f2b;

  --shadow-sm: 0 2px 6px rgba(24, 22, 19, 0.04);
  --shadow-md: 0 8px 24px rgba(24, 22, 19, 0.07);
  --shadow-lg: 0 16px 40px rgba(24, 22, 19, 0.1);
  --shadow-xl: 0 24px 60px rgba(24, 22, 19, 0.14);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);

  --container-max: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-primary);
  background-color: var(--bg-main);
  background-image:
    radial-gradient(1200px 700px at 15% -10%, rgba(15, 92, 77, 0.07), transparent 60%),
    radial-gradient(1000px 600px at 90% 12%, rgba(158, 63, 27, 0.06), transparent 65%),
    repeating-linear-gradient(0deg, rgba(24, 22, 19, 0.018) 0 1px, transparent 1px 4px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   Типографика и базовые элементы
   ========================================================================== */

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  margin-bottom: 10px;
}

p {
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.65;
}

.lede {
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.55;
  color: var(--ink-secondary);
  font-weight: 400;
}

.mono-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mono-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
    padding: 0 32px;
  }
}

/* ==========================================================================
   Шапка (Header) - строго 1 строка на любых экранах
   ========================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 235, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-main);
  transition: padding var(--transition-smooth), background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

header.site-header.scrolled {
  background: rgba(246, 243, 235, 0.96);
  box-shadow: 0 4px 20px rgba(24, 22, 19, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
  white-space: nowrap;
}

header.site-header.scrolled .header-inner {
  height: 60px;
}

/* Логотип */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-primary);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.logo-icon-svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transition: transform var(--transition-smooth);
}

.brand-logo:hover .logo-icon-svg {
  transform: rotate(3deg) scale(1.04);
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.logo-title span {
  color: var(--brand);
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-subtitle {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Навигация шапки */
.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Действия в шапке */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* На узком экране основное действие остаётся в hero и мобильном меню. */
@media (max-width: 480px) {
  .header-actions > .btn { display: none; }
  .header-actions { gap: 8px; }
  .header-inner { gap: 8px; }
}

.header-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  border-right: 1px solid var(--line-main);
  padding-right: 14px;
}

@media (max-width: 1600px) {
  .header-tagline {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }
}

/* Кнопка бургера на мобильных */
.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line-main);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-primary);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }
}

/* Мобильное меню выпадающее */
.mobile-drawer {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--line-main);
  padding: 20px 24px 28px;
  box-shadow: 0 16px 30px rgba(24, 22, 19, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  padding: 10px 0;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-link:hover {
  color: var(--brand);
}

/* ==========================================================================
   Кнопки (Buttons)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(15, 92, 77, 0.25);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 92, 77, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-ghost:hover {
  background: var(--brand-subtle);
  transform: translateY(-1px);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Hero Section (Живой первый экран с генеративным растром и инспектором)
   ========================================================================== */

.hero-section {
  padding: 48px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.hero-copy h1 {
  margin: 8px 0 20px;
}

.hero-copy h1 em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--brand);
  font-weight: 600;
}

.hero-copy .lede {
  margin-bottom: 28px;
  max-width: 580px;
}

/* Интерактивное поле ввода адреса в Hero */
.hero-input-group {
  display: flex;
  gap: 10px;
  max-width: 560px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line-main);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-input-group:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 92, 77, 0.12), var(--shadow-md);
}

.hero-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding-left: 12px;
}

.input-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.hero-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-primary);
  outline: none;
}

.hero-input::placeholder {
  color: var(--ink-faint);
}

.hero-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-hint svg {
  color: var(--brand);
}

/* Правая колонка Hero: Интерактивная витрина со светотенью и растровым фото */
.hero-visual-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line-main);
  background: var(--bg-dark);
  aspect-ratio: 4 / 3.3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-raster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-visual-card:hover .hero-raster-img {
  transform: scale(1.03);
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 24, 22, 0.2) 0%,
    rgba(20, 24, 22, 0.5) 45%,
    rgba(20, 24, 22, 0.94) 100%
  );
  z-index: 1;
}

/* Верхний бейдж на фото */
.hero-photo-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: rgba(20, 24, 22, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Интерактивная плашка сканирования внизу фото */
.hero-inspector-box {
  position: relative;
  z-index: 2;
  margin: 18px;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-smooth);
}

.hero-inspector-box:hover {
  transform: translateY(-2px);
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.inspector-address {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.inspector-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.inspector-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line-subtle);
  padding-top: 10px;
}

.inspector-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
}

.stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ==========================================================================
   Раздел: Что вы получаете (Метрики + Разворот документа)
   ========================================================================== */

.section-padding {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
  position: relative;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 56px 0;
  }
}

.section-head {
  max-width: 740px;
  margin-bottom: 40px;
}

/* Сетка ключевых 4 цифр */
.stats-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

@media (max-width: 900px) {
  .stats-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-mosaic {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--line-subtle);
  transition: background var(--transition-smooth);
}

.stat-card:hover::before {
  background: var(--brand);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
}

.stat-caption {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-top: 10px;
  display: block;
}

.footnote-hint {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  background: var(--bg-subtle);
  border-left: 3px solid var(--brand);
  padding: 12px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Разворот документа (Live HTML + SVG Dossier Spread)
   -------------------------------------------------------------------------- */

.spread-wrapper {
  margin-top: 48px;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-xl);
  color: var(--bg-main);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .spread-wrapper {
    padding: 24px 16px;
  }
}

.spread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.spread-title-wrap h3 {
  color: #ffffff;
  margin-bottom: 4px;
}

.spread-title-wrap p {
  color: #a3b0a8;
  font-size: 14px;
}

.spread-controls {
  display: flex;
  gap: 8px;
}

.spread-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.spread-btn:hover, .spread-btn.active {
  background: var(--brand);
  border-color: var(--brand);
}

/* 3D Сетка разворота */
.document-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  perspective: 1400px;
}

@media (max-width: 860px) {
  .document-spread {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.dossier-page {
  background: #fdfbf7;
  color: #191713;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 30px;
  font-size: 12px;
  line-height: 1.5;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform: rotateY(-2deg) rotateX(1deg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.dossier-page.page-two {
  transform: rotateY(2deg) rotateX(1deg);
}

.dossier-page:hover {
  transform: rotateY(0deg) rotateX(0deg) translateY(-4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
}

.doc-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #ded7c8;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.doc-stamp {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.doc-page-num {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
}

.doc-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: #191713;
  margin-bottom: 4px;
}

.doc-meta {
  font-size: 11px;
  color: #797163;
  margin-bottom: 14px;
}

.doc-section-box {
  background: #f4f0e6;
  border-left: 3px solid var(--brand);
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 0 4px 4px 0;
}

.doc-section-box.alert {
  border-left-color: var(--brick);
  background: #faece6;
}

.doc-section-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #191713;
  margin-bottom: 4px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 11px;
}

.doc-table th, .doc-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #ded7c8;
  text-align: left;
}

.doc-table th {
  font-weight: 700;
  color: #797163;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-table td:last-child {
  text-align: right;
  font-weight: 600;
}

/* ==========================================================================
   Фирменный приём: Крупная сетка-мозаика (Masonry / Expanding Mosaic Grid)
   Плитки разного размера, при наведении раскрываются и перестраивают соседей
   ========================================================================== */

.mosaic-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.mosaic-tile {
  background: var(--bg-surface);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.mosaic-tile:hover, .mosaic-tile.expanded {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  background: #ffffff;
}

/* Размеры плиток в сетке */
.tile-col-8 {
  grid-column: span 8;
}

.tile-col-4 {
  grid-column: span 4;
}

.tile-col-6 {
  grid-column: span 6;
}

.tile-col-12 {
  grid-column: span 12;
}

@media (max-width: 900px) {
  .tile-col-8, .tile-col-4, .tile-col-6 {
    grid-column: span 12;
  }
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tile-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  background: var(--brand-light);
  color: var(--brand);
}

.tile-badge.risk {
  background: var(--brick-light);
  color: var(--brick);
}

.tile-badge.warn {
  background: var(--warn-light);
  color: var(--warn);
}

.tile-badge.ok {
  background: var(--ok-light);
  color: var(--ok);
}

.tile-icon-svg {
  width: 28px;
  height: 28px;
  color: var(--brand);
  flex-shrink: 0;
}

.tile-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 10px;
  line-height: 1.25;
}

.tile-summary {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

/* Раскрываемый контент внутри плитки */
.tile-expanded-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  border-top: 1px dashed var(--line-main);
  padding-top: 0;
  margin-top: auto;
}

.mosaic-tile:hover .tile-expanded-content,
.mosaic-tile.expanded .tile-expanded-content {
  max-height: 260px;
  opacity: 1;
  padding-top: 14px;
}

.expanded-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--ink-secondary);
}

.expanded-row strong {
  color: var(--ink-primary);
  font-weight: 700;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-top: 8px;
}

/* ==========================================================================
   Раздел: Восемь версий одного досье (8 интерактивных ролей)
   ========================================================================== */

.roles-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-subtle) 100%);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

@media (max-width: 960px) {
  .roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }
}

.role-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.role-card:hover, .role-card.selected {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.role-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.role-card:hover .role-icon-box, .role-card.selected .role-icon-box {
  background: var(--brand);
  color: #ffffff;
}

.role-icon-box svg {
  width: 24px;
  height: 24px;
}

.role-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.role-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Раздел: Пример находок (Четыре карточки с реальными выводами)
   ========================================================================== */

.findings-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}

@media (max-width: 800px) {
  .findings-grid {
    grid-template-columns: 1fr;
  }
}

.finding-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 4px solid var(--line-main);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.finding-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.finding-card.risk {
  border-left-color: var(--brick);
}

.finding-card.warn {
  border-left-color: var(--warn);
}

.finding-card.plus {
  border-left-color: var(--ok);
}

.finding-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.finding-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.finding-card.risk .finding-icon-wrap {
  background: var(--brick-light);
  color: var(--brick);
}

.finding-card.warn .finding-icon-wrap {
  background: var(--warn-light);
  color: var(--warn);
}

.finding-card.plus .finding-icon-wrap {
  background: var(--ok-light);
  color: var(--ok);
}

.finding-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.finding-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.3;
}

.finding-money {
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-top: 6px;
}

/* ==========================================================================
   Раздел: Цена (Тариф и честные условия)
   ========================================================================== */

.pricing-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
  background: var(--bg-surface);
}

.pricing-box {
  background: var(--bg-card);
  border: 1.5px solid var(--line-main);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .pricing-box {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }
}

.price-main-display {
  display: flex;
  flex-direction: column;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  background: var(--brick);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  align-self: flex-start;
}

.price-digits-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
}

.price-now {
  font-family: var(--font-serif);
  font-size: 68px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.04em;
}

.price-was {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: line-through;
}

.pricing-desc-col p {
  margin-bottom: 14px;
}

/* ==========================================================================
   Раздел: Квиз - 5 вопросов (Ядро конверсии)
   ========================================================================== */

.quiz-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
  background: var(--bg-main);
}

.quiz-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--ink-primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  max-width: 760px;
  margin: 32px auto 0;
  position: relative;
}

@media (max-width: 600px) {
  .quiz-card {
    padding: 24px 18px;
  }
}

.quiz-progress-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.quiz-step-pip {
  flex: 1;
  height: 4px;
  background: var(--line-main);
  border-radius: 2px;
  transition: background var(--transition-smooth);
}

.quiz-step-pip.active {
  background: var(--brand);
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: step-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes step-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step h3 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 8px;
}

.quiz-options-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 10px;
}

.quiz-option-btn {
  text-align: left;
  padding: 16px 20px;
  border: 1.5px solid var(--line-main);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option-btn:hover {
  border-color: var(--brand);
  background: #ffffff;
  transform: translateX(3px);
}

.quiz-option-btn.selected {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-deep);
  font-weight: 700;
}

.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-subtle);
  gap: 16px;
}

.quiz-back-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.quiz-back-btn:hover {
  color: var(--ink-primary);
}

/* Финальный экран квиза (FCRA Чекбокс и Оплата) */
.fcra-checkbox-panel {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 22px 0;
  background: var(--bg-subtle);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.fcra-checkbox-panel input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--brand);
  flex-shrink: 0;
  cursor: pointer;
}

.fcra-checkbox-panel label {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.fcra-checkbox-panel label b {
  color: var(--ink-primary);
}

.pay-note-box {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* ==========================================================================
   Раздел: Границы (Чем это не является)
   ========================================================================== */

.boundaries-section {
  padding: 80px 0;
  border-top: 1px solid var(--line-main);
  background: var(--bg-subtle);
}

.boundaries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}

@media (max-width: 768px) {
  .boundaries-grid {
    grid-template-columns: 1fr;
  }
}

.boundary-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-main);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.boundary-card h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boundary-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Подвал (Footer)
   ========================================================================== */

footer.site-footer {
  border-top: 1px solid var(--line-main);
  padding: 48px 0 60px;
  background: var(--bg-dark);
  color: #a3b0a8;
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.footer-sources {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fa096;
}

/* ==========================================================================
   Кнопка "Возврат наверх" с круговым SVG прогрессом
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1.5px solid var(--line-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth), visibility var(--transition-smooth), border-color var(--transition-fast);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
}

.scroll-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.scroll-progress-ring circle {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-dasharray: 144.5;
  stroke-dashoffset: 144.5;
  transition: stroke-dashoffset 0.1s linear;
}

.back-to-top-icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
  position: relative;
  z-index: 2;
  transition: transform var(--transition-fast);
}

.back-to-top:hover .back-to-top-icon {
  transform: translateY(-2px);
}

/* ==========================================================================
   Анимации появления по скроллу (IntersectionObserver)
   ========================================================================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   prefers-reduced-motion (Отключение анимаций при системном требовании)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .pulse-dot {
    animation: none !important;
  }

  .hero-raster-img {
    transform: none !important;
  }

  .dossier-page {
    transform: none !important;
  }
}


/* Переключатель языковых версий: en в корне, ru и es — та же вёрстка. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(15, 92, 77, .25);
  border-radius: 999px;
}
.lang-link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  color: #0f5c4d;
  white-space: nowrap;
}
.lang-link:hover { background: rgba(15, 92, 77, .08); }
.lang-link.is-active { background: #0f5c4d; color: #fff; }
@media (max-width: 900px) {
  .lang-switch { padding: 1px; }
  .lang-link { padding: 3px 7px; font-size: 12px; }
}

/* Phase 20 mobile UX audit (390x844): prevent long CTA labels (e.g. /b2b/ pitch deck button) from overflowing narrow viewports */
@media (max-width: 520px) {
  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .header-inner .brand-logo { flex-shrink: 1; min-width: 0; }
  .header-inner .brand-logo-text { min-width: 0; }
  .header-inner .logo-subtitle { white-space: normal; }
}
