/* Страница «Энкратии» — вариант I «Свиток»: журнальная вёрстка, главы римскими цифрами,
   экран приложения как гравюра с подписями. Палитра сайта: тёмная бумага + один оранжевый. */

/* ---------- Шапка ---------- */

.ek-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line-soft);
}

.ek-back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 2.2rem;
  font-size: .85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .25s ease;
}

.ek-back svg { width: 16px; height: 16px; transition: transform .3s ease; }
.ek-back:hover { color: var(--text-primary); }
.ek-back:hover svg { transform: translateX(-3px); }

.ek-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(4rem, 10vw, 8.6rem);
  line-height: .86;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  margin: 0 0 1.1rem -0.05em;
}

.ek-greek {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
}

.ek-greek span { color: var(--color-accent); font-style: normal; letter-spacing: .02em; }

.ek-lead { max-width: 560px; margin-bottom: 2.4rem; }

.ek-beats { margin-bottom: 2.4rem; }
.ek-beats p {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  line-height: 1.32;
  color: var(--text-primary);
}
.ek-beats p:last-child { color: var(--color-accent); font-style: italic; }

.ek-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin-top: 2rem;
}

.ek-facts li {
  font-size: .78rem;
  color: var(--text-secondary);
  padding: .4rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
}

.ek-facts b { color: var(--text-primary); font-weight: 600; }

.ek-hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 0;
  align-items: center;
  justify-content: center;
  min-height: 560px;
}

.ek-orbit {
  position: absolute;
  left: 145px;
  top: 50%;
  width: min(560px, 120%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 90, 0.10);
  background: radial-gradient(closest-side, rgba(204, 106, 68, 0.16), transparent 70%);
  pointer-events: none;
}

.ek-orbit::before,
.ek-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 90, 0.07);
}

.ek-orbit::before { inset: 9%; border-style: dashed; }
.ek-orbit::after { inset: -9%; }

.ek-hero-phone {
  position: relative;
  width: 100%;
  max-width: 290px;
  justify-self: center;
  filter: drop-shadow(0 50px 60px rgba(0, 0, 0, .45));
}

.ek-notes {
  position: relative;
  list-style: none;
  align-self: stretch;
  margin: 0;
  padding: 0;
}

.ek-notes li {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--y);
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .8rem;
  padding-left: 4.4rem;
}

.ek-notes li::before {
  /* выноска: волосяная линия от телефона */
  content: "";
  position: absolute;
  left: -.6rem;
  top: .72rem;
  width: 4.4rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 130, 59, 0.9), rgba(234, 224, 207, 0.18));
}

.ek-notes li::after {
  content: "";
  position: absolute;
  left: -.85rem;
  top: calc(.72rem - 3px);
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  transform: rotate(45deg);
}

.ek-notes b {
  grid-row: span 2;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1.1;
  min-width: 1.6rem;
}

.ek-notes span { font-weight: 600; font-size: .95rem; color: var(--text-primary); }
.ek-notes small { font-size: .8rem; color: var(--text-secondary); line-height: 1.4; }

/* ---------- Два слова ---------- */

.ek-def { padding: clamp(2.4rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem) !important; }

.ek-def-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.ek-def-pair > div { padding: 1.6rem 1.6rem 0; border-left: 1px solid var(--line-soft); }
.ek-def-pair > div:first-child { padding-left: 0; border-left: 0; }

.ek-def-word {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: .7rem;
}

.ek-def-word span { color: var(--color-accent); font-style: normal; }
.ek-def-pair p { font-size: 1rem !important; line-height: 1.75 !important; }

/* ---------- Цифры ---------- */

.ek-nums {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: 0;
  text-align: left;
}

.ek-num {
  padding: 2rem 1.3rem;
  border-left: 1px solid var(--line-soft);
}

.ek-num:first-child { border-left: 0; padding-left: 0; }

.ek-num b {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 3.6vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: .55rem;
}

.ek-num span { font-size: .82rem; line-height: 1.45; color: var(--text-secondary); display: block; }

/* ---------- Главы ---------- */

.ek-center-head { margin-inline: auto; text-align: center; max-width: 720px; }
.ek-center-head .section-description { margin-inline: auto; max-width: 600px; }

.ek-chapters { padding: clamp(5rem, 9vw, 8rem) 0 2rem; }

.ek-chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--line-soft);
}

.ek-chapter:nth-of-type(even) .ek-chapter-phone { order: 2; }

.ek-chapter-phone {
  position: relative;
  width: min(270px, 100%);
  justify-self: center;
  isolation: isolate;
}

