/* ==========================================================================
   HYPNOSCAN — СТИЛИ И ДИЗАЙН-СИСТЕМА (Dark Only)
   Все параметры легко настраиваются через переменные ниже.
   ========================================================================== */

:root {
  /* ========================================================================
     ОСНОВНЫЕ ЦВЕТА САЙТА (МЕНЯТЬ ЗДЕСЬ)
     ======================================================================== */
  --bg: #07001e;            /* Глубокий тёмный основной фон */
  --bg-2: #0c0330;          /* Альтернативный фон для секций */
  --bg-card: #100739;       /* Фон карточек */
  --bg-elevated: #1a0958;   /* Фон при наведении и активных состояний */
  --bg-trans: rgba(7, 0, 30, 0.85); /* Полупрозрачный фон для шапки */

  /* АКЦЕНТНЫЕ ЦВЕТА (РОДНАЯ ГАММА HYPNOSCAN) */
  --accent: #00b4d8;        /* Основной медицинский акцент — бирюза */
  --accent-hover: #00d2f0;  /* Бирюза при наведении */
  --accent-dark: #007799;   /* Тёмная бирюза для градиентов */
  --accent-2: #9c19fa;      /* Второй акцент — космический фиолетовый */
  --accent-3: #ca77f9;      /* Светлый фиолетовый для акцентов в заголовках */
  --accent-cyan: #00f0ff;   /* Яркий неоновый циан */
  --accent-gold: #00f0ff;   /* Переопределено на родную неоново-бирюзовую гамму */
  --accent-gold-hover: #3df5ff; /* Неоновый циан при наведении */
  --accent-gold-dark: #00a29a;  /* Глубокая бирюза для градиента кнопки */

  /* ТЕКСТОВЫЕ ЦВЕТА (WCAG AA / AAA) */
  --text: #f0edfa;          /* Основной контрастный текст */
  --text-muted: #b8b3d0;    /* Второстепенный текст и описания */
  --text-dim: #8a85a8;      /* Метаданные, номера, сноски */

  /* РАДИУСЫ СКРУГЛЕНИЯ */
  --radius-sm: 10px;        /* Мелкие элементы */
  --radius: 16px;           /* Стандартные карточки */
  --radius-lg: 24px;        /* Крупные блоки */
  --radius-pill: 9999px;    /* Кнопки */

  /* ГРАНИЦЫ И СВЕЧЕНИЯ */
  --border: rgba(156, 25, 250, 0.16);
  --border-hover: rgba(0, 162, 154, 0.45);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glow-teal: 0 0 24px rgba(0, 162, 154, 0.2);
  --glow-purple: 0 0 24px rgba(156, 25, 250, 0.2);

  /* МАКСИМАЛЬНАЯ ШИРИНА */
  --container-max: 1200px;
  --header-height: 72px;

  /* ШРИФТЫ */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   БАЗОВЫЕ СТИЛИ И СБРОС
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Цифры с моноширинным интервалом */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   КОНТЕЙНЕРЫ И СЕТКА
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: 90px;
  padding-bottom: 90px;
  position: relative;
}

.section-bg {
  background-color: var(--bg);
}

.section-bg-2 {
  background-color: var(--bg-2);
}

.section-bg-card {
  background-color: var(--bg-card);
}

/* ==========================================================================
   ТИПОГРАФИКА
   ========================================================================== */
h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 52px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 38px;
  letter-spacing: 0;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 660px;
}

.text-gradient {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

/* ==========================================================================
   КНОПКИ
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease, border-color 200ms ease;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0090ad 0%, #005f78 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 95, 120, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00a2c0 0%, #00718c 100%);
  box-shadow: 0 6px 18px rgba(0, 113, 140, 0.4);
  transform: translateY(-1px);
}

.btn-gold,
.btn-action {
  background: linear-gradient(135deg, #008f9c 0%, #006660 100%);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(0, 102, 96, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-gold:hover,
.btn-action:hover {
  background: linear-gradient(135deg, #00a0ae 0%, #007a74 100%);
  box-shadow: 0 6px 18px rgba(0, 122, 116, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(0, 162, 154, 0.08);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
  min-height: auto;
}

.btn-ghost:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   КАРТОЧКИ (ЕДИНАЯ ДИЗАЙН-СИСТЕМА .card)
   ========================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), border-color 250ms ease, box-shadow 250ms ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-teal);
}

/* ==========================================================================
   ШАПКА САЙТА (STICKY HEADER)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-trans);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Зона 1: Логотип (знак + название) */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.18) 0%, rgba(156, 25, 250, 0.22) 100%);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: #00f0ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.45));
  transition: transform 200ms ease, filter 200ms ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.75));
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

