/* ═══════════ Luma — «Ночь и свет» ═══════════ */

@font-face { font-family: "Lora"; font-weight: 400 700; font-display: swap; src: url("../fonts/Lora.woff") format("woff"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../fonts/Lora-Italic.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("../fonts/unbounded-700-latin.woff2") format("woff2"); }

:root {
  --night: #07080c;
  --night-2: #0b0d14;
  --ink: #ece6d8;          /* пергамент */
  --muted: #9a9486;
  --dim: #6a665d;
  --gold: #e8d9a8;
  --gold-2: #b89b5e;
  --hair: rgba(232, 217, 168, .22);
  --hair-2: rgba(232, 217, 168, .1);
  --moon: #dfe5f2;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: var(--night) radial-gradient(120% 60% at 50% 0%, #0f1322 0%, var(--night) 60%) no-repeat;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.01em; line-height: 1.08; }
h1 em, h2 em { font-style: italic; color: var(--gold); font-weight: 400; }
::selection { background: var(--gold); color: #14110a; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #111; padding: 8px 14px; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; position: relative; }
.narrow { width: min(820px, 100% - 48px); }

/* золотая пыль поверх всего */
.dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ───── Кнопки ───── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 28px; border-radius: 999px;
  font: 500 15px/1 var(--sans); letter-spacing: .01em; transition: background .3s, box-shadow .4s, border-color .3s, color .3s, transform .3s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  color: #17130a; background: linear-gradient(180deg, #f3e8c4, var(--gold) 50%, #d9c58b);
  box-shadow: 0 0 0 1px rgba(255, 240, 200, .35) inset, 0 10px 40px rgba(232, 217, 168, .18);
}
.btn-gold:hover { box-shadow: 0 0 0 1px rgba(255, 240, 200, .5) inset, 0 12px 60px rgba(232, 217, 168, .35); }
.btn-ghost { border: 1px solid var(--hair); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ───── Навигация ───── */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 8, 12, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--hair-2); }
.nav-in { width: min(1180px, 100% - 48px); margin-inline: auto; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 14px/1 "Unbounded", var(--sans); letter-spacing: .3em; }
.moon-ico { width: 18px; height: 18px; color: var(--gold); filter: drop-shadow(0 0 6px rgba(232, 217, 168, .6)); }
.nav-links { display: flex; gap: 30px; font-size: 13.5px; letter-spacing: .04em; color: #c9c3b4; }
.nav-links a { display: inline-flex; align-items: baseline; gap: 7px; transition: color .25s; }
.nav-links i { font: italic 400 13px/1 var(--serif); color: var(--gold-2); }
.nav-links a:hover { color: var(--gold); }
.nav-dl { font-size: 14px; padding: 9px 20px; border: 1px solid var(--hair); border-radius: 999px; color: var(--gold); transition: background .3s, color .3s; }
.nav-dl:hover { background: var(--gold); color: #17130a; }

/* ───── Первый экран ───── */
.hero { position: relative; padding: 170px 0 0; overflow: hidden; }
.sky { position: absolute; inset: 0; pointer-events: none; mask-image: linear-gradient(#000 78%, transparent); -webkit-mask-image: linear-gradient(#000 78%, transparent); }
.stars { position: absolute; inset: 0 0 30%; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .5; animation: twinkle var(--d, 4s) ease-in-out infinite var(--dl, 0s); }
@keyframes twinkle { 50% { opacity: .08; } }
.moon {
  position: absolute; top: 108px; right: max(4vw, calc(50% - 600px)); width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fbfcff 0%, #e4e9f4 38%, #b9c2d6 72%, #8d97ad 100%);
  box-shadow: 0 0 60px 10px rgba(210, 222, 245, .25), 0 0 220px 60px rgba(150, 170, 220, .12);
  animation: moonrise 2.4s var(--ease) both;
}
.moon i { position: absolute; inset: 0; border-radius: 50%; /* кратеры */
  background:
    radial-gradient(circle at 62% 30%, rgba(110, 120, 145, .5) 0 6%, transparent 13%),
    radial-gradient(circle at 42% 62%, rgba(110, 120, 145, .45) 0 9%, transparent 18%),
    radial-gradient(circle at 70% 68%, rgba(110, 120, 145, .35) 0 4%, transparent 10%),
    radial-gradient(ellipse 30% 22% at 30% 42%, rgba(110, 120, 145, .3), transparent 70%);
  filter: blur(3px); opacity: .55;
}
@keyframes moonrise { from { transform: translateY(60px); opacity: 0; } }
.hero-land {
  position: absolute; left: 0; right: 0; top: 280px; width: 100%; height: 640px; object-fit: cover; object-position: 70% 60%;
  opacity: .42; filter: saturate(.25) hue-rotate(190deg) brightness(.7);
  mask-image: linear-gradient(transparent 0%, #000 40%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(transparent 0%, #000 40%, #000 70%, transparent 100%);
}
.mist { position: absolute; left: -20%; right: -20%; height: 240px; border-radius: 50%; filter: blur(40px); background: rgba(150, 165, 200, .09); }
.m1 { top: 560px; animation: mist 26s ease-in-out infinite alternate; }
.m2 { top: 700px; background: rgba(232, 217, 168, .05); animation: mist 34s ease-in-out infinite alternate-reverse; }
@keyframes mist { to { transform: translateX(8%); } }
.cursor-light { position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: 0; transition: opacity .6s; mix-blend-mode: screen;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 30%), rgba(232, 217, 168, .055), rgba(232, 217, 168, .02) 45%, transparent 72%); }
.cursor-light.on { opacity: 1; }
main, .foot { position: relative; z-index: 2; }

.hero-in { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.kicker { font: italic 400 16px/1 var(--serif); color: var(--gold); letter-spacing: .02em; display: flex; align-items: center; gap: 14px; }
.kicker::before, .kicker::after { content: ""; width: 36px; height: 1px; background: var(--hair); }
.hero h1 { font-size: clamp(46px, 7.4vw, 104px); margin-top: 26px; font-weight: 400; }
.hero h1 em { display: inline-block; text-shadow: 0 0 40px rgba(232, 217, 168, .25); }
.lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 18.5px); max-width: 560px; margin-top: 26px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 38px; }

.hero-window { position: relative; width: min(1060px, 100% - 48px); margin: 84px auto 0; }
.hero-window::before { /* лунный свет из-под окна */
  content: ""; position: absolute; inset: -12% 6% auto; height: 70%; border-radius: 50%; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(232, 217, 168, .2), transparent);
}
.hero-window:not(.demo) .frame-gold { animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* золотая рамка с уголками */
.frame-gold { position: relative; padding: 10px; border: 1px solid var(--hair); background: rgba(10, 11, 16, .6); box-shadow: 0 50px 120px rgba(0, 0, 0, .6); }
/* Keep the first video's shadow close to its frame, clear of the hero's clipped edge. */
.hero-window.demo .frame-gold { box-shadow: 0 0 24px rgba(0, 0, 0, .25); }
.frame-gold img { width: 100%; height: auto; border: 1px solid rgba(255, 255, 255, .06); }
.demo video { display: block; width: 100%; height: auto; aspect-ratio: 80 / 43; background: #0b0c11; }
.hero-window.demo video { aspect-ratio: 16 / 9; }
.frame-gold video { border: 1px solid rgba(255, 255, 255, .06); }
.demo-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 22px; margin-top: 16px;
  color: var(--muted); font-size: 13px; }
.demo-toggle { appearance: none; background: transparent; border: 1px solid var(--hair); border-radius: 999px; padding: 0 18px;
  min-height: 44px; color: var(--gold); font: inherit; cursor: pointer; transition: border-color .25s, background .25s; }
.demo-toggle:hover { border-color: var(--gold); background: rgba(232, 217, 168, .05); }
.demo-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.demo-actions a:hover { color: var(--gold); }
.corner { position: absolute; width: 22px; height: 22px; border: 1px solid var(--gold); }
.corner.tl { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -5px; right: -5px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -5px; left: -5px; border-right: 0; border-top: 0; }
.corner.br { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
.corner::after { content: ""; position: absolute; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.tl::after { top: -3px; left: -3px; } .tr::after { top: -3px; right: -3px; } .bl::after { bottom: -3px; left: -3px; } .br::after { bottom: -3px; right: -3px; }

/* орнамент-разделитель */
.orn { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--gold); font-size: 14px; padding: 40px 0; }
.orn span { width: min(200px, 30vw); height: 1px; background: linear-gradient(90deg, transparent, var(--hair)); }
.orn span:last-child { transform: scaleX(-1); }

/* ───── Главы ───── */
.chapter { padding: 120px 0; position: relative; overflow-x: clip; }
.numeral { font: italic 400 15px/1 var(--serif); color: var(--gold-2); letter-spacing: .08em; margin-bottom: 20px; }
.chapter h2 { font-size: clamp(38px, 5vw, 66px); font-weight: 400; }
.body { color: var(--muted); font-size: 17px; margin-top: 22px; max-width: 520px; }
.ch-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ch-head .body { max-width: 580px; }

.two { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.launchers { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; max-width: 500px;
  font: 400 19px/1.6 var(--serif); color: #d9d2c1; }
.launchers li { display: inline-flex; align-items: center; }
.launchers li:not(:last-child)::after { content: "✦"; font-size: 9px; color: var(--gold-2); margin: 0 14px; }
.launchers em { color: var(--gold); }
.ch-art { margin: 0; position: relative; }
.glow-moon { position: absolute; width: 60%; aspect-ratio: 1; right: -10%; top: -20%; border-radius: 50%; filter: blur(70px); background: rgba(160, 180, 230, .14); }
.constel { aspect-ratio: 1; width: min(520px, 100%); justify-self: center; position: relative; }
.constel-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constel-lines line { stroke: rgba(232, 217, 168, .28); stroke-width: .18; stroke-dasharray: .8 1.2; vector-effect: none; }
.constel-lines line.rim { stroke: rgba(232, 217, 168, .14); stroke-dasharray: none; }
.js .constel-lines line { stroke-dashoffset: 60; transition: stroke-dashoffset 2.4s var(--ease); }
.js .constel.in .constel-lines line { stroke-dashoffset: 0; }
.constel-core { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle, #1a1a22, #0b0c11);
  border: 1px solid var(--hair); box-shadow: 0 0 60px rgba(232, 217, 168, .25), inset 0 0 30px rgba(232, 217, 168, .08); }
.constel-core svg { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(232, 217, 168, .7)); }
.star-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.star-node img { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; padding: 6px; background: #0d0e13;
  box-shadow: 0 0 0 1px var(--hair-2), 0 0 24px rgba(232, 217, 168, .08); filter: grayscale(1) brightness(.85);
  transition: filter .5s, box-shadow .5s, transform .5s var(--ease); animation: bob 6s ease-in-out infinite calc(var(--i) * -.7s); }
.star-node em { font: italic 400 13px/1 var(--serif); color: var(--muted); white-space: nowrap; }
.star-node:hover img { filter: none; transform: scale(1.08); box-shadow: 0 0 0 1px var(--gold), 0 0 30px rgba(232, 217, 168, .3); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.star-node img { transition: filter 1.6s, box-shadow 1.6s, transform .5s var(--ease); }
.star-node.lit img { filter: none; box-shadow: 0 0 0 1px rgba(232, 217, 168, .55), 0 0 34px rgba(232, 217, 168, .32); }
.star-node em { transition: color 1.6s; }
.star-node.lit em { color: var(--gold); }
.constel-lines line.spoke { transition: stroke 1.6s; }
.constel-lines line.spoke.lit { stroke: rgba(232, 217, 168, .75); }
.ch-art figcaption { margin-top: 22px; font: italic 400 15px/1.5 var(--serif); color: var(--muted); text-align: right; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 70px; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.trio article { padding: 46px 36px; }
.trio article + article { border-left: 1px solid var(--hair-2); }
.trio svg { width: 44px; height: 44px; color: var(--gold); margin-bottom: 26px; }
.trio h3 { font-size: 25px; font-weight: 500; }
.trio p { color: var(--muted); margin-top: 12px; font-size: 15.5px; }
.quote { margin: 64px auto 0; text-align: center; font: 400 clamp(20px, 2.2vw, 26px)/1.5 var(--serif); color: #d6cfbe; max-width: 760px; }
.quote em { color: var(--gold); }

/* ───── Колода ───── */
.deck-sec { overflow: hidden; }
.deck-bg { position: absolute; inset: 0; pointer-events: none; }
.deck-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .16; filter: blur(30px) saturate(1.2); transform: scale(1.2); transition: opacity .8s; }
.deck-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--night), transparent 30%, transparent 70%, var(--night)); }

.deck { display: flex; justify-content: center; margin: 80px auto 0; height: 330px; perspective: 1400px; }
.deck-hint { display: none; }
.tcard {
  --rot: 0deg; --lift: 0px; --order: 1;
  appearance: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit;
  width: 150px; height: 256px; flex: none; margin: 0 -5px; position: relative; border-radius: 14px; overflow: hidden;
  background: #0d0e13; box-shadow: 0 0 0 1px var(--hair), 0 30px 60px rgba(0, 0, 0, .6);
  transform: translate3d(0, calc(var(--drop) - var(--lift)), 0) rotate(var(--rot)); transform-origin: 50% 120%;
  z-index: var(--order); backface-visibility: hidden; will-change: transform;
  transition: transform .5s var(--ease), box-shadow .4s, filter .4s; filter: brightness(.72) saturate(.85);
}
@media (hover: hover) and (pointer: fine) {
  .tcard:hover { --lift: 22px; filter: brightness(1) saturate(1); z-index: 20; }
}
.tcard[aria-selected="true"] { --lift: 40px; filter: brightness(1) saturate(1); z-index: 21; box-shadow: 0 0 0 1px var(--gold), 0 0 50px rgba(232, 217, 168, .25), 0 40px 70px rgba(0, 0, 0, .7); }
.tcard .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(232, 217, 168, .35); border-radius: 9px; z-index: 2; pointer-events: none; }
.tcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(7, 8, 12, .5), transparent 30%, transparent 50%, rgba(7, 8, 12, .95)); }
.tcard .num { position: absolute; top: 18px; left: 0; right: 0; text-align: center; z-index: 3; font: italic 400 15px/1 var(--serif); color: var(--gold); }
.tcard .fr { position: absolute; left: 50%; top: 52%; width: 100px; transform: translate(-50%, -50%); z-index: 3; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .7)); }
.tcard .nm { position: absolute; bottom: 22px; left: 10px; right: 10px; text-align: center; z-index: 3; font: 500 16px/1.25 var(--serif); }

