/* «Altyn Taq» («Алтын тақ» — «Золотой трон»): рубиновый бархат, золото, слоновая кость и яркие флажки с фасада сада.
   Эмблема-трон оживает и «сажает» на себя маленького хана; факты о саде — золотые монеты; залы — в золотых рамах. */

/* ---------- Шрифты: Yeseva One (заголовки) и Commissioner (текст), с казахскими буквами ә ғ қ ң ө ұ ү һ і ---------- */
@font-face { font-family: "Yeseva One"; font-weight: 400; font-display: swap; src: url("../assets/fonts/yeseva-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Yeseva One"; font-weight: 400; font-display: swap; src: url("../assets/fonts/yeseva-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Yeseva One"; font-weight: 400; font-display: swap; src: url("../assets/fonts/yeseva-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Commissioner"; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/commissioner-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Commissioner"; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/commissioner-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Commissioner"; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/commissioner-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ruby: #8a1432; --ruby-d: #5b0f26; --ruby-dd: #3d0a1a; --ruby-l: #c2294d;
  --gold: #f2b632; --gold-l: #ffe08a; --gold-d: #b57a10; --gold-dd: #7a4a05;
  --ivory: #fff8ec; --cream: #fbeed2; --paper: #fffdf8;
  --emerald: #1f9a5a; --sky: #4db3e6; --orange: #f28a1e;
  --ink: #2a1118; --ink-soft: #6b4a52; --line: rgba(91, 15, 38, .16);
  --head: "Yeseva One", Georgia, "Times New Roman", serif;
  --body: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --goldgrad: linear-gradient(135deg, #fff0b8 0%, #f2b632 35%, #d79a1b 62%, #ffe08a 82%, #b57a10 100%);
  --bar-h: 74px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.05rem/1.65 var(--body); overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--ruby); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 90; padding: 10px 16px; border-radius: 12px; background: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.12; color: var(--ruby-d); }
h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); text-wrap: balance; }
h3 { font-size: 1.45rem; }

/* ---------- Кнопки и плашки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 30px; border: 0; border-radius: 14px; cursor: pointer; font-family: var(--body); font-weight: 700; font-size: .95rem; letter-spacing: .04em; text-decoration: none; transition: transform .2s, box-shadow .2s, filter .2s; }
.btn-main { background: var(--goldgrad); color: #3d2000; box-shadow: 0 6px 0 var(--gold-dd), 0 14px 26px rgba(0, 0, 0, .3); }
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--gold-dd), 0 18px 30px rgba(0, 0, 0, .34); filter: brightness(1.05); }
.btn-main:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-dd); }
.btn-line { border: 2px solid rgba(255, 224, 138, .7); color: var(--gold-l); background: rgba(255, 255, 255, .05); }
.btn-line:hover { background: rgba(255, 224, 138, .15); transform: translateY(-3px); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ruby); }
.kicker::before, .kicker::after { content: ""; width: 26px; height: 8px; background: radial-gradient(circle at 4px 4px, var(--gold) 0 3px, transparent 3.5px) 0 0 / 13px 8px repeat-x; }
.lede { max-width: 60ch; color: var(--ink-soft); font-size: 1.1rem; text-wrap: pretty; }

/* ---------- Шапка и гирлянда флажков ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--ivory); transition: background .3s, color .3s, box-shadow .3s; }
.top.is-stuck { background: rgba(255, 248, 236, .94); backdrop-filter: blur(12px); color: var(--ink); box-shadow: 0 6px 24px rgba(91, 15, 38, .14); }
.top-in { display: flex; align-items: center; gap: 20px; width: min(1240px, 100% - 32px); min-height: var(--bar-h); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); transition: rotate .7s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { rotate: 360deg; }
.brand-text strong { display: block; white-space: nowrap; font-family: var(--head); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.brand-text small { display: block; white-space: nowrap; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.menu { display: flex; justify-content: center; flex: 1; gap: 2px; }
.menu a { white-space: nowrap; padding: 9px 14px; border-radius: 12px; color: inherit; font-weight: 600; font-size: .93rem; text-decoration: none; transition: background .2s, color .2s; }
.menu a:hover { background: rgba(255, 224, 138, .18); }
.top.is-stuck .menu a:hover { background: var(--cream); }
.menu a.is-active { background: var(--goldgrad); color: #3d2000; }
.chips { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 44px; padding: 0 16px; border: 1.5px solid rgba(255, 224, 138, .6); border-radius: 12px; background: transparent; color: inherit; font-weight: 700; font-size: .9rem; text-decoration: none; transition: background .2s; }
.top.is-stuck .chip { border-color: var(--line); }
.chip:hover { background: var(--gold); color: #3d2000; }
.chip-menu { display: none; justify-content: center; width: 44px; padding: 0; cursor: pointer; }
.bunting { display: flex; overflow: hidden; pointer-events: none; line-height: 0; }
.bunting-top { position: absolute; left: 0; right: 0; top: calc(100% - 6px); height: 64px; }
.bseg { flex: none; }
.fl { transform-box: fill-box; transform-origin: 50% 0; }
.js .fl { animation: flutter 2.6s ease-in-out calc(var(--i) * -.45s) infinite; }
@keyframes flutter { 0%, 100% { transform: rotate(-5deg) skewX(2deg); } 50% { transform: rotate(6deg) skewX(-3deg); } }

/* ---------- Первый экран: рубиновый бархат, золотая пыль, трон ---------- */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--bar-h) + 74px) 0 70px; overflow: hidden; color: var(--ivory);
  background: radial-gradient(ellipse at 72% 42%, #b02447 0, rgba(176, 36, 71, 0) 56%), radial-gradient(ellipse at 10% 100%, #7a1230 0, rgba(122, 18, 48, 0) 50%), linear-gradient(180deg, #4d0c20 0%, #5b0f26 60%, #3d0a1a 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23f2b632' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M60 60C44 60 36 46 44 36C52 26 66 32 62 42C60 48 52 47 53 43'/%3E%3Cpath d='M60 60C76 60 84 74 76 84C68 94 54 88 58 78C60 72 68 73 67 77'/%3E%3C/g%3E%3C/svg%3E"); background-size: 120px 120px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.curtain { position: absolute; top: 0; bottom: 0; width: clamp(46px, 7vw, 120px); background: repeating-linear-gradient(90deg, #6e0e29 0 12px, #b02447 12px 24px, #8a1432 24px 38px, #5b0f26 38px 48px); box-shadow: 0 0 60px rgba(0, 0, 0, .55); }
.curtain::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; background: var(--goldgrad); }
.curtain-l { left: 0; border-radius: 0 0 40% 0 / 0 0 6% 0; } .curtain-l::after { right: 0; }
.curtain-r { right: 0; border-radius: 0 0 0 40% / 0 0 0 6%; } .curtain-r::after { left: 0; }
.js .curtain-l { animation: drape-l 1.6s cubic-bezier(.3, .8, .2, 1) backwards; } .js .curtain-r { animation: drape-r 1.6s cubic-bezier(.3, .8, .2, 1) backwards; }
@keyframes drape-l { from { transform: translateX(-100%); } } @keyframes drape-r { from { transform: translateX(100%); } }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(20px, 4vw, 60px); }
.hero-text { display: grid; justify-items: start; gap: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; font-size: .8rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-l); }
.eyebrow span { width: 42px; height: 2px; background: var(--goldgrad); }
h1 { display: grid; gap: 0; line-height: .88; }
.h-pre { font-family: var(--head); font-size: clamp(2.4rem, 1.2rem + 5vw, 5.2rem); letter-spacing: .02em; color: var(--ivory); text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.h-main { font-family: var(--head); font-size: clamp(5rem, 2rem + 14vw, 12.5rem); letter-spacing: .01em; background: var(--goldgrad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .4)); }
.js .h-main { animation: goldflow 7s ease-in-out infinite; }
@keyframes goldflow { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.hero-slogan { font-family: var(--head); font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem); line-height: 1.2; color: var(--gold-l); text-wrap: balance; }
.hero-lead { max-width: 46ch; color: #f1d5da; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 12px; padding-top: 18px; border-top: 1px solid rgba(255, 224, 138, .3); width: 100%; }
.hero-stats li { display: grid; gap: 0; }
.hero-stats strong { font-family: var(--head); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; color: var(--gold); }
.hero-stats strong.txt { font-size: clamp(1.4rem, 2vw, 1.8rem); padding-top: .4em; }
.hero-stats span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #f1d5da; }
.hero-throne { position: relative; justify-self: center; width: min(100%, 480px, calc(66svh * .91)); }
.throne-hint { margin-top: 10px; text-align: center; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 224, 138, .8); }
.at-coin { will-change: transform; }

