/* ============================================================
   ESSENTIA — общие стили сайта
   Шапка, логотип, боковое меню, футер, переменные.
   Меняется здесь ОДИН раз и применяется ко всем страницам.
   ============================================================ */

:root {
  --ivory: #FAF7F2;
  --graphite: #2E2E2E;
  --burgundy: #6A1E2C;
}
.circle-logo {
  position: relative; width: 36px; height: 36px;
  border: 1px solid var(--graphite); border-radius: 50%;
  display: flex; justify-content: center; align-items: center; cursor: pointer;
  background: radial-gradient(circle, rgba(106, 30, 44, 0.1) 0%, transparent 70%);
}
.circle-logo::before {
  content: ''; position: absolute; width: 8px; height: 8px;
  background-color: var(--burgundy); border-radius: 50%; z-index: 2;
}
.circle-logo::after {
  content: ''; position: absolute; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 30%, var(--graphite) 31%, transparent 32%);
  border-radius: 50%; z-index: 1;
}
.hamburger { width: 24px; height: 16px; position: relative; cursor: pointer; }
.hamburger span { position: absolute; width: 100%; height: 1.5px; background-color: var(--graphite); left: 0; transition: all 0.3s ease; }
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 7px; }
.hamburger span:nth-child(3) { top: 14px; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg); top: 7px; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg); top: 7px; }
#mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.open { transform: translateX(0); }
#menu-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(46,46,46,0.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
#menu-overlay.open { opacity: 1; pointer-events: auto; }
.mm-panel {
  height: 100%;
  display: flex; flex-direction: column;
  background:
  radial-gradient(ellipse 80% 40% at 20% 0%, rgba(250,247,242,0.10), transparent 70%),
  linear-gradient(165deg, #6A1E2C 0%, #571825 60%, #4a1420 100%);
  color: var(--ivory);
  padding: 2rem 1.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(250,247,242,0.16);
  margin-bottom: 1.75rem;
}
.mm-logo {
  font-family: 'EB Garamond', serif; font-size: 1.6rem; font-weight: 500;
  letter-spacing: 1.5px; color: var(--ivory); cursor: pointer;
}
.mm-close {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(250,247,242,0.3); border-radius: 50%;
  background: transparent; color: var(--ivory);
  cursor: pointer; transition: background 0.25s ease, transform 0.25s ease;
}
.mm-close:hover { background: rgba(250,247,242,0.12); }
.mm-close:active { transform: scale(0.92); }
.mm-close svg { width: 16px; height: 16px; }
.mm-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(250,247,242,0.5);
  margin-bottom: 0.85rem;
}
.mm-nav { display: flex; flex-direction: column; }
.mm-link {
  position: relative;
  font-family: 'EB Garamond', serif; font-size: 1.18rem; font-weight: 400;
  color: rgba(250,247,242,0.92);
  padding: 0.72rem 0.5rem 0.72rem 0;
  text-decoration: none;
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.mm-link::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 0; height: 1px; background: var(--ivory);
  transform: translateY(-50%);
  transition: width 0.28s ease;
}
.mm-link:hover { color: #fff; padding-left: 1.4rem; }
.mm-link:hover::before { width: 0.9rem; }
.mm-feature {
  display: block;
  font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center; color: var(--ivory);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(250,247,242,0.35); border-radius: 999px;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.mm-feature:hover { background: rgba(250,247,242,0.12); border-color: rgba(250,247,242,0.6); }
.mm-divider {
  height: 1px; margin: 1.4rem 0;
  background: linear-gradient(to right, rgba(250,247,242,0.28), transparent);
}
.mm-foot {
  margin-top: auto; padding-top: 1.5rem;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 300;
  color: rgba(250,247,242,0.4); letter-spacing: 0.3px;
}
#mobile-menu .mm-stagger { opacity: 0; transform: translateX(-12px); }
#mobile-menu.open .mm-stagger {
  opacity: 1; transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
footer { font-size: 0.875rem; font-weight: 300; letter-spacing: 0.3px; }

/* задержки проявления пунктов меню — хватает на 20 строк */
#mobile-menu.open .mm-stagger:nth-child(1) { transition-delay: 0.12s; }
#mobile-menu.open .mm-stagger:nth-child(2) { transition-delay: 0.16s; }
#mobile-menu.open .mm-stagger:nth-child(3) { transition-delay: 0.20s; }
#mobile-menu.open .mm-stagger:nth-child(4) { transition-delay: 0.24s; }
#mobile-menu.open .mm-stagger:nth-child(5) { transition-delay: 0.28s; }
#mobile-menu.open .mm-stagger:nth-child(6) { transition-delay: 0.32s; }
#mobile-menu.open .mm-stagger:nth-child(7) { transition-delay: 0.36s; }
#mobile-menu.open .mm-stagger:nth-child(8) { transition-delay: 0.40s; }
#mobile-menu.open .mm-stagger:nth-child(9) { transition-delay: 0.44s; }
#mobile-menu.open .mm-stagger:nth-child(10) { transition-delay: 0.48s; }
#mobile-menu.open .mm-stagger:nth-child(11) { transition-delay: 0.52s; }
#mobile-menu.open .mm-stagger:nth-child(12) { transition-delay: 0.56s; }
#mobile-menu.open .mm-stagger:nth-child(13) { transition-delay: 0.60s; }
#mobile-menu.open .mm-stagger:nth-child(14) { transition-delay: 0.64s; }
#mobile-menu.open .mm-stagger:nth-child(15) { transition-delay: 0.68s; }
#mobile-menu.open .mm-stagger:nth-child(16) { transition-delay: 0.72s; }
#mobile-menu.open .mm-stagger:nth-child(17) { transition-delay: 0.76s; }
#mobile-menu.open .mm-stagger:nth-child(18) { transition-delay: 0.80s; }
#mobile-menu.open .mm-stagger:nth-child(19) { transition-delay: 0.84s; }
#mobile-menu.open .mm-stagger:nth-child(20) { transition-delay: 0.88s; }

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header {
  width: 100%;
  background: var(--ivory);
  border-bottom: 1px solid rgba(46,46,46,0.2);
  position: fixed; top: 0; left: 0; z-index: 50;
}
.hdr-brand {
  text-decoration: none;
  color: var(--graphite);
  font-family: 'EB Garamond', serif;
}
.hdr-brand:hover .circle-logo { border-color: var(--burgundy); }

.nav-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; font-weight: 300;
  color: var(--burgundy); text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer;
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--graphite); }
.nav-caret { width: 10px; height: 7px; transition: transform 0.25s ease; }
.nav-trigger[aria-expanded="true"] { color: var(--graphite); }
.nav-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem; font-weight: 500; letter-spacing: 0.2px;
  color: var(--ivory); background: var(--burgundy);
  padding: 0.55rem 1.15rem; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-cta:hover { background: #5a1825; transform: translateY(-1px); }

/* ---- выпадающая панель «Расчёты» ---- */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ivory);
  border-bottom: 1px solid rgba(46,46,46,0.15);
  box-shadow: 0 14px 34px rgba(46,46,46,0.10);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.mega[hidden] { display: none; }
