/* ==========================================================================
   EcoMC — главная (новый дизайн)
   ========================================================================== */

body.page-home {
    --green: #62d36c;
    --green-deep: #3f9e4a;
    --pink: #f4a0d0;
    --ink: #12131a;
    --panel: rgba(255, 255, 255, 0.035);
    --line: rgba(255, 255, 255, 0.1);
    --muted: #c0c4ce;
    --radius-xl: 28px;
    --radius-lg: 22px;
    background: var(--ink);
    color: #f4f5f7;
    font-family: Manrope, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

/* Фоновое свечение на всю страницу: зелёное сверху справа, розовое слева */
body.page-home::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* Сверху вниз: свечения → затемнение для читаемости → лесная картинка как на баннере */
    background:
        radial-gradient(900px 620px at 88% -6%, rgba(98, 211, 108, 0.14), transparent 62%),
        radial-gradient(760px 560px at -4% 46%, rgba(244, 160, 208, 0.07), transparent 62%),
        linear-gradient(90deg, rgba(10, 12, 18, 0.62) 0%, rgba(10, 12, 18, 0.28) 45%, rgba(10, 12, 18, 0.1) 100%),
        linear-gradient(180deg, rgba(10, 12, 18, 0.35) 0%, rgba(10, 12, 18, 0.5) 100%),
        url("../../img/design/home-forest-bg-sakura2.jpg") center / cover no-repeat,
        var(--ink);
}

