/* =====================================================================
   АНИМАЦИИ САЙТА. У каждой страницы — свой характер:
   главная — выезд блоков; информация — волны и перелистывание;
   журнал — плывущие оценки; экзамены — золотой луч; вход — звёзды.
   Кабинеты — только лёгкие полезные эффекты.
   ===================================================================== */

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); --gold-a: #c9a45c; }

/* ---------- Общее: шапка, ссылки меню, полоса прокрутки ---------- */
.header { animation: aHeaderDown .7s var(--ease-out) both; }
.navigation .nav-link { position: relative; }
.navigation .nav-link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px;
    background: var(--gold-a); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out);
}
.navigation .nav-link:hover::after { transform: scaleX(1); }
.navigation .nav-link.active::after { display: none; }
.logo img { transition: transform .5s var(--ease-out); }
.logo:hover img { transform: rotate(-8deg) scale(1.06); }

.scroll-progress {
    position: fixed; z-index: 1000; top: 0; left: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, #c9a45c, #f1dc9e, #c9a45c);
    transform: scaleX(var(--scroll, 0)); transform-origin: left; pointer-events: none;
}

/* Золотой блик на кнопках */
.gold-button, .info-button, .login-submit, .nav-login, .primary-button, .primary { position: relative; overflow: hidden; }
.gold-button::after, .info-button::after, .login-submit::after, .nav-login::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-18deg); pointer-events: none;
}
.gold-button:hover::after, .info-button:hover::after, .login-submit:hover::after, .nav-login:hover::after { animation: aShine .8s ease; }
.gold-button::after { animation: aShine 1.2s ease 4s 1 both; }