/* ---------- Разделы ---------- */
.section { position: relative; padding: clamp(68px, 9vw, 116px) 0; }
.head { display: grid; justify-items: start; gap: 14px; margin-bottom: clamp(28px, 4vw, 50px); }
.head-center { justify-items: center; text-align: center; }
.head-center .lede { margin-inline: auto; }

/* О саде: золотая рама и сокровищница */
.about { background: var(--ivory); }
.about::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e8c26a' stroke-opacity='.4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M60 60C44 60 36 46 44 36C52 26 66 32 62 42C60 48 52 47 53 43'/%3E%3Cpath d='M60 60C76 60 84 74 76 84C68 94 54 88 58 78C60 72 68 73 67 77'/%3E%3C/g%3E%3C/svg%3E"); background-size: 120px 120px; mask-image: linear-gradient(180deg, #000 0, transparent 40%); -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 40%); }
.about-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-text { display: grid; gap: 16px; justify-items: start; }
.about-text .head { margin-bottom: 4px; }
.gilt { position: relative; justify-self: center; width: min(100%, 460px); rotate: 1.2deg; transition: rotate .5s cubic-bezier(.3, 1.4, .5, 1); }
.gilt:hover { rotate: 0deg; }
.gilt-in { position: relative; padding: 16px; background: var(--goldgrad); box-shadow: 0 24px 50px rgba(91, 15, 38, .3), inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 0 0 5px rgba(122, 74, 5, .45); }
.gilt-in::before, .gilt-in::after { content: ""; position: absolute; width: 34px; height: 34px; border: 3px solid rgba(122, 74, 5, .7); pointer-events: none; z-index: 2; }
.gilt-in::before { left: 6px; top: 6px; border-right: 0; border-bottom: 0; }
.gilt-in::after { right: 6px; bottom: 6px; border-left: 0; border-top: 0; }
.gilt-in img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; box-shadow: 0 0 0 3px rgba(122, 74, 5, .55); }
.js .gilt-in img { animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { scale: 1; } to { scale: 1.07; } }
.gilt-in { overflow: hidden; }
.gilt figcaption { position: absolute; left: 50%; bottom: -18px; translate: -50% 0; z-index: 3; }
.gilt figcaption span { display: inline-block; padding: 8px 26px; border-radius: 4px; background: linear-gradient(180deg, var(--ruby-l), var(--ruby-d)); color: var(--gold-l); font-family: var(--head); font-size: 1.1rem; box-shadow: 0 8px 20px rgba(91, 15, 38, .4), inset 0 0 0 2px rgba(255, 224, 138, .6); white-space: nowrap; }

