/* Токены — намеренно те же, что на «Коде уважения» (тот же клиент, единый
   визуальный почерк на обоих лендингах). См. ТЗ «Пересборки», раздел 12. */
:root {
  --ink: #0b1821;
  --ink-soft: #172532;
  --paper: #f5f1e9;
  --paper-warm: #eae0d1;
  --gold: #d8ae63;
  --gold-light: #ebcb91;
  --gold-dark: #9e7437;
  --white: #fffdf8;
  --muted: #66717a;
  --divider: rgba(11, 24, 33, 0.16);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --font-ui: "Manrope", Arial, sans-serif;

  --radius-button: 8px;
  --radius-card: 14px;
  --content-max: 1200px;
  --gutter: 40px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: inherit; }
.eyebrow {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dark);
}
.section--dark .eyebrow { color: var(--gold-light); }
a { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px; border-radius: var(--radius-button);
  font-family: var(--font-ui); font-weight: 700; font-size: 0.98rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), filter 220ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: var(--ink); box-shadow: 0 10px 24px -10px rgba(158, 116, 55, 0.55);
}
.btn--primary:hover { box-shadow: 0 14px 32px -10px rgba(158, 116, 55, 0.7); transform: translateY(-1px); }
.btn--secondary { background: rgba(255, 253, 248, 0.06); color: var(--white); border: 1px solid rgba(216, 174, 99, 0.55); }
.btn--secondary:hover { background: rgba(255, 253, 248, 0.12); }
.section--light .btn--secondary { background: transparent; color: var(--ink); border: 1px solid rgba(11, 24, 33, 0.3); }
.section--light .btn--secondary:hover { background: rgba(11, 24, 33, 0.05); }
.btn--wide { width: 100%; }

/* Замок под кнопкой — тот же паттерн, что на «Коде уважения»: не flex
   (см. комментарий в оригинале про fit-content), обычный центрированный
   текст с инлайновой иконкой. */
.lock-note {
  text-align: center; max-width: 100%; font-family: var(--font-ui);
  font-size: 0.82rem; color: var(--muted); margin-top: 14px;
}
.section--dark .lock-note { color: rgba(255,253,248,0.72); }
.lock-note svg { display: inline-block; vertical-align: -2px; width: 15px; height: 15px; margin-right: 6px; }
.hero .lock-note { text-align: left; color: rgba(255,253,248,0.78); text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.hero .lock-note a { color: var(--gold-light); text-decoration: underline; }
.final-cta .lock-note { color: var(--ink); font-weight: 600; }
.final-cta .lock-note a { color: var(--gold-dark); font-weight: 700; text-decoration: underline; }

/* ---------- Иконки ---------- */
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--filled { fill: currentColor; stroke: none; }

/* ---------- Секции: базовая ритмика (тёмный/светлый, см. ТЗ раздел 12) ---------- */
.section { padding: 56px 0; position: relative; }
.section--tight { padding: 36px 0; }
.section--light {
  background: radial-gradient(ellipse at 85% 0%, rgba(216,174,99,0.06), transparent 55%), var(--paper);
  position: relative;
}
.section--light::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/paper-texture.svg"); background-size: 480px; opacity: 0.14; pointer-events: none;
}
.section--dark { background: var(--ink); color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); letter-spacing: -0.01em; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 760px; display: flex; align-items: center;
  color: var(--white); background: var(--ink); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(9,15,23,0.82) 0%, rgba(9,15,23,0.5) 30%, rgba(9,15,23,0) 58%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.hero__text { max-width: 650px; }
