/* ==========================================================================
   EngPulse — Вариант B. Файл 2/2: контентные блоки, курсы, автор, результаты,
   FAQ, sticky-бар, корзина, адаптив.
   ========================================================================== */

/* --- Pain (боли) -------------------------------------------------------- */
.pain-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pain {
  position: relative; background: #fff; border: 2px solid var(--navy);
  border-radius: var(--r-lg); padding: 26px 24px 24px; box-shadow: var(--shadow-hard);
  transition: transform .18s var(--spring), box-shadow .18s var(--ease);
}
.pain:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--navy); }
.pain__num { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--coral-600); margin-bottom: 14px; }
.pain__emoji { font-size: 30px; line-height: 1; margin-bottom: 14px; }
.pain__title { font-size: 19px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.pain__text { font-size: 15px; color: var(--ink-70); line-height: 1.5; }
@media (min-width: 640px) { .pain-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pain-grid { grid-template-columns: repeat(4, 1fr); } }

/* --- Route (маршрут) ---------------------------------------------------- */
.route { display: grid; gap: 14px; }
.route--h { grid-template-columns: 1fr; }
.rstep { position: relative; display: flex; gap: 16px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.16); border-radius: var(--r-lg); padding: 20px; }
.section--coral .rstep { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.rstep__node { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 800; font-size: 19px; display: grid; place-items: center; }
.rstep--accent .rstep__node { background: #fff; color: var(--coral); }
.rstep__name { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.rstep__desc { font-size: 14.5px; color: rgba(255,255,255,.7); margin-top: 5px; line-height: 1.45; }
@media (min-width: 880px) { .route--h { grid-template-columns: repeat(4, 1fr); } }

/* --- Courses ------------------------------------------------------------ */
.courses-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 680px) { .courses-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .courses-grid { grid-template-columns: repeat(4, 1fr); } }

.course {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 2px solid var(--navy); border-radius: var(--r-xl);
  padding: 24px 22px; box-shadow: var(--shadow-hard);
  transition: transform .18s var(--spring), box-shadow .18s var(--ease);
}
.course:hover { transform: translateY(-4px); box-shadow: 6px 10px 0 var(--navy); }
.course--featured { border-color: var(--coral); box-shadow: var(--shadow-hard-coral); }
.course--featured:hover { box-shadow: 6px 10px 0 var(--coral); }
.course__badge {
  position: absolute; top: -14px; left: 18px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  background: var(--coral); color: #fff; padding: 6px 13px; border-radius: var(--r-pill);
  border: 2px solid var(--navy); box-shadow: 2px 2px 0 var(--navy);
}
.course__type { font-family: var(--mono); font-size: 12px; color: var(--ink-50); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.course__title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.14; }
.course__subtitle { font-size: 14px; color: var(--coral-600); font-weight: 700; margin-top: 6px; }
.course__offer { font-size: 14.5px; color: var(--ink-70); margin-top: 12px; line-height: 1.5; }
.course__list { display: grid; gap: 9px; margin-top: 16px; }
.course__list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-70); line-height: 1.45; }
.course__list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--coral-soft) url("../assets/icons/success.png") center/11px no-repeat; }
.course__foot { margin-top: auto; padding-top: 18px; }
.course__audience { display: inline-flex; align-self: flex-start; margin-bottom: 12px; padding: 4px 11px; border-radius: var(--r-pill, 999px); background: var(--coral-soft, #ffe7e2); color: var(--coral-600, #f0473a); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.course__demo { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 10px; padding: 10px 14px; border: 1.5px solid var(--line, rgba(27,42,73,.12)); border-radius: var(--r-md, 14px); color: var(--navy, #1b2a49); font-weight: 700; font-size: 14px; }
.course__demo:hover { border-color: var(--coral, #ff5b4a); }
.course__access { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-50); font-weight: 600; margin-bottom: 12px; }
.course__access img { width: 16px; height: 16px; opacity: .7; }
.course__price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.course__price { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.course__price-old { font-size: 16px; color: var(--ink-50); text-decoration: line-through; font-weight: 600; }
.course__price-save { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--coral-600); background: var(--coral-tint); padding: 3px 8px; border-radius: var(--r-pill); }

/* --- Section heading helper with squiggle ------------------------------- */
.h-squiggle { display: block; height: 16px; margin-top: 12px; color: var(--coral); }
.h-squiggle svg { height: 16px; width: 220px; }

/* --- Author (об авторе) ------------------------------------------------- */
.author { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 52px); align-items: center; }
.author__media { position: relative; }
.author__photo { width: 100%; aspect-ratio: 4 / 4.4; border-radius: var(--r-xl); border: 2px solid var(--navy); box-shadow: var(--shadow-hard); overflow: hidden; }
.author__float { position: absolute; z-index: 3; }
.author__float--1 { top: 18px; right: -12px; transform: rotate(5deg); }
.author__float--2 { bottom: 22px; left: -14px; transform: rotate(-5deg); }
.author__body .eyebrow { margin-bottom: 14px; }
.author__title { margin-bottom: 16px; }
.author__text { font-size: 16px; color: var(--ink-70); line-height: 1.6; margin-bottom: 16px; }
.author__creds { display: grid; gap: 12px; margin: 22px 0 26px; }
.author__cred { display: flex; gap: 13px; align-items: flex-start; }
.author__cred-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.author__cred-text { font-size: 15px; font-weight: 600; padding-top: 3px; }
.author__cred-text span { display: block; font-weight: 500; color: var(--ink-50); font-size: 13.5px; margin-top: 2px; }
/* Каналы автора (Telegram / MAX) — пилюли-кнопки под CTA в секции «Об авторе». */
.author__channels { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.author__channels-label { font-size: 14px; font-weight: 600; color: var(--ink-50); }
.author__channel { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: #fff; font-weight: 700; font-size: 14.5px; color: var(--navy); transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.author__channel:hover { border-color: var(--coral); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.author__channel svg { width: 18px; height: 18px; flex: none; }
@media (min-width: 860px) { .author { grid-template-columns: .8fr 1.2fr; } }

/* --- Results / screenshots --------------------------------------------- */
.results-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 620px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }
.result-shot { position: relative; }
.result-shot image-slot { width: 100%; aspect-ratio: 3 / 4; border: 2px solid var(--navy); box-shadow: var(--shadow-hard); border-radius: var(--r-lg); display: block; }
.result-shot__cap { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.result-shot__name { font-weight: 800; font-size: 15px; }
.result-shot__delta { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #fff; background: var(--coral); padding: 4px 10px; border-radius: var(--r-pill); }

/* --- Reviews ------------------------------------------------------------ */
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review { background: #fff; border: 2px solid var(--navy); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-hard); display: flex; flex-direction: column; }
.review__stars { color: var(--coral); font-size: 16px; letter-spacing: 2px; margin-bottom: 12px; }
.review__text { font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.review__foot { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.review__avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--navy); overflow: hidden; }
.review__avatar image-slot { width: 100%; height: 100%; display: block; }
.review__who { font-weight: 800; font-size: 14.5px; }
.review__role { font-size: 13px; color: var(--ink-50); margin-top: 2px; }

/* --- Chooser ------------------------------------------------------------ */
.chooser { display: grid; gap: 12px; max-width: 860px; }
.choose {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px;
  background: #fff; border: 2px solid var(--navy); border-radius: var(--r-lg);
  padding: 18px 22px; box-shadow: 3px 3px 0 var(--navy);
  transition: transform .16s var(--spring);
}
.choose:hover { transform: translateX(4px); }
.choose__sit { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.choose__arrow { color: var(--coral); font-weight: 800; font-size: 22px; }
.choose__pick { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #fff; background: var(--navy); padding: 8px 14px; border-radius: var(--r-pill); white-space: nowrap; }
@media (max-width: 600px) { .choose { grid-template-columns: 1fr; gap: 10px; } .choose__arrow { display: none; } .choose__pick { justify-self: start; } }

/* --- For parents / students cards -------------------------------------- */
.aud { display: grid; grid-template-columns: 1fr; gap: clamp(26px, 4vw, 48px); align-items: center; }
.aud--reverse .aud__media { order: -1; }
.aud__title { margin: 14px 0 16px; }
.aud__text { font-size: 16px; color: var(--ink-70); line-height: 1.6; margin-bottom: 18px; }
.aud__list { display: grid; gap: 10px; margin-bottom: 26px; }
.aud__list li { position: relative; padding-left: 30px; font-size: 15.5px; color: var(--ink-70); }
.aud__list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--coral) url("../assets/icons/success.png") center/12px no-repeat; }
@media (min-width: 860px) { .aud { grid-template-columns: 1.1fr .9fr; } .aud--reverse .aud__media { order: 0; } }

.mini-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .mini-grid { grid-template-columns: repeat(3, 1fr); } }
.mini { background: #fff; border: 2px solid var(--navy); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-hard); }
.mini__k { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--coral-600); margin-bottom: 10px; }
.mini__title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.mini__text { font-size: 14.5px; color: var(--ink-70); line-height: 1.5; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 2px solid var(--navy); border-radius: var(--r-lg); overflow: hidden; }
.faq-item__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; text-align: left; color: var(--navy); }
.faq-item__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--coral-tint); position: relative; transition: background .2s var(--ease); }
.faq-item__icon::before, .faq-item__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.5px; background: var(--coral-600); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .2s var(--ease); }
.faq-item__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.is-open .faq-item__icon { background: var(--coral); }
.faq-item.is-open .faq-item__icon::before, .faq-item.is-open .faq-item__icon::after { background: #fff; }
.faq-item.is-open .faq-item__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item__a-inner { padding: 0 22px 22px; font-size: 15.5px; color: var(--ink-70); line-height: 1.6; }

/* --- Final CTA ---------------------------------------------------------- */
.final { position: relative; overflow: hidden; text-align: center; }
.final__blob { position: absolute; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,74,.32), transparent 66%); left: 50%; top: -40%; transform: translateX(-50%); pointer-events: none; }
.final .container { position: relative; z-index: 1; }
.final__title { margin: 16px auto 0; max-width: 16ch; }
.final__text { max-width: 600px; margin: 20px auto 30px; font-size: 17px; color: rgba(255,255,255,.74); line-height: 1.6; }
.final__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- Footer ------------------------------------------------------------- */
.footer { background: var(--navy-800); color: rgba(255,255,255,.7); padding: clamp(48px, 6vw, 72px) 0 100px; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer__logo { display: inline-flex; margin-bottom: 16px; }
.footer__logo img { width: 36px; height: 36px; }
.footer__about { font-size: 14.5px; line-height: 1.6; max-width: 380px; }
.footer__col-title { color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 14px; letter-spacing: -0.01em; }
.footer__link { display: block; padding: 6px 0; font-size: 14.5px; transition: color .15s var(--ease); }
.footer__link:hover { color: var(--coral); }
.footer__bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.45); }