.vault { position: relative; margin-top: clamp(56px, 7vw, 90px); padding: clamp(26px, 4vw, 48px); border-radius: 40px; background: radial-gradient(ellipse at 50% 0, #a3203f 0, rgba(163, 32, 63, 0) 60%), linear-gradient(180deg, #5b0f26, #3d0a1a); box-shadow: 0 30px 70px rgba(91, 15, 38, .35), inset 0 0 0 3px rgba(255, 224, 138, .5), inset 0 0 0 8px rgba(91, 15, 38, .9), inset 0 0 0 10px rgba(255, 224, 138, .25); }
.vault-head { display: grid; gap: 4px; margin-bottom: 26px; text-align: center; }
.vault-head h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--gold-l); }
.vault-head p { color: #f1d5da; }
.coins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 30px); }
.coin-cell { display: grid; justify-items: center; gap: 10px; }
.coin { width: 100%; aspect-ratio: 1; max-width: 220px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; }
.coin-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, 1.35, .4, 1); }
.coin.is-flip .coin-in { transform: rotateY(180deg); }
.coin-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 16%; border-radius: 50%; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: radial-gradient(circle at 32% 26%, #fff3c4 0, #f2b632 42%, #cf931a 76%, #8d5d08 100%); color: var(--ruby-d);
  box-shadow: inset 0 0 0 6px rgba(255, 244, 196, .5), inset 0 0 0 9px rgba(122, 74, 5, .55), inset 0 -10px 18px rgba(122, 74, 5, .35), 0 16px 28px rgba(0, 0, 0, .45); }
.coin-face::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(122, 74, 5, .5) 0 2.5deg, transparent 2.5deg 5deg); -webkit-mask: radial-gradient(circle, transparent 0 90%, #000 91%); mask: radial-gradient(circle, transparent 0 90%, #000 91%); }
.coin-face::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%); background-size: 260% 100%; background-position: 130% 0; pointer-events: none; }
.js .coin-face::after { animation: coin-sheen 5s ease-in-out calc(var(--i, 0) * .7s) infinite; }
@keyframes coin-sheen { 0%, 60% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
.coin-back { transform: rotateY(180deg); background: radial-gradient(circle at 32% 26%, #fff8d6 0, #ffd75a 45%, #e0a21e 80%, #a87008 100%); }
.coin-ico { width: 2.5rem; height: 2.5rem; stroke-width: 1.8; color: var(--ruby); }
.coin-front b { font-family: var(--head); font-weight: 400; font-size: 1.05rem; line-height: 1.1; }
.cv { font-family: var(--head); font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; color: var(--ruby-d); }
.cv-long { font-size: .88rem; line-height: 1.25; }
.coin-act { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--gold-l); }
.coin-act:hover { color: #fff; }
.about-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 48px; }
.about-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 6px solid #fff; box-shadow: 0 14px 34px rgba(91, 15, 38, .22); }

/* Руководство */
.team { background: var(--cream); }
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 34px; }
.leader { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: center; padding: 26px; background: var(--paper); border-radius: 28px; box-shadow: 0 18px 44px rgba(91, 15, 38, .14), inset 0 0 0 2px rgba(242, 182, 50, .5); }
.leader-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 120px 120px 18px 18px; background: var(--ruby-d); box-shadow: 0 0 0 5px var(--gold), 0 0 0 8px var(--ruby-d); }
.leader-photo > img, .leader-photo > .avatar { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.cn { display: none; }
.leader-years { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 10px; text-align: center; line-height: 1; background: linear-gradient(transparent, rgba(61, 10, 26, .9)); color: var(--gold-l); }
.leader-years strong { font-family: var(--head); font-weight: 400; font-size: 1.8rem; }
.leader-years span { display: block; font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; }
.leader-role { display: inline-block; margin-bottom: 8px; padding: 3px 14px; border-radius: 999px; background: var(--ruby); color: var(--gold-l); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.leader h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.leader-edu { display: grid; gap: 2px; margin-top: 10px; color: var(--ink-soft); }
.leader-edu span { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ruby); }
.leader-about { margin-top: 10px; color: var(--ink-soft); }
.tabset { margin-top: 14px; }
.tabset-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-tab { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--cream); font-weight: 700; font-size: .8rem; color: var(--ink-soft); cursor: pointer; transition: background .2s, color .2s; }
.ts-tab.is-on { background: var(--ruby); color: var(--gold-l); }
.ts-panel { display: none; margin-top: 10px; font-size: .98rem; }
.ts-panel.is-on { display: block; animation: rise .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }

