/* Интерактивные блоки и анимации иллюстраций */

/* ---------- Иллюстрации: анимации (останавливаются вне экрана — класс is-paused) ---------- */
.il { width: 100%; height: auto; overflow: visible; }
.il .il-orbit { transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.il .il-glow { transform-origin: 200px 200px; animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .55; transform: scale(.94); } to { opacity: 1; transform: scale(1.04); } }
.il .il-spark { transform-box: fill-box; transform-origin: center; animation: spark 3.2s ease-in-out infinite; animation-delay: var(--sd, 0s); }
@keyframes spark { 0%, 100% { opacity: .25; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
.il .il-float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.il .il-line { stroke-dasharray: 1600; stroke-dashoffset: 0; }
.js .il:not(.is-drawn) .il-line { stroke-dashoffset: 1600; }
.il.is-drawn .il-line { animation: drawline 2.2s var(--ease-out) forwards; }
@keyframes drawline { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
.il .il-drop { animation: drop 1.1s var(--ease-out) both; animation-delay: var(--dd, 0s); }
@keyframes drop { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: none; } }
.il .il-screw { animation: screw 1.3s var(--ease-out) both; animation-delay: var(--dd, 0s); }
@keyframes screw { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
.il .il-slide { animation: slidein 1.2s .3s var(--ease-out) both; }
@keyframes slidein { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
.il .il-pop { transform-box: fill-box; transform-origin: center; animation: pop .6s var(--ease-out) both; animation-delay: var(--dd, 0s); }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.il .il-wire { stroke-dasharray: 340; animation: wire 1.6s 1s var(--ease-out) both; }
@keyframes wire { from { stroke-dashoffset: 340; } to { stroke-dashoffset: 0; } }
.il .il-tooth { animation: drop .9s var(--ease-out) both; animation-delay: var(--td, 0s); }
.il .il-lift { animation: lift 3.4s ease-in-out infinite; }
@keyframes lift { 0%, 20% { transform: none; } 55%, 75% { transform: translateY(-34px); } 100% { transform: none; } }
.il .il-arrow { animation: arrowup 3.4s ease-in-out infinite; }
@keyframes arrowup { 0%, 20% { opacity: 0; transform: translateY(10px); } 55% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.il .il-tilt { transform-box: fill-box; transform-origin: center; animation: tilt 4s ease-in-out infinite; }
@keyframes tilt { 50% { transform: rotate(-4deg); } }
.il .il-pulse { animation: pulseop 1.6s ease-in-out infinite; }
@keyframes pulseop { 50% { opacity: .25; } }
.il .il-caries { animation: caries 6s ease-in-out infinite; }
.il .il-fill { animation: fillin 6s ease-in-out infinite; }
@keyframes caries { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes fillin { 0%, 45% { opacity: 0; transform: scale(.6); } 60%, 100% { opacity: 1; transform: none; } }
.il .il-fill { transform-box: fill-box; transform-origin: center; }
.il .il-canal { stroke-dasharray: 8 6; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.il .il-file { animation: file 2.4s ease-in-out infinite; }
@keyframes file { 50% { transform: translateY(36px); } }
.il .il-scan { transform-box: fill-box; transform-origin: center; animation: spin 10s linear infinite; }
.il .il-recede { animation: recede 4s ease-in-out infinite; }
@keyframes recede { 50% { transform: translateY(6px); } }
.il .il-shade { animation: shade 5s ease-in-out infinite; }
@keyframes shade { 0%, 100% { filter: sepia(.55) saturate(1.4) brightness(.92); } 50% { filter: none; } }
.il .il-shine { animation: shine 4s ease-in-out infinite; }
@keyframes shine { 0% { transform: translateX(-60px) skewX(-18deg); opacity: 0; } 30% { opacity: .7; } 60%, 100% { transform: translateX(320px) skewX(-18deg); opacity: 0; } }
.il .il-bounce { animation: bounce 2.6s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: none; } 40% { transform: translateY(-12px); } 60% { transform: translateY(2px); } }
.il .il-beam { animation: beam 3s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(234px); } }
.il .il-clean { animation: clean 4s ease-in-out infinite; }
@keyframes clean { 0%, 30% { opacity: 1; } 70%, 100% { opacity: 0; } }
.il .il-spray { animation: spray .5s ease-in-out infinite alternate; }
@keyframes spray { to { transform: translate(-3px, 3px); } }
.il.is-paused *, .il.is-paused { animation-play-state: paused !important; }

/* ---------- Интерактивная схема ---------- */
.anat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.anat-stage { position: relative; max-width: 560px; width: 100%; margin: 0 auto; aspect-ratio: 1; }
.anat-svg [data-l] { transition: opacity .5s var(--ease), filter .5s var(--ease); }
.anat.has-focus .anat-svg [data-l] { opacity: .22; filter: grayscale(.5); }
.anat.has-focus .anat-svg [data-l].is-hl { opacity: 1; filter: drop-shadow(0 0 14px rgba(201, 164, 92, .65)); }
.anat-dot { position: absolute; z-index: 1; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(14, 14, 15, .25); display: grid; place-items: center; font-weight: 800; font-size: 15px; color: var(--ink); transition: transform .3s var(--ease), background .3s; }
.anat-dot::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--gold); opacity: .7; animation: ring 2.4s infinite; }
.anat-dot:hover, .anat-dot.is-on { background: var(--grad-gold); transform: scale(1.12); }
.anat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: a; }
.anat-item { border-radius: var(--r); background: #fff; border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.anat-item.is-on { border-color: var(--gold); box-shadow: 0 18px 40px -30px rgba(168, 132, 63, .9); }
.anat-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; background: none; text-align: left; font-weight: 750; font-size: 17px; }
.anat-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); font-size: 14px; flex: none; transition: all .3s; }
.anat-item.is-on .anat-n { background: var(--ink); color: var(--gold-1); }
.anat-d { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.anat-d > p { overflow: hidden; margin: 0; padding: 0 18px 0 66px; color: var(--muted); font-size: 15.5px; }
.anat-item.is-on .anat-d { grid-template-rows: 1fr; }
.anat-item.is-on .anat-d > p { padding-bottom: 18px; }
.anat-prog { height: 3px; background: var(--grad-gold); width: 0; }
@media (max-width: 900px) { .anat { grid-template-columns: 1fr; } .anat-stage { max-width: 420px; } }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.calc-g { margin: 0 0 26px; }
.calc-g-t { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.calc-g-t > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold-1); font-size: 14px; }
.calc-g-t small { font-weight: 600; color: var(--muted); font-size: 13px; }
.calc-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.calc-opt { position: relative; cursor: pointer; }
.calc-opt input { position: absolute; opacity: 0; }
.calc-opt-box { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; transition: all .25s var(--ease); }
.calc-opt:hover .calc-opt-box { border-color: var(--line-2); transform: translateY(-2px); }
.calc-opt input:checked + .calc-opt-box { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 16px 34px -22px rgba(14, 14, 15, .7); }
.calc-opt input:focus-visible + .calc-opt-box { outline: 3px solid var(--gold); outline-offset: 2px; }
.calc-opt-t { font-weight: 700; line-height: 1.3; }
.calc-opt-n { font-size: 13px; color: var(--muted); line-height: 1.4; }
.calc-opt-p { font-weight: 800; color: var(--gold-ink); font-size: 15px; }
.calc-opt input:checked + .calc-opt-box .calc-opt-n { color: rgba(255, 255, 255, .65); }
.calc-opt input:checked + .calc-opt-box .calc-opt-p { color: var(--gold-1); }
.calc-qty { margin-bottom: 26px; padding: 18px 20px; border-radius: var(--r); background: var(--paper); }
.calc-qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.calc-qty-v { min-width: 52px; text-align: center; font-size: 30px; font-weight: 800; }
.calc-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 160px; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--fill, 50%), var(--line) 0); outline: 0; }
.calc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); border: 4px solid var(--gold-1); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: grab; }
.calc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--gold-1); cursor: grab; }
.calc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px var(--gold-glow); }
.calc-sum { position: sticky; top: 150px; }
.calc-sum-in { padding: 26px; border-radius: var(--r-l); background: var(--grad-dark); color: rgba(255, 255, 255, .8); box-shadow: var(--shadow); display: grid; gap: 14px; }
.calc-sum-l { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-1); }
.calc-total { margin: 0; font-size: clamp(36px, 4vw, 48px); font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; }
.calc-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13.5px; max-height: 220px; overflow-y: auto; }
.calc-lines li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed rgba(255, 255, 255, .12); }
.calc-lines b { color: #fff; white-space: nowrap; }
.calc-inst { padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 10px; }
.calc-months .seg-opt span { background: transparent; border-color: rgba(255, 255, 255, .2); color: #fff; padding: 7px 12px; font-size: 13px; }
.calc-months .seg-opt input:checked + span { background: var(--grad-gold); color: var(--ink); border-color: transparent; }
.calc-month { margin: 0; font-size: 15px; }
.calc-month b { font-size: 26px; color: var(--gold-1); }
.calc-note { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .55); line-height: 1.5; }
.calc-total.is-bump { animation: bump .4s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.06); color: var(--gold-1); } }
@media (max-width: 980px) { .calc { grid-template-columns: 1fr; } .calc-sum { position: sticky; bottom: 84px; top: auto; z-index: 5; } .calc-lines { display: none; } }