/* --- Sticky mobile bar -------------------------------------------------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  background: rgba(252, 249, 243, .94); backdrop-filter: blur(14px);
  border-top: 2px solid var(--navy); padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  transform: translateY(120%); transition: transform .3s var(--ease);
}
.sticky-bar.is-visible { transform: none; }
.sticky-bar__info { line-height: 1.2; }
.sticky-bar__from { font-size: 11.5px; color: var(--ink-50); font-weight: 600; }
.sticky-bar__price { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.sticky-bar__price span { color: var(--coral); }
.sticky-bar .btn { margin-left: auto; --h: 50px; }
@media (min-width: 980px) { .sticky-bar { display: none; } }

/* --- Cart drawer -------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(19, 31, 54, .5); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s; z-index: 150; }
.overlay.is-open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--cream); z-index: 160; transform: translateX(100%); transition: transform .32s var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 2px solid var(--navy); }
.drawer__head img { width: 22px; height: 22px; }
.drawer__title { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.drawer__close { margin-left: auto; font-size: 30px; line-height: 1; color: var(--navy); width: 40px; height: 40px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px; }
.cart-item { position: relative; background: #fff; border: 2px solid var(--navy); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px; box-shadow: 3px 3px 0 var(--navy); }
.cart-item__name { font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; padding-right: 60px; }
.cart-item__price { font-size: 19px; font-weight: 800; color: var(--coral); margin-top: 6px; }
.cart-item__meta { font-size: 12.5px; color: var(--ink-50); margin-top: 3px; }
.cart-item__remove { position: absolute; top: 14px; right: 16px; font-family: var(--mono); font-size: 12px; color: var(--ink-50); text-decoration: underline; }
.cart-item__remove:hover { color: var(--coral-600); }
.cart-empty { text-align: center; padding: 50px 20px; color: var(--ink-50); }
.cart-empty img { width: 48px; height: 48px; opacity: .35; margin: 0 auto 16px; }
.cart-empty__title { font-weight: 800; font-size: 17px; color: var(--navy); margin-bottom: 6px; }
.cart-empty p { font-size: 14px; }
.is-hidden { display: none; }

.checkout { display: none; }
.checkout.is-active { display: block; }
.checkout__back { font-family: var(--mono); font-size: 13px; color: var(--ink-50); text-decoration: underline; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field__label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field__label span { color: var(--coral); }
.field__input { width: 100%; height: 50px; padding: 0 16px; border: 2px solid var(--line); border-radius: var(--r-md); font-family: inherit; font-size: 15.5px; background: #fff; transition: border-color .16s var(--ease); }
.field__input:focus { outline: none; border-color: var(--coral); }
.field__input.is-error { border-color: var(--coral); }
.field__error { display: none; font-size: 13px; color: var(--coral-600); margin-top: 6px; font-weight: 600; }
.field__error.is-visible { display: block; }
.consent { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent__box { flex: none; width: 24px; height: 24px; border: 2px solid var(--navy); border-radius: 7px; background: #fff; position: relative; transition: background .15s var(--ease); }
.consent input:checked + .consent__box { background: var(--coral); border-color: var(--coral); }
.consent input:checked + .consent__box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.consent input:focus-visible + .consent__box { outline: 3px solid var(--coral); outline-offset: 2px; }
.consent__text { font-size: 13.5px; color: var(--ink-70); line-height: 1.45; padding-top: 2px; }
.consent__text a { color: var(--coral-600); text-decoration: underline; }
.consent.is-error .consent__box { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.secure-note { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12.5px; color: var(--ink-50); margin-top: 14px; }
.secure-note img { width: 16px; height: 16px; opacity: .6; }
.cart-foot { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 2px solid var(--navy); background: var(--cream-2); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cart-total__label { font-weight: 700; font-size: 15px; }
.cart-total__sum { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }

@media (max-width: 380px) {
  .container { padding: 0 16px; }
}