/* Группы: маленькие троны */
.groups { background: var(--cream); }
.thrones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3.4vw, 44px); max-width: 940px; margin-inline: auto; }
.throne { --tone: var(--ruby); --tone-d: var(--ruby-d); position: relative; display: grid; justify-items: center; gap: 8px; padding: 30px 26px 34px; border-radius: 34px; background: var(--paper); text-align: center; box-shadow: 0 20px 46px rgba(91, 15, 38, .16), inset 0 0 0 2px rgba(242, 182, 50, .55); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), box-shadow .4s; }
.tone-gold { --tone: #c28a14; --tone-d: #7a4a05; }
.throne:hover { transform: translateY(-10px); box-shadow: 0 30px 60px rgba(91, 15, 38, .26), inset 0 0 0 2px var(--gold); }
.throne::before { content: ""; position: absolute; left: 50%; top: -10px; width: 120px; height: 20px; translate: -50% 0; border-radius: 999px; background: linear-gradient(180deg, var(--tone), var(--tone-d)); box-shadow: 0 4px 10px rgba(0, 0, 0, .25), inset 0 0 0 2px rgba(255, 224, 138, .6); }
.t-art { width: 150px; margin-bottom: 2px; filter: drop-shadow(0 12px 12px rgba(91, 15, 38, .28)); }
.mini { width: 100%; height: auto; overflow: visible; }
.mini .mc { transition: transform .6s cubic-bezier(.3, 1.8, .4, 1); }
.mini .mt { transition: filter .4s; }
.throne:hover .mini .mt { filter: brightness(1.08); }
.js .mini .mc { animation: crown-float 3.4s ease-in-out infinite; }
.throne:hover .mini .mc { animation: crown-drop .8s cubic-bezier(.3, 1.8, .4, 1) 1; }
@keyframes crown-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes crown-drop { 0% { translate: 0 -24px; rotate: -12deg; } 100% { translate: 0 0; rotate: 0; } }
.t-age { display: inline-block; padding: 5px 22px; border-radius: 999px; background: linear-gradient(180deg, var(--tone), var(--tone-d)); color: var(--gold-l); font-family: var(--head); font-size: 1.3rem; box-shadow: 0 6px 14px rgba(0, 0, 0, .2); }
.throne h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.t-motto { max-width: 24ch; color: var(--ink-soft); }
.t-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 46px; padding: 0 24px; border-radius: 12px; background: var(--goldgrad); color: #3d2000; font-weight: 700; text-decoration: none; box-shadow: 0 5px 0 var(--gold-dd); transition: transform .15s, box-shadow .15s; }
.t-link:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--gold-dd); }