.hero__byline {
  font-family: var(--font-ui); font-size: 0.82rem; letter-spacing: 0.03em; text-transform: uppercase;
  color: rgba(255,253,248,0.8); margin-bottom: 20px;
}
.hero__byline strong { display: block; font-weight: 700; color: var(--white); font-size: 0.95rem; letter-spacing: 0.05em; margin-bottom: 2px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 18px;
  font-size: clamp(2.6rem, 4.4vw, 3.6rem); color: var(--white); max-width: 16ch;
}
.hero__lede {
  font-family: var(--font-ui); font-size: clamp(1.0625rem, 1.1vw, 1.1875rem);
  color: rgba(255,253,248,0.86); max-width: 46ch; margin: 0 0 30px;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Полоса навыков: 5 пунктов ---------- */
.skills-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.skill-item {
  padding: 4px 16px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 12px; border-left: 1px solid var(--divider);
}
.skill-item:first-child { border-left: none; }
.skill-item p { margin: 0; font-family: var(--font-ui); font-weight: 600; font-size: 0.88rem; color: var(--ink); line-height: 1.35; }

.icon-ring {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-ring--dark { border-color: rgba(216,174,99,0.55); color: var(--gold-light); }
.icon-badge {
  width: 40px; height: 40px; border-radius: 50%; background: var(--paper-warm); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
}
.icon-badge .icon { width: 20px; height: 20px; }
.section--dark .icon-badge { background: rgba(216,174,99,0.14); color: var(--gold-light); }

/* ---------- О курсе ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.block-title { font-size: clamp(1.5rem, 2.4vw, 1.9rem); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); }
.card {
  background: var(--white); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 36px; box-shadow: 0 24px 48px -32px rgba(11,24,33,0.22);
}
.card + .card { margin-top: 24px; }
.card p { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.quote-card { background: var(--paper-warm); border-left: 3px solid var(--gold); border-radius: 4px; padding: 22px 26px; margin-top: 22px; }
.quote-card p { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.4rem; line-height: 1.35; color: var(--ink); margin: 0 0 10px; }
.quote-card cite {
  display: block; font-family: var(--font-ui); font-style: normal; font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dark);
}
.content-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.content-list li { display: flex; gap: 14px; align-items: center; }
.content-list .icon-badge { flex-shrink: 0; }
.content-list span { font-size: 0.98rem; }

/* ---------- «Что входит в курс» — один ряд, но НЕ три равные колонки
   (см. ТЗ раздел 12: отчёт ChatGPT предлагал строго равный ряд — устаревший
   паттерн). Видео — карточка чуть шире остальных (флагманский материал),
   но той же высоты — асимметрия по ширине, без пустот по высоте, которые
   давала более ранняя версия с растягиванием на 2 строки. ---------- */
.bento-section { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.bento-section__bg { position: absolute; inset: 0; z-index: 0; }
.bento-section__bg img { width: 100%; height: 100%; object-fit: cover; }
.bento-section__scrim { position: absolute; inset: 0; z-index: 1; background: rgba(11,24,33,0.55); }
.bento-section .container { position: relative; z-index: 2; }

.bento-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: stretch; }
.bento-card {
  border-radius: 18px; padding: 30px 28px; background: rgba(11,24,33,0.55);
  border: 1px solid rgba(216,174,99,0.28); backdrop-filter: blur(2px);
}
.bento-card__icon {
  width: 48px; height: 48px; border-radius: 14px; border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center; color: var(--gold-light); margin-bottom: 18px;
}
.bento-card h3 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 1.3rem; margin: 0 0 14px; }
.bento-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bento-card li { font-family: var(--font-ui); font-size: 0.92rem; color: rgba(255,253,248,0.82); padding-left: 18px; position: relative; }
.bento-card li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

/* ---------- Результаты — 4 малых + 2 крупных (не 6 в один ряд) ---------- */
.results-section { position: relative; background: var(--paper); overflow: hidden; }
.results-title { font-size: clamp(1.6rem, 2.6vw, 2rem); text-transform: uppercase; color: var(--ink); margin-bottom: 32px; text-align: center; }
.results-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.result-card {
  grid-column: span 3; background: var(--white); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.result-card--wide { grid-column: span 6; padding: 30px 28px; background: var(--paper-warm); border-color: rgba(158,116,55,0.22); }
.result-card p { margin: 0; font-family: var(--font-ui); font-weight: 600; font-size: 0.92rem; line-height: 1.35; color: var(--ink); }
.result-card--wide p { font-size: 1.02rem; }

/* ---------- Финальный CTA ---------- */
.final-cta { position: relative; overflow: hidden; color: var(--ink); text-align: center; padding: 72px 0; }
.final-cta__bg { position: absolute; inset: 0; z-index: 0; }
.final-cta__bg img { width: 100%; height: 100%; object-fit: cover; }
.final-cta__shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(247,243,235,.95) 0%, rgba(247,243,235,.88) 45%, rgba(247,243,235,.55) 68%, rgba(9,15,23,.35) 100%);
}
.final-cta .container { position: relative; z-index: 2; }
.final-cta h2 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem); max-width: 34ch; margin: 0 auto 28px; color: var(--ink);
}
.final-cta__ctas { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ---------- Сервисная полоса ---------- */
.service-bar { background: var(--paper-warm); padding: 34px 0; }
.service-bar__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-item { display: flex; align-items: center; gap: 12px; font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink); }
.service-item .icon { width: 22px; height: 22px; color: var(--gold-dark); flex-shrink: 0; }

/* ---------- Подвал ---------- */
.legal-footer { background: var(--ink); padding: 28px 0; }
.legal-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.legal-footer__legal { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(255,253,248,0.55); line-height: 1.6; margin: 0; }
.legal-footer__legal a { color: rgba(255,253,248,0.72); }
.legal-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-footer__links a, .legal-footer__link-btn {
  font-family: var(--font-ui); font-size: 0.78rem; color: rgba(255,253,248,0.72);
  text-decoration: underline; text-underline-offset: 2px;
}
.legal-footer__link-btn { appearance: none; background: none; border: none; padding: 0; cursor: pointer; }
.legal-footer__links a:hover, .legal-footer__link-btn:hover { color: var(--gold-light); }
.legal-footer__copy { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(255,253,248,0.4); margin: 0; width: 100%; text-align: center; }

