/**
 * natal.css — стили страницы /natalnaya-karta/.
 *
 * Эстетика: «классическая астрология на бумаге». Cream-фон, Forum для заголовков,
 * Manrope для тела, спокойные акценты. Контрастно с тёмным /taro/.
 *
 * Architecture:
 *  - Все стили скоупом .natal-shell — body получает класс .natal-page (см. inc/natal.php)
 *  - Box-sizing border-box на shell и потомках
 *  - Контейнер .natal-shell .natal-wrap наследует тему 1:1 через --wrapper-offset
 *  - Шрифты — только из local-fonts.css (Forum/Manrope), без CDN
 *  - Heading scale — из STYLE-GUIDE.md, без clamp(), media queries 1120/580
 */

/* ── PALETTE ─────────────────────────────────────────────────────────── */
.natal-shell{
  --bg:           #FAF8F3;   /* кремовая бумага */
  --bg-paper:     #FFFFFF;   /* карточки, форма, таблицы */
  --bg-soft:      #F2EEE3;   /* выделение полей, hover */
  --ink:          #2C2A26;   /* основной текст */
  --ink-soft:     #6B6760;   /* подписи, meta */
  --ink-muted:    #A8A39A;   /* placeholder, disabled */
  --line:         #E5DFD3;   /* границы */
  --line-strong:  #C8C0B0;
  --accent:       #8B5A3C;   /* тёплый коричневый */
  --accent-dark:  #6B4530;
  --accent-soft:  rgba(139, 90, 60, 0.08);

  /* Стихии — Deep Crimson / Olive Moss / Opulent Gold / Regal Navy.
     Luxury heritage палитра: насыщенные пигменты, как обивка опера-холла
     или старинная астрологическая иллюминация. */
  --fire:        #9E0E18;   /* Deep Crimson */
  --fire-deep:   #6D0810;
  --fire-soft:   #C03540;
  --fire-fill:   #9E0E18;

  --earth:       #6B7B4E;   /* Olive Moss */
  --earth-deep:  #4A5736;
  --earth-soft:  #8A9C6A;
  --earth-fill:  #6B7B4E;

  --air:         #CC9E4A;   /* Opulent Gold */
  --air-deep:    #8A6B2A;
  --air-soft:    #DDB76E;
  --air-fill:    #CC9E4A;

  --water:       #0A1D4B;   /* Regal Navy */
  --water-deep:  #050F28;
  --water-soft:  #2A4480;
  --water-fill:  #0A1D4B;

  /* Цвет иконки знака поверх насыщенного сектора */
  --sign-glyph:  #F7EBE0;   /* Ethereal Ivory */

  /* Аспекты: цвета по пожеланию (conj=синий, opp+sq=чёрный, trine=красный,
     sx=розовый). Толщина/opacity линий — по ТЗ v1.1 §4.3 (рендерится в JS). */
  --asp-conj:  #1B3D8F;   /* Синий — соединение 0° */
  --asp-opp:   #111111;   /* Чёрный — оппозиция 180° (негатив) */
  --asp-trine: #C8121A;   /* Красный — тригон 120° (гармония-успех) */
  --asp-sq:    #111111;   /* Чёрный — квадрат 90° (негатив) */
  --asp-sx:    #E36BA1;   /* Розовый — секстиль 60° */

  /* Spacing */
  --section-py:   80px;
  --section-py-m: 56px;
  --section-py-s: 40px;
}

/* ── SHELL RESET ─────────────────────────────────────────────────────── */
.natal-shell,
.natal-shell *,
.natal-shell *::before,
.natal-shell *::after{
  box-sizing: border-box;
}

.natal-shell{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 1120px){ .natal-shell{ font-size: 17px; } }
@media (max-width: 580px) { .natal-shell{ font-size: 16px; } }

.natal-shell img{ max-width: 100%; display: block; }
.natal-shell a{ color: var(--accent); text-decoration: none; transition: color .15s ease; }
.natal-shell a:hover{ color: var(--accent-dark); }