/* Кружки */
.extras { background: var(--ivory); }
.clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 24px; }
.club { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: 28px; overflow: hidden; box-shadow: 0 16px 38px rgba(91, 15, 38, .14), inset 0 0 0 2px rgba(242, 182, 50, .5); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.club:hover { transform: translateY(-7px); }
.club-open { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit; cursor: default; }
button.club-open { cursor: pointer; }
.club-media { position: relative; display: grid; place-items: center; height: 150px; overflow: hidden; background: radial-gradient(circle at 50% 120%, #a3203f, #5b0f26); color: var(--gold); }
.club-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.extra-ico { position: relative; width: 74px; height: 74px; stroke-width: 2.4; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.club:hover .extra-ico { transform: scale(1.12) rotate(-6deg); }
.club-body { display: grid; align-content: start; gap: 6px; padding: 18px 24px 26px; }
.club-title { font-family: var(--head); font-size: 1.4rem; color: var(--ruby-d); }
.club-meta { font-size: .86rem; font-weight: 700; color: var(--ruby); }
.club-text { color: var(--ink-soft); }
.story-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; color: var(--ruby); }
.story-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: rgba(61, 10, 26, .85); color: #fff; font-size: .82rem; font-weight: 700; }

/* Залы: горизонтальная лента фото в золотых рамах */
.gallery { padding-bottom: clamp(56px, 7vw, 96px); background: radial-gradient(ellipse at 50% 0, #7a1230 0, rgba(122, 18, 48, 0) 60%), linear-gradient(180deg, #4d0c20, #3d0a1a); color: var(--ivory); overflow: hidden; }
.gallery h2 { color: var(--gold-l); }
.gallery .kicker { color: var(--gold-l); }
.gallery .lede { color: #f1d5da; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.tab { min-height: 44px; padding: 0 20px; border: 1.5px solid rgba(255, 224, 138, .55); border-radius: 12px; background: transparent; font-weight: 700; font-size: .9rem; color: var(--gold-l); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.tab:hover { transform: translateY(-2px); background: rgba(255, 224, 138, .14); }
.tab.is-on { background: var(--goldgrad); border-color: transparent; color: #3d2000; }
.hall { position: relative; }
.album { display: flex; align-items: center; gap: 30px; padding: 34px max(24px, calc((100vw - 1160px) / 2)) 48px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - 1160px) / 2)); scrollbar-width: none; cursor: grab; }
.album::-webkit-scrollbar { display: none; }
.album.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.album figure { flex: none; scroll-snap-align: start; margin: 0; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.album figure:nth-child(odd) { rotate: -.8deg; } .album figure:nth-child(even) { rotate: .8deg; }
.album figure:hover { transform: translateY(-8px) scale(1.02); rotate: 0deg; }
.album figure[hidden] { display: none; }
.photo-btn { position: relative; display: block; padding: 14px; border: 0; background: var(--goldgrad); cursor: zoom-in; box-shadow: 0 24px 46px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 0 0 5px rgba(122, 74, 5, .5); overflow: hidden; }
.photo-btn::before, .photo-btn::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid rgba(122, 74, 5, .7); pointer-events: none; z-index: 2; }
.photo-btn::before { left: 5px; top: 5px; border-right: 0; border-bottom: 0; } .photo-btn::after { right: 5px; bottom: 5px; border-left: 0; border-top: 0; }
.photo-btn img { display: block; width: auto; height: clamp(250px, 46vh, 420px); max-width: min(82vw, 640px); object-fit: cover; box-shadow: 0 0 0 3px rgba(122, 74, 5, .6); pointer-events: none; }
.photo-btn figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 36px 16px 12px; background: linear-gradient(transparent, rgba(61, 10, 26, .92)); color: var(--gold-l); font-family: var(--head); font-size: 1.15rem; text-align: left; opacity: 0; transition: opacity .3s; }
.photo-btn:hover figcaption, .photo-btn:focus-visible figcaption { opacity: 1; }
.hall-nav { position: absolute; top: 50%; z-index: 5; display: grid; place-items: center; width: 54px; height: 54px; translate: 0 -50%; border: 0; border-radius: 50%; background: var(--goldgrad); color: #3d2000; cursor: pointer; box-shadow: 0 6px 0 var(--gold-dd), 0 14px 26px rgba(0, 0, 0, .4); transition: transform .15s; }
.hall-nav:hover { transform: translateY(calc(-50% - 3px)); } .hall-nav:active { transform: translateY(calc(-50% + 2px)); }
.hall-prev { left: max(10px, calc((100vw - 1260px) / 2)); } .hall-next { right: max(10px, calc((100vw - 1260px) / 2)); }
.hall-hint { text-align: center; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 224, 138, .75); }
.note { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 34px 20px; border: 2px dashed rgba(255, 224, 138, .5); border-radius: 26px; text-align: center; }

/* Новости */
.news { background: var(--ivory); }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 26px; }
.story { overflow: hidden; border-radius: 28px; background: var(--paper); box-shadow: 0 16px 38px rgba(91, 15, 38, .14), inset 0 0 0 2px rgba(242, 182, 50, .5); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.story:hover { transform: translateY(-7px) rotate(-.4deg); }
.story-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; }
.story-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ruby-d); }
.story-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.story:hover .story-img img { transform: scale(1.06); }
.story-img-empty { display: grid; place-items: center; }
.story-img-empty img { width: 40%; height: auto; object-fit: contain; }
.story-body { display: grid; gap: 6px; padding: 18px 24px 26px; }
.story-body time { font-size: .84rem; font-weight: 700; color: var(--ruby); }
.story-title { font-family: var(--head); font-size: 1.3rem; line-height: 1.2; color: var(--ruby-d); }
.story-excerpt { color: var(--ink-soft); font-size: .98rem; }

