/* ==========================================================================
   MARKET — efimovaschool.ru  |  УМК · TOP-tier 2026 layout
   Sections: hero (asymmetric + stat-tiles + ambient orbs)
             includes (bento timeline)
             preview + buy (off-set composition)
             details (magazine chapters + sticky TOC)
             faq (общий компонент из faq.css, не трогаем)
   ========================================================================== */

.mk-page {
  background: #0a0710;
  color: rgba(255, 255, 255, 0.92);
}
.mk-page main { display: block; }

/* ============================================================
   COMMON · секции, заголовки, sr-only
   ============================================================ */
.mk-section {
  position: relative;
  padding: clamp(64px, 7vw, 112px) 0;
  background: #0a0710;
}
.mk-section--alt {
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(120, 255, 0, 0.05), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(126, 0, 154, 0.18), transparent 60%),
    #0c0814;
}

.mk-section__head { margin-bottom: clamp(32px, 3.5vw, 56px); }

.mk-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #78ff00;
  margin-bottom: 14px;
}
.mk-section__eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.mk-section__title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0;
}

.mk-visually-hidden,
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Последняя секция перед футером — отступ как у .hp-callback на главной */
.mk-page main > section:last-of-type { padding-bottom: 110px; }

/* ============================================================
   HERO · стиль 1:1 с .legal-hero (см. /css/legal.css)
   ============================================================ */
.mk-hero {
  position: relative;
  padding: clamp(108px, 11vw, 150px) 0 clamp(48px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(126, 0, 154, 0.45), transparent 60%),
    radial-gradient(700px 400px at 95% 30%, rgba(120, 255, 0, 0.10), transparent 60%),
    linear-gradient(180deg, #14081d 0%, #0a0710 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
.mk-hero > .container,
.mk-hero__inner { position: relative; z-index: 1; }

.mk-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}
.mk-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}
.mk-breadcrumb a:hover { color: #78ff00; }
.mk-breadcrumb__sep { color: rgba(255, 255, 255, 0.25); }
.mk-breadcrumb [aria-current="page"] { color: #fff; }

.mk-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid rgba(120, 255, 0, 0.3);
  background: rgba(120, 255, 0, 0.08);
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78ff00;
}
.mk-hero__eyebrow svg { color: #78ff00; width: 12px; height: 12px; }

.mk-hero__title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.mk-hero__title-accent {
  color: #78ff00;
  display: inline;
}

/* — Stats как .legal-meta — компактные пилюли в одну строку — */
.mk-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mk-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}
.mk-stat svg {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.mk-stat b {
  color: #fff;
  font-weight: 600;
  margin-right: 2px;
}

/* ============================================================
   INCLUDES · bento timeline (3-col, item 01 wide span 2)
   ============================================================ */
.mk-includes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(132px, auto);
  gap: 14px;
  counter-reset: mk-num;
  list-style: none;
  padding: 0;
  margin: 0;
}
.mk-includes__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 22px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  counter-increment: mk-num;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.mk-includes__item::before {
  content: counter(mk-num, decimal-leading-zero);
  flex-shrink: 0;
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: clamp(40px, 4vw, 56px);
  line-height: 0.85;
  color: rgba(120, 255, 0, 0.34);
  letter-spacing: 0.02em;
  transition: color 0.3s, transform 0.3s;
}
.mk-includes__item::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #78ff00 0%, transparent 60%);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s cubic-bezier(.2, .8, .2, 1);
}
.mk-includes__item:hover {
  border-color: rgba(120, 255, 0, 0.28);
  background: linear-gradient(180deg, rgba(120, 255, 0, 0.05) 0%, rgba(255, 255, 255, 0.012) 100%);
  transform: translateY(-2px);
}
.mk-includes__item:hover::before {
  color: #78ff00;
  transform: scale(1.04);
}
.mk-includes__item:hover::after { clip-path: inset(0 0 0 0); }

.mk-includes__text {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  padding-top: 4px;
}

@media (max-width: 960px) {
  .mk-includes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .mk-includes { grid-template-columns: 1fr; gap: 10px; }
  .mk-includes__item { padding: 18px 18px 20px; gap: 12px; }
  .mk-includes__item::before { font-size: 38px; }
  .mk-includes__text { font-size: 14.5px; font-weight: 500; }
}

