/* «OSKAR kids»: детские буквенные кубики. Тёплая бумага, яркие основные цвета (красный, жёлтый, синий, зелёный, фиолетовый),
   «игрушечные» кнопки с плотной тенью. Эмблема — пять кубиков O-S-K-A-R; факты о саде — игральные кубики; группы — башни из кубиков;
   «имя из кубиков» — игра; внизу страницы — городок из кубиков. Разделы лежат друг на друге, как листы бумаги. */

/* ---------- Шрифты: Geologica (заголовки) и Mulish (текст), с казахскими буквами ә ғ қ ң ө ұ ү һ і ---------- */
@font-face { font-family: "Geologica"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/geologica-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: "Geologica"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/geologica-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/geologica-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: "Mulish"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/mulish-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: "Mulish"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/mulish-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Mulish"; font-weight: 400 800; font-display: swap; src: url("../assets/fonts/mulish-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 {
  --navy: #1b2559; --navy-d: #111a42; --ink: #1b2559; --ink-soft: #505b88; --line: rgba(27, 37, 89, .16);
  --cream: #fff8ea; --paper: #fffdf7; --white: #fff;
  --red: #f0503f; --red-d: #c22f1f; --yellow: #ffc22e; --yellow-d: #dd9500; --blue: #2f86e8; --blue-d: #1b5db5;
  --green: #2cb56b; --green-d: #16864a; --purple: #8a5cf0; --purple-d: #6136c2;
  --sky: #e5f1ff; --mint: #e2f6ea; --blush: #ffe7e2; --lemon: #fff3c9; --lilac: #eee7ff;
  --head: "Geologica", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Mulish", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar-h: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 500 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(--blue-d); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 90; padding: 10px 16px; border-radius: 12px; background: #fff; font-weight: 800; }
.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: 800; line-height: 1.12; color: var(--navy); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.3rem); text-wrap: balance; }
h3 { font-size: 1.4rem; }

