/* =========================================================
   ПАРУС ДИАЛОГ — базовые стили темы
   Токены, ресет, типографика, контейнеры, секции, кнопки,
   шапка и подвал. Стили конкретных секций добавляются
   отдельными файлами на этапе сборки блоков.
   ========================================================= */

:root {
  /* Палитра (брендбук R02) */
  --c-bg: #F2EADF;            /* Диалог / Бумага */
  --c-surface: #FFFFFF;
  --c-surface-alt: #EDE5D9;
  --c-text: #181818;          /* Диалог / Чернила */
  --c-text-secondary: #4A4540;
  --c-text-muted: #8A837A;
  --c-border: #D9CFBF;
  --c-border-light: #E6DDD0;
  --c-accent: #2A3F5F;        /* Глубокая вода */
  --c-accent-light: #E8ECF2;
  --c-accent-mid: #2A3F5F;
  --c-teal: #8BA98E;          /* Шалфей */
  --c-teal-light: #EFF5F0;
  --c-coral: #D4A574;         /* Тёплый песок */
  --c-coral-light: #F7EDDF;
  --c-amber: #D4A574;
  --c-amber-light: #F7EDDF;
  --c-red: #8B3A3A;
  --c-red-light: #F5E8E8;
  --c-green: #5A7A4A;
  --c-green-light: #EFF5ED;
  --c-blue: #2A3F5F;
  --c-blue-light: #E8ECF2;

  /* Типографика */
  --font-main: 'Geologica', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Радиусы / раскладка */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --max-w: 960px;
  --max-w-narrow: 820px;
  --section-py: 80px;
}

/* ---- Ресет ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent); }

/* ---- Контейнеры ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--max-w-narrow); }

/* ---- Шапка (брендинг + меню) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 234, 223, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-light);
}
.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header a { text-decoration: none; }
.site-header .site-logo img,
.site-header img { height: 24px; width: auto; display: block; }
.site-header .site-branding__name a,
.site-header .site-name a {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--c-accent);
}
/* главное меню в строку */
.site-header .menu {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.site-header .menu a {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-secondary);
  transition: color 0.2s;
}
.site-header .menu a:hover { color: var(--c-text); }

/* ---- Секции ---- */
.section { padding: var(--section-py) 0; }
.section + .section { border-top: 1px solid var(--c-border-light); }
.section--alt { background: var(--c-surface); }
.section--accent { background: var(--c-accent); color: #fff; }
.section--accent .tag { color: rgba(255, 255, 255, 0.6); }
.section--accent .section-desc { color: rgba(255, 255, 255, 0.75); }

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--c-accent-mid);
}
.section-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  max-width: 640px;
}
.section-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-text-secondary);
  max-width: 580px;
  margin-bottom: 24px;
}

/* ---- Кнопки ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: #1E3350; }
.btn-outline { background: transparent; border: 1px solid var(--c-border); color: var(--c-text); }
.btn-outline:hover { background: var(--c-surface-alt); }
.btn-white { background: #fff; color: var(--c-accent); }
.btn-white:hover { background: #F5F5F5; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Подвал ---- */
.site-footer {
  background: var(--c-accent);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 32px;
}
.site-footer a { color: #fff; }

/* ---- Служебное содержимое (admin / системные страницы) ---- */
.region-content { padding: 40px 0; }

/* ---- Адаптив: брейкпоинт бренда 720px ---- */
@media (max-width: 720px) {
  :root { --section-py: 56px; }
  .section-title { font-size: 26px; }
  .site-header__inner { gap: 14px; }
  .site-header .menu { gap: 14px; }
}

/* ===================== СЕКЦИЯ: HERO ===================== */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero-byline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-text-muted); margin-bottom: 20px; padding: 6px 12px; background: var(--c-surface-alt); border-radius: 20px; }
.hero-byline::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-coral); display: inline-block; }
.hero-title { font-size: 38px; font-weight: 600; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.015em; }
.hero-desc { font-size: 17px; line-height: 1.65; color: var(--c-text-secondary); margin-bottom: 28px; }
.hero-img { aspect-ratio: 4 / 5; min-height: 380px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--c-border-light); }
.hero-stat-num { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--c-accent); line-height: 1; }
.hero-stat-label { font-family: var(--font-mono); font-size: 11px; color: var(--c-text-muted); margin-top: 4px; }
.img-slot { background: var(--c-surface-alt); border-radius: var(--radius); border: 1px dashed var(--c-border); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--c-text-muted); font-size: 12px; text-align: center; padding: 20px; overflow: hidden; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.img-slot-label { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--c-text-secondary); margin-bottom: 2px; letter-spacing: 0.02em; }
.img-slot-desc { font-size: 11px; color: var(--c-text-muted); line-height: 1.4; max-width: 240px; }
@media (max-width: 720px) { .hero { padding: 40px 0 48px; } .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero-title { font-size: 28px; } .hero-stats { gap: 20px; } .hero-img { min-height: 260px; } }