/* ============================================================
   PREVIEW · 50/50 split (стиль cs-umk__card со страницы курса)
   ============================================================ */
.mk-preview__shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
/* Buy-card имеет ту же 16/9 пропорцию, что и видео — обе плитки строго одной высоты */
.mk-preview__buy { aspect-ratio: 16 / 9; }

/* — Video tile — стиль cs-umk__card: aspect 16:9 + full-bleed image + play — */
.mk-preview__video {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  background: #1a0d25;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}
.mk-preview__video:hover,
.mk-preview__video:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(183, 87, 199, 0.5);
  box-shadow: 0 24px 60px -20px rgba(183, 87, 199, 0.5);
}
.mk-preview__video:focus-visible {
  outline: 2px solid #78ff00;
  outline-offset: 3px;
}

.mk-preview__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #14081d;
}
.mk-preview__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 280ms ease, transform 600ms ease;
}
.mk-preview__video:hover .mk-preview__media img,
.mk-preview__video:focus-visible .mk-preview__media img {
  opacity: 1;
  transform: scale(1.03);
}

.mk-preview__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 7, 16, 0.05) 0%, rgba(10, 7, 16, 0.40) 100%);
  pointer-events: none;
}

.mk-preview__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 76px; height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #78ff00;
  color: #0a0710;
  box-shadow: 0 12px 36px rgba(120, 255, 0, 0.42);
  transition: transform 0.3s, box-shadow 0.3s;
}
.mk-preview__video:hover .mk-preview__play,
.mk-preview__video:focus-visible .mk-preview__play {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 16px 48px rgba(120, 255, 0, 0.55);
}
.mk-preview__play svg { margin-left: 4px; }

.mk-preview__play-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(120, 255, 0, 0.45);
  animation: mkPulse 2.4s ease-out infinite;
}
@keyframes mkPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* — Buy CTA card · стиль cs-tier + декоративный фон-заполнитель — */
.mk-preview__buy {
  position: relative;
  display: flex;
}
.mk-buy {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 2.6vw, 36px) clamp(22px, 2.4vw, 32px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse at top right, rgba(120, 255, 0, 0.08), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(126, 0, 154, 0.20), transparent 50%),
    linear-gradient(180deg, rgba(22, 12, 34, 0.7) 0%, rgba(12, 6, 20, 0.85) 100%);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
/* Декоративный watermark — большое «УМК» в правом нижнем углу */
.mk-buy::before {
  content: "УМК";
  position: absolute;
  right: -18px;
  bottom: -52px;
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: clamp(180px, 22vw, 280px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  user-select: none;
}
/* Декоративные «орбы» — мягкие световые пятна в фоне */
.mk-buy::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(120, 255, 0, 0.10) 0%, transparent 60%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}
.mk-buy > * { position: relative; z-index: 1; }
.mk-buy:hover {
  border-color: rgba(183, 87, 199, 0.35);
  transform: translateY(-2px);
}

.mk-buy__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
}
.mk-buy__amount {
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 400;
  color: #fff;
  line-height: 1;
  letter-spacing: 0.01em;
}
.mk-buy__currency {
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  color: rgba(255, 255, 255, 0.65);
}

.mk-buy__discount {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -10px;
}
.mk-buy__old {
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.mk-buy__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #9eff3d;
  border: 1px solid rgba(120, 255, 0, 0.6);
  border-radius: 999px;
  background: rgba(120, 255, 0, 0.1);
  text-transform: uppercase;
}

/* Кнопка — стиль .cr-btn--primary (см. /css/courses.css) */
.mk-buy__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: auto;
  padding: 11px 22px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body, 'Futura PT', system-ui, sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #78ff00 0%, #5ecc00 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 16px -4px rgba(120, 255, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.mk-buy__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px -4px rgba(120, 255, 0, 0.50);
}
.mk-buy__btn:active { transform: translateY(0); }
.mk-buy__btn:focus-visible {
  outline: 2px solid #78ff00;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .mk-preview__shell { grid-template-columns: 1fr; gap: 24px; }
  .mk-preview__buy { aspect-ratio: auto; max-width: 520px; width: 100%; align-self: center; justify-self: center; }
}

/* ============================================================
   DETAILS · magazine chapters · sticky TOC слева
   ============================================================ */
