/* ==========================================================================
   RUSOV ACADEMY — DESIGN SYSTEM 2.0 / COMPONENTS
   10 компонентов: topbar, progress, cover, question, answer, echo/insight,
   interstitial, loading (театр), result, gate, cta (+ sticky).
   ========================================================================== */

/* ============================== TOP BAR ================================= */
.ds-topbar {
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, rgba(15,13,10,.92), rgba(15,13,10,.75));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(194,112,62,.12);
  position: sticky; top: 0; z-index: var(--z-topbar);
  display: none;
}
.ds-topbar.active { display: block; animation: ds-fade-in .3s ease; }
.ds-topbar__row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.ds-topbar__label {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px;
}
.ds-topbar__step { margin-left: auto; font-family: var(--font-ui); font-size: 11px; color: var(--text-dim); font-weight: 600; }

/* ============================== PROGRESS ================================ */
.ds-progress { height: 3px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; position: relative; }
.ds-progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright), var(--accent-gold));
  background-size: 200% 100%;
  border-radius: 2px;
  transition: width .5s var(--ease-out-expo);
  animation: ds-shimmer 2.4s linear infinite;
  box-shadow: 0 0 12px rgba(194,112,62,.5);
}

/* ============================== COVER =================================== */
.ds-cover { text-align: center; padding-top: 8px; }
.ds-cover__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent-soft);
  padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--r-pill);
  background: rgba(194,112,62,.07); margin-bottom: 26px;
}
.ds-cover__badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright); box-shadow: 0 0 10px var(--accent-bright);
  animation: ds-pulse 2s ease-in-out infinite;
}
.ds-cover__h1 {
  font-family: var(--font-h); font-weight: 800;
  font-size: clamp(30px, 8.4vw, 40px); line-height: 1.08;
  letter-spacing: -1px; margin-bottom: 16px;
}
.ds-cover__h1 .accent {
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-cover__sub {
  font-size: 17px; line-height: 1.55; color: var(--text-muted);
  max-width: 340px; margin: 0 auto 26px;
}
.ds-cover__meta {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.ds-cover__meta span {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--text-muted);
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ds-cover__features {
  display: flex; flex-direction: column; gap: 12px; text-align: left;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 18px; border-radius: var(--r-lg); margin-bottom: 26px;
  box-shadow: var(--shadow-card);
}
.ds-cover__feature { display: flex; gap: 12px; align-items: flex-start; font-family: var(--font-ui); font-size: 14px; line-height: 1.45; }
.ds-cover__feature-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center; font-size: 12px;
  background: rgba(194,112,62,.14); color: var(--accent-bright); font-weight: 700;
}
.ds-cover__trust { font-family: var(--font-ui); font-size: 11.5px; color: var(--text-dim); line-height: 1.5; margin-top: 18px; }

/* ============================== QUESTION ================================ */
.ds-q__tag {
  align-self: flex-start;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-bright);
  padding: 5px 11px; background: rgba(194,112,62,.1);
  border: 1px solid rgba(194,112,62,.16); border-radius: 6px;
  margin-bottom: 18px;
}
.ds-q__text {
  font-family: var(--font-h); font-size: clamp(21px, 6vw, 25px); font-weight: 700;
  line-height: 1.25; letter-spacing: -.4px; margin-bottom: 10px;
}
.ds-q__context { font-size: 14px; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }

