/* Какой ты экспонат: светлая лаборатория, бумага и музейная зелень.
   Цвет результата (--rc) приходит от экспоната: им красится карточка,
   спираль кода и картинка для сторис. */

:root {
  --bg: #f3eee4;
  --bg-2: #fffaf0;
  --accent: #2f7d5b;
  --rc: #2f7d5b;
  --shadow: 0 20px 44px -22px rgba(40, 30, 10, .45);
}
body { background: radial-gradient(120% 60% at 50% 0%, #fbf6ea 0%, #f3eee4 60%, #ebe4d4 100%) fixed; }
.center { text-align: center; }

/* ---------- первый экран */
.intro { display: grid; gap: 12px; }
.intro h1 { font-size: clamp(38px, 11vw, 50px); }
.crowd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 0 -6px; }
.crowd img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(40, 30, 10, .28)); animation: bob 4.2s ease-in-out infinite; animation-delay: calc(var(--k) * -.41s); }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.invite { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); border-left: 6px solid var(--rc); }
.invite img { width: 72px; height: 72px; object-fit: contain; }
.invite b { display: block; font-family: var(--serif); font-size: 20px; }
.invite p { color: var(--ink-2); font-size: 14px; }
.facts3 { display: flex; gap: 8px; flex-wrap: wrap; }
.facts3 span { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(47, 125, 91, .1); color: #245f45; }

/* ---------- спираль кода: восемь ступенек, по одной на ответ */
.dna { display: block; width: 100%; height: 44px; }
.dna .rung { stroke: rgba(35, 32, 27, .14); stroke-width: 5; stroke-linecap: round; transition: stroke .4s; }
.dna .strand { fill: none; stroke: rgba(35, 32, 27, .35); stroke-width: 2.5; }
.dna .rung.is-on { stroke: var(--c); }
.dna .rung.is-now { stroke: rgba(47, 125, 91, .45); stroke-dasharray: 2 5; }

/* ---------- вопрос */
.qhead { display: flex; align-items: center; gap: 10px; }
.qback { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-2); flex: none; }
.qback svg { width: 20px; height: 20px; }
.qnum { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.q { display: grid; gap: 14px; animation: slide .35s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.q h2 { font-size: 30px; }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 14px 1fr; gap: 14px; align-items: center; text-align: left; padding: 16px 18px; min-height: 60px; border-radius: 18px; background: #fff; box-shadow: 0 10px 22px -16px rgba(40, 30, 10, .5); font-weight: 600; font-size: 17px; line-height: 1.3; border: 2px solid transparent; transition: transform .15s var(--ease), border-color .15s; }
.opt i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.opt:active { transform: scale(.98); }
.opt.is-pick { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.opt:hover { border-color: rgba(35, 32, 27, .12); }

.slider { display: grid; gap: 14px; padding: 22px 18px 18px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.slider__face { font-family: var(--serif); font-size: 22px; font-weight: 700; text-align: center; min-height: 58px; display: grid; place-items: center; line-height: 1.2; }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; touch-action: pan-y; }
.slider input::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--l), var(--r)); }
.slider input::-moz-range-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--l), var(--r)); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -13px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); cursor: grab; }
.slider input::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); cursor: grab; }
.slider__ends { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.slider__ends span:last-child { text-align: right; }

/* ---------- расшифровка */
.lab { min-height: 70vh; display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; }
.lab__ring { position: relative; width: 240px; height: 240px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #fff 0%, #f6efe0 70%); box-shadow: var(--shadow), inset 0 0 0 6px rgba(47, 125, 91, .12); }
.lab__ring::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px dashed rgba(47, 125, 91, .45); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lab__ring img { width: 78%; height: 78%; object-fit: contain; }
.lab p { color: var(--ink-2); font-weight: 600; }

/* ---------- результат */
.res { position: relative; border-radius: 28px; overflow: hidden; color: #fff; background: radial-gradient(90% 60% at 50% 30%, color-mix(in srgb, var(--rc) 70%, #fff) 0%, var(--rc) 55%, color-mix(in srgb, var(--rc) 70%, #000) 100%); box-shadow: 0 30px 60px -26px color-mix(in srgb, var(--rc) 70%, #000); padding: 18px 20px 22px; display: grid; gap: 6px; text-align: center; animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.res__img { width: 86%; aspect-ratio: 1; object-fit: contain; margin: -6px auto -10px; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .35)); }
.res .eyebrow { color: rgba(255, 255, 255, .8); }
.res h1 { font-size: 44px; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, .25); }
.res__title { font-weight: 700; font-size: 18px; color: rgba(255, 255, 255, .95); }
.res__about { color: rgba(255, 255, 255, .92); font-size: 16px; max-width: 420px; margin: 4px auto 0; }
.traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.traits span { font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; }
.code { display: flex; gap: 4px; justify-content: center; margin-top: 10px; }
.code i { width: 16px; height: 26px; border-radius: 5px; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.code-note { font-size: 12px; color: rgba(255, 255, 255, .75); }

.act { display: grid; gap: 10px; }
.btn--rc { background: var(--rc); box-shadow: 0 10px 24px -12px var(--rc); }

.info { display: grid; gap: 10px; }
.info .card { display: grid; gap: 6px; }
.info .eyebrow { color: var(--rc); }
.info .card p:not(.eyebrow) { color: var(--ink-2); }
.where { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.where svg { width: 40px; height: 40px; color: var(--rc); }
.where b { display: block; }

.match { display: grid; gap: 10px; text-align: center; }
.match__pair { display: flex; align-items: center; justify-content: center; gap: 8px; }
.match__pair img { width: 96px; height: 96px; object-fit: contain; }
.match__pct { font-family: var(--serif); font-size: 44px; font-weight: 800; color: var(--rc); line-height: 1; }
.match p { color: var(--ink-2); }

.kin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kin button { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 10px 22px -16px rgba(40, 30, 10, .5); }
.kin img { width: 84px; height: 84px; object-fit: contain; }
.kin small { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kin b { font-size: 15px; }

.all { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.all button { position: relative; aspect-ratio: 1; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -14px rgba(40, 30, 10, .5); }
.all img { width: 84%; height: 84%; object-fit: contain; }
.all button.is-me { box-shadow: 0 0 0 3px var(--rc), 0 8px 18px -10px var(--rc); }
.all button.is-me::after { content: "ты"; position: absolute; top: -8px; right: -6px; background: var(--rc); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; }

.peek { display: grid; gap: 10px; text-align: center; }
.peek img { width: 180px; height: 180px; object-fit: contain; margin: 0 auto; }
.peek h2 { font-size: 30px; }
.peek .eyebrow { color: var(--pc); }
.peek p { color: var(--ink-2); }