.ek-chapter-phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(204, 106, 68, 0.12), transparent 72%);
  border: 1px solid rgba(201, 160, 90, 0.06);
  z-index: -1;
}

.ek-chapter-text { max-width: 560px; }

.ek-roman {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3.4rem, 6vw, 5rem);
  font-weight: 500;
  line-height: .9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(217, 130, 59, 0.75);
  margin-bottom: 1rem;
}

.ek-chapter-text h3 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.6vw, 3.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}

.ek-chapter-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 1rem;
}

.ek-law {
  margin: 1.6rem 0 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 2px solid var(--color-accent);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--text-primary);
}

/* ---------- Пять вкладок ---------- */

.ek-tabs-section,
.ek-mentors { padding: clamp(4.5rem, 8vw, 7rem) 0 0; }

.ek-tabs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3rem;
}

.ek-tabs-head .section-header { margin-bottom: 0; }
.ek-tabs-head > .section-description { max-width: 420px; }

.ek-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.8rem, 1.6vw, 1.6rem);
  padding: 2.5rem clamp(1rem, 2vw, 2rem) 2rem;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
}

.ek-shot { margin: 0; text-align: center; }
.ek-shot:nth-child(even) { transform: translateY(28px); }

.ek-shot figcaption {
  margin-top: 1.1rem;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ek-shot figcaption b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
}

.ek-strip .enk-phone { transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.ek-shot:hover .enk-phone { transform: translateY(-8px); }

/* ---------- Наставники ---------- */

.ek-seg {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-mid);
  border-radius: 100px;
  flex: none;
}

.ek-seg button {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}

.ek-seg button.on { background: var(--color-accent); color: var(--bg-base); }
.ek-seg button:not(.on):hover { color: var(--text-primary); }

.ek-mentor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ek-m {
  position: relative;
  padding: 2rem 1.6rem 1.8rem;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  text-align: center;
  transition: border-color .4s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
}

.ek-m:hover { border-color: var(--line-mid); transform: translateY(-4px); }

.ek-m-av {
  width: min(170px, 80%);
  aspect-ratio: 1;
  margin: 0 auto 1.4rem;
}

.ek-m-av svg { width: 100%; height: 100%; display: block; }

.ek-m h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .32em;
  padding-left: .32em;
  color: var(--text-primary);
}

.ek-m-title { font-size: .82rem; color: var(--text-light); margin: .35rem 0 1.1rem; }

.ek-m-creed {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.32;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.ek-m-essence { font-size: .86rem; line-height: 1.6; color: var(--text-secondary); }

.ek-mentor-note {
  max-width: 640px;
  margin: 1.8rem auto 0;
  text-align: center;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ---------- Законы ---------- */

.ek-laws { padding: clamp(5rem, 9vw, 8rem) 0 0; }

.ek-law-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-soft);
  margin-top: 1rem;
}

.ek-law-list li {
  position: relative;
  padding: 2.2rem 2rem 2.2rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.ek-law-list li:not(:nth-child(3n + 1)) { padding-left: 2rem; border-left: 1px solid var(--line-soft); }

.ek-law-list b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--color-accent);
  margin-bottom: .9rem;
}

.ek-law-list h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.12;
  margin-bottom: .7rem;
}

.ek-law-list p { font-size: .93rem; line-height: 1.65; color: var(--text-secondary); }

/* ---------- Защита ---------- */

.ek-guard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(5rem, 9vw, 8rem);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(204, 106, 68, 0.12), transparent 70%),
    var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius-card) + 8px);
}

.ek-guard-phones {
  display: flex;
  justify-content: center;
  gap: clamp(.8rem, 2vw, 1.6rem);
}

.ek-guard-phone { width: min(230px, 46%); }
.ek-guard-phone--low { margin-top: 3.5rem; }

.ek-guard-text .section-title { margin: .2rem 0 1.2rem; }
.ek-guard-text > p { color: var(--text-secondary); line-height: 1.8; font-weight: 300; font-size: 1.05rem; }

.ek-guard-list { list-style: none; margin: 1.8rem 0; display: grid; gap: 1.1rem; }

.ek-guard-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: start;
  color: var(--text-secondary);
  font-size: .93rem;
  line-height: 1.6;
}

.ek-guard-list b { display: block; color: var(--text-primary); font-weight: 600; font-size: 1rem; margin-bottom: .15rem; }

.ek-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-mid);
  border-radius: 50%;
  color: var(--color-accent);
}

.ek-ico svg { width: 22px; height: 22px; }