/* Светлячки (assets/js/fireflies.js) — поверх фона, под содержимым */
.fireflies {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body.page-home a {
    color: inherit;
    text-decoration: none;
}

body.page-home .site-main {
    padding: 0;
}

.home-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.home-wrap {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

/* Заголовки секций + звёздочка-разделитель из макета */
.home-title {
    margin: 0 0 40px;
    text-align: center;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
}

.home-title::after {
    content: "";
    display: block;
    width: 326px;
    height: 16px;
    margin: 8px auto 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='326' height='16' viewBox='0 0 326 16' shape-rendering='crispEdges'%3E%3Cdefs%3E%3ClinearGradient id='a'%3E%3Cstop offset='0' stop-color='%2362d36c' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%2362d36c' stop-opacity='.8'/%3E%3C/linearGradient%3E%3ClinearGradient id='b'%3E%3Cstop offset='0' stop-color='%2362d36c' stop-opacity='.8'/%3E%3Cstop offset='1' stop-color='%2362d36c' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='7' width='141' height='2' fill='url(%23a)'/%3E%3Crect x='185' y='7' width='141' height='2' fill='url(%23b)'/%3E%3Crect x='145' y='7' width='2' height='2' fill='%2362d36c' fill-opacity='.75'/%3E%3Crect x='179' y='7' width='2' height='2' fill='%2362d36c' fill-opacity='.75'/%3E%3Crect x='161' y='2' width='4' height='4' fill='%23f7a8c9'/%3E%3Crect x='155' y='6' width='4' height='4' fill='%23f7a8c9'/%3E%3Crect x='167' y='6' width='4' height='4' fill='%23f7a8c9'/%3E%3Crect x='161' y='10' width='4' height='4' fill='%23f7a8c9'/%3E%3Crect x='161' y='6' width='4' height='4' fill='%23ffe9a8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.home-center {
    display: flex;
    justify-content: center;
    margin: 36px 0 0;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #72df7c, var(--green));
    color: #0f2415;
    font: inherit;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(98, 211, 108, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(98, 211, 108, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.home-btn:focus-visible,
.home-ip-btn:focus-visible,
.home-faq-q:focus-visible,
.home-shot-btn:focus-visible,
.home-totop:focus-visible,
.home-form input:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Иконки соцсетей в подвале */

.home-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-social a {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.18s ease, transform 0.18s ease;
}

.home-social a:hover {
    background: rgba(98, 211, 108, 0.18);
    transform: translateY(-2px);
}

.home-social img {
    display: block;
    width: 30px;
    height: auto;
    opacity: 0.95;
}

/* ---------- Герой ---------- */

.home-hero {
    padding: 28px 0 20px;
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 540px;
}

.home-hero h1 {
    margin: 0;
    font-family: theboldprocyr, Arial, sans-serif;
    font-size: clamp(34px, 3.55vw, 52px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.home-hero h1 .line {
    display: block;
    white-space: nowrap;
}

.home-hero h1 .accent,
.home-title .accent {
    color: var(--green);
}

.home-hero-copy p {
    max-width: 440px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.5;
}

/* Кнопка «Начать играть» и блок с IP одной высоты (60px) */
.home-hero .home-btn {
    min-height: 60px;
    padding: 0 32px;
    font-size: 16px;
}

.home-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

/* Кнопка и IP держатся в одну строку на десктопе (IP стал длиннее из-за порта) */
@media (min-width: 900px) {
    .home-hero-actions {
        flex-wrap: nowrap;
        width: max-content;
    }

    .home-ip-line {
        white-space: nowrap;
    }
}

.home-ip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 22px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
}

/* Весь блок кликабелен: копирует IP */
.home-ip {
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.home-ip:hover {
    border-color: rgba(98, 211, 108, 0.45);
    background: rgba(98, 211, 108, 0.06);
}

.home-ip:hover .home-ip-btn {
    background: rgba(98, 211, 108, 0.26);
}

.home-ip-btn svg {
    width: 24px;
    height: 24px;
}

.home-ip-btn {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(98, 211, 108, 0.14);
    color: var(--green);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.home-ip-btn:hover {
    background: rgba(98, 211, 108, 0.26);
}

.home-ip-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}

.home-ip-line {
    font-weight: 800;
    font-size: 14.5px;
}

.home-ip-ver {
    color: #8e93a0;
    font-size: 12.5px;
}

/* Ветка «выходит» из правого края окна: арт привязан к краю экрана, а не к колонке */
.home-hero {
    --art-w: clamp(560px, 56vw, 1180px);
    position: relative;
    /* Режем только справа (ветка уходит за край), свечение сверху не обрезаем */
    overflow-x: clip;
    overflow-y: visible;
}

.home-hero-grid {
    min-height: max(540px, calc(var(--art-w) * 0.7));
}

.home-hero-art {
    position: absolute;
    top: 50%;
    /* 14% картинки уходит за край окна — срез ветки приходится на кору */
    right: calc(var(--art-w) * -0.14);
    width: var(--art-w);
    transform: translateY(-50%);
    pointer-events: none;
}

/* Мягкое свечение без жёсткого края: градиент замкнут внутри элемента */
.home-hero-art::before {
    content: "";
    position: absolute;
    left: 14%;
    top: -12%;
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(226, 255, 232, 0.5), rgba(98, 211, 108, 0.26) 46%, rgba(98, 211, 108, 0) 100%);
    pointer-events: none;
}

/* Тёплое жёлтое свечение вокруг жителя: под артом, неподвижное (не плывёт вместе с веткой) */
.home-hero-art::after {
    content: "";
    position: absolute;
    left: 24%;
    top: 0%;
    width: 56%;
    height: 82%;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, rgba(255, 232, 130, 0.5), rgba(255, 205, 80, 0.3) 42%, rgba(255, 190, 60, 0) 100%);
    filter: blur(14px);
    pointer-events: none;
}

/* Слой с пчёлами плывёт синхронно с .hero-rig, поверх арта */
.hero-fx {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    animation: home-float 9s linear infinite;
    will-change: transform;
    transition: opacity 0.6s ease;
}

html.hero-wait .hero-fx {
    opacity: 0;
}

/* Две пчелы у цветов на ветке (копии пчёл из «Почему EcoMC») */
.hero-fx .home-bee {
    width: clamp(64px, calc(var(--art-w) * 0.11), 118px);
}

.hero-fx .home-bee-hero-1 {
    left: 9%;
    top: calc(-3% + 30px);
    right: auto;
    animation: home-bee-a 12s ease-in-out -3s infinite;
}

.hero-fx .home-bee-hero-2 {
    left: 75%;
    top: 57%;
    right: auto;
    animation: home-bee-b 15s ease-in-out -8s infinite;
}

/* Весь арт (основа + оживающие детали) плавает как одно целое */
.hero-rig {
    position: relative;
    z-index: 1;
    animation: home-float 9s linear infinite;
    will-change: transform;
    transition: opacity 0.6s ease;
}

/* Арт скрыт, пока не загрузятся все слои (см. скрипт в index.php) */
html.hero-wait .hero-rig {
    opacity: 0;
}

.hero-base {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
}

/* Слои анимации лежат поверх основы; координаты — в % от всей картинки 1920×1280 */
.hero-layer {
    position: absolute;
    display: block;
    max-width: none;
    height: auto;
}

.hero-cat-head {
    position: absolute;
    inset: 0;
    display: block;
    will-change: transform;
    animation: hero-nod 17s ease-in-out -3.5s infinite;
}

.hero-hand    { left: 39.6875%; top: 37.8906%; width: 8.5938%; transform-origin: 5% 65%; will-change: transform; animation: hero-stroke 2.6s ease-in-out infinite; }
.hero-sleeve  { left: 35.9375%; top: 36.7188%; width: 6.0417%; transform-origin: 60% 0%; will-change: transform; animation: hero-elbow 2.6s ease-in-out infinite; }
.hero-cathead { left: 47.9167%; top: 33.9063%; width: 8.5417%; }
.hero-cateyes { left: 50.4688%; top: 39.2969%; width: 5.2604%; }
/* Глаза котика: три состояния (вправо — в основном слое, прямо и влево — поверх), плавный кроссфейд */
.hero-eyes-c, .hero-eyes-l { left: 50.9375%; top: 40.1563%; width: 4.2708%; opacity: 0; will-change: opacity; }
.hero-eyes-c { animation: hero-look-c 17s linear -3.5s infinite; }
.hero-eyes-l { animation: hero-look-l 17s linear -3.5s infinite; }
.hero-catlids { left: 50.2604%; top: 38.9844%; width: 5.6771%; opacity: 0; will-change: opacity; animation: hero-lids 17s ease-in-out -3.5s infinite; }
.hero-vlids   { left: 41.9792%; top: 19.6875%; width: 10.1042%; opacity: 0; will-change: opacity; animation: hero-vblink 5.6s linear -1.5s infinite; }

/* Житель гладит котика: рука плавно скользит вдоль спины и возвращается */
@keyframes hero-stroke {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-7%, 2%) rotate(-1.4deg); }
}

/* Рукав с локтем чуть уходит в сторону вместе с рукой; рука при этом заходит под манжету */
@keyframes hero-elbow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-2.5%, 0.8%) rotate(-0.7deg); }
}

/* Цикл котика 17 с (с 0 — просыпается):
   0–1 c голова поднимается, глаза открываются; 1–5 c хитро смотрит по сторонам;
   5,5–7,2 c прикрывает глаза и опускает голову; 7–17 c дремлет */
@keyframes hero-nod {
    0%     { transform: translateY(1.3%); }
    5.9%   { transform: translateY(0); }
    36.5%  { transform: translateY(0); }
    42.4%, 100% { transform: translateY(1.3%); }
}

@keyframes hero-lids {
    0%, 2.4% { opacity: 1; }
    5.9%, 32.4% { opacity: 0; }
    38%, 100% { opacity: 1; }
}

/* 5,9–8,8 % вправо→прямо→влево, 14,7–17,6 % обратно вправо, 23,5–25,9 % прямо, 29,4–31 % снова вправо */
@keyframes hero-look-c {
    0%, 5.9%    { opacity: 0; }
    7.3%, 16.2% { opacity: 1; }
    17.6%, 22.4% { opacity: 0; }
    23.5%, 29.4% { opacity: 1; }
    31%, 100%   { opacity: 0; }
}
@keyframes hero-look-l {
    0%, 7.3%    { opacity: 0; }
    8.8%, 14.7% { opacity: 1; }
    16.2%, 100% { opacity: 0; }
}

/* Житель моргает раз в ~5,6 с */
@keyframes hero-vblink {
    0%, 90% { opacity: 0; }
    91.5%, 94.5% { opacity: 1; }
    96%, 100% { opacity: 0; }
}

/* Плашка «скопировано» у курсора — нужна на всех страницах (подвал есть везде) */
.copy-toast {
    position: fixed;
    z-index: 1000;
    padding: 6px 12px;
    border: 1px solid rgba(98, 211, 108, 0.45);
    border-radius: 999px;
    background: rgba(24, 26, 35, 0.96);
    color: #fff;
    font: 700 13px/1.2 Manrope, "Segoe UI", sans-serif;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, calc(-100% - 12px));
    animation: copy-toast 1.8s ease forwards;
}

