/* EasyTiers — главная v4 (тест). Надстройка над home-et.css: плавность, интерактив, новые блоки.
   Всё скоупится на body.et-home. Грузится ПОСЛЕ home-et.css / home-faq.css / home-modes.css. */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.et-home { --ease: cubic-bezier(.2,.8,.2,1); --ease-io: cubic-bezier(.65,0,.35,1); }
body.et-home ::selection { background: var(--y); color: #14110a; }

/* ---------- Полоса прогресса прокрутки ---------- */
#etProgress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 10000; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #b88f00, var(--y), #fff1a5); box-shadow: 0 0 14px rgba(245,197,24,.7); pointer-events: none; }

/* ---------- Свет за курсором ---------- */
#etGlow { position: fixed; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle, rgba(245,197,24,.085) 0, rgba(245,197,24,.03) 35%, transparent 65%); will-change: transform; }
#etGlow.on { opacity: 1; }
@media (hover: none), (max-width: 900px) { #etGlow { display: none; } }

/* ---------- Навигация по секциям (точки справа) ---------- */
#etDots { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 50; display: flex; flex-direction: column; gap: 4px; }
#etDots a { position: relative; display: flex; justify-content: flex-end; align-items: center; width: 26px; height: 22px; }
#etDots a i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.22); transition: height .35s var(--ease), background .3s, box-shadow .3s; }
#etDots a:hover i { background: rgba(245,197,24,.7); }
#etDots a.on i { height: 22px; background: var(--y); box-shadow: 0 0 12px rgba(245,197,24,.7); }
#etDots a span { position: absolute; right: 24px; padding: 5px 10px; border-radius: 8px; background: rgba(18,21,22,.94); border: 1px solid rgba(255,255,255,.1); color: #ddd; font: 700 11px Rubik, sans-serif; white-space: nowrap; opacity: 0; transform: translateX(8px); pointer-events: none; transition: .25s var(--ease); }
#etDots a:hover span, #etDots a:focus-visible span { opacity: 1; transform: none; }
@media (max-width: 1240px) { #etDots { display: none; } }

/* ---------- Появление: заголовок по словам + каскад карточек ---------- */
body.et-home .et-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
body.et-home .et-title .w > i { display: inline-block; font-style: normal; transform: translateY(110%) rotate(4deg); animation: etWord .9s var(--ease) forwards; animation-delay: calc(.12s + var(--i) * .08s); }
@keyframes etWord { to { transform: none; } }
body.et-home .et-hero .et-eyebrow, body.et-home .et-hero .et-copy, body.et-home .et-hero .et-actions, body.et-home .et-hero .et-live { animation: etUp .9s var(--ease) backwards; }
body.et-home .et-hero .et-copy { animation-delay: .45s; } body.et-home .et-hero .et-actions { animation-delay: .58s; } body.et-home .et-hero .et-live { animation-delay: .7s; }
body.et-home .et-stage { animation: etStageIn 1.2s var(--ease) .2s backwards; }
@keyframes etUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes etStageIn { from { opacity: 0; transform: scale(.92) translateY(30px); } }

body.et-home .reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); transform: translateY(34px); }
body.et-home .reveal.in :is(.et-tier-list, .et-how, .news-grid, .et-notes, .et-top, .et-calc-rows, .et-faq)> * { animation: etCard .8s var(--ease) backwards; }
@keyframes etCard { from { opacity: 0; transform: translateY(24px) scale(.97); } }
body.et-home .reveal.in :is(.et-tier-list, .et-how, .news-grid, .et-notes, .et-top, .et-calc-rows) > :nth-child(2) { animation-delay: .07s; }
body.et-home .reveal.in :is(.et-tier-list, .et-how, .news-grid, .et-notes, .et-top, .et-calc-rows) > :nth-child(3) { animation-delay: .14s; }
body.et-home .reveal.in :is(.et-tier-list, .et-how, .et-top) > :nth-child(4) { animation-delay: .21s; }
body.et-home .reveal.in :is(.et-tier-list, .et-how, .et-top) > :nth-child(5) { animation-delay: .28s; }

/* ---------- Герой: параллакс / наклон (через независимые свойства translate/rotate — не ломают keyframes) ---------- */
body.et-home .et-stage { perspective: 1000px; }
body.et-home .et-stage > * { will-change: translate; }
body.et-home .et-player { translate: calc(var(--px, 0) * 14px) calc(var(--py, 0) * 10px); rotate: calc(var(--px, 0) * 2deg); }
body.et-home .et-orbit { translate: calc(var(--px, 0) * -22px) calc(var(--py, 0) * -16px); }
body.et-home .et-sunglow { translate: calc(var(--px, 0) * -34px) calc(var(--py, 0) * -24px); }
body.et-home .et-fc-1 { translate: calc(var(--px, 0) * 30px) calc(var(--py, 0) * 20px); }
body.et-home .et-fc-2 { translate: calc(var(--px, 0) * -26px) calc(var(--py, 0) * 24px); }
body.et-home .et-fc-3 { translate: calc(var(--px, 0) * 20px) calc(var(--py, 0) * -22px); }
body.et-home .et-king { translate: calc(var(--px, 0) * -24px) calc(var(--py, 0) * 18px); }
body.et-home .et-fc { transition: border-color .3s, box-shadow .3s; }
body.et-home .et-fc:hover { box-shadow: 0 18px 60px rgba(0,0,0,.6), 0 0 30px rgba(245,197,24,.18); }

/* Кнопки: магнит + блик */
body.et-home .btn { position: relative; overflow: hidden; isolation: isolate; transition: translate .25s var(--ease), transform .25s var(--ease), background .25s, border-color .25s, box-shadow .3s; }
body.et-home .btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s var(--ease); }
body.et-home .btn:hover::after { transform: translateX(120%); }
body.et-home .btn.primary:hover { box-shadow: 0 10px 34px -8px rgba(245,197,24,.6); }
body.et-home .btn:active { transform: scale(.97); }