/* ---------- Ответы: карточки с иконкой ---------- */
.ds-answers { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.ds-answer {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--glass); border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-md); padding: 15px 16px;
  color: var(--text); font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  line-height: 1.35; cursor: pointer; min-height: 56px;
  transition: transform var(--dur-fast) ease, border-color var(--dur-fast) ease,
              background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  animation: ds-fade-up .45s var(--ease-out-expo) both;
}
.ds-answer:hover { background: var(--bg-elevated); border-color: var(--border); }
.ds-answer:active, .ds-answer.pressed { transform: scale(.975); }
.ds-answer.chosen {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(194,112,62,.18), rgba(194,112,62,.06));
  box-shadow: var(--glow-accent);
}
.ds-answer__icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px;
  background: rgba(194,112,62,.12); border: 1px solid rgba(194,112,62,.1);
}
.ds-answer__body { flex: 1; }
.ds-answer__title { font-weight: 600; display: block; }
.ds-answer__sub { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.ds-answer__arrow {
  flex-shrink: 0; color: var(--text-dim); font-size: 15px;
  transition: transform var(--dur-fast) ease, color var(--dur-fast) ease;
}
.ds-answer:hover .ds-answer__arrow, .ds-answer.chosen .ds-answer__arrow { transform: translateX(3px); color: var(--accent-bright); }

/* ---------- Шкала 1–10 ---------- */
.ds-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 20px 0 10px; }
.ds-scale__btn {
  height: 54px; background: var(--glass); border: 1.5px solid var(--glass-border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-h); font-size: 17px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast) ease;
}
.ds-scale__btn:hover { border-color: var(--border); background: var(--bg-elevated); }
.ds-scale__btn:active { transform: scale(.93); border-color: var(--accent); }
.ds-scale__ends { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 11px; color: var(--text-dim); }

/* ============================== ECHO / INSIGHT ========================== */
/* Строка-эхо над следующим вопросом — 0 трения */
.ds-echo {
  display: flex; gap: 10px; align-items: flex-start;
  border-left: 2px solid var(--accent);
  background: var(--grad-insight);
  padding: 12px 14px; border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 22px;
  animation: ds-slide-in-left .5s var(--ease-out-expo) both;
}
.ds-echo__mark { color: var(--accent-bright); font-weight: 800; flex-shrink: 0; }
.ds-echo__text { font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--text); font-style: italic; }

/* Большая инсайт-карточка (интерстишл) */
.ds-insight {
  background: var(--grad-insight);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px 24px; margin: 40px 0 24px; text-align: center;
  display: flex; flex-direction: column; gap: 16px; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ds-insight::before {
  content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 220px; height: 220px; background: var(--aurora-1); filter: blur(30px);
  pointer-events: none;
}
.ds-insight__stat {
  font-family: var(--font-h); font-size: 54px; font-weight: 800; line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-insight__text { font-size: 16px; line-height: 1.55; position: relative; }
.ds-insight__em { color: var(--text-muted); font-style: italic; display: block; margin-top: 8px; }

/* ============================== LOADING (театр вычисления) ============== */
.ds-loading {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 40px 8px; min-height: 62vh;
}
.ds-loading__ringwrap { position: relative; width: 132px; height: 132px; margin-bottom: 30px; }
.ds-loading__ring { position: absolute; inset: 0; border-radius: 50%; }
.ds-loading__ring--track { border: 2px solid rgba(255,255,255,.06); }
.ds-loading__ring--spin {
  border: 2px solid transparent;
  border-top-color: var(--accent-bright);
  border-right-color: var(--accent);
  animation: ds-ring-spin 1.4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(194,112,62,.5));
}
.ds-loading__core {
  position: absolute; inset: 26px; border-radius: 50%;
  background: var(--grad-insight); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-h); font-weight: 800; font-size: 26px; color: var(--accent-bright);
}
.ds-loading__steps { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; text-align: left; }
.ds-loading__step {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-size: 13.5px; color: var(--text-dim);
  opacity: .35; transition: opacity .4s ease, color .4s ease;
}
.ds-loading__step.active { opacity: 1; color: var(--text); }
.ds-loading__step.done { opacity: .85; color: var(--text-muted); }
.ds-loading__step-check {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border); display: grid; place-items: center;
  font-size: 10px; color: transparent; transition: all .3s ease;
}
.ds-loading__step.done .ds-loading__step-check {
  background: rgba(95,168,118,.15); border-color: var(--success); color: var(--success);
  animation: ds-check-pop .35s var(--ease-spring);
}
.ds-loading__step.active .ds-loading__step-check { border-color: var(--accent-bright); animation: ds-pulse 1s ease-in-out infinite; }
.ds-loading__bars { display: flex; gap: 8px; align-items: flex-end; height: 56px; margin-top: 26px; }
.ds-loading__bar {
  width: 10px; border-radius: 5px; transform-origin: bottom;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  animation: ds-bar-grow .8s var(--ease-out-expo) both;
}
.ds-loading__bar.dim { background: rgba(255,255,255,.08); }