@keyframes copy-toast {
    0% {
        opacity: 0;
        margin-top: 6px;
    }
    12% {
        opacity: 1;
        margin-top: 0;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        margin-top: -6px;
    }
}

/* Онлайн под кнопками */
.home-online {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 600;
}

.home-online[hidden] {
    display: none;
}

.home-online strong {
    color: #fff;
    font-weight: 800;
}

.home-online-dot {
    position: relative;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(98, 211, 108, 0.8);
}

.home-online-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: home-online-pulse 2s ease-out infinite;
}

@keyframes home-online-pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .home-online-dot::after { animation: none; }
}

/* Текст героя чуть выше центра, чтобы он держался вровень с жителем на ветке */
.home-hero-copy {
    padding-bottom: clamp(0px, 4vw, 80px);
}

.home-hero-copy p {
    max-width: 27em;
}

/* Широкие мониторы: текст растёт вместе с картинкой, а не теряется рядом с ней */
@media (min-width: 1500px) {
    .home-hero h1 {
        font-size: clamp(52px, 2.8vw, 76px);
    }

    .home-hero-copy p {
        margin-top: 0.9em;
        font-size: clamp(16.5px, 1.1vw, 28px);
    }

    .home-hero-actions {
        gap: 1.2em;
        margin-top: 1.9em;
        font-size: clamp(15px, 0.95vw, 24px);
    }

    /* Обе плашки по 4.1em + рамка, чтобы кнопка и IP-блок совпадали по высоте */
    .home-hero .home-btn {
        /* font-size кнопки 1.05em, поэтому 4.1em родителя = 4.1em / 1.05 в её собственных em */
        min-height: calc(4.1em / 1.05 + 2px);
        padding: 0 1.9em;
        font-size: 1.05em;
    }

    .home-hero .home-ip {
        gap: 0.8em;
        padding: 0.5em 1.4em 0.5em 0.5em;
    }

    .home-hero .home-ip-btn {
        font-size: inherit; /* у <button> по умолчанию 13.3px, из-за чего круг не масштабировался */
        width: 3.1em;
        height: 3.1em;
    }

    .home-hero .home-ip-btn svg {
        width: 1.6em;
        height: 1.6em;
    }

    .home-hero .home-ip-line {
        font-size: 1em;
    }

    .home-hero .home-ip-ver {
        font-size: 0.86em;
    }

    .home-online {
        font-size: clamp(14.5px, 0.95vw, 22px);
    }
}