/* ---------- Подсветка карточек за курсором ---------- */
body.et-home [data-spot] { position: relative; }
body.et-home [data-spot]::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(245,197,24,.13), transparent 62%); }
body.et-home [data-spot]:hover::before { opacity: 1; }

/* ---------- Тир-лист: полосы очков ---------- */
body.et-home .et-tier-row { overflow: hidden; }
body.et-home .et-tier-row:hover { border-color: rgba(245,197,24,.45); transform: translateX(6px); background: #181b1c; }
body.et-home .et-tier-row .et-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--w); background: linear-gradient(90deg, var(--y), transparent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease) .3s; }
body.et-home .reveal.in .et-tier-row .et-bar { transform: scaleX(1); }

/* ---------- Калькулятор очков ---------- */
body.et-home .et-calc { margin-top: 46px; display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
body.et-home .et-calc-rows, body.et-home .et-calc-res { border: 1px solid var(--line); border-radius: 16px; background: #111415; }
body.et-home .et-calc-rows { padding: 8px 22px; display: grid; }
body.et-home .et-calc-row { padding: 18px 0; display: grid; grid-template-columns: 78px 1fr 96px; gap: 18px; align-items: center; }
body.et-home .et-calc-row + .et-calc-row { border-top: 1px solid var(--line); }
body.et-home .et-calc-row b { font: 800 14px Rubik, sans-serif; letter-spacing: .04em; }
body.et-home .et-calc-val { justify-self: end; text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
body.et-home .et-calc-val em { font: 800 15px Rubik, sans-serif; font-style: normal; color: #6f7476; transition: color .25s; }
body.et-home .et-calc-val small { font-size: 10px; color: #6f7476; }
body.et-home .et-calc-row.has .et-calc-val em { color: var(--y); }
body.et-home .et-range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; --v: 0%; }
body.et-home .et-range::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: linear-gradient(90deg, var(--y) var(--v), #25292a var(--v)); }
body.et-home .et-range::-moz-range-track { height: 6px; border-radius: 9px; background: #25292a; }
body.et-home .et-range::-moz-range-progress { height: 6px; border-radius: 9px; background: var(--y); }
body.et-home .et-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff1a5; border: 4px solid var(--y); box-shadow: 0 0 0 0 rgba(245,197,24,.4), 0 4px 14px rgba(0,0,0,.6); transition: box-shadow .25s, transform .2s; }
body.et-home .et-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff1a5; border: 4px solid var(--y); }
body.et-home .et-range:hover::-webkit-slider-thumb, body.et-home .et-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 8px rgba(245,197,24,.18), 0 4px 14px rgba(0,0,0,.6); transform: scale(1.1); }
body.et-home .et-calc-res { padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; position: relative; overflow: hidden; }
body.et-home .et-calc-res::after { content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(245,197,24,var(--g, .08)), transparent 70%); transition: background .5s; pointer-events: none; }
body.et-home .et-calc-res .lbl { font-size: 10px; font-weight: 800; letter-spacing: 2px; color: #7b8183; text-transform: uppercase; }
body.et-home .et-calc-total { font: 900 72px/1 Rubik, sans-serif; color: var(--y); letter-spacing: -.04em; text-shadow: 0 0 50px rgba(245,197,24,.3); font-variant-numeric: tabular-nums; }
body.et-home .et-calc-total small { font-size: 14px; color: #8a8f90; font-weight: 600; margin-left: 8px; letter-spacing: 0; text-shadow: none; }
body.et-home .et-calc-rank { font: 700 17px Rubik, sans-serif; margin-top: 4px; }
body.et-home .et-calc-rank span { display: block; font: 400 12px/1.5 Manrope, Inter, sans-serif; color: #8a8f90; margin-top: 5px; }
body.et-home .et-meter { height: 8px; border-radius: 9px; background: #25292a; overflow: hidden; }
body.et-home .et-meter i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--m, 0)); background: linear-gradient(90deg, #b88f00, var(--y), #fff1a5); border-radius: inherit; transition: transform .6s var(--ease); }

/* ---------- Как получить тир: линия прогресса ---------- */
body.et-home .et-how-card { transition: border-color .4s, transform .4s var(--ease), background .4s, box-shadow .4s; }
body.et-home .et-how-card::before { z-index: 0; }
body.et-home .et-how-card .et-how-num { transition: color .4s; }
body.et-home .et-how-card.lit { border-color: rgba(245,197,24,.4); background: #14150f; box-shadow: 0 0 40px -14px rgba(245,197,24,.35); }
body.et-home .et-how-card.lit .et-how-num { color: var(--y); }
body.et-home .et-how-line { grid-column: 1 / -1; height: 3px; border-radius: 9px; background: #1d2122; overflow: hidden; margin-bottom: 2px; }
body.et-home .et-how-line i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); background: linear-gradient(90deg, var(--y), #fff1a5); box-shadow: 0 0 12px rgba(245,197,24,.7); }

/* ---------- Заголовки секций, ссылки, CTA ---------- */
body.et-home .et-sec-head h2 { background: linear-gradient(180deg, #fff 55%, #b9bcbc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body.et-home .et-more { position: relative; transition: color .2s, letter-spacing .35s var(--ease); }
body.et-home .et-more:hover { letter-spacing: .04em; }
body.et-home .et-cta { transition: transform .5s var(--ease), box-shadow .5s; }
body.et-home .et-cta:hover { transform: translateY(-4px); box-shadow: 0 30px 70px -30px rgba(245,197,24,.4); }
body.et-home .news-card, body.et-home .et-top-row { transition: transform .4s var(--ease), border-color .3s, background .3s; }
body.et-home .news-card:hover, body.et-home .et-top-row:hover { transform: translateY(-5px); }
body.et-home .et-top-row:hover { transform: translateX(6px); }

/* ---------- FAQ: поиск ---------- */
body.et-home .faq-search { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 0 16px; height: 50px; border: 1px solid var(--line); border-radius: 12px; background: #111415; transition: border-color .3s, box-shadow .3s; }
body.et-home .faq-search:focus-within { border-color: rgba(245,197,24,.55); box-shadow: 0 0 0 4px rgba(245,197,24,.08); }
body.et-home .faq-search svg { flex: none; opacity: .55; }
body.et-home .faq-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: inherit; font: 500 14px Manrope, Inter, sans-serif; }
body.et-home .faq-row.is-hidden { display: none; }
body.et-home .faq-none { display: none; padding: 26px; text-align: center; color: #7b8183; font-size: 14px; }
body.et-home .faq-none.on { display: block; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  body.et-home .et-calc { grid-template-columns: 1fr; }
  body.et-home .et-calc-row { grid-template-columns: 60px 1fr 78px; gap: 12px; }
  body.et-home .et-calc-total { font-size: 56px; }
  body.et-home .et-stage { perspective: none; }
}
@media (prefers-reduced-motion: reduce) {
  #etProgress, #etGlow { display: none; }
  body.et-home .et-title .w > i { transform: none; animation: none; }
  body.et-home .reveal.in :is(.et-tier-list, .et-how, .news-grid, .et-notes, .et-top, .et-calc-rows, .et-faq) > * { animation: none; }
  body.et-home .et-player, body.et-home .et-orbit, body.et-home .et-sunglow, body.et-home .et-fc { translate: none; rotate: none; }
}