/* Эталонные блоки сайта (blogslider, item-article) НЕ перебиваем — возвращаем
   оригинальные стили темы через all: revert. */
.natal-shell .section-blogslider,
.natal-shell .section-blogslider *{
  /* Цвет ссылок, шрифт заголовков, размеры — берём как в style.css темы */
}
.natal-shell .section-blogslider a,
.natal-shell .section-blogslider a:hover,
.natal-shell .item-article a,
.natal-shell .item-article a:hover{
  color: revert;
  transition: revert;
}
.natal-shell .section-blogslider h2,
.natal-shell .section-blogslider .h2{
  font-size: revert;
  line-height: revert;
  margin: revert;
  color: revert;
  font-family: revert;
  font-weight: revert;
}
.natal-shell .item-article__name,
.natal-shell .item-article__name a{
  color: revert;
  font-family: revert;
  font-weight: revert;
}
.natal-shell button{ font-family: inherit; cursor: pointer; }

/* ── CONTAINER — 1:1 как theme .wrap (header/footer) ─────────────────── */
/* Тема сайта (style.css):
     .wrap{ width:100%; padding:0 var(--wrapper-offset); margin:0 auto;
            max-width:calc(144rem + 2 * var(--wrapper-offset)) }
   144rem с media-cascade --wrapper-offset 8/6/4/2/1.6rem.
   Наш .natal-wrap дублирует это 1:1 чтобы ширина совпадала с меню/подвалом. */
.natal-shell .natal-wrap{
  width: 100%;
  max-width: calc(144rem + 2 * var(--wrapper-offset, 32px));
  margin: 0 auto;
  padding-left:  var(--wrapper-offset, 32px);
  padding-right: var(--wrapper-offset, 32px);
}

/* ── TYPOGRAPHY (Forum, scale per STYLE-GUIDE) ──────────────────────── */
.natal-shell h1,
.natal-shell h2,
.natal-shell h3,
.natal-shell h4,
.natal-shell .h1,
.natal-shell .h2,
.natal-shell .h3,
.natal-shell .h4{
  font-family: 'Forum', 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.natal-shell h1, .natal-shell .h1{ font-size: 64px; line-height: 1.05; }
.natal-shell h2, .natal-shell .h2{ font-size: 44px; line-height: 1.10; margin-top: 8px; }
.natal-shell h3, .natal-shell .h3{ font-size: 28px; line-height: 1.20; }
.natal-shell h4, .natal-shell .h4{ font-size: 22px; line-height: 1.30; letter-spacing: 0; }
@media (max-width: 1120px){
  .natal-shell h1, .natal-shell .h1{ font-size: 52px; }
  .natal-shell h2, .natal-shell .h2{ font-size: 36px; }
  .natal-shell h3, .natal-shell .h3{ font-size: 24px; }
  .natal-shell h4, .natal-shell .h4{ font-size: 20px; }
}
@media (max-width: 580px){
  .natal-shell h1, .natal-shell .h1{ font-size: 38px; }
  .natal-shell h2, .natal-shell .h2{ font-size: 28px; }
  .natal-shell h3, .natal-shell .h3{ font-size: 20px; }
  .natal-shell h4, .natal-shell .h4{ font-size: 18px; }
}

.natal-shell p{ margin: 0 0 12px; }
.natal-shell .lead{
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 24px;
}
@media (max-width: 580px){ .natal-shell .lead{ font-size: 17px; } }

.natal-shell .eyebrow{
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── SECTIONS ────────────────────────────────────────────────────────── */
.natal-shell .natal-section{
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}
@media (max-width: 1120px){
  .natal-shell .natal-section{ padding-top: var(--section-py-m); padding-bottom: var(--section-py-m); }
}
@media (max-width: 580px){
  .natal-shell .natal-section{ padding-top: var(--section-py-s); padding-bottom: var(--section-py-s); }
}

.natal-shell .natal-section + .natal-section{
  border-top: 1px solid var(--line);
}

/* ── HERO ────────────────────────────────────────────────────────────── */
.natal-shell .natal-hero{
  padding-top: 56px;
  padding-bottom: 24px;
  position: relative;
}
.natal-shell .natal-hero .eyebrow{ margin-bottom: 16px; }
.natal-shell .natal-hero h1{ max-width: 920px; }

/* HERO SPLIT — 2 колонки: текст слева, форма справа */
.natal-shell .natal-hero-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 48px;
}
@media (min-width: 1024px){
  .natal-shell .natal-hero-split{
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr);
    gap: 48px;
    align-items: center;
  }
}
.natal-shell .natal-hero-split h1{ max-width: 100%; margin-top: 12px; }
.natal-shell .natal-hero-text{ min-width: 0; }
.natal-shell .natal-hero-text .lead{ max-width: 640px; margin-bottom: 0; }
.natal-shell .natal-hero-form{
  min-width: 0;
  position: sticky;
  top: 24px;
}
@media (max-width: 1023px){
  .natal-shell .natal-hero-form{ position: static; }
}
.natal-shell .natal-hero-form .natal-form-host{ margin: 0; }