/* Плавное «дыхание»: синусоидальное ускорение и translate3d — движение идёт на GPU и не «ступенькой» по пикселям */
@keyframes home-float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
    }
    50% {
        transform: translate3d(0, -12px, 0);
        animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1);
    }
}

/* ---------- Секции ---------- */

.home-section {
    padding: 64px 0;
    scroll-margin-top: 90px;
}

.home-why {
    position: relative;
}

.home-bee {
    position: absolute;
    display: block;
    width: 118px;
    aspect-ratio: 3 / 2;
    pointer-events: none;
    z-index: 2;
    will-change: transform;
}

/* Пчела собрана из трёх слоёв одного размера: тело и два крыла.
   Крылья машут вокруг точки крепления, всё вместе слегка покачивается в полёте. */
.bee-rig {
    position: absolute;
    inset: 0;
    display: block;
    will-change: transform;
    animation: bee-bob 1.3s ease-in-out infinite;
}

.bee-rig img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

.bee-body {
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
}

.bee-wing {
    will-change: transform;
    animation-duration: 0.15s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

/* Точки крепления крыльев (в % от картинки) подобраны по каждой пчеле */
.home-bee-left .bee-wing-l { transform-origin: 30.3% 30.5%; animation-name: bee-flap-up; }
.home-bee-left .bee-wing-r { transform-origin: 66.1% 26.9%; animation-name: bee-flap-up-inv; }
.home-bee-right .bee-wing-l { transform-origin: 33.6% 26.7%; animation-name: bee-flap-up; animation-duration: 0.17s; }
.home-bee-right .bee-wing-r { transform-origin: 69.2% 30.3%; animation-name: bee-flap-up-inv; animation-duration: 0.17s; }
.home-bee-right .bee-rig { animation-duration: 1.6s; animation-delay: -0.7s; }

@keyframes bee-flap-up {
    from { transform: rotate(16deg); }
    to   { transform: rotate(-12deg); }
}

@keyframes bee-flap-up-inv {
    from { transform: rotate(-16deg); }
    to   { transform: rotate(12deg); }
}

/* Лёгкое покачивание корпуса в такт полёту */
@keyframes bee-bob {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-2.5deg); }
    50%      { transform: translate3d(0, -4px, 0) rotate(2.5deg); }
}

/* Пчёлки «кружат» на месте: небольшой неровный маршрут со сносом вбок и лёгким наклоном.
   У каждой свой путь и длительность, поэтому движения не совпадают. */
.home-bee-left {
    left: max(6px, calc(50% - 640px));
    top: 8px;
    animation: home-bee-a 13s ease-in-out infinite;
}

.home-bee-right {
    right: max(6px, calc(50% - 650px));
    top: 74px;
    animation: home-bee-b 17s ease-in-out infinite;
    animation-delay: -6s;
}