/* ---------- Появление при прокрутке (включает js/reveal.js) ---------- */
.js-reveal .reveal { opacity: 0; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
.js-reveal .reveal.up { transform: translateY(40px); }
.js-reveal .reveal.left { transform: translateX(-60px); }
.js-reveal .reveal.right { transform: translateX(60px); }
.js-reveal .reveal.zoom { transform: scale(.88); }
.js-reveal .reveal.flip { transform: perspective(900px) rotateY(-28deg) translateY(30px); transform-origin: left center; }
.js-reveal .reveal.tilt { transform: perspective(900px) rotateX(18deg) translateY(40px); transform-origin: bottom; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
.js-reveal .reveal.is-visible:hover { transition-delay: 0s; }

/* ---------- ГЛАВНАЯ: карточки с наклоном и подсветкой ---------- */
.page-home .feature-card, .page-home .service-card { transition: transform .45s var(--ease-out), box-shadow .45s; will-change: transform; }
.page-home .feature-card:hover, .page-home .service-card:hover { box-shadow: 0 24px 50px rgba(16, 45, 36, .18); }
.page-home .feature-image img, .page-home .welcome-image img { transition: transform 1.2s var(--ease-out); }
.page-home .feature-card:hover .feature-image img, .page-home .welcome-image:hover img { transform: scale(1.07); }
.page-home .image-caption { animation: aFloat 5s ease-in-out infinite; }

/* ---------- ИНФОРМАЦИЯ: волны, перелистывание, шаги, счётчики ---------- */
.page-info .info-hero-content > * { opacity: 0; animation: aRise .9s var(--ease-out) forwards; }
.page-info .info-hero-content > :nth-child(1) { animation-delay: .3s; }
.page-info .info-hero-content > :nth-child(2) { animation-delay: .55s; }
.page-info .info-hero-content > :nth-child(3) { animation: aLineGrow .9s var(--ease-out) 1s forwards; transform-origin: left; }
.page-info .info-hero-content > :nth-child(4) { animation-delay: 1.15s; }
.page-info .info-hero-content > :nth-child(5) { animation-delay: 1.4s; }
/* Водопад: сцена справа, слева затемнение под текст */
.page-info .info-hero-overlay { display: none; }
.waterfall {
    position: absolute; z-index: 0; top: 0; right: 0; height: 100%; width: min(68%, 980px);
    pointer-events: none; opacity: 0; animation: aFadeIn 1.6s ease .1s forwards;
}
.page-info .info-hero::after {
    z-index: 1; opacity: 1; mask-image: none; -webkit-mask-image: none;
    background: linear-gradient(90deg, rgba(11, 33, 26, .97) 0%, rgba(11, 33, 26, .88) 34%, rgba(11, 33, 26, .35) 56%, rgba(11, 33, 26, 0) 72%);
}
/* Струи воды бегут вниз */
.wf-streaks path { stroke-dasharray: 26 54; opacity: .55; animation: aFall 1.1s linear infinite; }
.wf-streaks .s1 { stroke-width: 2; animation-duration: 1.25s; }
.wf-streaks .s2 { stroke-width: 3; animation-duration: .95s; stroke-dasharray: 40 50; }
.wf-streaks .s3 { stroke-width: 1.6; animation-duration: 1.15s; opacity: .7; }
.wf-streaks .s4 { stroke-width: 3.5; animation-duration: .9s; stroke-dasharray: 50 40; opacity: .45; }
.wf-streaks .s5 { stroke-width: 2; animation-duration: 1.05s; opacity: .7; }
.wf-streaks .s6 { stroke-width: 3; animation-duration: 1.3s; stroke-dasharray: 34 46; }
.wf-streaks .s7 { stroke-width: 1.8; animation-duration: 1s; }
.wf-river-glint { stroke-dasharray: 20 40; opacity: .7; animation: aFlowLeft 1.6s linear infinite; }
.wf-stream-glints path { stroke-dasharray: 16 34; animation: aFlowLeft 2.2s linear infinite; }
.wf-stream-glints path:nth-child(2) { animation-duration: 2.8s; }
/* Круги расходятся от места падения */
.wf-ripple { transform-box: fill-box; transform-origin: center; stroke-width: 1.5; opacity: 0; animation: aWfRipple 3.6s ease-out infinite; }
.wf-ripple.r2 { animation-delay: 1.2s; }
.wf-ripple.r3 { animation-delay: 2.4s; }
/* Туман поднимается и тает */
.wf-mist circle { transform-box: fill-box; transform-origin: center; opacity: .5; animation: aMist 4s ease-in-out infinite; }
.wf-mist .m2 { animation-delay: .8s; animation-duration: 4.6s; }
.wf-mist .m3 { animation-delay: 1.6s; }
.wf-mist .m4 { animation-delay: 2.4s; animation-duration: 3.6s; }
.wf-mist .m5 { animation-delay: 3.1s; animation-duration: 5s; }
/* Брызги отскакивают вверх */
.wf-drops circle { opacity: 0; animation: aDropL 1.4s ease-out infinite; }
.wf-drops .d2 { animation-name: aDropL; animation-delay: .5s; animation-duration: 1.2s; }
.wf-drops .d3 { animation-name: aDropUp; animation-delay: .2s; }
.wf-drops .d4 { animation-name: aDropR; animation-delay: .8s; animation-duration: 1.3s; }
.wf-drops .d5 { animation-name: aDropR; animation-delay: .35s; }
.wf-glint { animation: aTwinkle 1.8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.wf-glint.g2 { animation-delay: .6s; } .wf-glint.g3 { animation-delay: 1.1s; } .wf-glint.g4 { animation-delay: 1.5s; }
.wf-moon { animation: aMoon 6s ease-in-out infinite alternate; }
.wf-vines path { transform-box: fill-box; transform-origin: top center; animation: aSway 5s ease-in-out infinite alternate; }

@media (max-width: 760px) {
    .waterfall { width: 100%; opacity: .55; }
    .page-info .info-hero::after { background: linear-gradient(180deg, rgba(11, 33, 26, .55), rgba(11, 33, 26, .85)); }
}
.page-info .info-button span { display: inline-block; animation: aBounce 1.8s ease-in-out infinite; }
.page-info .teacher-card { transition: transform .5s var(--ease-out), box-shadow .5s; }
.page-info .teacher-card:hover { transform: translateY(-10px); box-shadow: 0 26px 50px rgba(16, 45, 36, .16); }
.page-info .teacher-photo img { transition: transform 1s var(--ease-out); }
.page-info .teacher-card:hover .teacher-photo img { transform: scale(1.08); }
.page-info .admission-steps { position: relative; }
.page-info .admission-step.is-visible .step-number { animation: aPop .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + .3s); }
.page-info .students-table tbody tr { transition: background .25s; }
.page-info .rank-gold, .page-info .rank-silver, .page-info .rank-bronze { position: relative; overflow: hidden; }
.page-info .rank-gold::after, .page-info .rank-silver::after, .page-info .rank-bronze::after {
    content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
    transform: translateX(-120%); animation: aMedal 3.5s ease-in-out infinite;
}
.page-info .rank-silver::after { animation-delay: .4s; }
.page-info .rank-bronze::after { animation-delay: .8s; }
.page-info .quote-star { display: inline-block; animation: aSpin 24s linear infinite; }

/* ---------- Общий тёмный блок со входом (журнал, экзамены, вход) ---------- */
.journal-hero { isolation: isolate; }
.journal-hero::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9a45c' stroke-width='0.8'%3E%3Crect x='24' y='24' width='36' height='36'/%3E%3Crect x='24' y='24' width='36' height='36' transform='rotate(45 42 42)'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); mask-image: linear-gradient(to left, #000, transparent 70%);
}
.journal-intro > * { opacity: 0; animation: aRise .9s var(--ease-out) forwards; }
.journal-intro > :nth-child(1) { animation-delay: .2s; }
.journal-intro > :nth-child(2) { animation-delay: .4s; }
.journal-intro > .journal-gold-line { animation: aLineGrow .8s var(--ease-out) .8s forwards; transform-origin: left; }
.journal-intro > :nth-child(4) { animation-delay: .9s; }
.journal-intro > .journal-features { animation-delay: 1.1s; }
.journal-feature { opacity: 0; animation: aSlideIn .7s var(--ease-out) forwards; }
.journal-feature:nth-child(1) { animation-delay: 1.3s; }
.journal-feature:nth-child(2) { animation-delay: 1.5s; }
.journal-feature:nth-child(3) { animation-delay: 1.7s; }
.feature-icon { transition: transform .5s var(--ease-out), background .3s, color .3s; }
.journal-feature:hover .feature-icon { transform: rotate(45deg); background: #c9a45c; color: #12392b; }
.journal-login-side { perspective: 1200px; }
.journal-login-side .login-card { animation: aCardIn 1.1s var(--ease-out) .5s both; transform-origin: right center; }
.login-emblem img { animation: aFloat 4s ease-in-out infinite; }
.journal-decoration { z-index: 0; }

/* ЖУРНАЛ: снизу вверх плывут оценки, как в тетради */
.floating-marks { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.floating-marks span {
    position: absolute; bottom: -60px; font-family: Georgia, serif; font-weight: 700; color: rgba(216, 189, 125, .16);
    animation: aMarkFloat linear infinite;
}
.page-journal .journal-decoration-one { animation: aSpin 70s linear infinite; border-style: dashed; }
.page-journal .journal-decoration-two { animation: aSpin 45s linear infinite reverse; }

/* ЭКЗАМЕНЫ: золотой луч проходит по фону, кольца — как циферблат */
.page-exams .journal-hero::after {
    content: ""; position: absolute; top: -20%; bottom: -20%; left: -30%; width: 30%; z-index: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(229, 208, 156, .12), transparent);
    transform: skewX(-15deg); animation: aBeam 7s ease-in-out 1.5s infinite;
}
.page-exams .journal-decoration { border-style: dashed; border-width: 2px; border-color: rgba(201, 164, 92, .18); }
.page-exams .journal-decoration-one { animation: aSpin 60s linear infinite; }
.page-exams .journal-decoration-two { animation: aSpin 12s steps(60) infinite reverse; }

/* ВХОД: мерцающие звёзды и мягкое свечение карточки */
.twinkle-stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.twinkle-stars i {
    position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #f1dc9e;
    box-shadow: 0 0 6px #f1dc9e; animation: aTwinkle ease-in-out infinite alternate;
}
.page-login .login-card { animation: aCardIn 1.1s var(--ease-out) .4s both, aGlow 4s ease-in-out 2s infinite alternate; }
.page-login .journal-decoration { animation: aBreath 8s ease-in-out infinite alternate; }

/* ---------- КАБИНЕТЫ: лёгкие эффекты ---------- */
.view:not([hidden]), .sheet-panel, .panel, .parent-card { animation: aFadeUp .5s var(--ease-out) both; }
.stat { animation: aPop .6s var(--ease-out) both; }
.stat:nth-child(2) { animation-delay: .1s; }
.stat:nth-child(3) { animation-delay: .2s; }
.teacher-course-block, .subject-card { animation: aFadeUp .6s var(--ease-out) both; }
.teacher-course-block:nth-child(2), .subject-card:nth-child(2) { animation-delay: .1s; }
.teacher-course-block:nth-child(3), .subject-card:nth-child(3) { animation-delay: .2s; }
.teacher-course-block:nth-child(4), .subject-card:nth-child(4) { animation-delay: .3s; }
.subject-card:nth-child(n+5) { animation-delay: .4s; }
.teacher-subject-card { transition: transform .35s var(--ease-out), box-shadow .35s; }
.teacher-subject-card:hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(25, 55, 40, .12); }
.mark-item { animation: aPop .45s var(--ease-out) both; }
.mark-item:nth-child(2) { animation-delay: .05s; } .mark-item:nth-child(3) { animation-delay: .1s; }
.mark-item:nth-child(4) { animation-delay: .15s; } .mark-item:nth-child(5) { animation-delay: .2s; }
.mark-item:nth-child(n+6) { animation-delay: .25s; }
.cell.just-saved { animation: aSaved 1.2s ease; }
.save-status.is-ok .dot { animation: aDotPulse 2.4s ease-in-out infinite; }
.row-state.ok { display: inline-block; animation: aPop .4s var(--ease-out); }
.exam-item { transition: transform .3s var(--ease-out), border-color .3s, background .3s; }
.exam-item:hover { transform: translateY(-3px); }

/* ---------- Ключевые кадры ---------- */
@keyframes aHeaderDown { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aShine { from { left: -60%; } to { left: 130%; } }
@keyframes aRise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes aFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes aSlideIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes aLineGrow { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes aPop { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes aFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes aBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes aSpin { to { transform: rotate(360deg); } }
@keyframes aBreath { from { transform: scale(1); opacity: .6; } to { transform: scale(1.08); opacity: 1; } }
@keyframes aLattice { from { background-position: 0 0, 0 0; } to { background-position: 360px 0, -360px 0; } }
@keyframes aRipple { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes aWave { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
@keyframes aMedal { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes aCardIn { from { opacity: 0; transform: rotateY(-16deg) translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes aGlow { from { box-shadow: 0 25px 75px rgba(0, 0, 0, .2), 0 0 0 rgba(201, 164, 92, 0); } to { box-shadow: 0 25px 75px rgba(0, 0, 0, .2), 0 0 40px rgba(201, 164, 92, .35); } }
@keyframes aMarkFloat {
    0% { transform: translateY(0) rotate(-8deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-115vh) rotate(10deg); opacity: 0; }
}
@keyframes aBeam { 0% { left: -30%; } 60%, 100% { left: 130%; } }
@keyframes aTwinkle { from { opacity: .1; transform: scale(.6); } to { opacity: .9; transform: scale(1.2); } }
@keyframes aFadeIn { to { opacity: 1; } }
@keyframes aFall { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -80; } }
@keyframes aFlowLeft { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -60; } }
@keyframes aWfRipple { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes aMist { 0% { transform: translateY(0) scale(.8); opacity: .15; } 40% { opacity: .55; } 100% { transform: translateY(-46px) scale(1.6); opacity: 0; } }
@keyframes aDropL { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-22px, -36px); opacity: 0; } }
@keyframes aDropR { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(24px, -32px); opacity: 0; } }
@keyframes aDropUp { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(4px, -48px); opacity: 0; } }
@keyframes aMoon { from { opacity: .7; } to { opacity: 1; } }
@keyframes aSway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes aSaved { 0% { background: #c8ecd3; box-shadow: inset 0 0 0 2px #2f8a55; } 100% { background: transparent; box-shadow: inset 0 0 0 2px transparent; } }
@keyframes aDotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 138, 85, .5); } 50% { box-shadow: 0 0 0 6px rgba(47, 138, 85, 0); } }

/* Без анимации — для тех, кто отключил её в системе */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js-reveal .reveal, .journal-intro > *, .journal-feature, .page-info .info-hero-content > * { opacity: 1 !important; transform: none !important; }
    .waterfall { opacity: 1 !important; }
    .wf-ripple, .wf-drops circle { opacity: 0 !important; }
    .floating-marks, .twinkle-stars, .scroll-progress { display: none; }
}

/* Печать — без эффектов */
@media print {
    .scroll-progress, .floating-marks, .twinkle-stars { display: none !important; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Логотип: эмблема в белом круге с золотым ободком ---------- */
.logo-symbol, .login-logo, .sheet-brand img, .admin-brand img, .parent-brand img, .exam-header .brand img {
    object-fit: contain !important;
    background: #fff;
    border-radius: 50% !important;
    padding: 3px;
    box-shadow: 0 0 0 1.5px #c9a45c, 0 3px 10px rgba(16, 45, 36, .18);
}
.logo-symbol { width: 46px !important; height: 46px !important; border: 0 !important; }
.login-emblem { border-radius: 50%; padding: 0 !important; border: 0 !important; background: transparent !important; }
.login-logo { width: 100%; height: 100%; }
.sheet-brand img { width: 44px; height: 44px; }
.admin-brand img, .parent-brand img, .exam-header .brand img { width: 36px; height: 36px; }
@media print { .p-institute img, .p-head img { object-fit: contain; border-radius: 50%; } }

/* ---------- ЭКЗАМЕНЫ: звёздное небо и падающие звёзды (метеоры) ---------- */
.falling-stars { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.falling-stars .shoot {
    position: absolute; width: var(--len, 180px); height: 1.6px; border-radius: 2px; opacity: 0;
    background: linear-gradient(90deg, #fffaf0 0%, rgba(255, 236, 190, .85) 12%, rgba(241, 220, 158, .35) 45%, transparent 100%);
    transform-origin: left center;
    transform: rotate(var(--angle, -32deg)) translateX(0) scaleX(.1);
    filter: drop-shadow(0 0 4px rgba(255, 240, 200, .9));
    animation: aShoot 11s cubic-bezier(.3, 0, .7, 1) infinite;
}
/* Яркая головка падающей звезды */
.falling-stars .shoot::before {
    content: ""; position: absolute; left: -3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
    background: #fffdf5; box-shadow: 0 0 6px 2px #fff4d0, 0 0 16px 5px rgba(241, 220, 158, .7);
}
/* Неподвижные звёзды: точки света, мерцают неровно, как настоящие */
.falling-stars .ss {
    position: absolute; border-radius: 50%;
    background: var(--tint, #fff);
    box-shadow: 0 0 3px 1px var(--tint, #fff), 0 0 8px 1px rgba(255, 244, 214, .35);
    animation: aTwinkleReal ease-in-out infinite;
}
/* Яркие звёзды — с тонкими лучами крестом */
.falling-stars .ss-big { box-shadow: 0 0 4px 2px var(--tint, #fff), 0 0 14px 4px rgba(255, 240, 205, .45); animation-name: aTwinkleBright; }
.falling-stars .ss-big::before, .falling-stars .ss-big::after {
    content: ""; position: absolute; left: 50%; top: 50%; border-radius: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 252, 240, .95), transparent);
}
.falling-stars .ss-big::before { width: 26px; height: 1px; margin: -0.5px 0 0 -13px; }
.falling-stars .ss-big::after { width: 1px; height: 26px; margin: -13px 0 0 -0.5px; background: linear-gradient(180deg, transparent, rgba(255, 252, 240, .95), transparent); }
@keyframes aTwinkleReal {
    0%, 100% { opacity: 1; }
    20% { opacity: var(--min, .4); }
    35% { opacity: .9; }
    55% { opacity: calc(var(--min, .4) + .15); }
    70% { opacity: 1; }
    85% { opacity: var(--min, .4); }
}
@keyframes aTwinkleBright {
    0%, 100% { opacity: 1; transform: scale(1); }
    30% { opacity: .7; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1.15); }
    75% { opacity: .8; transform: scale(.95); }
}
@keyframes aShoot {
    0% { opacity: 0; transform: rotate(var(--angle, -32deg)) translateX(0) scaleX(.1); }
    0.6% { opacity: 1; }
    4% { opacity: 1; transform: rotate(var(--angle, -32deg)) translateX(calc(var(--dist, 560px) * -0.55)) scaleX(1); }
    7% { opacity: 0; transform: rotate(var(--angle, -32deg)) translateX(calc(var(--dist, 560px) * -1)) scaleX(.35); }
    100% { opacity: 0; transform: rotate(var(--angle, -32deg)) translateX(calc(var(--dist, 560px) * -1)) scaleX(.35); }
}
@media (prefers-reduced-motion: reduce) { .falling-stars { display: none; } }
@media print { .falling-stars { display: none !important; } }

/* ---------- Водопад: рыбки выпрыгивают из воды ---------- */
.fish { opacity: 0; animation: aFishJump 6s linear infinite; }
.fish-splash { opacity: 0; transform-box: fill-box; transform-origin: center; }
.fish-splash.out { animation: aSplashOut 6s ease-out infinite; }
.fish-splash.in { animation: aSplashIn 6s ease-out infinite; }
.fish.f1, .fish-splash.f1 { animation-delay: 1.5s; }
.fish.f2, .fish-splash.f2 { animation-duration: 7.5s; animation-delay: 4s; }
.fish.f3, .fish-splash.f3 { animation-duration: 9s; animation-delay: 6.5s; }
@keyframes aFishJump {
    0% { transform: translate(0, 10px) rotate(-62deg); opacity: 0; }
    2% { transform: translate(3px, 0) rotate(-58deg); opacity: 1; }
    6% { transform: translate(16px, -36px) rotate(-34deg); }
    10% { transform: translate(32px, -54px) rotate(0deg); }
    14% { transform: translate(48px, -36px) rotate(34deg); }
    18% { transform: translate(61px, 0) rotate(58deg); opacity: 1; }
    20% { transform: translate(64px, 10px) rotate(62deg); opacity: 0; }
    100% { transform: translate(64px, 10px) rotate(62deg); opacity: 0; }
}
@keyframes aSplashOut {
    0% { opacity: .9; transform: scale(.3); }
    10% { opacity: 0; transform: scale(2.4); }
    100% { opacity: 0; transform: scale(2.4); }
}
@keyframes aSplashIn {
    0%, 17% { opacity: 0; transform: scale(.3); }
    19% { opacity: .9; transform: scale(.4); }
    32% { opacity: 0; transform: scale(2.6); }
    100% { opacity: 0; transform: scale(2.6); }
}
@media (prefers-reduced-motion: reduce) { .fish, .fish-splash { display: none; } }