.mk-details__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(36px, 4vw, 72px);
}

/* — TOC sidebar — */
.mk-details__toc {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mk-details__toc-eyebrow {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.mk-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.mk-toc a {
  display: block;
  padding: 11px 0 11px 18px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s, border-color 0.25s;
}
.mk-toc a:hover { color: #fff; }
.mk-toc a.is-active {
  color: #fff;
  border-left-color: #78ff00;
}

/* Level tag (под TOC, в sidebar) */
.mk-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background:
    linear-gradient(135deg, rgba(126, 0, 154, 0.32) 0%, rgba(126, 0, 154, 0.16) 100%);
  border: 1px solid rgba(183, 87, 199, 0.4);
  border-radius: 14px;
  align-self: stretch;
}
.mk-level-tag__eyebrow {
  display: block;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #B757C7;
  margin-bottom: 4px;
}
.mk-level-tag__text {
  display: block;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

/* — Main column — */
.mk-details__main { min-width: 0; }

/* Intro prose с drop-cap на первой букве */
.mk-prose--intro { margin-bottom: clamp(40px, 4vw, 56px); }
.mk-prose--intro p:first-child::first-letter {
  float: left;
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: 76px;
  line-height: 0.85;
  color: #78ff00;
  padding: 4px 14px 0 0;
  margin-top: 4px;
  font-weight: 400;
}

.mk-prose {
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}
.mk-prose > * + * { margin-top: 14px; }
.mk-prose p { margin: 0; }

.mk-prose ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}
.mk-prose ul li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.82);
}
.mk-prose ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #78ff00;
  box-shadow: 0 0 8px rgba(120, 255, 0, 0.5);
}

/* Chapter cards */
.mk-chapter {
  position: relative;
  padding: 36px 0 8px 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 36px;
  scroll-margin-top: 110px;
}
.mk-chapter:first-of-type { margin-top: 0; }
.mk-chapter__num {
  position: absolute;
  left: 0;
  top: 32px;
  font-family: var(--font-display, 'Bebas Neue', 'Impact', sans-serif);
  font-size: 56px;
  line-height: 0.85;
  color: rgba(120, 255, 0, 0.4);
  letter-spacing: 0.02em;
  font-weight: 400;
}
.mk-chapter h3 {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 14px;
}
.mk-chapter p {
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin: 14px 0 0;
}

/* Outro prose */
.mk-prose--outro {
  margin-top: clamp(40px, 4vw, 56px);
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
  .mk-details__layout { grid-template-columns: 1fr; gap: 24px; }
  .mk-details__toc {
    position: sticky;
    top: 72px;
    z-index: 5;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(10, 7, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mk-details__toc::-webkit-scrollbar { display: none; }
  .mk-details__toc-eyebrow { display: none; }
  .mk-toc {
    flex-direction: row;
    border-left: none;
    gap: 4px;
    flex-shrink: 0;
  }
  .mk-toc a {
    padding: 8px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
  }
  .mk-toc a.is-active {
    border-left-color: transparent;
    background: rgba(120, 255, 0, 0.08);
    border-bottom-color: #78ff00;
  }
  .mk-level-tag {
    flex-shrink: 0;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .mk-details__toc { display: none; }
  .mk-chapter { padding-left: 56px; }
  .mk-chapter__num { font-size: 44px; }
  .mk-prose--intro p:first-child::first-letter { font-size: 60px; padding-right: 10px; }
}

/* ============================================================
   FAQ · общий компонент .faq-list / .faq-item (faq.css), не трогаем
   ============================================================ */
.mk-faq__head {
  margin-bottom: clamp(24px, 3vw, 36px);
  max-width: 760px;
}
.mk-faq__head h2 {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.15;
}
.mk-faq__head p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   RESPONSIVE · общие
   ============================================================ */
@media (max-width: 720px) {
  .mk-hero { padding-top: clamp(96px, 22vw, 124px); }
  .mk-prose { font-size: 14.5px; }
  .mk-prose ul li { padding-left: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-buy::before,
  .mk-preview__play-pulse,
  .mk-includes__item,
  .mk-preview__video,
  .mk-buy__btn,
  .mk-preview__play { animation: none; transition: none; }
  .mk-includes__item:hover,
  .mk-preview__video:hover,
  .mk-buy__btn:hover { transform: none; }
}