.mega.open { opacity: 1; transform: translateY(0); }
.mega-inner { padding: 2rem 1rem 1.5rem; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.mega-head {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 1.18rem; font-weight: 500;
  color: var(--burgundy); text-decoration: none;
  transition: opacity 0.2s ease;
}
.mega-head:hover { opacity: 0.7; }
.mega-note {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem; font-weight: 300; line-height: 1.45;
  color: rgba(46,46,46,0.5);
  margin: 0.3rem 0 0.9rem;
}
.mega-item {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 300;
  color: var(--graphite); text-decoration: none;
  padding: 0.32rem 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.mega-item:hover { color: var(--burgundy); padding-left: 0.3rem; }

.mega-strip {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(46,46,46,0.12);
}
.mega-strip-label { display: flex; flex-direction: column; gap: 0.15rem; }
.mega-strip-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--burgundy);
}
.mega-strip-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem; font-weight: 300; color: rgba(46,46,46,0.5);
}
.mega-strip-links { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mega-chip {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 300;
  color: var(--graphite); text-decoration: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(46,46,46,0.2); border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.mega-chip:hover { border-color: var(--burgundy); color: var(--burgundy); }
.mega-chip-all { border-color: var(--burgundy); color: var(--burgundy); }
.mega-chip-all:hover { background: var(--burgundy); color: var(--ivory); }

/* ============================================================
   БОКОВОЕ МЕНЮ — дополнения
   ============================================================ */
.mm-logo { text-decoration: none; }
.mm-eyebrow-tight { margin-top: 1.1rem; }
.mm-link { display: flex; flex-direction: column; }
.mm-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem; font-weight: 300; line-height: 1.35;
  color: rgba(250,247,242,0.5);
  margin-top: 0.15rem;
}
.mm-all {
  display: inline-block; margin-top: 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 400;
  color: rgba(250,247,242,0.75); text-decoration: none;
  border-bottom: 1px solid rgba(250,247,242,0.3);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mm-all:hover { color: #fff; border-color: #fff; }

/* ============================================================
   ФУТЕР
   ============================================================ */
.site-footer {
  width: 100%; margin-top: 3rem;
  background: var(--ivory); color: var(--graphite);
  border-top: 1px solid rgba(46,46,46,0.15);
  padding: 3rem 0 2.25rem;
}
.ft-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  text-align: left;
}
.ft-title {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.7rem;
}
.ft-title-gap { margin-top: 1.5rem; }
.ft-link {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.83rem; font-weight: 300;
  color: rgba(46,46,46,0.78); text-decoration: none;
  padding: 0.24rem 0;
  transition: color 0.2s ease;
}
.ft-link:hover { color: var(--burgundy); }
.ft-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(46,46,46,0.1);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-align: center;
}
.ft-policy {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 300;
  color: var(--burgundy); opacity: 0.7;
  text-decoration: underline; text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}
.ft-policy:hover { opacity: 1; }
.ft-policy-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 0.35rem 1.1rem;
}
.ft-policy-row .ft-policy { cursor: pointer; }