/* ---------- Кнопки и плашки: «игрушечные», с плотной тенью снизу ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border: 3px solid var(--navy); border-radius: 18px; cursor: pointer; font-family: var(--body); font-weight: 800; font-size: 1rem; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-main { background: var(--yellow); color: var(--navy); box-shadow: 0 6px 0 var(--navy); }
.btn-line { background: #fff; color: var(--navy); box-shadow: 0 6px 0 var(--navy); }
.btn-play { background: var(--purple); border-color: var(--navy); color: #fff; box-shadow: 0 6px 0 var(--navy); }
.btn-ghost { min-height: 52px; padding: 0 22px; background: #fff; color: var(--navy); box-shadow: 0 5px 0 var(--navy); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--navy); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--navy); }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; rotate: -2deg; }
.lede { max-width: 60ch; color: var(--ink-soft); font-size: 1.1rem; text-wrap: pretty; }

/* ---------- Шапка: плавающая «таблетка» ---------- */
.top { position: fixed; inset: 10px 0 auto; z-index: 50; }
.top-in { position: relative; display: flex; align-items: center; gap: 16px; width: min(1220px, 100% - 24px); min-height: 66px; margin-inline: auto; padding: 8px 12px 8px 14px; border: 3px solid var(--navy); border-radius: 999px; background: rgba(255, 253, 247, .94); backdrop-filter: blur(10px); box-shadow: 0 5px 0 var(--navy); transition: box-shadow .3s, transform .3s; }
.top.is-stuck .top-in { box-shadow: 0 5px 0 var(--navy), 0 18px 34px rgba(27, 37, 89, .18); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 40px; height: auto; transition: transform .6s cubic-bezier(.3, 1.9, .5, 1); }
.brand:hover img { transform: translateY(-6px) rotate(-12deg); }
.brand-text strong { display: block; white-space: nowrap; font-family: var(--head); font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: -.02em; }
.brand-text small { display: block; white-space: nowrap; font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.menu { display: flex; justify-content: center; flex: 1; gap: 2px; }
.menu a { white-space: nowrap; padding: 8px 13px; border-radius: 999px; color: inherit; font-weight: 800; font-size: .92rem; text-decoration: none; transition: background .2s, color .2s; }
.menu a:hover { background: var(--lemon); }
.menu a.is-active { background: var(--navy); color: #fff; }
.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: 42px; padding: 0 16px; border: 2.5px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 800; font-size: .9rem; text-decoration: none; transition: background .2s, transform .15s; }
.chip:hover { background: var(--yellow); transform: translateY(-2px); }
.chip-call { background: var(--green); border-color: var(--navy); color: #fff; }
.chip-call:hover { background: var(--green-d); color: #fff; }
.chip-menu { display: none; justify-content: center; width: 42px; padding: 0; cursor: pointer; }

/* ---------- Первый экран ---------- */
.hero { position: relative; isolation: isolate; padding: calc(var(--bar-h) + 52px) 0 clamp(96px, 11vw, 130px); overflow: hidden;
  background: radial-gradient(rgba(27, 37, 89, .09) 1.8px, transparent 2px) 0 0 / 28px 28px, radial-gradient(ellipse at 50% 38%, #fff 0, rgba(255, 255, 255, 0) 62%), var(--cream); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.floaters { position: absolute; inset: 0; }
.fl-it { position: absolute; display: block; aspect-ratio: 1; opacity: .9; transform: translate(calc(var(--px, 0) * var(--d, 0) * 1px), calc(var(--py, 0) * var(--d, 0) * .8px)); transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.fl-it svg { width: 100%; height: 100%; overflow: visible; }
.js .fl-it svg { animation: floaty 7s ease-in-out calc(var(--dl) * -.7s) infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(8deg); } }
.hero-stage { display: grid; justify-items: center; gap: 16px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; padding: 7px 18px; border-radius: 999px; border: 2.5px solid var(--navy); background: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; box-shadow: 0 4px 0 var(--navy); rotate: -1.5deg; }
.hero-logo { width: min(100%, 800px); margin-top: 8px; }
.hero-slogan { width: fit-content; max-width: 100%; padding: 0 .3em; font-family: var(--head); font-weight: 800; font-size: clamp(1.5rem, 1rem + 2.2vw, 2.5rem); line-height: 1.25; text-wrap: balance; background: linear-gradient(transparent 60%, rgba(255, 194, 46, .8) 60% 92%, transparent 92%); }
.hero-lead { max-width: 52ch; color: var(--ink-soft); font-size: 1.12rem; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 6px; }
.btn-play .ico { width: 1.1em; height: 1.1em; fill: currentColor; stroke: none; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.pills li { padding: 6px 18px; border: 2.5px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 700; font-size: .95rem; }
.pills strong { font-family: var(--head); font-weight: 800; color: var(--red); }
.pills li:nth-child(2) strong { color: var(--blue); } .pills li:nth-child(3) strong { color: var(--green-d); }
.hero-hint { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
/* коврик-пазл по низу первого экрана */
.mat { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; height: 46px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='46' viewBox='0 0 360 46'%3E%3Cg%3E%3Crect x='2' y='8' width='68' height='60' rx='14' fill='%23f0503f'/%3E%3Crect x='74' y='8' width='68' height='60' rx='14' fill='%23ffc22e'/%3E%3Crect x='146' y='8' width='68' height='60' rx='14' fill='%232f86e8'/%3E%3Crect x='218' y='8' width='68' height='60' rx='14' fill='%232cb56b'/%3E%3Crect x='290' y='8' width='68' height='60' rx='14' fill='%238a5cf0'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 360px 46px; }
.mat::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: rgba(27, 37, 89, .12); }

/* ---------- Разделы: листы бумаги, лежащие друг на друге ---------- */
.section { position: relative; margin-top: -44px; padding: calc(clamp(64px, 8vw, 108px) + 44px) 0 clamp(64px, 8vw, 108px); border-radius: 46px 46px 0 0; box-shadow: 0 -8px 0 rgba(27, 37, 89, .1); }
.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(--paper); z-index: 2; }
.about-grid { 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; }
.about-art { justify-self: center; width: min(100%, 460px); }
.ok-pile { width: 100%; height: auto; overflow: visible; }
.pile-hint, .groups-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: .84rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.pile-hint .ico, .groups-hint .ico { fill: var(--yellow-d); stroke: none; }
.pl-b { cursor: pointer; outline: none; transform-origin: 55px 119px; }
.pl-b:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.pl-in { transform-origin: 55px 119px; }
.js .pl-in { animation: ok-bob 4.2s ease-in-out calc(var(--n) * -.45s) infinite; }
.frame { position: relative; justify-self: center; width: min(100%, 460px); rotate: 1.6deg; transition: rotate .5s cubic-bezier(.3, 1.6, .5, 1); }
.frame:hover { rotate: -.6deg; }
.frame-in { padding: 14px; border: 3px solid var(--navy); border-radius: 30px; background: #fff; box-shadow: 0 10px 0 var(--navy); overflow: hidden; }
.frame-in img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: 18px; }
.frame figcaption { position: absolute; left: 50%; bottom: -20px; translate: -50% 0; }
.frame figcaption span { display: inline-block; padding: 7px 22px; border: 3px solid var(--navy); border-radius: 999px; background: var(--yellow); font-family: var(--head); font-weight: 800; white-space: nowrap; box-shadow: 0 4px 0 var(--navy); }

.dice-zone { margin-top: clamp(56px, 7vw, 92px); }
.dice-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.dice-head h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.dice-head p { color: var(--ink-soft); }
.dice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(16px, 2.6vw, 32px); }
.die-cell { display: grid; justify-items: center; gap: 12px; }
.die { --c: var(--red); --cd: var(--red-d); width: 100%; max-width: 190px; aspect-ratio: 1; padding: 0; border: 0; background: none; perspective: 900px; cursor: pointer; }
.c0 { --c: var(--red); --cd: var(--red-d); } .c1 { --c: var(--yellow); --cd: var(--yellow-d); color: var(--navy); }
.c2 { --c: var(--blue); --cd: var(--blue-d); } .c3 { --c: var(--green); --cd: var(--green-d); } .c4 { --c: var(--purple); --cd: var(--purple-d); }
.die-cube { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rot, 0deg)); transition: transform 1.05s cubic-bezier(.3, 1.25, .4, 1); }
.die.is-roll { animation: die-jump 1.05s cubic-bezier(.3, .6, .4, 1); }
@keyframes die-jump { 0% { translate: 0 0; } 30% { translate: 0 -44px; rotate: -6deg; } 62% { translate: 0 0; rotate: 4deg; } 80% { translate: 0 -10px; } 100% { translate: 0 0; rotate: 0deg; } }
.die-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 12%; border-radius: 28px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 3px solid var(--navy); }
.die-front { background: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, .75) 0 6px, transparent 7px), radial-gradient(circle at 85% 85%, rgba(255, 255, 255, .75) 0 6px, transparent 7px), radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .45) 0 4px, transparent 5px), radial-gradient(circle at 15% 85%, rgba(255, 255, 255, .45) 0 4px, transparent 5px), var(--c); color: #fff; box-shadow: 0 9px 0 var(--navy), inset 0 0 0 5px rgba(255, 255, 255, .3); }
.c1 .die-front { color: var(--navy); }
.die-ico { width: 2.6rem; height: 2.6rem; stroke-width: 2; }
.die-front b { font-family: var(--head); font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.die-back { transform: rotateX(180deg); background: #fff; color: var(--navy); box-shadow: 0 9px 0 var(--navy), inset 0 0 0 6px var(--c); }
.dv { display: grid; gap: 2px; justify-items: center; font-family: var(--head); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.dv-num { font-size: clamp(2.6rem, 5vw, 3.6rem); color: var(--c); -webkit-text-stroke: 0; }
.c1 .dv-num { color: var(--yellow-d); }
.dv small { font-family: var(--body); font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.dv-txt { font-size: 1.15rem; } .dv-small { font-size: .92rem; }
.die-act { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .84rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--blue-d); }
.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: 3px solid var(--navy); border-radius: 22px; box-shadow: 0 7px 0 var(--navy); }

/* Игра: имя из кубиков */
.play { background: var(--yellow); z-index: 3; }
.play h2, .play .lede { color: var(--navy); }
.play .lede { color: #4b4220; }
.play .kicker { background: var(--navy); }
.builder { display: grid; justify-items: center; gap: 28px; }
.builder-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: min(100%, 560px); }
.builder-bar input { flex: 1 1 260px; min-width: 0; min-height: 64px; padding: 0 24px; border: 3.5px solid var(--navy); border-radius: 20px; background: #fff; font: 800 1.6rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--navy); box-shadow: 0 6px 0 var(--navy); }
.builder-bar input::placeholder { color: rgba(27, 37, 89, .35); text-transform: none; letter-spacing: 0; font-weight: 700; }
.builder-bar input:focus { outline: 0; box-shadow: 0 6px 0 var(--navy), 0 0 0 5px rgba(255, 255, 255, .8); }
.btn-ghost .ico { stroke-width: 2.6; }
.rail { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 12px; min-height: clamp(110px, 16vw, 150px); width: 100%; padding: 20px 10px 0; }
.rail .bk { --bs: clamp(48px, 11vw, 88px); }
.rail .bk.is-new { animation: bk-drop .95s linear backwards; }
.rail .ghost { display: block; width: clamp(48px, 11vw, 88px); aspect-ratio: 1; border: 3.5px dashed rgba(27, 37, 89, .35); border-radius: 22%; }
.rail .gap { width: clamp(20px, 4vw, 40px); }
.rail.is-down { align-items: flex-end; }
.rail.is-down .bk { transform: translate(var(--fx, 0), 14px) rotate(var(--fr, 20deg)); transition: transform .85s cubic-bezier(.5, 0, .85, .45) calc(var(--k, 0) * 70ms); }
.rail .bk { transition: transform 1s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bk-drop {
  0% { transform: translateY(-260px) rotate(var(--r, -24deg)); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  10% { opacity: 1; }
  52% { transform: translateY(0) rotate(0) scale(1.1, .84); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  70% { transform: translateY(-30px) scale(.97, 1.05); animation-timing-function: ease-in; }
  84% { transform: translateY(0) scale(1.04, .94); }
  100% { transform: none; }
}

/* Кубик из HTML */
.bk { --bs: 44px; --c: var(--red); --cd: var(--red-d); position: relative; display: inline-grid; place-items: center; flex: none; width: var(--bs); height: var(--bs); border-radius: calc(var(--bs) * .22); background: var(--c); box-shadow: 0 calc(var(--bs) * .1) 0 var(--cd), inset 0 0 0 calc(var(--bs) * .05) rgba(255, 255, 255, .3); color: #fff; font-style: normal; user-select: none; -webkit-user-select: none; cursor: pointer; }
.bk::before { content: ""; position: absolute; left: 13%; top: 11%; width: 36%; height: 11%; border-radius: 99px; background: rgba(255, 255, 255, .6); }
.bk b { font: 800 calc(var(--bs) * .6) / 1 var(--head); text-shadow: calc(var(--bs) * .03) calc(var(--bs) * .05) 0 rgba(0, 0, 0, .18); }
.bk.c0 { --c: var(--red); --cd: var(--red-d); color: #fff; } .bk.c1 { --c: var(--yellow); --cd: var(--yellow-d); color: var(--navy); }
.bk.c2 { --c: var(--blue); --cd: var(--blue-d); color: #fff; } .bk.c3 { --c: var(--green); --cd: var(--green-d); color: #fff; } .bk.c4 { --c: var(--purple); --cd: var(--purple-d); color: #fff; }
.bk.c1 b { text-shadow: none; }
.bk.is-hop { animation: bk-hop .7s cubic-bezier(.3, .6, .4, 1); }
@keyframes bk-hop { 0% { transform: none; } 20% { transform: scale(1.14, .82); } 50% { transform: translateY(calc(var(--bs) * -1.1)) rotate(16deg) scale(.95, 1.06); } 78% { transform: scale(1.1, .86); } 100% { transform: none; } }

/* Группы: башни из кубиков — чем старше группа, тем выше башня (O-S-K-A-R: у мектепалды складывается всё слово) */
.groups { background: var(--sky); z-index: 4; }
.stages { --bs: clamp(48px, 8.4vw, 92px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px); max-width: 1000px; margin-inline: auto; }
.stage { --tone: var(--red); --tone-d: var(--red-d); display: flex; flex-direction: column; align-items: center; text-align: center; }
.tone-yellow { --tone: var(--yellow); --tone-d: var(--yellow-d); } .tone-blue { --tone: var(--blue); --tone-d: var(--blue-d); } .tone-green { --tone: var(--green); --tone-d: var(--green-d); }
.stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: center; gap: calc(var(--bs) * .1); width: 100%; min-height: calc(5 * var(--bs) * 1.1); }
.stage .bk { --bs: clamp(48px, 8.4vw, 92px); transition: transform .3s; }
.stage:hover .bk { animation: bk-wave .75s ease calc(var(--k) * .08s); }
@keyframes bk-wave { 0%, 100% { transform: none; } 40% { transform: translateY(calc(var(--bs) * -.22)) rotate(-5deg); } 70% { transform: translateY(0) rotate(3deg); } }
.js .stage.is-in .bk { animation: bk-build .8s linear calc(var(--i) * .14s + var(--k) * .13s + .1s) backwards; }
.js .stage:hover .bk { animation: bk-wave .75s ease calc(var(--k) * .08s); }
@keyframes bk-build {
  0% { transform: translateY(-360px) rotate(-20deg); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  10% { opacity: 1; }
  55% { transform: translateY(0) scale(1.1, .84); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  75% { transform: translateY(-14px) scale(.98, 1.03); animation-timing-function: ease-in; }
  100% { transform: none; }
}
.plank { width: calc(100% + clamp(0px, 1.2vw, 14px)); height: 16px; margin-top: 8px; border: 3px solid var(--navy); border-radius: 10px; background: var(--tone); box-shadow: 0 5px 0 var(--navy); }
.t-age { margin-top: 18px; font-family: var(--head); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1; color: var(--tone-d); }
.stage h3 { margin-top: 6px; font-size: clamp(1.05rem, 1.8vw, 1.35rem); }
.t-motto { max-width: 18ch; margin-top: 6px; color: var(--ink-soft); font-size: .95rem; line-height: 1.4; }
.t-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 44px; padding: 0 18px; border: 3px solid var(--navy); border-radius: 14px; background: #fff; color: var(--navy); font-weight: 800; font-size: .92rem; text-decoration: none; box-shadow: 0 4px 0 var(--navy); transition: transform .15s, box-shadow .15s, background .2s; }
.t-link:hover { background: var(--tone); color: #fff; transform: translateY(-3px); box-shadow: 0 7px 0 var(--navy); }
.tone-yellow .t-link:hover { color: var(--navy); }
.groups-hint { margin-top: 38px; }

/* Руководство */
.team { background: var(--blush); z-index: 5; }
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 36px; }
.leader { --acc: var(--red); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: center; padding: 26px; border: 3px solid var(--navy); border-radius: 34px; background: #fff; box-shadow: 0 8px 0 var(--navy); }
.leader:nth-child(2) { --acc: var(--blue); } .leader:nth-child(3) { --acc: var(--green); } .leader:nth-child(4) { --acc: var(--purple); }
.leader-photo { position: relative; aspect-ratio: 4 / 5; border: 3px solid var(--navy); border-radius: 26px 26px 26px 6px; background: var(--acc); box-shadow: 9px 9px 0 var(--acc), 9px 9px 0 3px var(--navy); }
.leader-photo > img, .leader-photo > .avatar { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 23px 23px 23px 3px; }
.leader-years { position: absolute; right: -22px; bottom: -22px; display: grid; place-content: center; width: 92px; height: 92px; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); text-align: center; line-height: 1; rotate: 9deg; box-shadow: 0 4px 0 var(--navy); }
.leader-years strong { font-family: var(--head); font-weight: 800; font-size: 1.9rem; }
.leader-years span { max-width: 9ch; margin-inline: auto; font-size: .56rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.leader-role { display: inline-block; margin-bottom: 8px; padding: 4px 14px; border-radius: 999px; background: var(--acc); color: #fff; font-weight: 800; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.leader h3 { font-size: clamp(1.4rem, 2.3vw, 1.9rem); }
.leader-edu { display: grid; gap: 2px; margin-top: 10px; color: var(--ink-soft); }
.leader-edu span { font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.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: 2.5px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 800; font-size: .8rem; color: var(--navy); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.ts-tab:hover { transform: translateY(-2px); }
.ts-tab.is-on { background: var(--navy); color: #fff; }
.ts-panel { display: none; margin-top: 12px; font-size: .98rem; line-height: 1.6; }
.ts-panel.is-on { display: block; animation: rise .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }

/* Кружки */
.extras { background: var(--mint); z-index: 6; }
.clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 28px; }
.club { --acc: var(--red); position: relative; display: flex; flex-direction: column; border: 3px solid var(--navy); border-radius: 30px; background: #fff; overflow: hidden; box-shadow: 0 8px 0 var(--navy); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.club:nth-child(4n+2) { --acc: var(--blue); } .club:nth-child(4n+3) { --acc: var(--yellow); } .club:nth-child(4n+4) { --acc: var(--purple); }
.club:hover { transform: translateY(-8px) rotate(-.6deg); }
.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: 156px; overflow: hidden; border-bottom: 3px solid var(--navy); background: var(--acc); color: #fff; }
.club-media::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, .28) 2.5px, transparent 3px) 0 0 / 22px 22px; }
.club:nth-child(4n+3) .club-media { color: var(--navy); }
.club-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.extra-ico { position: relative; width: 82px; height: 82px; stroke-width: 2.6; transition: transform .45s cubic-bezier(.3, 1.9, .5, 1); }
.club:hover .extra-ico { transform: scale(1.14) rotate(-8deg); }
.club-body { display: grid; align-content: start; gap: 6px; padding: 18px 24px 26px; }
.club-title { font-family: var(--head); font-weight: 800; font-size: 1.4rem; color: var(--navy); }
.club-meta { font-size: .86rem; font-weight: 800; color: var(--blue-d); }
.club-text { color: var(--ink-soft); }
.story-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 800; color: var(--blue-d); }
.story-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 800; }

/* Фото: горизонтальная лента карточек */
.gallery { padding-bottom: clamp(56px, 7vw, 96px); background: var(--lemon); overflow: hidden; z-index: 7; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.tab { min-height: 44px; padding: 0 20px; border: 3px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 800; font-size: .9rem; color: var(--navy); cursor: pointer; box-shadow: 0 4px 0 var(--navy); transition: background .2s, transform .15s; }
.tab:hover { transform: translateY(-2px); }
.tab.is-on { background: var(--navy); color: #fff; }
.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.5, .5, 1); }
.album figure:nth-child(odd) { rotate: -1.2deg; } .album figure:nth-child(even) { rotate: 1.2deg; }
.album figure:hover { transform: translateY(-8px) scale(1.02); rotate: 0deg; }
.album figure[hidden] { display: none; }
.photo-btn { position: relative; display: block; padding: 12px; border: 3px solid var(--navy); border-radius: 26px; background: #fff; cursor: zoom-in; box-shadow: 0 8px 0 var(--navy); overflow: hidden; }
.photo-btn img { display: block; width: auto; height: clamp(250px, 46vh, 420px); max-width: min(82vw, 640px); object-fit: cover; border-radius: 16px; pointer-events: none; }
.photo-btn figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 34px 16px 12px; border-radius: 0 0 16px 16px; background: linear-gradient(transparent, rgba(17, 26, 66, .88)); color: #fff; font-family: var(--head); font-weight: 800; font-size: 1.1rem; 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: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); color: var(--navy); cursor: pointer; box-shadow: 0 5px 0 var(--navy); transition: transform .15s; }
.hall-nav:hover { transform: translateY(-3px); } .hall-nav:active { transform: translateY(3px); }
.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; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.note { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 34px 20px; border: 3px dashed var(--line); border-radius: 26px; text-align: center; }

/* Новости */
.news { background: var(--cream); z-index: 8; }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.story { overflow: hidden; border: 3px solid var(--navy); border-radius: 28px; background: #fff; box-shadow: 0 8px 0 var(--navy); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.story:hover { transform: translateY(-7px) rotate(-.5deg); }
.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; border-bottom: 3px solid var(--navy); background: var(--yellow); }
.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: 24%; height: auto; object-fit: contain; }
.story-body { display: grid; gap: 6px; padding: 18px 24px 26px; }
.story-body time { font-size: .84rem; font-weight: 800; color: var(--red-d); }
.story-title { font-family: var(--head); font-weight: 800; font-size: 1.3rem; line-height: 1.2; color: var(--navy); }
.story-excerpt { color: var(--ink-soft); font-size: .98rem; }

/* Документы и вакансии */
.docs { background: var(--sky); z-index: 9; }
.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: 22px; margin-top: 20px; }
.doc-set, .jobs { padding: 26px 28px; border: 3px solid var(--navy); border-radius: 28px; background: #fff; box-shadow: 0 7px 0 var(--navy); }
.jobs { background: var(--purple); color: #fff; }
.jobs h3 { color: #fff; }
.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: 800; text-decoration: none; color: var(--navy); }
.doc-set a:hover { color: var(--blue-d); }
.doc-set a .ico { color: var(--red); }
.doc-set small { margin-left: 32px; color: var(--ink-soft); font-weight: 700; }
.job { margin-top: 14px; padding-top: 14px; border-top: 2px dashed rgba(255, 255, 255, .45); }
.job summary { cursor: pointer; font-weight: 800; }
.job p { margin-top: 8px; color: #efe9ff; }
.job a { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 800; color: var(--yellow); }

/* Контакты и «городок» из кубиков */
.contact { z-index: 10; padding-bottom: 0; background: var(--navy); color: #fff; }
.contact h2 { color: #fff; }
.contact .kicker { background: var(--yellow); color: var(--navy); }
.contact .lede { color: #cfd6ff; }
.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-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; text-decoration: none; color: var(--yellow); }
.contact-phone:hover { color: #fff; }
.contact-list { display: grid; gap: 12px; margin-top: 6px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.contact-list .ico { margin-top: .22em; color: var(--yellow); }
.contact-list a { text-underline-offset: 3px; color: #fff; }
.social-label { margin-top: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: #aab4f0; }
.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: 2.5px solid #fff; border-radius: 999px; font-weight: 800; text-decoration: none; color: #fff; transition: background .2s, color .2s, transform .2s; }
.socials a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); transform: translateY(-3px); }
.form { position: relative; padding: 42px 36px 34px; border: 3px solid var(--navy); border-radius: 34px; background: #fff; color: var(--navy); box-shadow: 0 10px 0 rgba(0, 0, 0, .35), 0 0 0 5px var(--yellow); }
.seal { position: absolute; top: -34px; right: 30px; display: grid; place-items: center; width: 72px; height: 72px; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); box-shadow: 0 4px 0 var(--navy); rotate: 8deg; }
.seal img { width: 70%; height: auto; }
.form h3 { max-width: calc(100% - 90px); font-size: 2rem; }
.form label { display: block; margin: 16px 0 6px; font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; padding: 13px 16px; border: 3px solid var(--navy); border-radius: 16px; background: var(--cream); font-weight: 700; color: var(--navy); transition: box-shadow .2s, background .2s; }
.form input::placeholder, .form textarea::placeholder { color: rgba(27, 37, 89, .4); }
.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='%231b2559' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; padding-right: 42px; }
.form textarea { resize: vertical; min-height: 100px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; background: #fff; box-shadow: 0 0 0 5px rgba(47, 134, 232, .35); }
.form .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.form .consent input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--blue); }
.form .btn { width: 100%; margin-top: 22px; }
.form-note { display: none; margin-top: 14px; font-weight: 800; color: var(--green-d); }
.form-note.show { display: block; }
.form-note.error { color: var(--red-d); }
.hp-field { position: absolute; left: -9999px; }
.foot { margin-top: 56px; }
.sky { display: flex; justify-content: center; align-items: flex-end; gap: clamp(3px, .8vw, 10px); overflow: hidden; padding-top: 40px; }
.sky-col { display: flex; flex-direction: column-reverse; gap: clamp(3px, .45vw, 5px); }
.sky .bk { --bs: clamp(28px, 3.7vw, 50px); }
.foot-ground { position: relative; padding-top: 18px; background: var(--navy-d); }
.foot-ground::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='12' viewBox='0 0 360 12'%3E%3Crect x='0' width='72' height='12' fill='%23f0503f'/%3E%3Crect x='72' width='72' height='12' fill='%23ffc22e'/%3E%3Crect x='144' width='72' height='12' fill='%232f86e8'/%3E%3Crect x='216' width='72' height='12' fill='%232cb56b'/%3E%3Crect x='288' width='72' height='12' fill='%238a5cf0'/%3E%3C/svg%3E") repeat-x 0 0 / 360px 12px; }
.foot-bye { padding: 14px 16px 0; text-align: center; font-family: var(--head); font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: #fff; }
.foot-hint { margin-top: 2px; text-align: center; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8e99d8; }
.foot-in { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 26px; padding: 18px 0 28px; }
.foot-in img { flex: none; width: 40px; height: auto; }
.foot-in p { margin-right: auto; font-weight: 600; color: #aab4f0; }
.foot-in a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; color: var(--yellow); }
.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(17, 26, 66, .94); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 80vh; max-width: min(1000px, 78vw); padding: 10px; border-radius: 24px; background: #fff; box-shadow: 0 30px 70px rgba(0, 0, 0, .6); }
.lightbox figcaption { margin-top: 12px; color: #fff; font-family: var(--head); font-weight: 800; font-size: 1.3rem; }
.lb-close, .lb-nav, .nd-close, .nd-nav { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); color: var(--navy); cursor: pointer; box-shadow: 0 4px 0 var(--navy); }
.lb-close { position: absolute; top: 16px; right: 16px; }
.news-dialog { width: min(780px, calc(100% - 24px)); max-height: 90vh; padding: 0; border: 3px solid var(--navy); border-radius: 30px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); overflow: auto; }
.news-dialog::backdrop { background: rgba(17, 26, 66, .8); }
.nd-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.nd-stage { position: relative; background: var(--navy-d); }
.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: 800; 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(--lemon); }
.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(--navy); 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: 800; color: var(--red-d); }
.nd-body h3 { margin: .15em 0 .5em; font-size: 1.9rem; }

/* ===================================================================================
   КУБИКИ (includes/art.php → ok_emblem()). Базовые стили — готовая картинка; движение включает класс .js на <html>
   (его нет при «уменьшить движение»), поэтому без анимации эмблема просто собрана.
   Слои кубика: .ok-slot (расстановка: ряд / лесенка / куча) > .ok-p (параллакс от курсора, --d — глубина) >
   .ok-in (появление) > .ok-pop (прыжок по нажатию) > .ok-idle (покачивание).
   =================================================================================== */
.ok { position: relative; width: 100%; aspect-ratio: 740 / 230; -webkit-tap-highlight-color: transparent; }
.ok-svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; }
.ok-slot { transform-origin: 55px 55px; transition: transform .95s cubic-bezier(.3, 1.55, .5, 1); }
.ok-p, .ok-kslot { transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.ok-p { transform: translate(calc(var(--px, 0) * var(--d, 0) * 1.5px), calc(var(--py, 0) * var(--d, 0) * .7px)); }
.ok-in, .ok-pop, .ok-idle { transform-origin: 55px 119px; }
.ok-pop { cursor: pointer; outline: none; }
.ok-pop:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.ok-brick { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); transition: transform .55s cubic-bezier(.3, 1.6, .5, 1) calc(var(--k) * .07s + .25s); }
.ok-shadow { transition: opacity .4s; }
.ok.is-stairs .ok-slot { transform: translateY(calc(var(--i) * -22px)); }
.ok.is-stairs .ok-brick { transform: none; }
.ok.is-tumble .ok-slot { transform: translate(var(--tx), var(--ty)) rotate(var(--tr)); }
.ok.is-stairs .ok-shadow, .ok.is-tumble .ok-shadow { opacity: 0; }
.ok-kslot { transition: transform .95s cubic-bezier(.3, 1.55, .5, 1); }
.ok.is-stairs .ok-kslot { transform: translate(8px, -78px); }
.ok.is-tumble .ok-kslot { transform: translate(34px, 4px) rotate(200deg); }
.ok-pupil { transition: transform .12s ease-out; }
.ok-twinkle { transform-origin: 33px -35px; }
.ok-say { position: absolute; left: 2%; top: 12%; z-index: 2; padding: 8px 18px; border: 3px solid var(--navy); border-radius: 20px 20px 20px 4px; background: #fff; font-family: var(--head); font-weight: 800; font-size: clamp(.85rem, 1.6vw, 1.1rem); white-space: nowrap; box-shadow: 0 4px 0 var(--navy); opacity: 0; transform: translateY(10px) scale(.85); transform-origin: 10% 100%; transition: opacity .25s, transform .4s cubic-bezier(.3, 1.8, .5, 1); pointer-events: none; }
.ok-say.show { opacity: 1; transform: none; }

.js .ok-in { animation: ok-drop 1.2s linear calc(.2s + var(--i) * .17s) backwards; }
@keyframes ok-drop {
  0% { transform: translateY(-380px) rotate(var(--ir)); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  8% { opacity: 1; }
  48% { transform: translateY(0) rotate(0) scale(1.1, .82); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  66% { transform: translateY(-36px) scale(.96, 1.06); animation-timing-function: ease-in; }
  82% { transform: translateY(0) scale(1.04, .94); animation-timing-function: ease-out; }
  100% { transform: none; }
}
.js .ok-kin { animation: ok-badge 1.1s cubic-bezier(.2, 1.5, .4, 1) 1.3s backwards; }
@keyframes ok-badge { from { transform: scale(0) rotate(-220deg); opacity: 0; } }
.js .ok-idle { animation: ok-bob 3.6s ease-in-out calc(2s + var(--i) * .3s) infinite; }
@keyframes ok-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(calc(var(--s, 1) * 1.8deg)); } }
.js .ok-kidle { animation: ok-kbob 4s ease-in-out 2.2s infinite; }
@keyframes ok-kbob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg) scale(1.05); } }
.js .ok-eyes { transform-origin: 55px 50px; animation: ok-blink 5.2s ease-in-out 3s infinite; }
@keyframes ok-blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.08); } }
.js .ok-twinkle { animation: ok-tw 2.2s ease-in-out infinite; }
@keyframes ok-tw { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.5) rotate(40deg); opacity: .6; } }
.ok.is-paused *, .hero.is-paused .ok *, .hero.is-paused .fl-it svg, .about.is-paused .pl-in { animation-play-state: paused !important; }
.ok.is-cheer .ok-smile { animation: ok-grin .9s ease; }
@keyframes ok-grin { 40% { d: path("M44 60Q55 80 66 60"); } }

/* ---------- Появление при прокрутке ---------- */
.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 .frame.reveal.is-in { transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (hover: hover) { .die:hover .die-cube { transform: rotateX(calc(var(--rot, 0deg) + 14deg)); } }

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) { .menu a { padding: 8px 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: 42px; padding: 0; justify-content: center; }
  .menu { position: absolute; top: calc(100% + 10px); left: 0; right: 0; display: none; flex-direction: column; gap: 4px; padding: 14px; border: 3px solid var(--navy); border-radius: 28px; background: #fff; box-shadow: 0 8px 0 var(--navy), 0 24px 50px rgba(27, 37, 89, .25); }
  .menu.open { display: flex; }
  .menu a { padding: 13px 18px; font-size: 1.05rem; }
  .about-grid, .contact-grid, .docs-grid { grid-template-columns: 1fr; }
  .about-art, .frame { width: min(100%, 420px); }
}
@media (max-width: 860px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; row-gap: 44px; }
  .stage .bk, .stages { --bs: clamp(48px, 14vw, 78px); }
  .stage:nth-child(-n+2) .stack { min-height: calc(3 * var(--bs) * 1.1); }
}
@media (max-width: 760px) {
  .leader { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-bottom: 36px; }
  .leader-photo { width: 220px; }
  .leader > div:last-child { display: grid; justify-items: center; }
  .tabset-bar { justify-content: center; }
  .fl-it:nth-child(n+10) { display: none; }
}
@media (max-width: 640px) {
  .wrap { width: min(1160px, 100% - 32px); }
  .section { margin-top: -32px; padding-top: calc(clamp(56px, 8vw, 90px) + 32px); border-radius: 34px 34px 0 0; }
  .form { padding: 38px 20px 28px; }
  .seal { right: 18px; width: 60px; height: 60px; }
  .foot-in { justify-content: center; text-align: center; } .foot-in p { margin-right: 0; width: 100%; }
  .hall-nav { width: 44px; height: 44px; }
  .photo-btn { padding: 10px; } .photo-btn img { height: clamp(210px, 38vh, 340px); }
  .sky-col:nth-child(n+14) { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .dice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .die-front b { font-size: .95rem; }
}
@media (max-width: 520px) {
  .tab { min-height: 40px; padding: 0 14px; font-size: .84rem; }
  .top-in { gap: 8px; width: calc(100% - 20px); padding: 6px 8px 6px 10px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 34px; }
  .brand-text strong { font-size: 1.15rem; }
  .chips { gap: 6px; }
  .chip { min-height: 40px; padding: 0 12px; font-size: .86rem; }
  .chip-menu, .chip-call { width: 40px; padding: 0; }
  .ok-say { left: 0; top: -4%; }
  .builder-bar input { font-size: 1.3rem; }
}
