/* Главная (src/pages/home.mjs). Общие токены, шапка, подвал, .btn — в site.css.
   Демо оживляет js/home.js: состояния — классами и aria-pressed, координаты — через CSS-переменные. */

.page-home { --plum: #3a1733; --gold: #e2bf6a; --dvoe-pink: #e98fb0; --ink-muted: #6d5561; }
.page-home [hidden] { display: none !important; }

.page-home section { scroll-margin-top: 5rem; }
.h-text { color: var(--muted); max-width: 34rem; }
.h-demo-note { font-size: 0.82rem; color: var(--muted); margin: 0.75rem 0 0; }
.h-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }

/* — кнопки главной — */
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-love { background: var(--rose); color: var(--ink); box-shadow: 0 0.75rem 2.5rem rgba(240, 132, 138, 0.35); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ghost-ink { background: transparent; color: var(--ink); border-color: rgba(42, 22, 32, 0.35); }
.btn-ghost-ink:hover { border-color: var(--ink); filter: none; }
.btn-ghost-gold { background: transparent; color: var(--gold); border-color: rgba(226, 191, 106, 0.6); }
.btn-ghost-gold:hover, .btn-ghost-gold[aria-pressed="true"] { border-color: var(--gold); background: rgba(226, 191, 106, 0.08); filter: none; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-berry { background: var(--berry); color: #fff; box-shadow: 0 0.75rem 2.5rem rgba(194, 65, 107, 0.35); }

/* — пилюли, кикеры, чипы — */
.h-pill { display: inline-flex; align-items: center; margin: 0; padding: 0.2rem 0.75rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.85rem; color: var(--soft); white-space: nowrap; }
.h-kicker { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
.h-kicker-mark { font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1; }
.h-kicker-line { width: 3rem; height: 1px; background: currentColor; opacity: 0.6; }
.h-kicker-love { color: var(--rose); }
.h-kicker-dvoe { color: var(--gold); }
.h-chips { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.h-chips li { margin: 0; padding: 0.35rem 0.85rem; border-radius: 999px; background: var(--surface-2); color: var(--soft); font-size: 0.88rem; }
.h-chips .h-chip-age { background: transparent; border: 1px solid var(--rose); color: var(--rose); }
.h-sub { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.55rem, 5.6vw, 2.2rem); line-height: 1.15; margin: 0.75rem 0 1.25rem; max-width: 30rem; }
.h-sub-love { color: var(--rose); }
.h-sub-dvoe { color: var(--gold); }

/* — герой — */
.h-hero { padding-top: clamp(2rem, 8vw, 5rem); padding-bottom: clamp(1.5rem, 5vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr); }
.h-eyebrow { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 3.8vw, 1.45rem); color: var(--rose); line-height: 1.25; margin: 0 0 1rem; max-width: 36rem; text-wrap: balance; }
.h-title { font-size: clamp(2rem, 9.6vw, 6.4rem); line-height: 0.98; letter-spacing: -0.04em; margin: 0; max-width: none; hyphens: manual; }
.h-title-long { font-size: clamp(1.75rem, 7.6vw, 5.25rem); }
.h-title-short { font-size: clamp(2.6rem, 17vw, 8.5rem); }
.h-line { display: block; white-space: nowrap; }
.h-mini { display: inline-grid; place-items: center; vertical-align: 0.55em; margin-left: 0.18em; width: 1.9em; height: 2.7em; border-radius: 0.35em; font-size: 0.22em; line-height: 1; letter-spacing: 0; transform: rotate(8deg); }
.h-mini-love { background: var(--cream); color: var(--berry); font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 0.26em; box-shadow: 0.25em 0 0 -0.08em var(--rose); }
.h-mini-norm { width: auto; height: 1.9em; padding: 0 0.45em; background: var(--lime); color: var(--ink); font-size: 0.17em; font-weight: 800; transform: rotate(-4deg); vertical-align: 0.9em; }
.h-mini-dvoe { background: var(--berry); color: var(--cream); font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 0.26em; transform: rotate(4deg); }
.h-lead { font-size: clamp(1.05rem, 3.6vw, 1.25rem); color: var(--muted); max-width: 32rem; margin: 1.5rem 0 0; }
.h-cta { display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; margin: 1.5rem 0 0; }
.h-cta .btn { min-height: 3.5rem; font-size: 1.05rem; }
.h-cta-note { font-size: 0.85rem; color: var(--muted); text-align: center; }

/* веер карт */
.h-fan { position: relative; height: clamp(15rem, 72vw, 19rem); margin: 2rem auto 0; width: 100%; max-width: 26rem; }
.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }
.fcard { position: absolute; top: 0; width: 44%; aspect-ratio: 5 / 7; border-radius: 1.1rem; overflow: hidden; display: flex; flex-direction: column; padding: 0.9rem; box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45); }
.fcard-mark { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1; }
.fcard-name { margin-top: auto; font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.fcard-love { left: 0; top: 10%; background: var(--cream); color: var(--ink); rotate: -12deg; }
.fcard-love .fcard-mark { color: var(--berry); }
.fcard-q { margin-top: 1.4rem; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 4.3vw, 1.3rem); line-height: 1.1; }
.fcard-norm { left: 29%; top: 16%; z-index: 1; padding: 0; justify-content: center; align-items: center; background: linear-gradient(180deg, var(--lime) 0 50%, var(--coral) 50% 100%); color: var(--ink); rotate: -2deg; text-align: center; }
.fcard-yes, .fcard-no { position: absolute; left: 0.6rem; font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 5.4vw, 1.75rem); letter-spacing: -0.03em; white-space: nowrap; }
.fcard-yes { bottom: 54%; }
.fcard-no { top: 54%; }
.fcard-or { position: relative; z-index: 1; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 0.72rem; font-weight: 600; }
.fcard-dvoe { right: 2%; top: 0; z-index: 2; background: linear-gradient(160deg, #4a1d40 0%, var(--plum) 55%, #26101f 100%); color: var(--cream); rotate: 12deg; border: 1px solid rgba(226, 191, 106, 0.18); }
.fcard-dvoe .fcard-mark { color: var(--gold); }
.fcard-rings { position: relative; flex: 1; }
.fcard-rings i { position: absolute; top: 50%; width: 52%; aspect-ratio: 1; border-radius: 50%; translate: 0 -50%; }
.fcard-rings i:first-child { left: 14%; border: 1.5px solid var(--gold); }
.fcard-rings i:last-child { right: 12%; border: 1.5px solid var(--dvoe-pink); }

/* — полоса игр — */
.h-strip ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.h-strip li { margin: 0; border-bottom: 1px solid var(--line); }
.h-strip a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; color: var(--text); text-decoration: none; }
.h-strip-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.h-strip-sub { display: none; }
.h-strip-short { font-size: 0.9rem; color: var(--muted); text-align: right; }
.h-strip-love .h-strip-name { color: var(--rose); }
.h-strip-norm .h-strip-name { color: var(--lime); }
.h-strip-dvoe .h-strip-name { color: var(--dvoe-pink); }
.h-strip a:hover .h-strip-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* — love. — */
.h-love, .h-dvoe, .h-soon, .h-principles { padding-top: clamp(4rem, 12vw, 7.5rem); }
.h-love { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "demo" "body"; column-gap: 4rem; }
.h-love-head { grid-area: head; }
.h-love-demo { grid-area: demo; }
.h-love-body { grid-area: body; margin-top: 2rem; }
.h-love-title, .h-dvoe-title { font-size: clamp(4rem, 19vw, 8.5rem); line-height: 0.9; letter-spacing: -0.05em; margin: 0; }

.h-deck { position: relative; height: clamp(21rem, 102vw, 27rem); max-width: 25rem; margin-right: 1.5rem; touch-action: pan-y; }
.qcard { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 1.4rem 1.5rem; border-radius: 1.75rem; background: var(--cream); color: var(--ink); box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.35); user-select: none; -webkit-user-select: none; }
.qcard-mark { font-family: var(--serif); font-style: italic; font-size: 1.7rem; line-height: 1; color: var(--berry); }
.qcard-mark-end { align-self: flex-end; rotate: 180deg; }
.qcard-theme { position: absolute; top: 1.25rem; right: 1.25rem; padding: 0.3rem 0.8rem; border-radius: 999px; background: rgba(42, 22, 32, 0.08); font-size: 0.82rem; color: var(--ink-muted); }
.qcard-q { flex: 1; display: flex; align-items: center; margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(1.75rem, 7.6vw, 2.4rem); line-height: 1.1; }
.qcard-foot { font-size: 0.8rem; color: var(--ink-muted); }
.qcard.is-pos-0 { z-index: 4; translate: var(--dx, 0px) 0; rotate: var(--dr, 0deg); }
.qcard.is-pos-1 { z-index: 3; translate: 0.6rem 0.5rem; rotate: 3deg; background: #e9dccd; }
.qcard.is-pos-2 { z-index: 2; translate: 1.2rem 1rem; rotate: 6deg; background: #dccdbc; }
.qcard.is-pos-3 { z-index: 1; translate: 1.2rem 1rem; rotate: 6deg; background: #dccdbc; }
.qcard:not(.is-pos-0) > * { visibility: hidden; }
.qcard.is-leaving > * { visibility: visible; }
.h-deck.is-dragging .qcard.is-pos-0 { cursor: grabbing; }
.h-deck-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.75rem; max-width: 26.5rem; }
.h-dots { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; }
.h-dot { display: grid; place-items: center; width: 1.75rem; height: 2.75rem; padding: 0; border: 0; background: transparent; cursor: pointer; }
.h-dot::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 999px; background: var(--muted); opacity: 0.6; }
.h-dot[aria-pressed="true"]::before { width: 1.4rem; background: var(--rose); opacity: 1; }
.h-share { gap: 0.5rem; }
.h-share-icon { width: 1.1rem; height: 1.1rem; }

/* — «Норм или стрём?» — светлая плашка — */
.h-norm { margin: clamp(4rem, 12vw, 7.5rem) 0.5rem 0; padding: clamp(2.5rem, 8vw, 5rem) 0; border-radius: clamp(1.75rem, 5vw, 2.75rem); background: var(--cream); color: var(--ink); }
.h-norm h2, .h-norm h3 { color: var(--ink); }
.h-norm .h-text { color: #4c3440; }
.h-norm .h-pill { color: var(--ink-muted); border-color: rgba(42, 22, 32, 0.25); }
.h-norm .h-chips li { background: rgba(42, 22, 32, 0.08); color: var(--ink); }
.h-norm .h-chips .h-chip-age { background: transparent; border-color: var(--berry); color: var(--berry); }
.h-norm .h-demo-note { color: var(--ink-muted); }
.h-norm a:not(.btn) { color: var(--ink); }
.h-norm :focus-visible { outline-color: var(--ink); }
.h-norm-in { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "steps" "demo" "body"; column-gap: 3.5rem; }
.h-norm-head { grid-area: head; }
.h-steps { grid-area: steps; }
.h-ns { grid-area: demo; }
.h-norm-body { grid-area: body; margin-top: 2rem; }
.h-ns-badge { padding: 0.2rem 0.5rem; border-radius: 0.4rem; background: var(--lime); font-family: var(--display); font-weight: 800; font-size: 0.85rem; }
.h-norm-title { font-size: clamp(2.3rem, 10vw, 4.2rem); line-height: 0.98; letter-spacing: -0.04em; margin: 0; }
.h-sub-norm { font-family: var(--sans); font-style: normal; font-weight: 600; font-size: clamp(1.15rem, 3.8vw, 1.45rem); color: var(--ink); }
.h-steps { list-style: none; counter-reset: step; margin: 0.5rem 0 2rem; padding: 0; display: grid; gap: 0.35rem; }
.h-steps li { counter-increment: step; display: flex; align-items: baseline; gap: 0.75rem; margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.35rem, 6vw, 2.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.h-steps li::before { content: counter(step); font-size: 0.5em; color: var(--ink-muted); min-width: 0.8em; }

.h-ns-q { position: relative; padding: 1.4rem 1.5rem 1.5rem; border-radius: 1.5rem; background: var(--ink); color: var(--cream); touch-action: pan-y; user-select: none; -webkit-user-select: none; translate: var(--dx, 0px) 0; rotate: var(--dr, 0deg); }
.h-ns-q.is-back { transition: translate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.h-ns-q.is-yes-hint { box-shadow: 0 0 0 3px var(--lime); }
.h-ns-q.is-no-hint { box-shadow: 0 0 0 3px var(--coral); }
.h-ns-sit { font-size: 0.88rem; color: var(--muted); }
.h-ns-text { margin: 0.5rem 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 5.2vw, 1.75rem); line-height: 1.12; letter-spacing: -0.02em; }
.h-ns-swipe { display: block; margin-top: 0.9rem; font-size: 0.8rem; color: var(--muted); }
.h-ns-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.ns { min-height: 5.25rem; padding: 0.5rem; border: 0; border-radius: 1.5rem; font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 6vw, 2.3rem); letter-spacing: -0.03em; color: var(--ink); cursor: pointer; }
.ns-yes { background: var(--lime); }
.ns-no { background: var(--coral); }
.ns[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--ink); }
.h-ns.is-done .ns[aria-pressed="false"] { opacity: 0.45; }
.h-ns-flips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.h-flip { position: relative; min-height: 9rem; perspective: 900px; }
.h-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.75rem; border-radius: 1.5rem; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: rotate 0.6s cubic-bezier(0.3, 1.3, 0.5, 1); }
.h-face-who { font-size: 0.85rem; }
.h-face-val { font-family: var(--display); font-weight: 800; font-size: clamp(0.95rem, 3.8vw, 1.2rem); line-height: 1.15; }
.h-flip-you .h-face-front { border: 2px dashed rgba(42, 22, 32, 0.3); color: var(--ink); }
.h-flip-you .h-face-front .h-face-who { color: var(--ink-muted); }
.h-flip-other .h-face-front { background: repeating-linear-gradient(135deg, #2a1620 0 12px, #3a2530 12px 24px); color: var(--cream); }
.h-flip-other .h-face-front .h-face-who { color: var(--muted); }
.h-face-back { rotate: y 180deg; color: var(--ink); }
.h-flip.is-open .h-face-front { rotate: y -180deg; }
.h-flip.is-open .h-face-back { rotate: y 0deg; }
.h-flip-you.is-yes .h-face-back { background: var(--lime); }
.h-flip-you.is-no .h-face-back, .h-flip-other .h-face-back { background: var(--coral); }
.h-bubble { margin-top: 0.35rem; padding: 0.35rem 0.6rem; border-radius: 0.8rem 0.8rem 0.8rem 0.2rem; background: var(--cream); font-size: 0.78rem; line-height: 1.3; }
.h-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 1rem; min-height: 1px; }
.h-verdict-text { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.2; letter-spacing: -0.02em; }
.h-verdict-text:empty { display: none; }
.h-stats { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; margin: 2rem 0 0; padding: 1.25rem; border-radius: 1.25rem; background: rgba(42, 22, 32, 0.06); }
.h-stats strong { grid-row: span 2; font-family: var(--display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.04em; }
.h-stats small { color: var(--ink-muted); font-size: 0.8rem; }

/* — «Двое» — */
.h-dvoe { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "scene" "actions" "body" "mini"; column-gap: 4rem; }
.h-dvoe-head { grid-area: head; }
.h-dvoe-body { grid-area: body; margin-top: 2rem; }
.h-scene { grid-area: scene; }
.h-dvoe-actions { grid-area: actions; }
.h-minidvoe { grid-area: mini; }
.h-dvoe .h-chips li { background: #3d1a31; }
.h-dvoe .h-chips .h-chip-age { background: transparent; }

.h-scene { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; margin-top: 1.5rem; padding: 2rem 1rem 1.5rem; border-radius: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid rgba(226, 191, 106, 0.16); background: radial-gradient(60% 50% at 50% 55%, rgba(194, 65, 107, 0.2), transparent 70%), linear-gradient(170deg, #2e1426 0%, #1f0e1a 100%); }
.h-scene::before { content: ""; position: absolute; left: 50%; top: 55%; width: 170%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 22%, rgba(226, 191, 106, 0.1) 22% 22.25%); pointer-events: none; }
.h-orbits { position: relative; display: flex; justify-content: center; gap: clamp(1rem, 10vw, 7rem); width: 100%; }
.h-orbit { display: grid; place-items: center; width: clamp(7.5rem, 36vw, 11rem); aspect-ratio: 1; border-radius: 50%; transition: translate 0.9s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.6s ease; }
.h-orbit-you { border: 1px solid rgba(226, 191, 106, 0.7); color: var(--gold); background: radial-gradient(circle at 45% 40%, rgba(226, 191, 106, 0.18), transparent 70%); }
.h-orbit-partner { border: 1px solid rgba(233, 143, 176, 0.7); color: var(--dvoe-pink); background: radial-gradient(circle at 45% 40%, rgba(233, 143, 176, 0.18), transparent 70%); }
.h-orbit-icon { width: 34%; height: 34%; }
.h-orbit-labels { position: relative; display: flex; justify-content: center; gap: clamp(1rem, 10vw, 7rem); width: 100%; margin: 0.75rem 0 0; color: var(--soft); font-size: 0.92rem; }
.h-orbit-labels span { width: clamp(7.5rem, 36vw, 11rem); text-align: center; }
.h-sample { position: relative; max-width: 26rem; margin: 1.5rem auto 0; padding: 1.4rem 1.5rem; border-radius: 1.5rem; background: rgba(27, 16, 24, 0.85); border: 1px solid rgba(226, 191, 106, 0.3); text-align: center; }
.h-sample-label { margin: 0; font-size: 0.8rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; }
.h-sample-pct { margin: 0.25rem 0 0; font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: var(--gold); letter-spacing: -0.04em; }
.h-sample-title { margin: 0.25rem 0 0.5rem; font-size: 1.2rem; }
.h-sample-text { margin: 0; color: var(--soft); font-size: 0.95rem; }
.h-sample-note { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.78rem; }
.h-scene-hint { position: relative; margin: 1.25rem 0 0; color: var(--muted); font-size: 0.85rem; text-align: center; }
.h-scene.is-live { display: grid; justify-items: center; align-content: center; }
.h-scene.is-live > * { grid-column: 1; }
.h-scene.is-live .h-orbits { grid-row: 1; } .h-scene.is-live .h-orbit-labels { grid-row: 2; } .h-scene.is-live .h-scene-hint { grid-row: 3; }
.h-scene.is-live .h-sample { grid-row: 1 / 4; align-self: center; width: 100%; margin: 0; scale: 0.9; opacity: 0; visibility: hidden; transition: opacity 0.5s ease 0.4s, scale 0.5s ease 0.4s, visibility 0s linear 0.9s; }
.h-scene.is-on .h-orbit-you { translate: calc(50% + clamp(0.5rem, 5vw, 3.5rem)) 0; opacity: 0.35; }
.h-scene.is-on .h-orbit-partner { translate: calc(-50% - clamp(0.5rem, 5vw, 3.5rem)) 0; opacity: 0.35; }
.h-scene.is-on .h-orbit-labels, .h-scene.is-on .h-scene-hint { opacity: 0; }
.h-scene.is-on .h-sample { opacity: 1; scale: 1; visibility: visible; transition-delay: 0.5s, 0.5s, 0s; }
.h-orbit-labels, .h-scene-hint { transition: opacity 0.4s ease; }
.h-dvoe-actions { margin-top: 1.25rem; }
.h-dvoe-actions .btn { flex: 1 1 12rem; }

.h-minidvoe { margin-top: 2.5rem; padding: 1.5rem; border-radius: 1.5rem; background: var(--surface); border: 1px solid var(--line); }
.h-minidvoe h3 { margin: 0 0 1rem; font-size: 1.15rem; color: var(--gold); }
.h-minidvoe-fields { display: grid; gap: 0.9rem; }
.h-minidvoe label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--soft); }
.h-minidvoe input { min-height: 3rem; width: 100%; padding: 0.5rem 0.9rem; border-radius: 0.9rem; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; color-scheme: dark; }
.h-minidvoe input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.h-minidvoe-out { display: block; }
.h-minidvoe-out:not(:empty) { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.h-md-row { margin: 0 0 0.5rem; color: var(--soft); }
.h-md-row b { color: var(--text); }
.h-md-pair { margin: 0.75rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.4rem; line-height: 1.2; color: var(--gold); }
.h-md-err { margin: 0; color: var(--rose); }
.h-minidvoe-note { margin: 1rem 0 0; font-size: 0.8rem; color: var(--muted); }

/* — «Скоро будет» — */
.h-soon { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; margin-top: clamp(4rem, 12vw, 7.5rem); border-top: 1px solid var(--line); }
.h-soon-text { order: -1; }
.h-soon-text h2 { font-size: clamp(2.1rem, 9vw, 3.6rem); letter-spacing: -0.04em; margin: 1rem 0; }
.h-soon-text .h-pill { border-style: dashed; }
.h-soon-card { justify-self: center; width: min(15rem, 62vw); aspect-ratio: 5 / 7; padding: 0; border: 0; background: transparent; cursor: pointer; perspective: 1000px; rotate: -6deg; color: var(--cream); }
.h-soon-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.5, 1); }
.h-soon-card[aria-pressed="true"] .h-soon-inner { transform: rotateY(180deg); }
.h-soon-face { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 1rem; border-radius: 1.25rem; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid rgba(240, 132, 138, 0.18); box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45); }
.h-soon-front { background: repeating-radial-gradient(circle at 50% 50%, #2a1822 0 10px, #321e2a 10px 11px); }
.h-soon-back { transform: rotateY(180deg); align-items: center; background: var(--cream); color: var(--ink); }
.h-soon-back .h-soon-cap { font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1.15; color: var(--ink); }
.h-soon-q { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(242, 232, 220, 0.4); background: #2a1822; font-family: var(--display); font-weight: 800; font-size: 1.8rem; }
.h-soon-corner { position: absolute; left: 1rem; top: 0.9rem; font-family: var(--display); font-weight: 800; font-size: 1rem; }
.h-soon-corner-end { left: auto; top: auto; right: 1rem; bottom: 0.9rem; }
.h-soon-front .h-soon-cap { position: relative; margin-bottom: 1.6rem; font-size: 0.8rem; color: var(--muted); }

/* — «Как мы их делаем» — */
.h-principles h2 { font-size: clamp(1.9rem, 8vw, 3.2rem); letter-spacing: -0.04em; margin: 0 0 1.75rem; }
.h-pcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.h-pcard { position: relative; margin: 0; padding: 1.5rem 1.5rem 1.6rem; border-radius: 1.5rem; background: var(--surface); border: 1px solid var(--line); }
.h-pcard-n { display: block; font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; letter-spacing: -0.04em; margin-bottom: 1rem; }
.h-pcard-1 .h-pcard-n { color: var(--rose); }
.h-pcard-2 .h-pcard-n { color: var(--lime); }
.h-pcard-3 .h-pcard-n { color: var(--gold); }
.h-pcard h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.h-pcard p { margin: 0; color: var(--muted); }

/* — «Зачем эти игры» — */
.h-about { padding-top: clamp(4rem, 12vw, 7.5rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.h-about-box { display: grid; gap: 1rem 4rem; padding: clamp(2rem, 7vw, 4rem) clamp(1.25rem, 5vw, 4rem); margin: 0 -0.75rem; border-radius: clamp(1.75rem, 5vw, 2.75rem); background: var(--surface); }
.h-about h2 { font-size: clamp(2rem, 8.5vw, 3.2rem); letter-spacing: -0.04em; margin: 0; }
.h-sub-about { color: var(--cream); font-size: clamp(1.4rem, 5vw, 1.85rem); margin-top: 0; }
.h-contact { color: var(--muted); margin: 1.25rem 0 0; }
.h-contact a { color: var(--text); }

/* ——— планшет ——— */
@media (min-width: 768px) {
  .h-cta { flex-direction: row; align-items: center; gap: 1.25rem; }
  .h-cta .btn { padding-inline: 2rem; }
  .h-strip ul { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .h-strip li { border-bottom: 0; }
  .h-strip li + li { border-left: 1px solid var(--line); padding-left: 1.5rem; }
  .h-strip a { flex-direction: column; gap: 0.3rem; padding: 1.5rem 1rem 1.75rem 0; }
  .h-strip-sub { display: block; font-size: 0.92rem; color: var(--soft); }
  .h-strip-short { display: none; }
  .h-norm { margin-inline: 1.25rem; }
  .h-steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
  .h-steps li { flex-direction: column; gap: 0.35rem; font-size: clamp(1.4rem, 3.4vw, 2.5rem); }
  .h-steps li::before { font-size: 1rem; }
  .h-norm-in { grid-template-areas: "steps" "head" "demo" "body"; }
  .h-minidvoe-fields { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .h-soon { grid-template-columns: 17rem 1fr; gap: 4rem; }
  .h-soon-text { order: 0; }
  .h-pcards { grid-template-columns: repeat(3, 1fr); }
  .h-pcard-1 { rotate: -1.2deg; }
  .h-pcard-3 { rotate: 1deg; }
  .h-about-box { grid-template-columns: 1fr 1.3fr; margin: 0; }
  .h-dvoe-actions .btn { flex: 0 1 auto; }
}

/* ——— десктоп ——— */
@media (min-width: 1024px) {
  .h-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
  .h-hero > * { grid-column: 1; }
  .h-hero .h-title { grid-column: 1 / -1; }
  .h-hero .h-fan { grid-column: 2; grid-row: 3 / span 2; margin: -2rem 0 0; height: 22rem; max-width: 30rem; justify-self: end; }
  .fcard { padding: 1.1rem; }
  .fcard-q { font-size: 1.45rem; }
  .fcard-name { font-size: 1.15rem; }
  .fcard-yes, .fcard-no { font-size: 2rem; }
  .h-love { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head demo" "body demo"; align-items: start; }
  .h-love-body { margin-top: 0; }
  .h-love-demo { justify-self: end; width: 100%; max-width: 27rem; }
  .h-norm { margin-inline: auto; max-width: calc(72rem + 3rem); }
  .h-norm-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "steps steps" "demo head" "demo body"; align-items: start; }
  .h-norm-body { margin-top: 0; }
  .h-dvoe { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "head body" "scene scene" "actions actions" "mini mini"; }
  .h-dvoe-body { margin-top: 3.25rem; }
  .h-scene { min-height: 24rem; justify-content: center; margin-top: 2.5rem; }
  .h-dvoe-actions { justify-content: space-between; }
}

@media (min-width: 1280px) {
  .h-hero .h-fan { height: 26rem; max-width: 32rem; }
}

/* ——— движение ——— */
@media (prefers-reduced-motion: no-preference) {
  .qcard { transition: translate 0.35s ease, rotate 0.35s ease, background-color 0.35s ease; }
  .h-deck.is-dragging .qcard.is-pos-0 { transition: none; }
  .qcard.is-leaving { animation: h-fly 0.6s ease-in-out; }
  .h-fan .fcard { animation: h-deal 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
  .h-fan .fcard-norm { animation-delay: 0.12s; }
  .h-fan .fcard-dvoe { animation-delay: 0.24s; }
  .tilt { transition: transform 0.25s ease-out; }
  .h-dot::before { transition: width 0.25s ease, background-color 0.25s ease; }
  .ns { transition: transform 0.15s ease, opacity 0.2s ease; }
  .ns:active { transform: scale(0.97); }
  .h-soon-card:hover .h-soon-inner { transform: rotateY(-12deg); }
  .h-soon-card[aria-pressed="true"]:hover .h-soon-inner { transform: rotateY(180deg); }
}
@keyframes h-deal {
  from { translate: 0 3rem; opacity: 0; scale: 0.9; }
}
@keyframes h-fly {
  0% { z-index: 5; translate: 0 0; rotate: 0deg; }
  45% { z-index: 5; translate: -115% 1rem; rotate: -14deg; }
  55% { z-index: 0; translate: -115% 1rem; rotate: -14deg; }
  100% { z-index: 0; }
}

/* раздача карт при прокрутке — только где браузер умеет scroll-driven animations */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .h-deck, .h-ns-flips, .h-soon-card, .h-pcard {
      animation: h-scroll-deal linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }
    .h-deck { animation-name: h-scroll-rise; }
    .h-pcard-2 { animation-range: entry 15% cover 35%; }
    .h-pcard-3 { animation-range: entry 25% cover 40%; }
  }
  @keyframes h-scroll-deal {
    from { opacity: 0; translate: 0 4rem; rotate: -5deg; }
  }
  @keyframes h-scroll-rise {
    from { opacity: 0; translate: 0 4rem; }
  }
}