/* секция результата — отдельный отступ, без верхнего h2 */
.natal-shell .natal-result-section{
  padding-top: 24px;
  padding-bottom: 64px;
}

/* ── BREADCRUMBS ────────────────────────────────────────────────────── */
.natal-shell .natal-crumbs{
  padding-top: 32px;
  padding-bottom: 0;
}
.natal-shell .natal-crumbs ol{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.natal-shell .natal-crumbs li:not(:last-child)::after{
  content: '/';
  color: var(--ink-muted);
  margin-left: 10px;
}
.natal-shell .natal-crumbs a{ color: var(--ink-soft); }
.natal-shell .natal-crumbs a:hover{ color: var(--accent); }

/* ── CARD ────────────────────────────────────────────────────────────── */
.natal-shell .natal-card{
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 32px;
}
@media (max-width: 580px){
  .natal-shell .natal-card{ padding: 20px; border-radius: 14px; }
}

/* ── INFO TEXT FRAGMENTS ────────────────────────────────────────────── */
.natal-shell .natal-prose p{
  max-width: 720px;
  font-size: 18px;
  line-height: 1.65;
}
.natal-shell .natal-prose ul,
.natal-shell .natal-prose ol{
  max-width: 720px;
  padding-left: 22px;
  margin: 0 0 16px;
}
.natal-shell .natal-prose li{ margin-bottom: 6px; }

/* ── EDU-секции: 2-кол grid с визуалом справа/слева ──────────────────── */
.natal-shell .natal-edu{
  padding-top: 56px;
  padding-bottom: 56px;
}
.natal-shell .natal-edu + .natal-edu{
  border-top: 1px solid var(--line);
  padding-top: 56px;
}
@media (max-width: 580px){
  .natal-shell .natal-edu{ padding-top: 40px; padding-bottom: 40px; }
  .natal-shell .natal-edu + .natal-edu{ padding-top: 40px; }
}
.natal-shell .natal-edu-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px){
  .natal-shell .natal-edu-grid{
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
    gap: 56px;
  }
  /* Альтернативная секция — визуал слева, текст справа */
  .natal-shell .natal-edu-alt .natal-edu-grid{
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.35fr);
  }
}
.natal-shell .natal-edu-text{ min-width: 0; }
/* По STYLE-GUIDE: h2 = 76/59/42, h3 = 32/26/20, font-family Forum.
   Margin: h2=10px после, lead=12px после, section=56px */