.ek-guard-note {
  font-size: .86rem !important;
  color: var(--text-light) !important;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- Установка и приватность ---------- */

.ek-install { padding: clamp(5rem, 9vw, 8rem) 0 0; }
.ek-install .section-header { margin-bottom: 3rem; }

.ek-priv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ek-priv > div {
  padding: 2rem 1.8rem;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
}

.ek-priv .ek-ico { margin-bottom: 1.2rem; }
.ek-priv b { display: block; font-family: var(--font-heading); font-size: 1.45rem; font-weight: 500; line-height: 1.15; margin-bottom: .6rem; color: var(--text-primary); }
.ek-priv p { font-size: .9rem; line-height: 1.65; color: var(--text-secondary); }

/* ---------- Вопросы ---------- */

.ek-faq { padding: clamp(5rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem); }
.ek-faq .section-header { margin-bottom: 2.5rem; }
.ek-faq .faq-accordion-container { max-width: 900px; margin: 0 auto; }

/* ---------- Скачать ---------- */

.ek-cta { padding-top: 0; }
.ek-cta .contact-card { text-align: left; }

.ek-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.ek-cta .contact-title { margin-inline: 0; max-width: 760px; }
.ek-cta .contact-lead { margin-inline: 0; max-width: 560px; }
.ek-cta .contact-actions { justify-content: flex-start; }

.ek-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  width: 190px;
  text-align: center;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--sheet-ink-soft);
}

.ek-qr img {
  width: 172px;
  height: 172px;
  padding: 10px;
  background: #EAE0CF;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(42, 20, 8, 0.25);
}

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
  .ek-strip { grid-template-columns: repeat(5, 200px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .ek-shot { scroll-snap-align: center; }
  .ek-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ek-num:nth-child(4) { border-left: 0; padding-left: 0; }
  .ek-num:nth-child(n + 4) { border-top: 1px solid var(--line-soft); }
  .ek-mentor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .ek-hero { grid-template-columns: 1fr; }
  .ek-hero-stage { min-height: 0; margin-top: 1rem; }
  .ek-orbit { left: 50%; }
}

@media (max-width: 900px) {
  .ek-hero-stage { grid-template-columns: 1fr; justify-items: center; }
  .ek-orbit { left: 50%; top: 290px; }
  .ek-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; margin-top: 2.5rem; width: 100%; max-width: 520px; }
  .ek-notes li { position: static; transform: none; padding-left: 0; }
  .ek-notes li::before, .ek-notes li::after { display: none; }
  .ek-chapter { grid-template-columns: 1fr; }
  .ek-chapter:nth-of-type(even) .ek-chapter-phone { order: 0; }
  .ek-chapter-phone { width: min(240px, 70%); }
  .ek-law-list { grid-template-columns: 1fr 1fr; }
  .ek-law-list li, .ek-law-list li:not(:nth-child(3n + 1)) { padding: 1.8rem 1.2rem 1.8rem 0; border-left: 0; }
  .ek-law-list li:nth-child(even) { padding-left: 1.2rem; border-left: 1px solid var(--line-soft); }
  .ek-guard { grid-template-columns: 1fr; }
  .ek-priv { grid-template-columns: 1fr; }
  .ek-tabs-head { flex-direction: column; align-items: flex-start; }
  .ek-cta-grid { grid-template-columns: 1fr; }
  .ek-qr { display: none; }
}

@media (max-width: 640px) {
  .ek-title { font-size: clamp(3.4rem, 17vw, 4.6rem); }
  .ek-def-pair { grid-template-columns: 1fr; }
  .ek-def-pair > div, .ek-def-pair > div:first-child { padding: 1.4rem 0 0; border-left: 0; }
  .ek-def-pair > div + div { border-top: 1px solid var(--line-soft); margin-top: 1.4rem; }
  .ek-nums { grid-template-columns: 1fr 1fr; }
  .ek-num, .ek-num:first-child, .ek-num:nth-child(4) { padding: 1.4rem 1rem 1.4rem 0; border-left: 0; }
  .ek-num:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line-soft); }
  .ek-num:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  .ek-strip { grid-template-columns: repeat(5, 62vw); padding: 1.8rem 1rem 1.4rem; }
  .ek-shot:nth-child(even) { transform: none; }
  .ek-mentor-grid { grid-template-columns: 1fr; }
  .ek-law-list { grid-template-columns: 1fr; }
  .ek-law-list li:nth-child(even) { padding-left: 0; border-left: 0; }
  .ek-notes { grid-template-columns: 1fr; }
  .ek-guard { padding: 2rem 1.2rem; }
  .ek-guard-phone { width: 46%; }
  .ek-guard-phone--low { margin-top: 2rem; }
}