/* ===================== СЕКЦИЯ: ПРОБЛЕМА ===================== */
.tag--danger { color: var(--c-red); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-bottom: 48px; }
.problem-img { aspect-ratio: 4 / 3; min-height: 260px; }
.problem-note { font-weight: 500; color: var(--c-text); font-size: 16px; }
.errors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.error-card { padding: 16px 18px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-light); transition: border-color .2s; }
.error-card:hover { border-color: var(--c-border); }
.error-num { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--c-red); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.error-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.error-desc { font-size: 13px; color: var(--c-text-secondary); line-height: 1.5; }
@media (max-width: 720px) { .problem-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; } .errors-grid { grid-template-columns: 1fr; } .problem-img { min-height: 220px; } }

/* ===================== СЕКЦИЯ: МЕТОД ===================== */
.steps-list { margin-top: 24px; }
.step-item { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--c-border-light); }
.step-item:last-child { border-bottom: none; }
.step-letter { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; font-size: 20px; flex-shrink: 0; }
.step-letter--1 { background: var(--c-accent-light); color: var(--c-accent); }
.step-letter--2 { background: var(--c-blue-light); color: var(--c-blue); }
.step-letter--3 { background: var(--c-teal-light); color: var(--c-teal); }
.step-letter--4 { background: var(--c-amber-light); color: var(--c-amber); }
.step-letter--5 { background: var(--c-coral-light); color: var(--c-coral); }
.step-content { flex: 1; }
.step-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.step-desc { font-size: 14px; color: var(--c-text-secondary); line-height: 1.55; }

/* ===================== СЕКЦИИ: ОСТАЛЬНЫЕ ===================== */
.tag--muted { color: var(--c-text-muted); }
.tag--teal { color: var(--c-teal); }