/* Документы и вакансии */
.docs { background: var(--cream); }
.docs-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.doc-sets { display: grid; gap: 20px; margin-top: 20px; }
.doc-set, .jobs { padding: 26px 28px; border-radius: 26px; background: var(--paper); box-shadow: 0 12px 30px rgba(91, 15, 38, .12); }
.jobs { background: linear-gradient(160deg, var(--ruby), var(--ruby-dd)); color: var(--ivory); }
.jobs h3 { color: var(--gold-l); }
.doc-set h3, .jobs h3 { margin-bottom: 12px; }
.doc-set li { display: grid; gap: 2px; padding: 10px 0; border-top: 2px dotted var(--line); }
.doc-set li:first-child { border-top: 0; }
.doc-set a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ruby-d); }
.doc-set a:hover { color: var(--ruby-l); }
.doc-set a .ico { color: var(--gold-d); }
.doc-set small { margin-left: 32px; color: var(--ink-soft); font-weight: 600; }
.job { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(255, 224, 138, .4); }
.job summary { cursor: pointer; font-weight: 700; }
.job p { margin-top: 8px; color: #f1d5da; }
.job a { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; color: var(--gold-l); }

/* Контакты */
.contact { padding-bottom: 0; background: radial-gradient(ellipse at 20% 0, #7a1230 0, rgba(122, 18, 48, 0) 55%), linear-gradient(180deg, #4d0c20, #2e0714); color: var(--ivory); }
.contact h2 { color: var(--gold-l); }
.contact .kicker { color: var(--gold-l); }
.contact .lede { color: #f1d5da; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.contact-info { display: grid; gap: 14px; justify-items: start; }
.contact-info .head { margin-bottom: 0; }
.contact-phone { font-family: var(--head); font-size: clamp(1.9rem, 3.8vw, 2.8rem); line-height: 1.1; text-decoration: none; background: var(--goldgrad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-list { display: grid; gap: 12px; margin-top: 6px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.contact-list .ico { margin-top: .22em; color: var(--gold); }
.contact-list a { text-underline-offset: 3px; color: var(--gold-l); }
.social-label { margin-top: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; color: #f0c4cc; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.socials a { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1.5px solid rgba(255, 224, 138, .6); border-radius: 12px; font-weight: 700; text-decoration: none; color: var(--gold-l); transition: background .2s, color .2s, transform .2s; }
.socials a:hover { background: var(--gold); color: #3d2000; transform: translateY(-3px); }
.form { position: relative; padding: 42px 36px 34px; border-radius: 34px; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); box-shadow: 0 30px 70px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 224, 138, .5), inset 0 0 0 7px rgba(61, 10, 26, .6), inset 0 0 0 8px rgba(255, 224, 138, .22); }
.seal { position: absolute; top: -32px; right: 30px; display: grid; place-items: center; width: 70px; height: 70px; border: 4px solid var(--gold); border-radius: 50%; background: var(--ruby-d); box-shadow: 0 10px 24px rgba(0, 0, 0, .5); overflow: hidden; rotate: 8deg; }
.seal img { width: 100%; height: 100%; }
.form h3 { max-width: calc(100% - 90px); font-size: 2rem; color: var(--gold-l); }
.form label { display: block; margin: 16px 0 6px; font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #f0c4cc; }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; padding: 13px 16px; border: 1.5px solid rgba(255, 224, 138, .35); border-radius: 14px; background: rgba(30, 4, 14, .5); font-weight: 500; color: #fff; transition: border-color .2s, box-shadow .2s; }
.form input::placeholder, .form textarea::placeholder { color: rgba(255, 255, 255, .45); }
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffe08a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; padding-right: 42px; }
.form select option { color: #2a1118; }
.form textarea { resize: vertical; min-height: 100px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 182, 50, .25); }
.form .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .9rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: #f1d5da; }
.form .consent input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--gold); }
.form .btn { width: 100%; margin-top: 22px; }
.form-note { display: none; margin-top: 14px; font-weight: 700; color: var(--gold-l); }
.form-note.show { display: block; }
.form-note.error { color: #ff9f8f; }
.hp-field { position: absolute; left: -9999px; }
.foot { margin-top: 70px; padding-top: 0; background: #230510; }
.bunting-foot { height: 64px; margin-top: -10px; }
.foot-bye { margin-top: 6px; text-align: center; font-family: var(--head); font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--gold-l); padding: 0 16px; }
.foot-in { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 26px; padding: 22px 0 28px; }
.foot-in img { flex: none; border-radius: 50%; }
.foot-in p { margin-right: auto; font-weight: 500; color: #d9a9b3; }
.foot-in a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--gold-l); }
.foot-in a:hover { color: #fff; }

/* Просмотр фото и новости */
.lightbox { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: rgba(30, 4, 14, .94); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 80vh; max-width: min(1000px, 78vw); padding: 10px; background: var(--goldgrad); box-shadow: 0 30px 70px rgba(0, 0, 0, .6); }
.lightbox figcaption { margin-top: 12px; color: var(--gold-l); font-family: var(--head); font-size: 1.3rem; }
.lb-close, .lb-nav, .nd-close, .nd-nav { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--goldgrad); color: #3d2000; cursor: pointer; box-shadow: 0 5px 0 var(--gold-dd); }
.lb-close { position: absolute; top: 16px; right: 16px; }
.news-dialog { width: min(780px, calc(100% - 24px)); max-height: 90vh; padding: 0; border: 0; border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); overflow: auto; }
.news-dialog::backdrop { background: rgba(30, 4, 14, .8); }
.nd-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.nd-stage { position: relative; background: #230510; }
.nd-img { display: block; width: 100%; height: min(58vh, 470px); object-fit: contain; }
.nd-nav { position: absolute; top: 50%; translate: 0 -50%; display: none; width: 46px; height: 46px; }
.nd-prev { left: 12px; } .nd-next { right: 12px; }
.nd-counter { position: absolute; left: 12px; bottom: 12px; display: none; padding: 2px 12px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 700; font-size: .9rem; }
.has-many .nd-nav { display: grid; } .has-many .nd-counter { display: block; }
.nd-thumbs { display: none; gap: 8px; padding: 10px 12px; overflow-x: auto; background: var(--cream); }
.has-many .nd-thumbs { display: flex; }
.nd-thumbs button { flex: none; width: 72px; height: 54px; padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .7; }
.nd-thumbs button.is-active { border-color: var(--gold); opacity: 1; }
.nd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.nd-body { padding: 24px 30px 34px; }
.nd-gallery[hidden] + .nd-body { padding-top: 62px; }
.nd-body time { font-weight: 700; color: var(--ruby); }
.nd-body h3 { margin: .15em 0 .5em; font-size: 1.9rem; }

/* ===================================================================================
   ТРОН (includes/art.php → at_emblem()). Базовые стили — готовая картинка; движение включает класс .js на <html>
   (его нет при «уменьшить движение»), поэтому без анимации эмблема просто собрана.
   Слои: .at-p (параллакс от курсора, --d — глубина) > появление > покой (бесконечное движение).
   =================================================================================== */
.at { position: relative; width: 100%; aspect-ratio: 400 / 440; -webkit-tap-highlight-color: transparent; }
.at-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .5)); }
.at-hit { position: absolute; inset: 14% 12% 8%; padding: 0; border: 0; border-radius: 40px; background: none; cursor: pointer; }
.at-hit:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.at-p { transform: translate(calc(var(--px, 0) * var(--d, 0) * 1.3px), calc(var(--py, 0) * var(--d, 0) * 1px)); transition: transform .45s cubic-bezier(.2, .8, .3, 1); }
.at-horn { stroke-dasharray: 1; }
.at-shine { transform: skewX(-18deg) translateX(-100px); }
.at-gem, .at-seat, .at-crown-move, .at-crown, .at-spark, .at-spark-in, .at-kid, .at-wave, .at-arm, .at-glow { transform-box: fill-box; }
.at-crown-move, .at-crown, .at-crown-bob, .at-crown-fall { transform-origin: 50% 50%; }
.at-kid { transform-origin: 50% 100%; transform: scale(0); transition: transform .7s cubic-bezier(.2, 1.8, .4, 1); }
.at.is-sit .at-kid { transform: scale(1.4); }
.at-wave { transform-origin: 14% 96%; }
.at-crown-move { transition: transform .9s cubic-bezier(.3, 1.35, .4, 1); }
.at.is-sit .at-crown-move { transform: translateY(62px) scale(.62); }
.at-glow { transform-origin: 50% 50%; opacity: .8; }

.js .at-glow { animation: at-glow 5s ease-in-out infinite; }
@keyframes at-glow { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.05); } }
.js .at-plat-in { animation: at-rise .9s cubic-bezier(.2, .9, .3, 1) .1s backwards; }
@keyframes at-rise { from { transform: translateY(40px); opacity: 0; } }
.js .at-back-in { animation: at-reveal 1.2s cubic-bezier(.5, 0, .2, 1) .4s backwards; }
@keyframes at-reveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.js .at-horn { animation: at-draw 1.1s ease 1.3s backwards; }
@keyframes at-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.js .at-arm-l { animation: at-arm-l .9s cubic-bezier(.2, 1.3, .4, 1) 1.2s backwards; }
.js .at-arm-r { animation: at-arm-r .9s cubic-bezier(.2, 1.3, .4, 1) 1.3s backwards; }
@keyframes at-arm-l { from { transform: translateX(-70px); opacity: 0; } } @keyframes at-arm-r { from { transform: translateX(70px); opacity: 0; } }
.js .at-seat { transform-origin: 50% 100%; animation: at-plop .8s cubic-bezier(.2, 1.7, .4, 1) 1.6s backwards; }
@keyframes at-plop { from { transform: scale(.7, 0); opacity: 0; } }
.js .at-panel { animation: at-rise .8s cubic-bezier(.2, .9, .3, 1) 1.5s backwards; }
.js .at-gem { transform-origin: 50% 50%; animation: at-gempop .6s cubic-bezier(.2, 1.9, .4, 1) calc(2s + var(--i) * .12s) backwards, at-gemidle 2.8s ease-in-out calc(3s + var(--i) * -.55s) infinite; }
@keyframes at-gempop { from { transform: scale(0); } }
@keyframes at-gemidle { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.45) drop-shadow(0 0 4px rgba(255, 255, 255, .8)); } }
.js .at-shine { animation: at-shine 6.5s ease-in-out 3.6s infinite; }
@keyframes at-shine { 0% { transform: skewX(-18deg) translateX(-100px); } 22%, 100% { transform: skewX(-18deg) translateX(560px); } }
.js .at-crown-fall { animation: at-fall 1.5s cubic-bezier(.3, 1.15, .5, 1) 2.3s backwards; }
@keyframes at-fall { 0% { transform: translateY(-300px) rotate(-30deg); opacity: 0; } 20% { opacity: 1; } 58% { transform: translateY(14px) rotate(6deg); } 78% { transform: translateY(-6px) rotate(-2deg); } 100% { transform: none; } }
.js .at-crown-bob { animation: at-bob 3.8s ease-in-out 3.9s infinite; }
@keyframes at-bob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-5px) rotate(2deg); } 75% { transform: translateY(-3px) rotate(-2deg); } }
.js .at-spark-in { animation: at-starpop .8s cubic-bezier(.2, 1.7, .4, 1) calc(3s + var(--i) * .15s) backwards; }
@keyframes at-starpop { from { transform: scale(0) rotate(-140deg); opacity: 0; } }
.js .at-spark { transform-origin: 50% 50%; animation: at-twinkle calc(2.2s + var(--i) * .3s) ease-in-out calc(var(--i) * -.5s) infinite; }
@keyframes at-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.55) rotate(20deg); opacity: .55; } }
.js .at-kid-bob { animation: at-kidbob 2.4s ease-in-out infinite; }
@keyframes at-kidbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.js .at.is-sit .at-wave { animation: at-wave .7s ease-in-out infinite alternate; }
@keyframes at-wave { from { transform: rotate(-18deg); } to { transform: rotate(16deg); } }
.at.is-burst .at-crown { animation: at-flip .9s ease-in-out 1; }
@keyframes at-flip { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1) scale(1.12); } 100% { transform: scaleX(1); } }
.at.is-burst .at-gem { animation: at-gempop .6s cubic-bezier(.2, 1.9, .4, 1) calc(var(--i) * .06s) 1; }
.at.is-paused *, .hero.is-paused .at * { animation-play-state: paused !important; }