@media (max-width: 900px) {
  .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
}
@media (max-width: 520px) {
  .site-footer { padding: 2.25rem 0 1.75rem; }
  .ft-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* текущая страница в навигации */
.mega-item.is-current, .mega-head.is-current, .nav-link.is-current { color: var(--burgundy); font-weight: 400; }
.ft-link.is-current { color: var(--burgundy); }
.mm-link.is-current { color: #fff; padding-left: 1.4rem; }
.mm-link.is-current::before { width: 0.9rem; }

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================================ */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem; font-weight: 300;
  color: rgba(46,46,46,0.5);
  margin-bottom: 1.75rem;
}
.crumbs a { color: var(--burgundy); text-decoration: none; opacity: 0.85; transition: opacity 0.2s ease; }
.crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.crumbs span[aria-hidden] { opacity: 0.4; }

/* ============================================================
   МОСТИК МЕЖДУ РАЗДЕЛАМИ (например, Матрица → Стихии)
   ============================================================ */
.bridge-card {
  max-width: 42rem; margin: 3rem auto 0;
  padding: 2rem 1.75rem; text-align: center;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(106,30,44,0.18);
  border-radius: 1.25rem;
}
.bridge-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(46,46,46,0.5); margin-bottom: 0.6rem;
}
.bridge-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.6rem; font-weight: 500; color: var(--burgundy);
  margin-bottom: 0.75rem;
}
.bridge-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 300; line-height: 1.7;
  color: rgba(46,46,46,0.78);
  margin-bottom: 1.4rem;
}
.bridge-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem; font-weight: 400;
  color: var(--burgundy); text-decoration: none;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--burgundy); border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.bridge-btn:hover { background: var(--burgundy); color: var(--ivory); transform: translateY(-2px); }

/* вводный абзац под заголовком страницы */
.page-intro {
  max-width: 40rem; margin: 1.5rem auto 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem; font-weight: 300; line-height: 1.75;
  color: rgba(46,46,46,0.7); text-align: center;
}
.page-intro a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 2px; }