/* ============================== RESULT ================================== */
.ds-result__label {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 2px; font-weight: 600;
  text-transform: uppercase; color: var(--text-dim); text-align: center; margin-bottom: 14px;
}
.ds-result__icon {
  font-size: 54px; text-align: center; line-height: 1; margin-bottom: 14px;
  animation: ds-float 4s ease-in-out infinite;
  filter: drop-shadow(0 6px 24px rgba(194,112,62,.35));
}
.ds-result__h1 {
  font-family: var(--font-h); font-size: clamp(27px, 7.6vw, 34px); font-weight: 800;
  line-height: 1.1; letter-spacing: -.6px; text-align: center; margin-bottom: 12px;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-result__tagline { text-align: center; font-size: 15.5px; font-style: italic; color: var(--text-muted); line-height: 1.5; margin-bottom: 24px; }

/* Зеркало ответов — сердце результата */
.ds-mirror {
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.ds-mirror__row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.045); font-size: 14px; line-height: 1.5; }
.ds-mirror__row:last-child { border-bottom: 0; }
.ds-mirror__key { color: var(--accent-soft); font-family: var(--font-ui); font-size: 12px; font-weight: 600; flex-shrink: 0; min-width: 74px; padding-top: 1px; text-transform: uppercase; letter-spacing: .4px; }
.ds-mirror__val { color: var(--text); font-family: var(--font-body); }