.deck-result { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 40px; }
.deck-note p { color: var(--muted); font-size: 16px; margin-bottom: 26px; max-width: 460px; }
.saying { margin: 0 0 26px; max-width: 470px; transition: opacity .3s; }
.saying span { display: block; font: italic 400 clamp(21px, 2vw, 25px)/1.45 var(--serif); color: #e6dcc2; }
.saying cite { display: block; margin-top: 10px; font: normal 400 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
/* рубашка «ещё N» */
.tcard.back { background: radial-gradient(circle at 50% 42%, #1b1a22, #0b0b10 70%); filter: none; }
.tcard.back::after { background: repeating-conic-gradient(from 0deg at 50% 42%, rgba(232, 217, 168, .05) 0 6deg, transparent 6deg 18deg); }
.tcard.back .bk-moon { position: absolute; left: 50%; top: 42%; width: 64px; height: 64px; transform: translate(-50%, -50%); z-index: 3; color: var(--gold);
  filter: drop-shadow(0 0 14px rgba(232, 217, 168, .6)); }
.tcard.back .bk-num { position: absolute; left: 0; right: 0; bottom: 56px; z-index: 3; text-align: center; font: 500 30px/1 var(--serif); color: var(--gold); }
.tcard.back .nm { font: italic 400 14px/1.3 var(--serif); color: var(--muted); }
.tcard.back:hover .bk-moon { transform: translate(-50%, -50%) rotate(-12deg) scale(1.08); transition: transform .5s var(--ease); }

.pcard { width: min(500px, 100%); justify-self: end; border-radius: 16px; overflow: hidden; background: #0e0e13; border: 1px solid var(--hair-2);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 80px var(--accent-glow, rgba(220, 40, 70, .18)); transition: box-shadow .8s; }
.pcard-banner { height: 150px; overflow: hidden; position: relative; }
.pcard-banner img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; animation: pan 18s ease-in-out infinite alternate; }
@keyframes pan { to { transform: scale(1.12) translateX(-3%); } }
.pcard-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, #0e0e13); }
.pcard-body { display: flex; gap: 16px; align-items: flex-end; padding: 0 22px 24px; margin-top: -54px; position: relative; }
.pcard-ava { --fs: 124px; width: var(--fs); height: var(--fs); position: relative; flex: none; }
.ava { /* размер и центр — по дырке конкретной рамки (--hole, --cx, --cy в долях 200px) */
  position: absolute; width: calc(var(--fs) * var(--hole, 46) / 100 * 1.06); aspect-ratio: 1;
  left: calc(var(--fs) * var(--cx, 100) / 200); top: calc(var(--fs) * var(--cy, 100) / 200); transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-items: center; font: 600 28px/1 var(--serif); color: #fff;
  background: radial-gradient(circle at 35% 30%, #3a3442, #15131a); transition: width .4s var(--ease), left .4s, top .4s; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .4s; }
.pcard-who { padding-bottom: 10px; }
.online { font-size: 12px; color: #6fd39a; display: flex; align-items: center; gap: 6px; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nick { display: block; font: 700 26px/1.15 var(--sans); letter-spacing: -.02em; margin: 2px 0 4px;
  background: linear-gradient(90deg, var(--n1, #ff4d6d), var(--n2, #ffb3c1), var(--n1, #ff4d6d)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 4s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.lvl { font-size: 13px; color: var(--muted); }
.fade-swap { opacity: 0 !important; }

/* ───── Vision: телевизор ───── */
.tv { position: relative; width: min(1000px, 100%); margin: 70px auto 0; }
.tv-screen { position: relative; border-radius: 10px; overflow: hidden; border: 10px solid #101116; box-shadow: 0 0 0 1px var(--hair-2), 0 0 24px rgba(0, 0, 0, .25); }
.tv-screen img { width: 100%; height: auto; }
.tv-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(7, 8, 12, .55)); }
.tv-glow { position: absolute; inset: 40% 5% -20%; z-index: -1; filter: blur(80px); background: radial-gradient(closest-side, rgba(120, 150, 220, .22), transparent); }
.tv-notes { list-style: none; padding: 0; margin: 56px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1000px; }
.tv-notes li { color: var(--muted); font-size: 15px; text-align: center; }
.tv-notes b { display: block; font: 500 19px/1.3 var(--serif); color: var(--ink); margin-bottom: 8px; }

/* ───── Город: гравированная карта ───── */
.city-map { margin: 64px auto 0; max-width: 1080px; position: relative; }
.city-map::before { content: ""; position: absolute; inset: 10% 20%; border-radius: 50%; filter: blur(80px); background: rgba(232, 217, 168, .06); }
.map-frame { padding: 14px; background: rgba(9, 10, 15, .7); }
.map-frame svg { width: 100%; height: auto; max-width: none; display: block; }
.city-map .lbl { font: italic 400 19px var(--serif); fill: var(--gold); text-anchor: middle; letter-spacing: .02em; }
.city-map .lbl.sm { font-size: 15px; }
.city-map .lbl.xs { font-size: 12px; fill: var(--muted); text-anchor: start; }
.city-map .cart { font: 700 13px "Unbounded", var(--sans); letter-spacing: .32em; fill: var(--gold); text-anchor: middle; }
.city-map .win { fill: #f0dca0; animation: win var(--d, 7s) ease-in-out infinite var(--dl, 0s); }
@keyframes win { 0%, 70%, 100% { opacity: 1; } 78%, 92% { opacity: .12; } }
.city-map .rays { transform-box: view-box; transform-origin: 500px 214px; animation: spin 60s linear infinite; }
.city-map .lamp-glow { transform-box: fill-box; transform-origin: center; animation: lamp 4s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: .65; transform: scale(.92); } }
.city-map .mine-ring { transform-box: fill-box; transform-origin: center; animation: spin 24s linear infinite; }
.city-map .rose { transform-box: fill-box; transform-origin: center; }
.map-hint { display: none; }
.quad { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 50px; border-top: 1px solid var(--hair-2); }
.quad article { padding: 34px 28px 10px; }
.quad article + article { border-left: 1px solid var(--hair-2); }
.quad h3 { font-size: 22px; font-weight: 500; }
.quad h3::before { content: "✦"; color: var(--gold-2); font-size: 11px; margin-right: 10px; vertical-align: middle; }
.quad p { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* ───── Оглавление расширений ───── */
.toc { list-style: none; counter-reset: t; padding: 0; margin: 60px 0 0; }
.toc li { counter-increment: t; display: flex; align-items: baseline; gap: 14px; padding: 16px 0; font-size: 15.5px; color: var(--muted); }
.toc li::before { content: counter(t, upper-roman) "."; font: italic 400 16px/1 var(--serif); color: var(--gold-2); width: 36px; flex: none; }
.toc b { font: 400 22px/1.3 var(--serif); color: var(--ink); white-space: nowrap; }
.toc .dots { flex: 1; border-bottom: 1px dotted rgba(232, 217, 168, .3); transform: translateY(-5px); min-width: 30px; }
.toc li span:last-child { text-align: right; }
.toc li.soon b { color: var(--dim); }
.toc li.soon span:last-child { font: italic 400 16px/1 var(--serif); color: var(--gold-2); }

/* ───── FAQ ───── */
.faq { margin-top: 50px; }
.faq details { border-bottom: 1px solid var(--hair-2); }
.faq details:first-child { border-top: 1px solid var(--hair-2); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 50px 24px 0; position: relative; font: 400 20px/1.4 var(--serif); transition: color .25s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 300 28px/1 var(--sans); color: var(--gold); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--gold); }
.faq details p { color: var(--muted); padding: 0 50px 26px 0; }
.faq a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ───── Финал: луна наполняется светом ───── */
.final { position: relative; padding: 146px 0 150px; text-align: center; overflow-x: clip; }
.final::before { content: ""; position: absolute; left: 50%; top: 200px; width: 1100px; height: 700px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(232, 217, 168, calc(.12 * var(--lit, 0))), transparent 68%); transition: background .3s; }
.final-in { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 24px; }
.phase { --s: 300px; position: relative; width: var(--s); height: var(--s); margin-bottom: 44px; }
.astro { position: absolute; inset: -24%; width: 148%; height: 148%; max-width: none; opacity: calc(.25 + .75 * var(--lit, 0)); animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.astro .ring { fill: none; stroke: rgba(232, 217, 168, .28); stroke-width: .4; }
.astro .ring.thin { stroke: rgba(232, 217, 168, .14); stroke-dasharray: 1 2; }
.astro .tick { stroke: rgba(232, 217, 168, .45); stroke-width: .4; }
.astro text { font: italic 5px var(--serif); fill: rgba(232, 217, 168, .7); }
.astro .star { fill: var(--gold); }
.phase::before { content: ""; position: absolute; inset: -70%; border-radius: 50%; pointer-events: none; transition: opacity .5s;
  background: radial-gradient(circle, rgba(240, 224, 170, .42) 0%, rgba(240, 224, 170, .12) 32%, transparent 62%); opacity: calc(var(--lit, 0) * .85); }
.phase::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(232, 217, 168, .16); pointer-events: none; }
.phase-moon { position: absolute; inset: 0; border-radius: 50%; clip-path: circle(50% at 50% 50%); }
.pm-disc { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fffaf0 0%, #f2e8cf 30%, #d7c9a4 62%, #a8997a 100%); }
.pm-disc i { position: absolute; inset: 0; border-radius: 50%; opacity: .38; filter: blur(1.5px);
  background:
    radial-gradient(circle at 30% 30%, rgba(150, 132, 100, .55) 0 7%, transparent 13%),
    radial-gradient(circle at 58% 24%, rgba(150, 132, 100, .4) 0 5%, transparent 10%),
    radial-gradient(ellipse 18% 14% at 46% 58%, rgba(150, 132, 100, .55), transparent 70%),
    radial-gradient(circle at 70% 62%, rgba(150, 132, 100, .45) 0 8%, transparent 15%),
    radial-gradient(circle at 36% 76%, rgba(150, 132, 100, .35) 0 4%, transparent 9%),
    radial-gradient(circle at 78% 40%, rgba(150, 132, 100, .3) 0 3%, transparent 7%); }
.pm-shadow { position: absolute; inset: -8%; background: radial-gradient(circle, #0a0b10 64%, rgba(10, 11, 16, 0) 71%);
  transform: translateX(var(--ph, 0%)); }
.final.ignite .phase::before { opacity: 1; inset: -85%; transition: opacity .5s, inset .8s var(--ease); }
.final.ignite .astro { opacity: 1; }
.final.ignite::before { background: radial-gradient(ellipse at center, rgba(232, 217, 168, .2), transparent 68%); }
.final h2 { font-size: clamp(48px, 7vw, 96px); font-weight: 400; }
.meta { margin-top: 24px; font-size: 12.5px; color: var(--dim); font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.download-note { max-width: 460px; margin: 16px auto 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.download-modal[hidden] { display: none; }
.download-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.download-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 8, .78); backdrop-filter: blur(8px); }
.download-panel { position: relative; width: min(560px, 100%); padding: 34px; border: 1px solid var(--hair); border-radius: 18px; background: linear-gradient(145deg, #171821, #0b0c11 72%); box-shadow: 0 30px 100px rgba(0,0,0,.7), 0 0 60px rgba(232,217,168,.08); }
.download-close { position: absolute; top: 15px; right: 17px; width: 32px; height: 32px; border: 1px solid var(--hair); border-radius: 50%; background: transparent; color: var(--muted); font: 24px/1 var(--sans); cursor: pointer; }
.download-close:hover { color: var(--gold); border-color: var(--gold); }
.download-kicker { color: var(--gold); font-size: 11px; letter-spacing: .16em; }
.download-panel h2 { margin-top: 12px; font-size: clamp(30px, 5vw, 44px); }
.download-lead { margin-top: 8px; color: var(--muted); }
.platform-grid { display: grid; gap: 10px; margin-top: 26px; }
.platform-card { position: relative; display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 12px 15px; border: 1px solid var(--hair-2); border-radius: 14px; color: var(--ink); overflow: hidden; transition: border-color .3s, background .3s, transform .35s var(--ease), box-shadow .35s; }
.platform-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.08) 48%, transparent 72%); transform: translateX(-120%); transition: transform .65s var(--ease); pointer-events: none; }
.platform-card.is-active { border-color: rgba(232,217,168,.42); background: linear-gradient(105deg, rgba(232,217,168,.13), rgba(232,217,168,.035)); }
.platform-card.is-active:hover { border-color: var(--gold); background: linear-gradient(105deg, rgba(232,217,168,.2), rgba(232,217,168,.06)); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.25), 0 0 24px rgba(232,217,168,.08); }
.platform-card.is-active:hover::before { transform: translateX(120%); }
.platform-card.is-disabled { opacity: .62; cursor: default; }
.platform-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 11px; color: var(--gold); font-size: 20px; flex: none; transition: transform .35s var(--ease), background .3s; }
.platform-icon svg { width: 23px; height: 23px; fill: currentColor; }
.platform-card.is-active:hover .platform-icon { transform: scale(1.08) rotate(-4deg); background: rgba(232,217,168,.1); }
.platform-card span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.platform-card b { font-size: 16px; font-weight: 500; }
.platform-card small { color: var(--muted); font-size: 12px; }
.platform-card i { color: var(--gold-2); font-size: 12px; font-style: normal; white-space: nowrap; }
.platform-action { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(232,217,168,.5); border-radius: 50%; background: rgba(232,217,168,.08); transition: color .3s, background .3s, border-color .3s, transform .35s var(--ease); }
.platform-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.platform-card.is-active:hover .platform-action { color: #17130a; background: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.platform-card.is-disabled i { color: var(--dim); }
body.modal-open { overflow: hidden; }
@media (max-width: 560px) { .download-panel { padding: 28px 18px 22px; } .platform-card { min-height: 64px; } }

.foot { border-top: 1px solid var(--hair-2); padding: 36px 0 42px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
.foot nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.foot nav a:hover { color: var(--gold); }
.foot small { margin-left: auto; color: var(--dim); font-size: 13px; }

/* ───── Появление ───── */
.js .rv { opacity: 0; transform: translateY(24px); filter: blur(4px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.js .rv.in { opacity: 1; transform: none; filter: none; }
.trio .rv:nth-child(2), .tv-notes .rv:nth-child(2) { transition-delay: .12s; }
.trio .rv:nth-child(3), .tv-notes .rv:nth-child(3) { transition-delay: .24s; }

/* ───── Адаптив ───── */
@media (max-width: 1100px) {
  .deck { justify-content: flex-start; overflow-x: auto; overflow-y: hidden; height: auto; padding: 32px 24px 40px; margin: 40px -24px 0;
    scroll-snap-type: x mandatory; scroll-padding-inline: 24px; overscroll-behavior-x: contain; perspective: none; scrollbar-width: none;
    /* Тени затухают до границы скролла, а не обрезаются горизонтальной полосой. */
    mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(transparent, #000 20px, #000 calc(100% - 24px), transparent); }
  .deck::-webkit-scrollbar { display: none; }
  .deck-hint { display: block; margin: 0; text-align: center; font: italic 400 13px/1.6 var(--serif); color: var(--gold-2); }
  .tcard { margin: 0 7px; --rot: 0deg !important; --drop: 0px !important; scroll-snap-align: center;
    box-shadow: 0 0 0 1px var(--hair), 0 6px 12px rgba(0, 0, 0, .25); }
  .tcard[aria-selected="true"] { --lift: 8px;
    box-shadow: 0 0 0 1px var(--gold), 0 0 12px rgba(232, 217, 168, .12), 0 8px 16px rgba(0, 0, 0, .25); }
}
@media (max-width: 1100px) and (hover: hover) and (pointer: fine) {
  .tcard:hover:not([aria-selected="true"]) { --lift: 4px; }
}
@media (max-width: 1000px) {
  .quad { grid-template-columns: 1fr 1fr; }
  .quad article:nth-child(3) { border-left: 0; }
  .nav-links { display: none; }
  .two, .deck-result { grid-template-columns: 1fr; gap: 50px; }
  .pcard { justify-self: center; }
  .deck-note { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .moon { width: 130px; height: 130px; top: 96px; }
}
@media (max-width: 760px) {
  .hero { padding-top: 130px; }
  .moon { width: 64px; height: 64px; right: 7vw; top: 92px; }
  .kicker { margin-top: 30px; }
  .kicker::before, .kicker::after { display: none; }
  .hero-land { top: 320px; height: 420px; }
  .hero-window { margin-top: 56px; width: calc(100% - 28px); }
  .frame-gold { padding: 6px; }
  .chapter { padding: 56px 0 64px; }
  .orn { padding: 18px 0; }
  .chapter h2 { font-size: clamp(32px, 9vw, 44px); }
  .body { font-size: 16px; margin-top: 16px; }
  .numeral { margin-bottom: 14px; }
  .two { gap: 36px; }
  .star-node em { display: none; }
  .launchers { font-size: 17px; margin-top: 24px; }
  .trio { margin-top: 40px; }
  .quote { margin-top: 40px; font-size: 19px; }
  .pcard { box-shadow: 0 12px 36px rgba(0, 0, 0, .3), 0 0 40px var(--accent-glow, rgba(220, 40, 70, .18)); }
  .deck-result { margin-top: 20px; gap: 34px; }
  .tv { margin-top: 40px; }
  .tv-screen { border-width: 6px; }
  .tv-notes { margin-top: 34px; }
  .city-map { margin-top: 36px; }
  .map-frame { padding: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .map-frame::-webkit-scrollbar { display: none; }
  .map-frame svg { width: 780px; }
  .map-hint { display: block; text-align: center; margin-top: 14px; font: italic 400 14px/1 var(--serif); color: var(--gold-2); }
  .quad { margin-top: 30px; }
  .toc { margin-top: 34px; }
  .toc li { padding: 12px 0; }
  .faq { margin-top: 30px; }
  .faq summary { font-size: 18px; padding: 20px 40px 20px 0; }
  .hero-window { margin-top: 44px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 56px); }
  .trio { grid-template-columns: 1fr; }
  .trio article + article { border-left: 0; border-top: 1px solid var(--hair-2); }
  .trio article { padding: 34px 6px; }
  .tcard { width: 150px; height: 250px; }
  .tcard .fr { width: 92px; }
  .tv-notes { grid-template-columns: 1fr; gap: 26px; }
  .constel { width: 84%; }
  .star-node img { width: 44px; height: 44px; }
  .constel-core { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .toc b { font-size: 18px; white-space: normal; }
  .toc li { flex-wrap: wrap; }
  .toc .dots { display: none; }
  .toc li span:last-child { width: 100%; padding-left: 50px; text-align: left; margin-top: -8px; }
  .final { padding: 122px 0 120px; }
  .phase { --s: 200px; }
  .quad { grid-template-columns: 1fr; }
  .quad article + article { border-left: 0; border-top: 1px solid var(--hair-2); }
  .quad article { padding: 26px 4px 20px; }
  .city-tags span { font-size: 12px; }
  .pcard-ava { --fs: 104px; }
  .foot small { margin-left: 0; }
}
/* Keep the whole astrolabe below the fixed header and in view after the download jump. */
@media (max-height: 760px) {
  .final { padding-top: calc(84px + clamp(140px, 40svh, 280px) * .24); }
  .phase { --s: clamp(140px, 40svh, 280px); margin-bottom: 30px; }
}
@media (max-height: 760px) and (max-width: 600px) {
  .final { padding-top: calc(84px + min(200px, 40svh) * .24); }
  .phase { --s: min(200px, 40svh); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; filter: none; }
  .dust { display: none; }
}

/* ═══════════ Страница-документ (privacy) ═══════════ */
.nav-back { font-size: 14px; color: #c9c3b4; display: inline-flex; gap: 8px; transition: color .25s; }
.nav-back:hover { color: var(--gold); }
.doc-hero { position: relative; padding: 170px 0 30px; overflow: hidden; text-align: center; }
.doc-hero .sky { mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent); }
.doc-hero .stars { inset: 0; }
.moon.small { width: 96px; height: 96px; top: 110px; right: max(5vw, calc(50% - 560px)); }
.doc-hero-in { display: flex; flex-direction: column; align-items: center; position: relative; }
.doc-hero h1 { font-size: clamp(40px, 6vw, 80px); font-weight: 400; margin-top: 22px; }
.doc { display: grid; grid-template-columns: 250px 1fr; gap: 80px; align-items: start; padding: 30px 0 130px; }
.doc-toc { position: sticky; top: 110px; }
.doc-toc ol { list-style: none; counter-reset: t; padding: 0; margin: 0; border-left: 1px solid var(--hair-2); }
.doc-toc li { counter-increment: t; }
.doc-toc a { display: flex; gap: 12px; padding: 8px 0 8px 18px; font-size: 14.5px; color: var(--muted); position: relative; transition: color .25s; }
.doc-toc a::before { content: counter(t, upper-roman); font: italic 400 13px/1.6 var(--serif); color: var(--gold-2); width: 30px; flex: none; }
.doc-toc a:hover, .doc-toc a.on { color: var(--ink); }
.doc-toc a.on::after { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; background: var(--gold); }
.doc-body { max-width: 720px; }
.doc-body article { padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid var(--hair-2); scroll-margin-top: 110px; }
.doc-body .numeral { margin-bottom: 12px; }
.doc-body h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 400; margin-bottom: 18px; }
.doc-body p, .doc-body li { color: #bdb6a6; font-size: 16.5px; }
.doc-body p + p, .doc-body ul + p { margin-top: 14px; }
.doc-body ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.doc-body li { padding-left: 26px; position: relative; }
.doc-body li::before { content: "✦"; position: absolute; left: 2px; top: 1px; font-size: 10px; color: var(--gold-2); }
.doc-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.doc-note { margin: 10px 0 0; font: 400 20px/1.55 var(--serif); color: #d6cfbe; padding-left: 24px; border-left: 2px solid var(--gold-2); }
.doc-note em { color: var(--gold); }
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 40px; }
  .doc-toc { position: static; }
  .doc-toc ol { display: grid; grid-template-columns: 1fr 1fr; border-left: 0; gap: 0 16px; }
  .doc-toc a { padding-left: 0; }
  .nav-back { display: none; }
}
@media (max-width: 760px) {
  .doc-hero { padding: 130px 0 10px; }
  .moon.small { width: 54px; height: 54px; top: 96px; right: 7vw; }
  .doc-toc { display: none; }
  .doc-hero h1 { font-size: clamp(30px, 8.4vw, 44px); }
  .doc-body p, .doc-body li { font-size: 15.5px; }
  .doc { padding-bottom: 90px; }
}