/* ---------- Появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease var(--delay, 0s), transform .9s cubic-bezier(.2, .9, .3, 1) var(--delay, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .gilt.reveal.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } #dust { display: none; } }
@media (hover: hover) { .coin:hover .coin-in { transform: rotateY(180deg); } }

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) { .menu a { padding: 9px 10px; font-size: .88rem; } .brand-text small { display: none; } }
@media (max-width: 1100px) {
  .chip-menu { display: inline-flex; }
  .chip-call span { display: none; }
  .chip-call { width: 44px; padding: 0; justify-content: center; }
  .menu { position: absolute; top: calc(var(--bar-h) - 4px); left: 12px; right: 12px; display: none; flex-direction: column; gap: 4px; padding: 14px; border-radius: 26px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(30, 4, 14, .4); }
  .menu.open { display: flex; }
  .menu a { padding: 13px 18px; font-size: 1.05rem; }
  .hero { padding-top: calc(var(--bar-h) + 70px); }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { justify-items: center; order: 2; }
  .hero-throne { order: 1; width: min(100%, 380px, calc(52svh * .91)); }
  .hero-actions, .hero-stats { justify-content: center; }
  .about-grid, .contact-grid, .docs-grid { grid-template-columns: 1fr; }
  .coins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin { margin-inline: auto; }
  .thrones { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 760px) {
  .leader { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .leader-photo { width: 220px; }
  .leader > div:last-child { display: grid; justify-items: center; }
}
@media (max-width: 640px) {
  .wrap { width: min(1160px, 100% - 32px); }
  .form { padding: 38px 20px 28px; }
  .seal { right: 18px; width: 60px; height: 60px; }
  .curtain { width: 28px; }
  .foot-in { justify-content: center; text-align: center; } .foot-in p { margin-right: 0; width: 100%; }
  .vault { padding: 24px 16px 28px; border-radius: 28px; }
  .hall-nav { width: 44px; height: 44px; }
  .photo-btn { padding: 10px; } .photo-btn img { height: clamp(210px, 38vh, 340px); }
}
@media (max-width: 520px) {
  .tab { min-height: 40px; padding: 0 14px; font-size: .84rem; }
  .top-in { gap: 8px; width: calc(100% - 20px); }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 40px; height: 40px; }
  .brand-text strong { font-size: 1.3rem; }
  .chips { gap: 6px; }
  .chip { min-height: 40px; padding: 0 12px; font-size: .86rem; }
  .chip-menu, .chip-call { width: 40px; padding: 0; }
}
