/* Бережная полировка поверх оригинального дизайна Banana English */

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(43, 43, 43, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 43, 43, 0.022) 1px, transparent 1px),
        radial-gradient(circle at 8% 20%, rgba(251, 234, 140, 0.3), transparent 25rem),
        radial-gradient(circle at 94% 72%, rgba(92, 58, 33, 0.09), transparent 29rem),
        var(--pure-white);
    background-attachment: fixed;
    background-size: 30px 30px, 30px 30px, auto, auto, auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before,
body::after {
    position: fixed;
    z-index: 0;
    width: clamp(130px, 15vw, 220px);
    aspect-ratio: 1;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    image-rendering: pixelated;
    opacity: 0.075;
    pointer-events: none;
}

body::before {
    top: 31%;
    left: clamp(-70px, -4vw, -34px);
    background-image: url("account-assets/thinking gorilla 500.webp");
    transform: rotate(-5deg);
}

body::after {
    right: clamp(-72px, -4vw, -36px);
    bottom: 8%;
    background-image: url("account-assets/idea gorilla 500.webp");
    transform: rotate(5deg);
}

body > header,
body > main,
body > footer {
    position: relative;
    z-index: 1;
}

a:focus-visible,
.spin-target:focus-visible {
    outline: 4px solid var(--action-orange);
    outline-offset: 4px;
}

/* Навигация */
.top-nav {
    background: rgba(250, 248, 245, 0.94);
    box-shadow: 0 7px 24px rgba(0, 0, 0, 0.17);
}

.nav-link {
    padding: 7px 9px;
    border-radius: 7px;
}

.nav-link:hover {
    color: var(--action-orange);
    background: rgba(251, 234, 140, 0.32);
}

.nav-link[aria-current="page"] {
    color: var(--pure-black);
    background: var(--banana-yellow);
}

.tg-btn,
.login-btn {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

/* Сохраняем исходный чёрно-коричневый баннер */
.page-home header,
.page-about header {
    background:
        radial-gradient(circle at 50% -15%, rgba(92, 58, 33, 0.48), transparent 34rem),
        linear-gradient(135deg, var(--pure-black) 0%, #1a1a1a 100%);
}

/* Главный баннер: компактный стартовый блок вместо пустой нижней зоны */
.page-home header {
    padding: 150px 24px 78px;
    border-bottom: 8px solid var(--banana-yellow);
    box-shadow: 0 7px 0 var(--action-orange);
}

.page-home .hero-content {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.page-home .logo-container {
    margin-bottom: 46px;
}

.hero-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 18px;
    padding: 18px;
    border: 4px solid var(--pure-black);
    border-radius: 20px;
    color: var(--pure-black);
    background: var(--banana-yellow);
    box-shadow: 12px 12px 0 var(--action-orange);
    font-family: "Montserrat", Arial, sans-serif;
    text-align: left;
    opacity: 0;
    animation: fade-in-up 0.65s ease-out 0.25s forwards;
}

.hero-intro__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 3.7vw, 46px);
}

.hero-intro__eyebrow,
.hero-route__kicker {
    display: block;
    color: var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.58rem;
    line-height: 1.65;
    text-transform: uppercase;
}