.natal-shell .natal-edu-text h2{
  font-family: 'Forum', serif;
  font-weight: 400;
  font-size: 76px;
  line-height: 0.9;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 10px;
}
.natal-shell .natal-edu-text h3{
  font-family: 'Forum', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.11;
  color: var(--ink);
  margin: 32px 0 14px;
}
.natal-shell .natal-edu-text .lead{
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 12px;
}
.natal-shell .natal-edu-text p{
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
@media (max-width: 1120px){
  .natal-shell .natal-edu-text h2{ font-size: 59px; line-height: 0.9; }
  .natal-shell .natal-edu-text h3{ font-size: 26px; }
}
@media (max-width: 580px){
  .natal-shell .natal-edu-text h2{ font-size: 42px; line-height: 0.95; }
  .natal-shell .natal-edu-text h3{ font-size: 20px; margin-top: 24px; }
  .natal-shell .natal-edu-text .lead{ font-size: 16px; }
  .natal-shell .natal-edu-text p{ font-size: 16px; }
}
.natal-shell .natal-edu-list{
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}
.natal-shell .natal-edu-list li{
  position: relative;
  padding: 10px 14px 10px 16px;
  background: var(--bg-paper, #fff);
  border-left: 3px solid var(--air, #CC9E4A);
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.natal-shell .natal-edu-list li b{
  color: var(--ink);
  font-weight: 600;
}
.natal-shell .natal-edu-houses{
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
@media (max-width: 580px){
  .natal-shell .natal-edu-houses{ grid-template-columns: 1fr; }
}
.natal-shell .natal-edu-visual{
  position: sticky;
  top: 24px;
  text-align: center;
  padding: 18px;
  background: var(--bg-paper, #fff);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
@media (max-width: 899px){
  .natal-shell .natal-edu-visual{ position: static; }
}
.natal-shell .natal-edu-visual svg{
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  display: block;
}
.natal-shell .natal-edu-caption{
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
  font-style: italic;
}

/* ── FAQ (используем native <details>) ──────────────────────────────── */
.natal-shell .natal-faq{ display: grid; gap: 12px; max-width: 820px; }
.natal-shell .natal-faq details{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-paper);
  padding: 18px 22px;
}
.natal-shell .natal-faq summary{
  font-family: 'Forum', serif;
  font-size: 22px;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.natal-shell .natal-faq summary::-webkit-details-marker{ display: none; }
.natal-shell .natal-faq summary::after{
  content: '＋';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent);
  transition: transform .15s ease;
}
.natal-shell .natal-faq details[open] summary::after{ content: '−'; }
.natal-shell .natal-faq details[open]{ background: var(--bg-soft); }
.natal-shell .natal-faq details p{
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
}
@media (max-width: 580px){
  .natal-shell .natal-faq summary{ font-size: 18px; padding-right: 28px; }
}

/* ── PREVIEW BANNER (выкл. перед launch) ────────────────────────────── */
.natal-shell .natal-preview-banner{
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  color: var(--accent-dark);
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.natal-shell .natal-preview-banner strong{ color: var(--accent-dark); }

/* ── RELATED LINKS ───────────────────────────────────────────────────── */
.natal-shell .natal-related ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.natal-shell .natal-related a{
  display: block;
  padding: 18px 22px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  transition: border-color .15s ease, transform .15s ease;
}
.natal-shell .natal-related a:hover{
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent);
}

/* ── PLACEHOLDER для формы / результата (Phase 2-4 заполнят) ──────────── */
.natal-shell .natal-form-placeholder,
.natal-shell .natal-result-placeholder{
  background: var(--bg-paper);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 16px;
}
.natal-shell .natal-form-placeholder strong{ color: var(--ink-soft); }

/* ── FOOTER MARGIN FIX (см. memory feedback_no_white_gap_above_footer) ─ */
body.natal-page{ background: #FAF8F3; }
.natal-shell ~ .footer{ margin-top: 0 !important; }

/* Предотвращение горизонтального скролла на узких viewport'ах: даже если
   какой-нибудь внутренний блок (таблица аспектов, длинный URL и т.п.) выпрет
   за контейнер — на уровне body это не создаст горизонтальный скролл. */
body.natal-page{ overflow-x: clip; }
.natal-shell{ overflow-x: clip; max-width: 100vw; }