/* ---------- Сравнение вариантов ---------- */
.vs-crit { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.vs-chip input { position: absolute; opacity: 0; }
.vs-chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .7); font-weight: 650; font-size: 14.5px; cursor: pointer; transition: all .25s; }
.vs-chip span .ico { width: 16px; height: 16px; opacity: 0; transform: scale(.5); transition: all .25s; margin-left: -6px; }
.vs-chip input:checked + span { background: var(--grad-gold); color: var(--ink); border-color: transparent; }
.vs-chip input:checked + span .ico { opacity: 1; transform: none; margin-left: 0; }
.vs-chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.vs-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 16px; }
.vs-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 22px; border-radius: var(--r-l); background: rgba(255, 255, 255, .04); border: 1.5px solid rgba(255, 255, 255, .1); transition: all .5s var(--ease); }
.vs-card.is-best { background: rgba(211, 181, 118, .1); border-color: var(--gold-1); transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.vs-best { position: absolute; top: -14px; left: 22px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--grad-gold); color: var(--ink); font-size: 12.5px; font-weight: 800; opacity: 0; transform: translateY(6px) scale(.9); transition: all .4s var(--ease); }
.vs-best .ico { width: 15px; height: 15px; }
.vs-card.is-best .vs-best { opacity: 1; transform: none; }
.vs-t { color: #fff; margin: 0; font-size: 20px; }
.vs-price { margin: 0; color: var(--gold-1); font-weight: 800; font-size: 18px; }
.vs-bars { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 10px; }
.vs-bars li { display: grid; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, .65); transition: opacity .3s; }
.vs-bars li.is-off { opacity: .25; }
.vs-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.vs-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--grad-gold); border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease-out); }
.vs.in .vs-bar i, .vs-card.in .vs-bar i { transform: scaleX(1); }
.vs-score { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .6); }
.vs-score b { font-size: 22px; color: #fff; }
.vs-d { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .72); }
.vs-link { color: #fff; margin-top: auto; align-self: flex-start; }
@media (max-width: 980px) { .vs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .vs-grid { grid-template-columns: 1fr; } .vs-card.is-best { transform: none; } }

/* ---------- Тест-подбор ---------- */
.quiz { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 60px); padding: clamp(24px, 3.4vw, 48px); border-radius: var(--r-l); background: var(--cream); border: 1px solid var(--line); }
.quiz-prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 22px; }
.quiz-prog span { display: block; height: 100%; width: 0; background: var(--grad-gold); transition: width .5s var(--ease-out); }
.quiz-count { margin: 10px 0 0; font-weight: 700; color: var(--gold-ink); font-size: 14px; }
.quiz-main { position: relative; min-height: 300px; }
.quiz-step { display: none; }
.quiz-step.is-on { display: block; animation: paneIn .45s var(--ease-out); }
.quiz-q { font-size: clamp(20px, 2vw, 26px); font-weight: 800; margin-bottom: 18px; letter-spacing: -.015em; line-height: 1.25; }
.quiz-ans { display: grid; gap: 10px; }
.quiz-a input { position: absolute; opacity: 0; }
.quiz-a span { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); font-weight: 650; cursor: pointer; transition: all .25s var(--ease); }
.quiz-a span i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--paper); font-style: normal; font-weight: 800; font-size: 14px; flex: none; transition: all .25s; }
.quiz-a span:hover { border-color: var(--ink); transform: translateX(4px); }
.quiz-a input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.quiz-a input:checked + span i { background: var(--grad-gold); color: var(--ink); }
.quiz-a input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.quiz-result { animation: modalIn .5s var(--ease-out); }
.quiz-res-t { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.quiz-res-p { font-size: 20px; font-weight: 800; color: var(--gold-ink); margin: 0 0 10px; }
.quiz-back { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.quiz-back:disabled { visibility: hidden; }
@media (max-width: 900px) { .quiz { grid-template-columns: 1fr; } }

/* ---------- Оттенки ---------- */
.shade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.shade-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin: 22px 0 10px; }
.shade-scale span { display: grid; gap: 4px; text-align: center; }
.shade-scale i { display: block; height: 44px; border-radius: 8px 8px 14px 14px; background: var(--c); border: 1px solid rgba(0, 0, 0, .08); transition: transform .3s var(--ease), box-shadow .3s; }
.shade-scale small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.shade-scale span.is-on i { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--ink), 0 10px 20px -8px rgba(0, 0, 0, .4); }
.shade-scale span.is-from i { box-shadow: 0 0 0 2px var(--gold); }
.shade-ctl { display: flex; margin: 8px 0 10px; }
.shade-ctl .calc-range { width: 100%; }
.shade-out { font-weight: 650; }
.shade-out b { font-size: 22px; }
.shade-out span { color: var(--gold-ink); font-weight: 800; }
.shade-smile { width: 100%; max-width: 520px; margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(14, 14, 15, .2)); }
.shade-teeth path { fill: var(--tooth, #E5D4AF); stroke: rgba(120, 90, 50, .25); stroke-width: 1; transition: fill .45s var(--ease); }
@media (max-width: 900px) { .shade { grid-template-columns: 1fr; } .shade-scale small { font-size: 9px; } }

/* ---------- Шкала по времени ---------- */
.tl { position: relative; max-width: 980px; margin: 0 auto; }
.tl-track { position: relative; height: 70px; margin: 0 28px; }
.tl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 34px; height: 4px; border-radius: 99px; background: var(--line); }
.tl-fill { position: absolute; left: 0; top: 34px; height: 4px; border-radius: 99px; background: var(--grad-gold); width: 0; transition: width .5s var(--ease-out); }
.tl-dot { position: absolute; top: 22px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; border: 3px solid var(--line-2); background: #fff; padding: 0; transition: all .3s var(--ease); }
.tl-dot span { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted); }
.tl-dot.is-past { border-color: var(--gold); background: var(--gold-2); }
.tl-dot.is-on { border-color: var(--ink); background: var(--ink); transform: scale(1.25); }
.tl-dot.is-on span { color: var(--ink); }
.tl-range { position: absolute; left: 0; top: 0; width: 100%; height: 0; margin: 0; opacity: 0; pointer-events: none; }
.tl-panes { position: relative; margin-top: 40px; min-height: 160px; }
.tl-pane { position: absolute; inset: 0 0 auto 0; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-l); background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -50px rgba(14, 14, 15, .6); opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); pointer-events: none; }
.tl-pane.is-on { position: relative; opacity: 1; transform: none; pointer-events: auto; }
.tl-when { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--grad-gold); font-weight: 800; font-size: 13.5px; margin-bottom: 12px; }
.tl-pane h3 { margin-bottom: 8px; }
.tl-pane p { margin: 0; color: var(--ink-3); }
.tl-note { display: flex; gap: 8px; margin-top: 16px; }
@media (max-width: 640px) { .tl-dot span { font-size: 11px; } .tl-dot:nth-child(odd):not(.is-on) span { display: none; } }

/* ---------- Мифы ---------- */
.myths { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.myth { position: relative; border: 0; padding: 0; background: none; perspective: 1200px; min-height: 230px; text-align: left; }
.myth-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease-out); }
.myth.is-flipped .myth-in { transform: rotateY(180deg); }
.myth-f { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.myth-front { background: #fff; border: 1px solid var(--line); }
.myth-back { background: var(--ink); color: rgba(255, 255, 255, .85); transform: rotateY(180deg); }
.myth-tag { align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: #F6E3DE; color: #9A3B2E; }
.myth-back .myth-tag { background: var(--grad-gold); color: var(--ink); }
.myth-t { font-size: 19px; font-weight: 750; line-height: 1.3; }
.myth-d { font-size: 15.5px; line-height: 1.55; }
.myth-hint { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gold-ink); }
.myth:hover .myth-front { border-color: var(--gold); }