.hero-intro h1 {
    max-width: 650px;
    margin: 16px 0 18px;
    color: var(--pure-black);
    font-family: "Press Start 2P", cursive;
    font-size: clamp(1.45rem, 3vw, 2.45rem);
    line-height: 1.35;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.hero-intro__lead {
    max-width: 650px;
    margin: 0;
    color: #43392f;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.7;
}

.hero-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-intro__primary,
.hero-intro__secondary {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 9px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.58rem;
    line-height: 1.55;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hero-intro__primary {
    border: 3px solid var(--pure-black);
    color: var(--banana-yellow);
    background: var(--pure-black);
    box-shadow: 5px 5px 0 var(--action-orange);
}

.hero-intro__secondary {
    border: 2px solid var(--pure-black);
    color: var(--pure-black);
    background: rgba(250, 248, 245, 0.58);
}

.hero-intro__primary:hover,
.hero-intro__secondary:hover {
    transform: translateY(-2px);
}

.hero-intro__primary:hover {
    box-shadow: 8px 8px 0 var(--action-orange);
}

.hero-intro__secondary:hover {
    background: var(--pure-white);
}

.hero-intro__route {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(22px, 3vw, 34px);
    border: 3px solid var(--pure-black);
    border-radius: 15px;
    color: var(--pure-white);
    background:
        radial-gradient(circle at 92% 0%, rgba(251, 234, 140, 0.16), transparent 15rem),
        var(--pure-black);
}

.hero-route__head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.hero-route__head img {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.hero-route__kicker {
    color: var(--banana-yellow);
}

.hero-route__head strong {
    display: block;
    margin-top: 7px;
    color: var(--pure-white);
    font-size: 1rem;
}

.hero-route__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-route__list li {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid rgba(251, 234, 140, 0.26);
    border-radius: 10px;
    background: rgba(250, 248, 245, 0.045);
}

.hero-route__number {
    color: var(--banana-yellow);
    font-family: "Press Start 2P", cursive;
    font-size: 0.57rem;
}

.hero-route__list strong,
.hero-route__list small {
    display: block;
}

.hero-route__list strong {
    margin-bottom: 2px;
    color: var(--pure-white);
    font-size: 0.9rem;
}

.hero-route__list small {
    color: rgba(250, 248, 245, 0.68);
    font-size: 0.79rem;
    line-height: 1.45;
}

/* Асимметричный срез с банановой печатью */
.fold-divider {
    --fold-brown-offset: -17px;
    --fold-yellow-offset: -9px;
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 112px;
    pointer-events: none;
}

.fold-divider::before,
.fold-divider::after,
.fold-divider__surface {
    position: absolute;
    inset: 0;
    clip-path: polygon(
        0 34%, 58% 34%, 69% 62%, 100% 62%, 100% 100%, 0 100%
    );
}

.fold-divider::before,
.fold-divider::after {
    content: "";
}

.fold-divider::before {
    background: rgba(92, 58, 33, 0.72);
    transform: translateY(var(--fold-brown-offset));
}

.fold-divider::after {
    background: var(--banana-yellow);
    transform: translateY(var(--fold-yellow-offset));
}

.fold-divider__surface {
    z-index: 1;
    display: block;
    background: var(--pure-white);
}

.fold-divider__badge {
    position: absolute;
    z-index: 3;
    top: 48%;
    left: 66%;
    width: 58px;
    height: 58px;
    border: 3px solid var(--pure-black);
    border-radius: 14px;
    background: var(--banana-yellow) url("banana.png") center / 43px no-repeat;
    box-shadow: 6px 6px 0 var(--action-orange);
    transform: translate(-50%, -50%) rotate(-6deg);
}

.page-about .monkey-tracker {
    bottom: 34px;
}

.hero-kicker,
.page-kicker {
    font-family: "Press Start 2P", cursive;
    font-weight: 400;
    text-transform: uppercase;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 22px;
    padding: 8px 12px;
    border: 1px solid rgba(251, 234, 140, 0.48);
    border-radius: 999px;
    color: var(--banana-yellow);
    background: rgba(43, 43, 43, 0.48);
    font-size: 0.62rem;
    line-height: 1.6;
}

.page-kicker {
    margin-bottom: 14px;
    color: var(--action-orange);
    font-size: 0.66rem;
    line-height: 1.6;
    text-align: center;
}

.hero-text {
    border-width: 3px;
    border-radius: 18px;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.38),
        0 0 28px rgba(251, 234, 140, 0.13);
}

/* Карточки — исходная форма и фирменные объёмные тени */
.features-grid {
    gap: 32px;
    padding-top: 74px;
    padding-bottom: 94px;
}

.feature-card,
.program-card,
.teacher-card,
.about-box {
    border-radius: 16px;
}

.feature-card {
    padding: 26px;
    box-shadow: 10px 10px 0 var(--banana-yellow);
}

.program-card,
.about-box {
    box-shadow: 10px 10px 0 var(--banana-yellow);
}

.teacher-card {
    box-shadow: 7px 7px 0 var(--banana-yellow);
}

.feature-card:hover,
.program-card.visible:hover,
.teacher-card.visible:hover,
.about-box:hover {
    transform: translateY(-6px);
    box-shadow: 13px 13px 0 var(--action-orange);
}

.feature-image,
.program-image {
    border-width: 2px;
    border-radius: 12px;
    background: rgba(251, 234, 140, 0.34);
}

.teacher-photo,
.image-placeholder {
    border-radius: 12px;
}

.feature-card::after {
    content: "СМОТРЕТЬ →";
    display: block;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 22px;
    color: var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.6rem;
    line-height: 1.5;
}

.page-programs main,
.page-teachers main,
.page-about main {
    background:
        radial-gradient(circle at 92% 8%, rgba(251, 234, 140, 0.14), transparent 26rem),
        transparent;
}

.programs-grid,
.teachers-grid,
.about-container {
    gap: 32px;
}

.program-card,
.teacher-card {
    overflow: hidden;
}

/* Карточки программ теперь ведут на отдельные страницы */
.page-programs .program-card {
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.page-programs .program-card:focus-visible {
    outline: 4px solid var(--action-orange);
    outline-offset: 7px;
}

/* Более просторная и спокойная страница «О нас» */
.page-about main {
    padding: 108px 24px 124px;
}

.page-about .about-container {
    max-width: 1040px;
    gap: 58px;
}

.page-about .about-section {
    width: min(100%, 860px);
    padding: 48px 52px;
}

.page-about .about-section:nth-child(odd) {
    align-self: flex-start;
}

.page-about .about-section:nth-child(even) {
    align-self: flex-end;
}

.page-about .about-label {
    display: block;
    margin-bottom: 18px;
    color: var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.58rem;
    line-height: 1.6;
    text-transform: uppercase;
}

.page-about .about-box h2 {
    margin-bottom: 18px;
}

.page-about .about-box p {
    max-width: 780px;
    font-weight: 500;
}

.page-about .about-box:nth-child(4).visible {
    animation-delay: 0.65s;
}

.page-about .about-cta {
    width: 100%;
    padding: 52px;
    color: var(--pure-white);
    background:
        radial-gradient(circle at 92% 0%, rgba(251, 234, 140, 0.18), transparent 20rem),
        var(--pure-black);
    box-shadow: 12px 12px 0 var(--banana-yellow);
}

.page-about .about-cta:hover {
    box-shadow: 15px 15px 0 var(--action-orange);
}

.page-about .about-cta .about-label,
.page-about .about-cta h2 {
    color: var(--banana-yellow);
}

.page-about .about-cta p {
    color: rgba(250, 248, 245, 0.78);
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.about-primary-link,
.about-secondary-link {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 17px;
    border-radius: 8px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.63rem;
    line-height: 1.55;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.about-primary-link {
    border: 3px solid var(--pure-black);
    color: var(--pure-black);
    background: var(--banana-yellow);
    box-shadow: 5px 5px 0 var(--action-orange);
}

.about-primary-link:hover {
    box-shadow: 8px 8px 0 var(--action-orange);
    transform: translateY(-2px);
}

.about-secondary-link {
    border: 2px solid var(--banana-yellow);
    color: var(--banana-yellow);
}

.about-secondary-link:hover {
    color: var(--pure-black);
    background: var(--banana-yellow);
    transform: translateY(-2px);
}

.site-footer {
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

/* Исправленные следящие глаза исходной обезьянки */
.page-about .eye {
    width: 20%;
    height: 20%;
    top: 28%;
}

.page-about .left-eye {
    left: 31%;
}

.page-about .right-eye {
    right: 31%;
}

.page-about .pupil {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-image: url("pupil.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: none;
    transform: translate(0, 0);
    transition: transform 60ms linear;
}

.page-about .pupil-reversed {
    background-image: url("pupil reversed.png");
}

@media (max-width: 900px) {
    .top-nav {
        gap: 12px;
        padding: 13px;
    }

    .nav-links,
    .nav-actions {
        gap: 10px;
    }

    .page-home header,
    .page-about header {
        padding-top: 220px;
    }

    .page-home header {
        padding-right: 18px;
        padding-bottom: 66px;
        padding-left: 18px;
    }

    .hero-intro {
        grid-template-columns: 1fr;
    }

    .fold-divider {
        height: 82px;
    }

    .page-programs main,
    .page-teachers main {
        padding-top: 190px;
    }

    .features-grid {
        gap: 30px;
        padding-top: 62px;
        padding-bottom: 76px;
    }

    .feature-card,
    .program-card,
    .about-box {
        padding: 24px;
    }

    .page-about main {
        padding-top: 84px;
        padding-bottom: 96px;
    }

    .page-about .about-container {
        gap: 38px;
    }

    .page-about .about-section,
    .page-about .about-cta {
        width: 100%;
        padding: 34px;
    }
}

@media (max-width: 520px) {
    body::before {
        top: 42%;
        left: -48px;
        width: 126px;
        opacity: 0.055;
    }

    body::after {
        display: none;
    }

    .fold-divider {
        --fold-brown-offset: -11px;
        --fold-yellow-offset: -6px;
        height: 68px;
    }

    .fold-divider__badge {
        top: 50%;
        left: 64%;
        width: 46px;
        height: 46px;
        border-radius: 11px;
        background-size: 34px;
        box-shadow: 4px 4px 0 var(--action-orange);
    }

    .page-about .monkey-tracker {
        bottom: 18px;
    }

    .page-home header {
        padding-bottom: 54px;
    }

    .page-home .logo-container {
        margin-bottom: 34px;
    }

    .hero-intro {
        gap: 12px;
        padding: 11px;
        border-radius: 15px;
        box-shadow: 8px 8px 0 var(--action-orange);
    }

    .hero-intro__copy,
    .hero-intro__route {
        padding: 22px 19px;
    }

    .hero-intro h1 {
        font-size: clamp(1.15rem, 7vw, 1.55rem);
    }

    .hero-intro__actions {
        flex-direction: column;
    }

    .hero-intro__primary,
    .hero-intro__secondary {
        width: 100%;
    }

    .hero-route__head img {
        width: 62px;
        height: 62px;
    }

    .nav-link {
        font-size: 0.72rem;
    }

    .tg-btn,
    .login-btn {
        padding-inline: 13px;
        font-size: 0.7rem;
    }

    .hero-kicker {
        font-size: 0.53rem;
    }

    .feature-card,
    .program-card,
    .teacher-card,
    .about-box {
        border-radius: 13px;
    }

    .page-about .about-section,
    .page-about .about-cta {
        padding: 27px 24px;
    }

    .about-primary-link,
    .about-secondary-link {
        width: 100%;
        font-size: 0.56rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Главная: более заметная шапка маршрута */
.page-home .hero-route__head {
    gap: 22px;
    margin-bottom: 18px;
    padding: 14px 17px;
    border: 2px solid rgba(251, 234, 140, 0.28);
    border-radius: 12px;
    background: rgba(250, 248, 245, 0.055);
}

.page-home .hero-route__head img {
    width: 112px;
    height: 112px;
}

.page-home .hero-route__head > div {
    min-width: 0;
}

.page-home .hero-route__kicker {
    font-size: 0.67rem;
}

.page-home .hero-route__head strong {
    margin-top: 10px;
    font-size: 1.22rem;
    line-height: 1.4;
}

/* Главная: полезное продолжение после первых трёх карточек */
.home-directions,
.baby-groups-showcase,
.home-final-callout {
    width: min(calc(100% - 40px), 1180px);
    margin-inline: auto;
    font-family: "Montserrat", Arial, sans-serif;
}

.home-directions {
    padding: 4px 0 104px;
}

.home-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.home-section-kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.62rem;
    line-height: 1.6;
    text-transform: uppercase;
}

.home-section-heading h2,
.baby-groups-showcase h2,
.home-final-callout h2 {
    margin: 0 0 15px;
    color: var(--pure-black);
    font-family: "Press Start 2P", cursive;
    font-size: clamp(1.15rem, 2.2vw, 1.85rem) !important;
    line-height: 1.45;
    text-wrap: balance;
}

.home-section-heading p,
.baby-groups-showcase__copy p {
    margin: 0;
    color: #574c42;
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.75;
}

.direction-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.direction-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 300px;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 25px;
    overflow: hidden;
    border: 3px solid var(--pure-black);
    border-radius: 15px;
    color: var(--pure-black);
    background: #fffdf9;
    box-shadow: 8px 8px 0 var(--direction-accent, var(--banana-yellow));
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.direction-card:hover {
    transform: translateY(-5px);
    box-shadow: 12px 12px 0 var(--direction-accent, var(--banana-yellow));
}

.direction-card--junior {
    --direction-accent: #fbf236;
}

.direction-card--oge {
    --direction-accent: #f0c66f;
}

.direction-card--hacker {
    --direction-accent: #9b7b62;
}

.direction-card__number {
    position: absolute;
    top: 17px;
    right: 18px;
    color: rgba(43, 43, 43, 0.18);
    font-family: "Press Start 2P", cursive;
    font-size: 0.7rem;
}

.direction-card img {
    width: 88px;
    height: 88px;
    grid-row: 1 / span 2;
    align-self: start;
    object-fit: contain;
    image-rendering: pixelated;
}

.direction-card__label {
    display: block;
    margin: 2px 30px 11px 0;
    color: var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.52rem;
    line-height: 1.6;
    text-transform: uppercase;
}

.direction-card h3 {
    margin: 0 0 12px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.74rem;
    line-height: 1.55;
}

.direction-card p {
    margin: 0;
    color: #5c5249;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.6;
}

.direction-card__arrow {
    display: inline-flex;
    width: 42px;
    min-height: 42px;
    grid-column: 2;
    align-items: center;
    justify-content: center;
    align-self: end;
    border: 2px solid var(--pure-black);
    border-radius: 9px;
    color: var(--pure-black);
    background: var(--direction-accent, var(--banana-yellow));
    font-size: 1.35rem;
    font-weight: 800;
}

.baby-groups-showcase {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
    align-items: center;
    gap: clamp(30px, 5vw, 66px);
    margin-bottom: 76px;
    padding: clamp(34px, 5vw, 58px);
    border: 4px solid var(--pure-black);
    border-radius: 20px;
    color: var(--pure-white);
    background:
        radial-gradient(circle at 84% 14%, rgba(251, 234, 140, 0.14), transparent 17rem),
        var(--pure-black);
    box-shadow: 12px 12px 0 var(--banana-yellow);
}

.baby-groups-showcase h2 {
    color: var(--banana-yellow);
}

.baby-groups-showcase .home-section-kicker {
    color: var(--banana-yellow);
}

.baby-groups-showcase__copy p {
    color: rgba(250, 248, 245, 0.78);
}

.baby-groups-showcase__copy > a,
.home-final-callout > a {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 26px;
    padding: 11px 16px;
    border: 3px solid var(--pure-black);
    border-radius: 9px;
    color: var(--pure-black);
    background: var(--banana-yellow);
    box-shadow: 5px 5px 0 var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.57rem;
    line-height: 1.55;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.baby-groups-showcase__copy > a:hover,
.home-final-callout > a:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 0 var(--action-orange);
}

.baby-banana-team {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
    border: 2px solid rgba(251, 234, 140, 0.32);
    border-radius: 15px;
    background: rgba(250, 248, 245, 0.055);
}

.baby-banana-card {
    min-width: 0;
    margin: 0;
    padding: 8px 5px 10px;
    border: 2px solid var(--pure-black);
    border-radius: 11px;
    color: var(--pure-black);
    background: var(--team-card, var(--banana-yellow));
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.42);
    text-align: center;
}

.baby-banana-card--yellow { --team-card: #fbf3ae; }
.baby-banana-card--green { --team-card: #dff4c7; }
.baby-banana-card--blue { --team-card: #dce2fa; }
.baby-banana-card--red { --team-card: #f8d8d8; }
.baby-banana-card--purple { --team-card: #e9dcef; }

.baby-banana-sprite {
    position: relative;
    display: block;
    width: 100%;
    height: 42px;
    overflow: hidden;
}

.baby-banana-sprite img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    max-width: none;
    height: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    transform: translate(-46%, -49%);
}

.baby-banana-card figcaption {
    margin-top: 4px;
    overflow: hidden;
    font-family: "Press Start 2P", cursive;
    font-size: 0.43rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.home-final-callout {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 25px;
    margin-bottom: 104px;
    padding: 25px 30px;
    border: 3px solid var(--pure-black);
    border-radius: 16px;
    background: var(--banana-yellow);
    box-shadow: 9px 9px 0 var(--action-orange);
}

.home-final-callout img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    image-rendering: pixelated;
}

.home-final-callout .home-section-kicker {
    margin-bottom: 8px;
}

.home-final-callout h2 {
    margin: 0;
    font-size: clamp(0.98rem, 1.8vw, 1.45rem) !important;
}

.home-final-callout > a {
    margin-top: 0;
    color: var(--banana-yellow);
    background: var(--pure-black);
}

@media (max-width: 1000px) {
    .direction-grid {
        grid-template-columns: 1fr;
    }

    .direction-card {
        min-height: 0;
        grid-template-columns: 104px minmax(0, 1fr) 44px;
        grid-template-rows: auto;
        align-items: center;
    }

    .direction-card img {
        width: 104px;
        height: 104px;
        grid-row: auto;
    }

    .direction-card__arrow {
        grid-column: auto;
        align-self: center;
    }

    .baby-groups-showcase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .page-home .hero-route__head {
        gap: 16px;
        padding: 12px;
    }

    .page-home .hero-route__head img {
        width: 88px;
        height: 88px;
    }

    .page-home .hero-route__kicker {
        font-size: 0.56rem;
    }

    .page-home .hero-route__head strong {
        font-size: 1.04rem;
    }

    .home-directions {
        padding-bottom: 76px;
    }

    .direction-card {
        grid-template-columns: 76px minmax(0, 1fr);
        padding: 21px;
    }

    .direction-card img {
        width: 76px;
        height: 76px;
    }

    .direction-card__arrow {
        display: none;
    }

    .baby-groups-showcase {
        padding: 30px 24px;
        box-shadow: 8px 8px 0 var(--banana-yellow);
    }

    .baby-banana-team {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .baby-banana-card:last-child {
        grid-column: 1 / -1;
    }

    .home-final-callout {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .home-final-callout img {
        width: 82px;
        height: 82px;
    }

    .home-final-callout > a {
        width: 100%;
        grid-column: 1 / -1;
    }
}

@media (max-width: 440px) {
    .home-directions,
    .baby-groups-showcase,
    .home-final-callout {
        width: min(calc(100% - 28px), 1180px);
    }

    .direction-card {
        grid-template-columns: 1fr;
    }

    .direction-card img {
        width: 94px;
        height: 94px;
    }

    .baby-banana-team {
        grid-template-columns: 1fr;
    }

    .baby-banana-card:last-child {
        grid-column: auto;
    }

    .home-final-callout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .home-final-callout img {
        margin-inline: auto;
    }
}

/* Home hero v18: action-first banner with a live lesson scene */
.page-home header {
    padding: 90px 24px 64px;
}

.page-home .logo-container {
    gap: 14px;
    margin: 18px auto 26px;
    font-size: clamp(3.2rem, 5.6vw, 4.75rem);
    line-height: 1.05;
}

.page-home .banana-trick {
    width: 94px;
    height: 94px;
    margin: 0 -10px;
}

.page-home .spin-target {
    width: 94px;
    height: 94px;
}

.page-home .hero-intro {
    grid-template-columns: minmax(0, 1.32fr) minmax(330px, 0.68fr);
    gap: 14px;
    padding: 14px;
    border-color: var(--pure-black);
    color: var(--pure-white);
    background: var(--pure-black);
    box-shadow: 12px 12px 0 var(--action-orange), 0 28px 70px rgba(0, 0, 0, 0.34);
}

.page-home .hero-intro__copy {
    padding: clamp(28px, 3vw, 42px);
}

.hero-proof {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 7px 14px 7px 8px;
    border: 1px solid rgba(251, 234, 140, 0.34);
    border-radius: 999px;
    color: var(--pure-white);
    background: rgba(250, 248, 245, 0.08);
}

.hero-proof__faces {
    display: flex;
    align-items: center;
}

.hero-proof__faces img {
    width: 34px;
    height: 34px;
    margin-left: -8px;
    border: 2px solid var(--banana-yellow);
    border-radius: 50%;
    background: var(--pure-white);
    object-fit: contain;
    image-rendering: pixelated;
}

.hero-proof__faces img:first-child {
    margin-left: 0;
}

.hero-proof strong {
    font-size: 0.8rem;
    line-height: 1.3;
}

.page-home .hero-intro__eyebrow {
    color: #f1c8aa;
}

.page-home .hero-intro h1 {
    max-width: 660px;
    margin: 11px 0 17px;
    color: var(--pure-white);
    font-size: clamp(1.55rem, 2.55vw, 2.24rem);
    line-height: 1.24;
    letter-spacing: -0.045em;
}

.page-home .hero-intro h1 span {
    color: var(--banana-yellow);
    text-decoration: underline;
    text-decoration-color: var(--action-orange);
    text-decoration-thickness: 4px;
    text-underline-offset: 8px;
}

.page-home .hero-intro__lead {
    max-width: 680px;
    color: rgba(250, 248, 245, 0.82);
    font-size: 1rem;
    line-height: 1.58;
}

/* Прозрачное ценовое предложение: заметное, но не конкурирует с CTA */
.page-home .hero-offer {
    display: flex;
    max-width: 680px;
    align-items: center;
    justify-content: space-between;
    gap: 14px 22px;
    margin-top: 20px;
    padding: 14px 18px;
    border: 2px solid rgba(251, 234, 140, 0.48);
    border-radius: 14px;
    background: rgba(250, 248, 245, 0.08);
}

.page-home .hero-offer__price {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
        "old current"
        "period current";
    min-width: 0;
    align-items: baseline;
    column-gap: 12px;
    row-gap: 2px;
    min-height: 48px;
    line-height: 1.2;
}

.page-home .hero-offer__price del {
    grid-area: old;
    align-self: end;
    color: rgba(250, 248, 245, 0.62);
    font-size: 0.84rem;
    text-decoration-thickness: 2px;
    text-decoration-color: #f1c8aa;
    white-space: nowrap;
}

.page-home .hero-offer__price strong {
    grid-area: current;
    align-self: center;
    color: var(--banana-yellow);
    font-family: "Press Start 2P", "Montserrat", sans-serif;
    font-size: clamp(1.6rem, 2.7vw, 2.15rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    word-spacing: -0.34em;
    line-height: 1;
    text-shadow: 2px 2px 0 rgba(92, 58, 33, 0.9);
    white-space: nowrap;
}

.page-home .hero-offer__price span {
    grid-area: period;
    align-self: start;
    color: rgba(250, 248, 245, 0.82);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.page-home .hero-offer__details {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.page-home .hero-offer__discount {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: 2px solid var(--pure-black);
    border-radius: 999px;
    color: var(--pure-black);
    background: var(--banana-yellow);
    box-shadow: 3px 3px 0 var(--action-orange);
    font-family: "Press Start 2P", cursive;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.page-home .hero-offer__trial {
    color: rgba(250, 248, 245, 0.88);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.page-home .hero-intro__actions {
    display: grid;
    grid-template-columns: minmax(250px, 1.3fr) minmax(190px, 0.7fr);
    gap: 12px;
    margin-top: 21px;
}

.page-home .hero-intro__primary,
.page-home .hero-intro__secondary {
    min-height: 52px;
    padding: 13px 18px;
    touch-action: manipulation;
}

.page-home .hero-intro__primary {
    border-color: var(--banana-yellow);
    color: var(--pure-black);
    background: var(--banana-yellow);
    box-shadow: 6px 6px 0 var(--action-orange);
}

.page-home .hero-intro__secondary {
    border-color: rgba(250, 248, 245, 0.74);
    color: var(--pure-white);
    background: rgba(250, 248, 245, 0.06);
}

.page-home .hero-intro__secondary:hover {
    color: var(--pure-black);
}

.hero-intro__tracks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 18px 0 0;
    padding: 0;
    color: rgba(250, 248, 245, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    list-style: none;
}

.hero-intro__tracks li::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--banana-yellow);
    content: "";
}

.page-home .hero-live {
    position: relative;
    display: grid;
    min-height: 420px;
    grid-template-rows: auto 1fr auto;
    padding: 18px;
    overflow: hidden;
    border: 3px solid var(--pure-black);
    border-radius: 15px;
    color: var(--pure-black);
    background:
        linear-gradient(rgba(92, 58, 33, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 58, 33, 0.08) 1px, transparent 1px),
        linear-gradient(145deg, #fff6bd, var(--banana-yellow));
    background-size: 28px 28px, 28px 28px, auto;
}

.hero-live__bar,
.hero-live__footer {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-live__bar {
    padding: 10px 12px;
    border: 2px solid var(--pure-black);
    border-radius: 10px;
    background: rgba(250, 248, 245, 0.82);
    font-size: 0.76rem;
    font-weight: 800;
}

.hero-live__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.47rem;
    text-transform: uppercase;
}

.hero-live__status i {
    width: 9px;
    height: 9px;
    border: 2px solid var(--pure-black);
    border-radius: 50%;
    background: #f04b42;
    box-shadow: 0 0 0 4px rgba(240, 75, 66, 0.17);
    animation: hero-live-pulse 1.8s ease-in-out infinite;
}

.hero-live__stage {
    position: relative;
    min-height: 278px;
}

.hero-live__gorilla {
    position: absolute;
    z-index: 2;
    bottom: 2px;
    left: 50%;
    width: min(68%, 235px);
    height: auto;
    filter: drop-shadow(8px 12px 0 rgba(92, 58, 33, 0.26));
    image-rendering: pixelated;
    transform: translateX(-50%);
}

.hero-live__bubble,
.hero-live__score {
    position: absolute;
    z-index: 3;
    border: 3px solid var(--pure-black);
    border-radius: 10px;
    background: var(--pure-white);
    box-shadow: 4px 4px 0 var(--action-orange);
}

.hero-live__bubble {
    padding: 10px 12px;
    font-family: "Press Start 2P", cursive;
    font-size: 0.62rem;
    line-height: 1.35;
    animation: hero-bubble-float 3.6s ease-in-out infinite;
}

.hero-live__bubble--hello {
    top: 40px;
    left: 6px;
    transform: rotate(-4deg);
}

.hero-live__bubble--reply {
    top: 84px;
    right: 6px;
    color: var(--pure-black);
    background: #f1c8aa;
    animation-delay: -1.8s;
    transform: rotate(4deg);
}

.hero-live__score {
    right: 6px;
    bottom: 16px;
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 0.72rem;
    font-weight: 800;
}

.hero-live__score strong {
    color: #356f27;
    font-family: "Press Start 2P", cursive;
    font-size: 0.58rem;
}

.hero-live__footer {
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-live__footer span {
    padding: 8px 13px;
    border: 2px solid var(--pure-black);
    border-radius: 999px;
    background: rgba(250, 248, 245, 0.96);
    box-shadow: 2px 2px 0 var(--pure-black);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--pure-black);
    letter-spacing: -0.01em;
}

@keyframes hero-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.68; transform: scale(0.84); }
}

@keyframes hero-bubble-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-live__status i,
    .hero-live__bubble {
        animation: none;
    }
}

/* Keep the hero character centered when the offer copy makes the card taller. */
@media (min-width: 821px) {
    .page-home .hero-live__gorilla {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }

    .page-home .hero-live__score {
        top: 65%;
        bottom: auto;
    }
}