/* ---------- Модалка оферты/политики ---------- */
.legal-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.legal-modal[hidden] { display: none; }
.legal-modal__backdrop { position: absolute; inset: 0; background: rgba(9,15,23,0.6); backdrop-filter: blur(2px); animation: legal-fade-in 0.25s var(--ease); }
.legal-modal__panel {
  position: relative; display: flex; flex-direction: column; width: min(100%, 880px); height: min(88vh, 960px);
  background: var(--white); border-radius: var(--radius-card); box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45);
  overflow: hidden; animation: legal-pop-in 0.3s var(--ease);
}
.legal-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--divider); flex-shrink: 0; }
.legal-modal__title { margin: 0; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.legal-modal__close {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  padding: 0; border: none; border-radius: 50%; background: var(--paper-warm); color: var(--ink); cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.legal-modal__close svg { width: 18px; height: 18px; }
.legal-modal__close:hover { background: var(--ink); color: var(--white); }
.legal-modal__frame { flex: 1; width: 100%; border: none; background: var(--paper); }
@keyframes legal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes legal-pop-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
body.legal-modal-open { overflow: hidden; }

/* ---------- Motion: один orchestrated hero-вход + scroll-reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }

  .hero__byline, .hero__title, .hero__lede, .hero__ctas {
    opacity: 0; animation: hero-in 760ms var(--ease) forwards;
  }
  .hero__byline { animation-delay: 40ms; }
  .hero__title { animation-delay: 160ms; }
  .hero__lede { animation-delay: 320ms; }
  .hero__ctas { animation-delay: 460ms; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Оверлей выдачи доступа ---------- */
.download-overlay { position: fixed; inset: 0; background: rgba(11,24,33,0.72); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.download-overlay[hidden] { display: none; }
.download-overlay__card { background: var(--white); border-radius: var(--radius-card); padding: 40px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.4); }
.download-overlay__card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.download-overlay__card p { color: var(--muted); font-family: var(--font-ui); font-size: 0.95rem; margin-bottom: 20px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1099px) {
  .about-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  /* 4 малых + 2 крупных карточки не делятся ровно ни на 3, ни на 4 в ряд —
     на этой ширине последняя строка "провисала" (не занимала всю ширину).
     Проще и без дыр — ровная сетка 2 в ряд, разница крупная/малая карточка
     тут не критична, она в первую очередь десктопный акцент. */
  .results-bento { grid-template-columns: repeat(2, 1fr); }
  .result-card, .result-card--wide { grid-column: span 1; }
}
@media (max-width: 1099px) {
  /* 5 иконок не делятся ровно ни на 2, ни на 3 в ряд — при grid последняя
     неполная строка прижималась к левому краю и не занимала всю ширину.
     Flex + justify-content:center вместо grid — тогда остаток строки
     центрируется как группа, а не висит слева. Разделители между
     пунктами на этой ширине убираем — с центрированием и переносом строк
     они не могут аккуратно совпадать. */
  .skills-row { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 24px; column-gap: 8px; }
  .skill-item { flex: 0 1 200px; border-left: none !important; }
}
@media (max-width: 1023px) {
  :root { --gutter: 28px; }
  .service-bar__row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  :root { --gutter: 24px; }
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  /* Не 100svh — при таком объёме текста снизу оставалось много пустого фото
     без контента. Высота под реальный контент + запас на сам путь/горы,
     не на весь экран. */
  .hero { min-height: 72svh; align-items: flex-start; padding-top: clamp(10px, 2svh, 32px); padding-bottom: clamp(8px, 1svh, 20px); }
  .hero__scrim { background: linear-gradient(180deg, rgba(9,15,23,0.82) 0%, rgba(9,15,23,0.5) 32%, rgba(9,15,23,0) 55%); }
  .hero__text { max-width: none; }
  .hero__title { font-size: clamp(2.1rem, 8vw, 2.6rem); max-width: none; }
  .hero__ctas { flex-direction: column; gap: clamp(6px, 1svh, 8px); }
  .hero__ctas .btn { width: 100%; height: 44px; }
  .lock-note { margin-top: clamp(6px, 1svh, 8px); }

  .skills-row { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .skill-item:nth-child(odd) { border-left: none; }
  .skill-item:nth-child(even) { border-left: 1px solid var(--divider); }

  .result-card, .result-card--wide { grid-column: span 12; }
}