/* колонки-сетки: без переполнения длинными словами */
.mega-col, .ft-col { min-width: 0; }

/* панель «Расчёты» на узких десктопах */
@media (max-width: 1180px) {
  .mega-grid { gap: 1.5rem; }
  .mega-item { font-size: 0.82rem; }
  .mega-note { font-size: 0.7rem; }
}

/* ============================================================
   ОБЩИЙ КАРКАС КОНТЕНТНЫХ СТРАНИЦ
   Используется на raschety.aspx, o-metode.aspx и далее.
   Не дублировать в <style> страниц.
   ============================================================ */

.page-wrap { max-width: 1120px; margin: 0 auto; padding: 7.5rem 1.25rem 2rem; }
@media (max-width: 640px) { .page-wrap { padding-top: 6rem; } }

.page-eyebrow {
  display: block; text-align: center;
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--burgundy); margin-bottom: 1rem;
}
.page-title {
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500;
  color: var(--graphite); margin-bottom: 1rem;
}
.page-lead {
  max-width: 46rem; margin: 0 auto;
  text-align: center; font-size: 1.02rem;
  color: rgba(46,46,46,0.78);
}

.divider { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 2.5rem 0; }
.divider::before, .divider::after { content: ''; height: 1px; width: 60px; background: rgba(46,46,46,0.2); }
.divider-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--burgundy); }

.group { margin-top: 3.5rem; }
.group-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--burgundy);
}
.group-title { font-family: 'EB Garamond', serif; font-size: 1.75rem; font-weight: 500; margin: 0.4rem 0 0.5rem; }
.group-lead { font-size: 0.95rem; color: rgba(46,46,46,0.7); max-width: 42rem; margin-bottom: 1.75rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }

.rcard {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid rgba(46,46,46,0.12);
  border-radius: 1rem; padding: 1.6rem 1.5rem;
  text-decoration: none; color: inherit;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.rcard:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(46,46,46,0.09); border-color: rgba(106,30,44,0.3); }
.rcard-lead { border: 1px solid rgba(106,30,44,0.35); }

.rcard-badge {
  align-self: flex-start;
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--burgundy); background: rgba(106,30,44,0.07);
  padding: 0.25rem 0.6rem; border-radius: 999px; margin-bottom: 0.85rem;
}
.rcard-badge-soon { color: rgba(46,46,46,0.55); background: rgba(46,46,46,0.06); }
.rcard-title { font-family: 'EB Garamond', serif; font-size: 1.4rem; font-weight: 500; margin-bottom: 0.5rem; }
.rcard-desc { font-size: 0.9rem; color: rgba(46,46,46,0.72); flex-grow: 1; }
.rcard-parts {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.9rem; padding-top: 0.9rem;
  border-top: 1px solid rgba(46,46,46,0.09);
}
.rcard-part {
  font-size: 0.72rem; font-weight: 300;
  color: rgba(46,46,46,0.6);
  border: 1px solid rgba(46,46,46,0.15); border-radius: 999px;
  padding: 0.18rem 0.6rem;
}
.rcard-link { margin-top: 1.1rem; font-size: 0.86rem; font-weight: 400; color: var(--burgundy); }

.invite {
  margin: 4rem 0 1rem; padding: 2.75rem 1.5rem; text-align: center;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(106,30,44,0.18); border-radius: 1.25rem;
}
.invite h2 { font-family: 'EB Garamond', serif; font-size: 1.75rem; font-weight: 500; color: var(--burgundy); margin-bottom: 0.75rem; }
.invite p { max-width: 34rem; margin: 0 auto 1.5rem; font-size: 0.97rem; color: rgba(46,46,46,0.78); }

.btn-individual {
  display: inline-block; padding: 0.9rem 2.2rem;
  background: var(--burgundy); color: var(--ivory);
  border-radius: 1.5rem; text-decoration: none; font-weight: 500;
  box-shadow: 0 6px 18px rgba(106,30,44,0.22);
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn-individual:hover { background: #5a1825; transform: translateY(-2px); }