@keyframes home-bee-a {
    /* Наклон по ходу движения: летит вправо — клонится вправо, влево — влево */
    0%   { transform: translate(0, 0) rotate(5deg); }
    13%  { transform: translate(12px, -14px) rotate(8deg); }
    29%  { transform: translate(28px, -6px) rotate(3deg); }
    44%  { transform: translate(20px, 10px) rotate(-8deg); }
    58%  { transform: translate(6px, 18px) rotate(-12deg); }
    74%  { transform: translate(-12px, 8px) rotate(-7deg); }
    88%  { transform: translate(-8px, -8px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(5deg); }
}

@keyframes home-bee-b {
    0%   { transform: translate(0, 0) rotate(-9deg); }
    17%  { transform: translate(-14px, 8px) rotate(-12deg); }
    33%  { transform: translate(-30px, 0) rotate(-4deg); }
    46%  { transform: translate(-22px, -14px) rotate(10deg); }
    61%  { transform: translate(-4px, -18px) rotate(12deg); }
    77%  { transform: translate(12px, -6px) rotate(6deg); }
    90%  { transform: translate(8px, 10px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(-9deg); }
}

/* Карточки «Почему EcoMC» */
.home-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.home-why-card {
    position: relative;
    min-height: 380px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-size: cover;
    background-position: center top;
    border: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-why-card:hover {
    transform: translateY(-6px);
    border-color: rgba(98, 211, 108, 0.45);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(98, 211, 108, 0.2);
}

.home-why-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, 0) 30%, rgba(8, 10, 16, 0.55) 62%, rgba(8, 10, 16, 0.88) 100%);
}

.home-why-num,
.home-why-body {
    position: relative;
    z-index: 1;
}

.home-why-num {
    align-self: flex-end;
    min-width: 52px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(12, 14, 20, 0.45);
    backdrop-filter: blur(8px);
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.home-why-body h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 800;
}

.home-why-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #e6e9ef;
}

.home-why-arrow {
    display: none;
}

.home-why-counter {
    display: none;
    margin: 4px 0 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
}

.home-why-counter span {
    color: var(--green);
}

/* ---------- Скриншоты ---------- */

.home-shots-wrap {
    width: min(780px, calc(100% - 96px));
}

.home-shots {
    position: relative;
}

.home-shot-frame {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #0e1016;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.4), 0 0 0 8px rgba(255, 255, 255, 0.025);
}

.home-shot {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 15% 50%; /* уводит от чата, который на части кадров справа */
}

.home-shot.is-active {
    display: block;
    animation: home-fade 0.35s ease;
}

@keyframes home-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.home-shot-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, #72df7c, var(--green));
    color: #0f2415;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(98, 211, 108, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.18s ease;
}

.home-shot-prev { left: -52px; }
.home-shot-next { right: -52px; }

.home-shot-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 14px 30px rgba(98, 211, 108, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.home-shots {
    margin-bottom: 40px;
}

.home-counter {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 18px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
}

.home-counter span {
    color: var(--green);
}

/* ---------- FAQ ---------- */

.home-faq-wrap {
    width: min(820px, calc(100% - 40px));
}

.home-faq {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    /* Та же тёмно-серая подложка, что на внутренних страницах — иначе FAQ просвечивает лес */
    background: rgba(18, 19, 26, 0.82);
    overflow: hidden;
}

.home-faq-item + .home-faq-item {
    border-top: 1px solid var(--line);
}

.home-faq-item.is-open {
    background: rgba(98, 211, 108, 0.05);
}

.home-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 26px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
}

.home-faq-q:hover {
    color: var(--green);
}

.home-faq-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.07);
    font-size: 20px;
    line-height: 1;
    color: #d5d7de;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.home-faq-item.is-open .home-faq-icon {
    background: var(--pink);
    color: #fff;
    transform: rotate(45deg);
}

.home-faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.home-faq-a > div {
    overflow: hidden;
}

.home-faq-item.is-open .home-faq-a {
    grid-template-rows: 1fr;
}