/* КЕЙС */
.case-situation { padding: 20px 24px; border-radius: var(--radius); background: var(--c-surface-alt); margin-bottom: 20px; font-size: 15px; line-height: 1.65; }
.case-label { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.case-situation .case-label { color: var(--c-text-muted); }
.case-bad { padding: 20px 24px; border-radius: var(--radius); background: var(--c-red-light); margin-bottom: 16px; }
.case-bad .case-label { color: var(--c-red); }
.case-bad blockquote { font-family: var(--font-main); font-style: italic; font-size: 15px; color: #4A2020; line-height: 1.6; margin: 0; }
.case-bad-why { font-size: 13px; color: var(--c-red); margin-top: 10px; }
.case-good { padding: 20px 24px; border-radius: var(--radius); background: var(--c-green-light); }
.case-good .case-label { color: var(--c-green); }
.parus-line { display: flex; gap: 10px; margin-bottom: 8px; font-size: 14px; line-height: 1.55; }
.parus-line:last-child { margin-bottom: 0; }
.parus-letter { font-family: var(--font-mono); font-weight: 600; color: var(--c-green); flex-shrink: 0; width: 16px; }

/* ОБ АВТОРЕ */
.author-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; margin-top: 24px; }
.author-photo { aspect-ratio: 3 / 4; min-height: 380px; }
.author-name { font-size: 26px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.author-role { font-size: 14px; color: var(--c-text-muted); margin-bottom: 20px; }
.author-bio { font-size: 16px; color: var(--c-text-secondary); line-height: 1.7; margin-bottom: 20px; }
.author-quote { padding: 18px 22px; border-left: 3px solid var(--c-coral); background: var(--c-surface-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; font-weight: 300; font-size: 16px; line-height: 1.6; color: var(--c-text); margin-bottom: 24px; }
.author-facts { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--c-border-light); }
.author-fact { display: flex; gap: 14px; align-items: baseline; font-size: 14px; }
.author-fact-label { font-family: var(--font-mono); color: var(--c-text-muted); min-width: 150px; flex-shrink: 0; font-size: 11px; letter-spacing: 0.02em; }
.author-fact-value { color: var(--c-text); }

/* ВИДЕОКУРС */
.lesson-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 4px; }
.lesson-tab { flex: 1; padding: 10px 0; text-align: center; font-size: 13px; font-weight: 500; color: var(--c-text-secondary); cursor: pointer; border-radius: 6px; transition: all 0.2s; border: none; background: none; font-family: var(--font-main); }
.lesson-tab:hover { color: var(--c-text); }
.lesson-tab.active { background: var(--c-surface); color: var(--c-accent); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.lesson-panel { display: none; }
.lesson-panel.active { display: block; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; background: var(--c-surface-alt); border-radius: var(--radius); border: 1px solid var(--c-border-light); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; margin-bottom: 16px; }
.video-frame::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(42,63,95,0.04), rgba(42,63,95,0.01)); }
.video-frame iframe { width: 100%; height: 100%; border: 0; position: relative; z-index: 1; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--c-accent); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; transition: transform 0.2s; cursor: pointer; }
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 20px; height: 20px; margin-left: 2px; }
.video-badge { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.6); color: #fff; font-family: var(--font-mono); font-size: 10px; font-weight: 500; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.03em; z-index: 1; }
.video-dur { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 4px; z-index: 1; }
.lesson-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lesson-desc { font-size: 15px; color: var(--c-text-secondary); line-height: 1.6; }
.nurse-teaser { margin-top: 16px; padding: 14px 18px; background: var(--c-accent-light); border-radius: var(--radius-sm); border-left: 3px solid var(--c-accent-mid); }
.nurse-teaser-title { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--c-accent); margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.nurse-teaser-text { font-size: 13px; color: var(--c-accent-mid); line-height: 1.5; }
.clips-teaser { margin-top: 32px; padding: 28px 32px; background: var(--c-accent-light); border-radius: var(--radius-lg); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.clips-teaser-content { display: flex; gap: 20px; align-items: center; }
.clips-teaser-stack { display: flex; flex-shrink: 0; margin-right: 10px; }
.clips-teaser-stack .clip-mini { width: 48px; height: 64px; background: var(--c-surface); border: 2px solid var(--c-accent-light); border-radius: 6px; margin-left: -14px; display: flex; align-items: center; justify-content: center; }
.clips-teaser-stack .clip-mini:first-child { margin-left: 0; }
.clips-teaser-stack .clip-mini svg { width: 14px; height: 14px; color: var(--c-accent-mid); opacity: 0.6; }
.clips-teaser-text { flex: 1; }
.clips-teaser-title { font-size: 18px; font-weight: 600; color: var(--c-accent); margin-bottom: 4px; }
.clips-teaser-desc { font-size: 14px; color: var(--c-accent-mid); line-height: 1.5; }

/* ЛК-ПРЕВЬЮ */
.cabinet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.cabinet-card { padding: 24px; background: var(--c-surface); border-radius: var(--radius-lg); border: 1px solid var(--c-border-light); position: relative; }
.cabinet-card-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.cabinet-card-icon svg { width: 22px; height: 22px; }
.cabinet-card-icon--1 { background: var(--c-accent-light); color: var(--c-accent); }
.cabinet-card-icon--2 { background: var(--c-teal-light); color: var(--c-teal); }
.cabinet-card-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.cabinet-card-desc { font-size: 14px; color: var(--c-text-secondary); line-height: 1.55; margin-bottom: 12px; }
.cabinet-card-features { font-size: 12px; color: var(--c-text-muted); line-height: 1.6; }
.cabinet-card-features div { padding-left: 14px; position: relative; }
.cabinet-card-features div::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-accent-mid); }
.cabinet-visual { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cabinet-visual-slot { aspect-ratio: 16 / 10; min-height: 220px; }

/* N.U.R.S.E. */
.nurse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.nurse-card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--c-border-light); background: var(--c-surface); }
.nurse-card-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.nurse-card-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.nurse-card-desc { font-size: 14px; color: var(--c-text-secondary); line-height: 1.55; }
.nurse-card--parus .nurse-card-tag { color: var(--c-amber); }
.nurse-card--nurse .nurse-card-tag { color: var(--c-accent-mid); }
.nurse-card--nurse { border-color: var(--c-accent-mid); border-width: 2px; }

/* ПОДВАЛ / ПРОДУКТЫ */
.footer-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.footer-prod { padding: 18px 20px; border-radius: var(--radius); background: var(--c-surface); border: 1px solid var(--c-border-light); transition: border-color 0.2s; }
.footer-prod:hover { border-color: var(--c-border); }
.footer-prod-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.footer-prod-desc { font-size: 12px; color: var(--c-text-secondary); line-height: 1.45; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--c-border-light); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--c-text-muted); letter-spacing: 0.02em; }

/* Адаптив остальных секций */
@media (max-width: 720px) {
  .author-grid { grid-template-columns: 1fr; gap: 28px; }
  .author-photo { aspect-ratio: 16 / 10; min-height: 260px; }
  .author-fact-label { min-width: auto; }
  .author-fact { flex-direction: column; gap: 2px; align-items: flex-start; }
  .cabinet-grid { grid-template-columns: 1fr; }
  .cabinet-visual { grid-template-columns: 1fr; }
  .nurse-grid { grid-template-columns: 1fr; }
  .footer-products { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; align-items: flex-start; }
  .clips-teaser { grid-template-columns: 1fr; padding: 20px; }
  .clips-teaser-content { flex-direction: column; align-items: flex-start; }
}