/* Зона 2: Главное меню */
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 200ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Зона 3: Действия (Языковой переключатель + Кнопка CTA) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ RU / RO */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 6px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all 180ms ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 162, 154, 0.35);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   КОСМИЧЕСКИЙ ФОН HERO
   ========================================================================== */
.hero-wrapper {
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
}

.hero-space-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
  pointer-events: none;
}

.section-cosmic-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  pointer-events: none;
}

/* Ambient cosmic section with subtle starfield/nebula depth */
.section-cosmic-ambient {
  position: relative;
  overflow: hidden;
}

.section-cosmic-ambient .section-cosmic-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  pointer-events: none;
}

.section-cosmic-ambient .section-cosmic-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 30%, rgba(156, 25, 250, 0.16), transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(0, 162, 154, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, rgba(7, 0, 30, 0.4) 50%, var(--bg) 100%);
  pointer-events: none;
}

.section-cosmic-ambient > .container {
  position: relative;
  z-index: 1;
}

/* 3D Respiratory Flow Ribbon Banner (Screenshot inspired) */
.flow-ribbon-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 162, 154, 0.35);
  background: linear-gradient(135deg, rgba(16, 21, 36, 0.85), rgba(7, 0, 30, 0.95));
  margin: 36px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 35px rgba(0, 162, 154, 0.15);
}

@media (max-width: 900px) {
  .flow-ribbon-banner {
    grid-template-columns: 1fr;
  }
}

.flow-ribbon-content {
  padding: 36px 32px;
}

.flow-ribbon-image {
  height: 100%;
  min-height: 220px;
  max-height: 280px;
  position: relative;
  overflow: hidden;
}

.flow-ribbon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dual clinical photo showcase */
.clinical-photo-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .clinical-photo-dual {
    grid-template-columns: 1fr;
  }
}

.hero-radial-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 20% 15%, rgba(156, 25, 250, 0.28), transparent 50%),
    radial-gradient(circle at 80% 65%, rgba(0, 162, 154, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(7, 0, 30, 0.2) 0%, rgba(7, 0, 30, 0.7) 80%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-top: 50px;
  padding-bottom: 70px;
}

/* Floating step card as seen in Screenshot 1 */
.hero-step-float {
  background: rgba(16, 7, 57, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 320px;
  box-shadow: 0 16px 36px rgba(7, 0, 30, 0.8), 0 0 20px rgba(0, 240, 255, 0.2);
  margin-top: 24px;
}

.hero-step-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #00f0ff;
  margin-bottom: 6px;
  display: block;
}

.hero-step-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
}

/* Клинические фотокарточки с мягким градиентом */
.clinical-photo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(7, 0, 30, 0.6), var(--glow-purple);
  height: 100%;
  min-height: 380px;
}

.clinical-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.clinical-photo-card:hover img {
  transform: scale(1.02);
}

.photo-overlay-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(7, 0, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* HERO СЕТКА (2 КОЛОНКИ: 1.1fr / 1fr) */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-title {
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   HERO «НОЧНАЯ ЗАПИСЬ» — ЖИВАЯ SVG-ВИЗУАЛИЗАЦИЯ 4 КАНАЛОВ
   ========================================================================== */
.sleep-monitor-card {
  background: rgba(16, 7, 57, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(7, 0, 30, 0.6), var(--glow-purple);
}

.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.monitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: pulse-dot-anim 1.6s infinite ease-in-out;
}

@keyframes pulse-dot-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.monitor-meta {
  font-size: 13px;
  color: var(--text-dim);
}

/* Демо-метрики */
.monitor-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  background: rgba(7, 0, 30, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.metric-value.accent-teal {
  color: var(--accent);
}

.metric-value.accent-purple {
  color: var(--accent-3);
}

/* SVG График */
.sleep-svg-container {
  width: 100%;
  background: #090226;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.sleep-dashboard-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Анимация непрерывного потока кривых */
.wave-pulse {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: flow-wave 6s linear infinite;
}

.wave-spo2 {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: flow-wave 6s linear infinite;
  animation-delay: -1.2s;
}

.wave-resp {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: flow-wave 6s linear infinite;
  animation-delay: -2.4s;
}

.wave-snore {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: flow-wave 6s linear infinite;
  animation-delay: -3.6s;
}

@keyframes flow-wave {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -1200; }
}

.monitor-footer-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

/* ==========================================================================
   СЕКЦИЯ 2. СИМПТОМЫ (12 КАРТОЧЕК В СЕТКЕ 3*4)
   ========================================================================== */
.symptoms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.symptom-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.symptom-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 6px 16px rgba(0, 162, 154, 0.15);
}

.symptom-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 162, 154, 0.16) 0%, rgba(156, 25, 250, 0.16) 100%);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
}