.home-faq-a p {
    margin: 0;
    padding: 0 70px 22px 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Ссылки на соцсети внутри ответов */
body.page-home .home-faq-a a.home-faq-link {
    color: var(--green);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(98, 211, 108, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

body.page-home .home-faq-a a.home-faq-link:hover {
    color: #8ae993;
    text-decoration-color: currentColor;
}

/* ---------- Баннер «мир EcoMC» ---------- */

.home-banner {
    position: relative;
    min-height: 440px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #6cbcf0 0%, #b9e3fa 52%, #dff3ff 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    isolation: isolate;
}

/* Блочные облака в стиле Minecraft */
.home-cloud {
    position: absolute;
    z-index: 0;
    width: 132px;
    height: 24px;
    background: rgba(255, 255, 255, 0.92);
    animation: home-drift 40s linear infinite;
}

.home-cloud::before {
    content: "";
    position: absolute;
    left: 24px;
    bottom: 100%;
    width: 64px;
    height: 24px;
    background: inherit;
}

.home-cloud-a { top: 118px; left: 7%; }
.home-cloud-b { top: 74px; right: 10%; width: 100px; animation-duration: 55s; }
.home-cloud-b::before { left: 18px; width: 48px; }
.home-cloud-c { top: 196px; right: 26%; width: 76px; opacity: 0.75; animation-duration: 70s; }
.home-cloud-c::before { left: 14px; width: 36px; }

@keyframes home-drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(34px); }
}

/* Земля: блоки травы и земли */
.home-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 84px;
    z-index: 0;
    background: repeating-conic-gradient(#5cb85c 0 25%, #4aa64d 0 50%) 0 0 / 32px 32px;
}

.home-ground::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    background: repeating-conic-gradient(#7b5337 0 25%, #6a452e 0 50%) 0 0 / 26px 26px;
}

.home-banner-bee,
.home-banner-mini {
    position: absolute;
    height: auto;
    z-index: 1;
    animation: home-float 5s ease-in-out infinite;
}

.home-banner-bee {
    left: 50%;
    top: 112px;
    width: min(250px, 42%);
    margin-left: calc(min(250px, 42%) / -2);
    filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.22));
}

.home-banner-mini {
    width: 92px;
    opacity: 0.95;
    filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.2));
}

.home-banner-mini-a { left: 14%; top: 196px; animation-delay: -1.6s; }
.home-banner-mini-b { right: 14%; top: 150px; animation-delay: -3.2s; }

.home-pills {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: min(660px, calc(100% - 32px));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 15px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 6px 14px rgba(180, 70, 130, 0.25);
}

.home-banner-copy {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 104px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.home-banner-ip {
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(12, 20, 14, 0.55);
    color: #f4fff4;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Форма ---------- */

.home-contact {
    padding-bottom: 150px;
}

.home-contact-wrap {
    width: min(860px, calc(100% - 40px));
}

.home-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    /* Та же тёмно-серая подложка, что на внутренних страницах */
    background: rgba(18, 19, 26, 0.82);
}

.home-form textarea {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 14px 22px;
    border-radius: 24px;
    border: 1.5px solid rgba(98, 211, 108, 0.7);
    background: rgba(12, 13, 18, 0.72);
    color: #fff;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-form textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(98, 211, 108, 0.14);
}

.home-form textarea::placeholder {
    color: #aeb3be;
}

/* Ловушка для ботов: людям не видна */
.home-form .home-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.home-form-status.is-error {
    color: #ff8a8a;
}

/* Ник в игре + Telegram в одной строке (слева от кнопки) */
.home-form-fields {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
    gap: 14px;
}

.home-form input {
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1.5px solid rgba(98, 211, 108, 0.7);
    background: rgba(12, 13, 18, 0.72);
    color: #fff;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(98, 211, 108, 0.14);
}

.home-form input::placeholder {
    color: #aeb3be;
}

.home-form-note,
.home-form-status {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    font-size: 12.5px;
    color: #9aa0ab;
}

body.page-home .home-form-note a {
    color: var(--green, #62d36c);
    font-weight: 700;
    text-decoration: none;
}

body.page-home .home-form-note a:hover {
    color: #8ef097;
}

.home-form-status {
    color: var(--green);
}

.home-form-status:empty {
    display: none;
}

/* ---------- Подвал: кот сидит на его верхней кромке ---------- */

.home-footer {
    position: relative;
    background: #171920;
    border-top: 1px solid var(--line);
}

.home-footer-inner {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 46px 0 30px;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.8fr 1fr 0.9fr;
    gap: 20px 28px;
    align-items: start;
}

.home-footer-logo {
    display: inline-block;
    line-height: 0;
    transition: opacity 0.15s ease;
}

.home-footer-logo:hover {
    opacity: 0.8;
}

.home-footer-brand p {
    margin: 10px 0 14px;
    color: #b7bcc6;
    font-size: 14px;
}

.home-footer strong {
    display: block;
    margin-bottom: 14px;
    color: var(--green);
    font-size: 14px;
    letter-spacing: 0.04em;
}

.home-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-footer li {
    margin: 0 0 9px;
    font-size: 14.5px;
}

.home-footer li a:hover {
    color: var(--green);
}

.home-footer-bottom {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 24px;
    border-top: 1px solid var(--line);
    text-align: right;
}

.home-footer-bottom p {
    margin: 0;
    color: #8f95a1;
    font-size: 13px;
}

.home-footer-bottom .home-footer-legal {
    margin-top: 6px;
}

.home-footer-bottom .home-footer-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-footer-bottom .home-footer-legal a:hover {
    color: #fff;
}

.home-footer-cat {
    position: absolute;
    /* Выходит за край контента вправо, чтобы не наезжать на форму обратной связи (860px) */
    right: max(8px, calc(50% - 650px));
    --cat-w: 210px;
    width: var(--cat-w);
    /* Внизу картинки прозрачный отступ ~13.9% ширины; вычитаем его, чтобы лапки и хвост стояли на линии футера (+27px вглубь, сидит на футере) при любой ширине котика */
    bottom: calc(100% - var(--cat-w) * 0.139 - 27px);
    aspect-ratio: 1 / 1;
    display: block;
    pointer-events: none;
}

/* Котик: слои одного размера. Дышит весь корпус, хвост виляет вокруг основания, глаза моргают.
   Только transform/opacity — анимации идут на GPU и не нагружают страницу. */
.cat-rig {
    position: absolute;
    inset: 0;
    display: block;
}

.cat-rig img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    display: block;
}

.cat-body,
.cat-lick,
.cat-tail img {
    filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.35));
}