/* Карточки результата */
.ds-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.ds-card__h3 {
  font-family: var(--font-h); font-size: 17px; font-weight: 700;
  letter-spacing: -.2px; margin-bottom: 12px;
}
.ds-card__h3--dim {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px;
}
.ds-card p { font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.ds-card p:last-child { margin-bottom: 0; }

/* Скор */
.ds-score { text-align: center; }
.ds-score__value {
  font-family: var(--font-h); font-size: 52px; font-weight: 800; line-height: 1;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-score__bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; margin: 14px 0 16px; overflow: hidden; }
.ds-score__bar-fill { height: 100%; width: 0; background: var(--grad-line); border-radius: 3px; transition: width 1.2s var(--ease-out-expo); box-shadow: 0 0 10px rgba(194,112,62,.5); }
.ds-score__conv { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.ds-score__conv-row { display: flex; gap: 10px; font-family: var(--font-ui); font-size: 13.5px; align-items: center; }
.ds-score__conv-icon { color: var(--accent-bright); font-weight: 800; min-width: 16px; text-align: center; }

/* Карта 6 утечек */
.ds-links__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.045); }
.ds-links__row:last-child { border-bottom: 0; }
.ds-links__row.top .ds-links__name { color: var(--accent-soft); font-weight: 600; }
.ds-links__icon { font-size: 19px; min-width: 26px; text-align: center; }
.ds-links__name { flex: 1; font-family: var(--font-ui); font-size: 13.5px; line-height: 1.3; }
.ds-links__bar { width: 84px; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.ds-links__bar-fill { height: 100%; border-radius: 3px; width: 0; transition: width 1s var(--ease-out-expo); }
.ds-links__bar-fill.zone-green { background: var(--success); }
.ds-links__bar-fill.zone-yellow { background: var(--warning); }
.ds-links__bar-fill.zone-red { background: var(--danger); }

/* Список «поможет» */
.ds-help { display: flex; flex-direction: column; gap: 13px; }
.ds-help__item { display: flex; gap: 11px; font-family: var(--font-ui); font-size: 14px; line-height: 1.5; }
.ds-help__item::before { content: "✓"; color: var(--success); font-weight: 800; flex-shrink: 0; }

/* Практика 60 секунд */
.ds-practice { border-color: var(--border); position: relative; overflow: hidden; }
.ds-practice__timer {
  font-family: var(--font-h); font-size: 40px; font-weight: 800; color: var(--accent-bright);
  text-align: center; line-height: 1;
}

/* ============================== OFFER =================================== */
.ds-offer {
  background: var(--grad-offer);
  border: 1.5px solid var(--border-strong); border-radius: var(--r-lg);
  padding: 24px 20px; margin-bottom: 16px; position: relative; overflow: hidden;
  animation: ds-glow-breathe 3.5s ease-in-out infinite;
}
.ds-offer__title { font-family: var(--font-h); font-size: 21px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 14px; }
.ds-offer__objection {
  border-left: 2px solid var(--accent-gold); padding: 10px 14px;
  background: rgba(212,168,75,.06); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px; line-height: 1.5; margin-bottom: 16px; font-style: italic;
}
.ds-offer__bullets { list-style: none; margin: 14px 0 18px; }
.ds-offer__bullets li { font-family: var(--font-ui); font-size: 14px; padding: 5px 0 5px 24px; position: relative; line-height: 1.45; }
.ds-offer__bullets li::before { content: "→"; position: absolute; left: 0; color: var(--accent-bright); font-weight: 700; }
.ds-offer__price {
  font-family: var(--font-h); font-size: 38px; font-weight: 800; line-height: 1; margin: 10px 0 14px;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent-gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-offer__price small { font-size: 15px; font-weight: 600; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }

/* ============================== GATE ==================================== */
.ds-gate__field { position: relative; margin-bottom: 12px; }
.ds-gate__input {
  width: 100%; background: var(--glass); border: 1.5px solid var(--glass-border);
  border-radius: var(--r-md); padding: 17px 18px;
  color: var(--text); font-family: var(--font-ui); font-size: 16px;
  outline: none; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.ds-gate__input:focus { border-color: var(--accent); box-shadow: var(--glow-accent); }
.ds-gate__input::placeholder { color: var(--text-dim); }
.ds-gate__trust { font-family: var(--font-ui); font-size: 11.5px; color: var(--text-dim); text-align: center; line-height: 1.5; margin-top: 14px; }
.ds-gate__teaser {
  text-align: center; padding: 20px; margin-bottom: 22px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  background: rgba(194,112,62,.05);
}

/* ============================== CTA ===================================== */
.ds-cta {
  position: relative; overflow: hidden;
  display: block; width: 100%;
  background: var(--grad-cta);
  color: var(--text); font-family: var(--font-ui); font-size: 17px; font-weight: 700;
  letter-spacing: .3px; text-align: center;
  padding: 18px 24px; border: 0; border-radius: var(--r-md); cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.ds-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(194,112,62,.45); }
.ds-cta:active { transform: translateY(0) scale(.985); }
.ds-cta::after { /* бегущий блик */
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  animation: ds-shine 3.2s ease-in-out infinite;
}
.ds-cta--ghost {
  background: transparent; border: 1.5px solid var(--border); box-shadow: none;
  color: var(--text-muted); font-weight: 600;
}
.ds-cta--ghost::after { display: none; }
.ds-cta__meta { font-family: var(--font-ui); font-size: 12px; color: var(--text-dim); text-align: center; margin-top: 12px; line-height: 1.5; }

/* ---------- Sticky CTA ---------- */
.ds-sticky {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max); z-index: var(--z-sticky);
  background: var(--grad-fade-up);
  padding: 28px var(--app-pad-x) calc(14px + env(safe-area-inset-bottom, 0px));
  display: none;
}
.ds-sticky.active { display: block; animation: ds-fade-up-soft .4s ease; }
.ds-sticky__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: var(--grad-cta); color: var(--text);
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  padding: 15px 18px; border: 0; border-radius: var(--r-md); cursor: pointer;
  box-shadow: 0 10px 36px rgba(194,112,62,.45);
}
.ds-sticky__label { font-size: 11px; font-weight: 500; opacity: .85; display: block; }
.ds-sticky__amount { font-family: var(--font-h); font-size: 18px; font-weight: 800; white-space: nowrap; }