.symptom-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

.symptoms-banner {
  margin-top: 40px;
  padding: 24px 32px;
  background: rgba(16, 7, 57, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.symptoms-banner-text {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 740px;
}

/* ==========================================================================
   СЕКЦИЯ 3. ОТ ПОДОЗРЕНИЯ ДО ЭФФЕКТИВНОГО РЕШЕНИЯ (4 ШАГА)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.step-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.step-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  flex-grow: 1;
}

.step-question {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

/* ==========================================================================
   СЕКЦИЯ 4. НЕ ОБЯЗАТЕЛЬНО ЕХАТЬ В КЛИНИКУ (2 КОЛОНКИ)
   ========================================================================== */
.clinic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.study-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.study-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background-color: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.study-item:hover {
  border-color: var(--accent);
  background-color: var(--bg-elevated);
  transform: translateX(4px);
}

.study-item-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  transition: color 180ms ease;
}

.study-item:hover .study-item-title {
  color: var(--accent);
}

.study-arrow {
  color: var(--text-dim);
  transition: transform 180ms ease, color 180ms ease;
}

.study-item:hover .study-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.study-footnote {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ==========================================================================
   СЕКЦИЯ 5. С ЧЕГО НАЧАТЬ, ЕСЛИ БЕСПОКОИТ ХРАП (3 КАРТОЧКИ)
   ========================================================================== */
.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  margin-bottom: 36px;
}

.start-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.start-card-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   СЕКЦИЯ 6. CPAP (ПРОСТЫМИ СЛОВАМИ)
   ========================================================================== */
.cpap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.mask-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.mask-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  color: var(--text-muted);
}

.mask-item::before {
  content: '·';
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}

/* ==========================================================================
   СЕКЦИЯ 7. HYPNOSCAN (3 ТЕЗИСА-УТВЕРЖДЕНИЯ)
   ========================================================================== */
.theses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.thesis-card {
  padding: 32px;
}

.thesis-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.35;
}

.thesis-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ==========================================================================
   СЕКЦИЯ 8. ИТОГОВЫЙ CTA С ТЕЛЕФОНОМ (Космический фон и мягкое свечение)
   ========================================================================== */
.cta-box {
  position: relative;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgba(7, 0, 30, 0.86) 0%, rgba(16, 7, 57, 0.90) 100%),
    url('images/space-cta.webp') center/cover no-repeat;
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 45px rgba(156, 25, 250, 0.22);
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(0, 162, 154, 0.2), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.cta-box > * {
  position: relative;
  z-index: 2;
}

.cta-box h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.cta-box p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-phone-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.phone-link-large {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  transition: color 180ms ease, transform 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.phone-link-large:hover {
  color: var(--accent);
  transform: scale(1.02);
}

/* ==========================================================================
   СТРАНИЦА УСЛУГ (USLUGI)
   ========================================================================== */
.page-hero {
  padding-top: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.service-category {
  margin-bottom: 60px;
}

.service-category-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-category-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-row {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  transition: border-color 200ms ease;
}

.service-row:hover {
  border-color: var(--border-hover);
}

.service-row-main {
  flex-grow: 1;
  max-width: 820px;
}

.service-row-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.service-row-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

.service-row-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.service-row-price.free {
  color: var(--accent-3);
}

/* ==========================================================================
   СТРАНИЦА БЛОГА (36 ВОПРОСОВ И ОТВЕТОВ)
   ========================================================================== */
.blog-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 96px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.blog-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-nav-link {
  display: block;
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 180ms ease;
}

.blog-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.blog-nav-link.active {
  color: var(--accent);
  background: rgba(0, 162, 154, 0.12);
  font-weight: 600;
}

.blog-mobile-accordion {
  display: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
}

.blog-mobile-toggle {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
}

.blog-mobile-content {
  display: none;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  max-height: 380px;
  overflow-y: auto;
}

.blog-mobile-content.open {
  display: block;
}

.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-card {
  scroll-margin-top: 96px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 200ms ease;
}

.blog-card:hover {
  border-color: var(--border-hover);
}

.blog-question {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 16px;
}

.blog-answer {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ==========================================================================
   СТРАНИЦА КОНТАКТОВ (КОНТАКТНОЙ ФОРМЫ НЕТ ВООБЩЕ)
   ========================================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.contacts-info-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.contact-item-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 162, 154, 0.12);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.contact-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.contact-val a:hover {
  color: var(--accent);
}

.contacts-call-box {
  position: relative;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgba(7, 0, 30, 0.86) 0%, rgba(16, 7, 57, 0.90) 100%),
    url('images/space-contacts.webp') center/cover no-repeat;
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), var(--glow-teal);
}