.cat-tail {
    position: absolute;
    inset: 0;
    display: block;
    transform-origin: 63.5% 72.1%;
    will-change: transform;
    animation: cat-tail 5s ease-in-out infinite;
}

.cat-eyes {
    opacity: 0;
    will-change: opacity;
    animation: cat-blink 5.5s linear infinite;
}

/* Раз в 16 секунд котик поднимает переднюю лапку и пару секунд её лижет:
   плавно подменяем картинку на кадр «умывается», пока лижет — лёгкое покачивание головой */
.cat-lick {
    opacity: 0;
    transform-origin: 30% 40%;
    will-change: opacity, transform;
    animation: cat-lick 16s linear -5s infinite, cat-lick-bob 0.5s ease-in-out infinite alternate;
}

@keyframes cat-lick {
    0%, 48%  { opacity: 0; }
    50%, 66% { opacity: 1; }
    68%, 100% { opacity: 0; }
}

/* Пока кадр «умывается» полностью виден, основное тело прячем под ним —
   иначе из-под него торчит старая передняя лапка (в новом кадре она в другом месте) */
.cat-body {
    will-change: opacity;
    animation: cat-body-swap 16s linear -5s infinite;
}

@keyframes cat-body-swap {
    0%, 50%     { opacity: 1; }
    50.2%, 65.8% { opacity: 0; }
    66%, 100%   { opacity: 1; }
}

@keyframes cat-lick-bob {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    to   { transform: translate3d(0, -1px, 0) rotate(0.6deg); }
}

/* Ленивое покачивание с двумя быстрыми взмахами; минус — хвост вверх */
@keyframes cat-tail {
    0%, 100% { transform: rotate(-3deg); }
    22%      { transform: rotate(-11deg); }
    44%      { transform: rotate(3deg); }
    58%      { transform: rotate(-9deg); }
    72%      { transform: rotate(2deg); }
    86%      { transform: rotate(-4deg); }
}

/* Моргание: глаза закрыты ~0,15 с раз в 5,5 с, второе моргание чуть позже */
@keyframes cat-blink {
    0%, 52%   { opacity: 0; }
    53%, 55%  { opacity: 1; }
    56%, 88%  { opacity: 0; }
    89%, 90.5% { opacity: 1; }
    92%, 100% { opacity: 0; }
}

.home-totop {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 35;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--green);
    color: #123018;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.home-totop.is-on {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ---------- Появление при прокрутке ---------- */

.home-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-reveal.is-in {
    opacity: 1;
    transform: none;
}

.home-why-card.home-reveal {
    transition: opacity 0.6s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-why-card.home-reveal.is-in:hover {
    transform: translateY(-6px);
}

/* ---------- Адаптив ---------- */

@media (max-width: 980px) {
    .home-bee { display: none; }
    .home-hero-grid,
    .home-why-grid {
        grid-template-columns: 1fr;
    }
    /* На узких экранах ветка тоже уходит за правый край окна (срез скрыт) */
    .home-hero { --art-w: min(560px, 100vw); }
    .home-hero-art {
        position: relative;
        top: auto;
        right: auto;
        order: -1;
        justify-self: end;
        width: var(--art-w);
        margin: 0 calc(-20px - var(--art-w) * 0.14) 0 0;
        transform: none;
    }
    .home-hero-grid { min-height: 0; }
    .home-hero-copy { padding-bottom: 0; }
    .home-hero h1 .line { white-space: normal; }
    /* Три карточки не стопкой, а лентой: свайп или стрелки, каждая карточка встаёт по центру окна */
    .home-why-slider {
        position: relative;
        margin: 0 -20px;
    }
    .home-why-grid {
        --why-w: min(82%, 420px);
        position: relative;
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        padding: 4px 0 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .home-why-grid::-webkit-scrollbar { display: none; }
    /* Пустые края: первая и последняя карточки тоже могут встать по центру */
    .home-why-grid::before,
    .home-why-grid::after {
        content: "";
        flex: 0 0 max(0px, calc((100% - var(--why-w)) / 2 - 14px));
    }
    .home-why-card {
        flex: 0 0 var(--why-w);
        min-height: 250px;
        scroll-snap-align: center;
    }
    /* Карточки справа за краем экрана не ждут прокрутки страницы, чтобы показаться */
    .home-why-card.home-reveal { opacity: 1; transform: none; }
    .home-why-counter { display: block; }
    .home-why-arrow {
        position: absolute;
        top: calc(50% - 7px);
        z-index: 3;
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 50%;
        background: rgba(60, 64, 76, 0.55);
        backdrop-filter: blur(6px);
        color: #fff;
        cursor: pointer;
        transform: translateY(-50%);
        transition: opacity 0.2s ease, background 0.2s ease;
    }
    .home-why-arrow:hover { background: rgba(80, 84, 98, 0.7); }
    .home-why-arrow.is-off { opacity: 0; pointer-events: none; }
    .home-why-prev { left: 8px; }
    .home-why-next { right: 8px; }
    .home-footer-inner { grid-template-columns: 1fr 1fr; }
    /* Бренд сверху на всю ширину, две колонки ссылок — рядом */
    .home-footer-brand { grid-column: 1 / -1; }
    /* Значки соцсетей — справа от логотипа и подписи, а не отдельной строкой */
    .home-footer-brand {
        display: grid;
        /* те же две колонки и зазор, что у ссылок ниже: значки встают ровно над «О сервере» */
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 28px;
    }
    .home-footer-brand .home-footer-logo { grid-column: 1; grid-row: 1; justify-self: start; }
    .home-footer-brand p { grid-column: 1; grid-row: 2; margin: 10px 0 0; }
    .home-footer-brand .home-social { grid-column: 2; grid-row: 1 / span 2; justify-self: start; }
    .home-footer-brand .home-social a { width: 46px; height: 46px; }
    .home-footer-brand .home-social img { width: 26px; }
    .home-footer-cat { --cat-w: 150px; }
    .home-form { grid-template-columns: 1fr; }
    .home-form-fields { grid-template-columns: 1fr; }
    .home-form .home-btn { width: 100%; }
    .home-shots-wrap { width: min(780px, calc(100% - 40px)); }
    .home-shot-prev { left: 10px; }
    .home-shot-next { right: 10px; }
}

@media (max-width: 760px) {
    .home-hero h1 { font-size: 34px; }
    .home-section { padding: 48px 0; }
    /* Кот из подвала не должен наезжать на форму */
    .home-section.home-contact { padding-bottom: 130px; }
    .home-banner { min-height: 500px; }
    .home-banner-mini { display: none; }
    .home-banner-bee { top: 150px; }
    .home-faq-q { padding: 18px 18px; }
    .home-faq-a p { padding: 0 18px 20px; }
    .home-form { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-rig,
    .hero-fx,
    .hero-cat-head,
    .hero-hand,
    .hero-sleeve,
    .hero-eyes-c,
    .hero-eyes-l,
    .hero-catlids,
    .hero-vlids,
    .home-bee,
    .bee-rig,
    .bee-wing,
    .cat-rig,
    .cat-tail,
    .cat-eyes,
    .cat-lick,
    .cat-body,
    .home-banner-bee,
    .home-banner-mini,
    .home-cloud {
        animation: none;
    }
    .home-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .home-btn,
    .home-why-card,
    .home-faq-a,
    .home-faq-icon {
        transition: none;
    }
}