.contacts-call-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(0, 162, 154, 0.2), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.contacts-call-box > * {
  position: relative;
  z-index: 2;
}

.call-box-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.call-box-desc {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 420px;
}

/* ==========================================================================
   ПОДВАЛ САЙТА (FOOTER)
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: #050017;
  border-top: 1px solid var(--border-subtle);
  padding-top: 50px;
  padding-bottom: 50px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand-desc {
  font-size: 22px;          /* как у названия HYPNOSCAN в подвале */
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-top: 14px;
  max-width: 520px;
}
@media (max-width: 640px) { .footer-brand-desc { font-size: 18px; } }

.footer-nav-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-link {
  font-size: 15px;
  color: var(--text-muted);
}

.footer-nav-link:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dim);
}

/* ==========================================================================
   МОБИЛЬНЫЙ DRAWER
   ========================================================================== */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(7, 0, 30, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-nav-link {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
}

.drawer-nav-link.active {
  color: var(--accent);
}

.drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   RESPONSIVE АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .symptoms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .clinic-grid,
  .cpap-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .start-grid,
  .theses-grid {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    display: none;
  }

  .blog-mobile-accordion {
    display: block;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 17px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 19px;
  }

  .eyebrow {
    font-size: 12px;
  }

  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .header-nav {
    display: none;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .symptoms-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .symptoms-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .monitor-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-row {
    flex-direction: column;
    gap: 12px;
  }

  .service-row-price {
    text-align: left;
  }

  .phone-link-large {
    font-size: 24px;
  }

  .blog-question {
    font-size: 19px;
  }

  .blog-answer {
    font-size: 17px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@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;
  }
}

/* ===== СВОРАЧИВАЕМЫЙ ТЕКСТ (кнопка «Подробнее») ===== */
details.more{margin:6px 0 0}
details.more>summary{list-style:none;cursor:pointer;display:inline-flex;gap:6px;align-items:center;color:var(--accent);font-weight:600;font-size:.92em}
details.more>summary::-webkit-details-marker{display:none}
details.more>summary::after{content:"▾";transition:transform .2s}
details.more[open]>summary::after{transform:rotate(180deg)}
details.more>p{margin-top:8px}

/* ===== Подзаголовок первого экрана (курсив, фиолетовый) ===== */
.hero-tagline{display:block;font-style:italic;color:var(--accent-3);font-size:19px;margin:-4px 0 20px}

/* ===== МОБИЛЬНАЯ ПРАВКА: закрытое боковое меню не должно расширять страницу ===== */
html { overflow-x: hidden; }
.mobile-drawer { overflow: hidden; }

/* ===== МОБИЛЬНАЯ ШАПКА: помещается в экран телефона ===== */
@media (max-width: 860px) {
  .header-actions .btn-gold { display: none; }   /* кнопка записи есть в боковом меню и на первом экране */
}
@media (max-width: 480px) {
  .brand-link { font-size: 18px; gap: 8px; letter-spacing: 0.02em; }
  .brand-logo-img { width: 32px; height: 32px; }
  .header-actions { gap: 8px; }
  .lang-btn { padding: 6px 10px; font-size: 13px; }
}

/* Бургер-меню вместо полного меню на планшетах и узких окнах */
@media (max-width: 1100px) {
  .header-nav { display: none; }
  .menu-toggle { display: flex; }
}
/* Совсем узкие телефоны (320 px) */
@media (max-width: 360px) {
  .brand-link { font-size: 15px; gap: 6px; }
  .brand-logo-img { width: 28px; height: 28px; }
  .lang-btn { padding: 5px 8px; font-size: 12px; }
  .header-actions { gap: 6px; }
  .menu-toggle { width: 40px; height: 40px; }
}
