/* о сайте — новый hero + меню фич
   старый стиль в about_old.css, его не трогаем */

html:has(.about-hero) {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body:has(.about-hero) {
    background:
        radial-gradient(1200px 620px at 88% 8%, rgba(255, 122, 0, 0.11), transparent 62%),
        radial-gradient(900px 520px at 10% 72%, rgba(255, 160, 100, 0.08), transparent 58%),
        radial-gradient(700px 320px at 78% 52%, rgba(255, 140, 60, 0.07), transparent 65%),
        linear-gradient(180deg, #ffffff 0%, #fff8f2 14%, #fff3ea 48%, #fff7f1 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body:has(.about-hero) #back-content {
    display: none;
}

body:has(.about-hero) .wrapper {
    min-height: 100vh;
    background: transparent;
}

body:has(.about-hero) #content {
    max-width: none;
    width: calc(100% - var(--sidebar-width, 0px));
    margin-left: var(--sidebar-width, 0px);
    margin-right: 0;
    padding: 0 0 48px;
    border: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

body.has-sidebar:has(.about-hero) #content,
body.has-teacher-cab:has(.about-hero) #content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* ===== hero как на фото 1 ===== */
.about-hero {
    position: relative;
    padding: 48px 28px 28px;
    background: transparent;
    overflow: visible;
}

.about-hero__inner {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 36px;
    align-items: center;
}

.about-hero__eyebrow {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff6b00;
}

.about-hero__title {
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #171717;
}

.about-hero__title span {
    color: #ff6b00;
}

.about-hero__desc {
    margin: 18px 0 0;
    max-width: 48ch;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #5f6470;
}

.about-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
}

.about-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 14px;
    background: #ff6b00;
    color: #fff !important;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(255, 107, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.about-hero__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 107, 0, 0.34);
}

.about-hero__btn svg,
.about-hero__link svg {
    width: 18px;
    height: 18px;
}

.about-hero__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #171717 !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none !important;
}

.about-hero__link:hover {
    color: #ff6b00 !important;
}

/* справа: только Sprite_Nastya */
.about-hero__art {
    position: relative;
    min-height: 360px;
    display: grid;
    place-items: center;
}

.about-hero__sprite {
    width: min(100%, 420px);
    height: auto;
    max-height: 420px;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(120, 60, 20, 0.16));
    animation: sprite-float 5s ease-in-out infinite;
}

/* ===== меню под hero — 4 пункта по центру ===== */
.about-features {
    padding: 8px 28px 12px;
    background: transparent;
    scroll-margin-top: 96px;
}

.about-features__row {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.about-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 10px;
}

.about-feature__icon {
    width: 48px;
    height: 48px;
    color: #ff6b00;
    margin-bottom: 4px;
}

.about-feature__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.about-feature h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #171717;
    line-height: 1.25;
}

.about-feature p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8a8f9a;
    line-height: 1.35;
}

/* ===== преимущества — карточки ниже ===== */
.about-advantages {
    padding: 40px 28px 24px;
    background: transparent;
}

.about-advantages__title {
    margin: 0 auto 36px;
    width: min(1120px, 100%);
    text-align: center;
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #171717;
    line-height: 1.25;
}

.about-advantages__row {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.about-adv {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
    padding: 24px 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #eceef2;
    box-shadow: 0 8px 24px rgba(23, 23, 23, 0.04);
}

.about-adv__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff1e8;
    color: #ff6b00;
    flex-shrink: 0;
}

.about-adv__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.about-adv h3 {
    margin: 4px 0 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #171717;
    line-height: 1.3;
}

.about-adv p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== соревнования + таблица лидеров ===== */
.about-compete {
    padding: 56px 28px 40px;
    background: transparent;
    overflow: visible;
}

.about-compete__inner {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 48px;
    align-items: center;
}

.about-compete__title {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #171717;
}

.about-compete__desc {
    margin: 18px 0 0;
    max-width: 40ch;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #6b7280;
}

.about-compete__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1.5px solid #ff9a4a;
    background: transparent;
    color: #ff6b00 !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.15s ease;
}

.about-compete__btn:hover {
    background: rgba(255, 107, 0, 0.06);
    transform: translateY(-1px);
}

.about-compete__btn svg {
    width: 18px;
    height: 18px;
}

.about-compete__stage {
    position: relative;
    padding: 28px 12px 8px;
    overflow: visible;
}

.about-compete__deco--line {
    position: absolute;
    left: -4%;
    right: -4%;
    top: 0;
    width: 108%;
    height: auto;
    color: #ff9a55;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.about-compete__sight {
    position: absolute;
    z-index: 2;
    width: 14px;
    height: 14px;
    pointer-events: none;
    color: #ff7a2e;
}

.about-compete__sight::before,
.about-compete__sight::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 1px;
}

.about-compete__sight::before {
    left: 50%;
    top: 0;
    width: 1.5px;
    height: 100%;
    transform: translateX(-50%);
}

.about-compete__sight::after {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    transform: translateY(-50%);
}

.about-compete__sight--a { top: 6%; right: 6%; }
.about-compete__sight--b { top: 38%; right: -2%; width: 12px; height: 12px; opacity: 0.75; }
.about-compete__sight--c { bottom: 22%; left: -2%; width: 11px; height: 11px; opacity: 0.7; }
.about-compete__sight--d { top: 18%; left: 8%; width: 10px; height: 10px; opacity: 0.55; }

.about-lb {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 22px;
    border: 1px solid #f0e6dc;
    box-shadow: 0 18px 40px rgba(120, 60, 20, 0.08);
    padding: 28px 22px 18px;
}

.about-lb__podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 8px;
    align-items: end;
    padding-bottom: 22px;
    border-bottom: 1px solid #f0ebe6;
}

.about-lb__place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.about-lb__place--1 {
    transform: translateY(-10px);
}

.about-lb__rank {
    font-size: 0.95rem;
    font-weight: 800;
    color: #e8a317;
    line-height: 1;
}

.about-lb__crown {
    display: grid;
    place-items: center;
    width: 28px;
    height: 22px;
    color: #e8a317;
}

.about-lb__crown svg {
    width: 100%;
    height: 100%;
}

.about-lb__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background:
        linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #f0e6dc;
    flex-shrink: 0;
}

.about-lb__avatar--lg {
    width: 72px;
    height: 72px;
    box-shadow: 0 0 0 2px #ffd7a8;
}

.about-lb__avatar--sm {
    width: 36px;
    height: 36px;
    box-shadow: 0 0 0 1.5px #eee7e0;
}

.about-lb__name {
    margin: 2px 0 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #171717;
    line-height: 1.2;
}

.about-lb__score {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1.2;
}

.about-lb__list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.about-lb__row {
    display: grid;
    grid-template-columns: 32px 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
}

.about-lb__row--you {
    background: #fff4eb;
}

.about-lb__row--you .about-lb__num,
.about-lb__row--you .about-lb__name {
    color: #ff6b00;
}

.about-lb__num {
    font-size: 0.85rem;
    font-weight: 700;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.about-lb__row .about-lb__name {
    margin: 0;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.about-lb__row .about-lb__score {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ===== примеры заданий ===== */
.about-examples {
    padding: 56px 28px 48px;
    background: transparent;
}

.about-examples__head {
    width: min(1120px, 100%);
    margin: 0 auto 32px;
    text-align: center;
}

.about-examples__title {
    margin: 0;
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #171717;
    line-height: 1.25;
}

.about-examples__sub {
    margin: 10px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: #8a8f9a;
    line-height: 1.4;
}

.about-examples__row {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.about-ex {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 22px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eceef2;
    box-shadow: 0 10px 28px rgba(23, 23, 23, 0.05);
}

.about-ex__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.about-ex__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1e8ff;
    color: #7c3aed;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.about-ex__ico {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.about-ex__ico svg {
    width: 18px;
    height: 18px;
    display: block;
}

.about-ex__ico--code {
    background: #ffe8e4;
    color: #e85a4f;
}

.about-ex__ico--book {
    background: #efe8ff;
    color: #7c3aed;
}

.about-ex__ico--pen {
    background: #e7f2ff;
    color: #3b82f6;
}

.about-ex h3 {
    margin: 4px 0 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: #171717;
    line-height: 1.3;
}

.about-ex p {
    margin: 0;
    flex: 1;
    font-size: 0.92rem;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.5;
}

.about-ex__xp {
    margin-top: 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ff6b00;
}

/* ===== CTA-баннер ===== */
.about-cta {
    width: min(1120px, 100%);
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 1fr);
    gap: 8px;
    align-items: stretch;
    padding: 0 8px 0 40px;
    min-height: 280px;
    border-radius: 24px;
    background: #fff3ea;
    overflow: hidden;
}

.about-cta__text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 0 40px;
}

.about-cta__title {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #171717;
}

.about-cta__desc {
    margin: 14px 0 0;
    max-width: 42ch;
    font-size: 0.98rem;
    line-height: 1.5;
    color: #6b7280;
}

.about-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 22px;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    width: fit-content;
    max-width: max-content;
    border-radius: 14px;
    background: #ff6b00;
    color: #fff !important;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(255, 107, 0, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.about-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 107, 0, 0.34);
}

.about-cta__btn svg {
    width: 18px;
    height: 18px;
}

.about-cta__art {
    position: relative;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 260px;
    height: 100%;
    overflow: visible;
}

.about-cta__cat {
    width: min(118%, 560px);
    max-width: none;
    height: auto;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 16px 26px rgba(120, 60, 20, 0.16));
    transform-origin: 70% 100%;
    animation: cat-reach 3.6s ease-in-out infinite;
}

@keyframes cat-reach {
    0%, 100% { transform: translate(10%, 18%) scale(1.22) rotate(-2deg); }
    50% { transform: translate(8%, 10%) scale(1.28) rotate(-4deg); }
}

@media (max-width: 900px) {
    .about-hero__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-hero__art {
        min-height: 280px;
        order: -1;
    }

    .about-hero__sprite {
        max-height: 300px;
    }

    .about-features__row,
    .about-advantages__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-compete__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-compete__desc {
        max-width: none;
    }

    .about-examples__row {
        grid-template-columns: 1fr;
    }

    .about-cta {
        grid-template-columns: 1fr;
        padding: 0 24px;
        text-align: center;
        min-height: 0;
    }

    .about-cta__text {
        padding: 28px 0 8px;
    }

    .about-cta__title,
    .about-cta__desc {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .about-cta__art {
        min-height: 220px;
        justify-content: center;
        order: -1;
    }

    .about-cta__cat {
        width: min(86%, 360px);
        animation: none;
        transform: translateY(18%) scale(1.12);
    }
}

@media (max-width: 560px) {
    .about-hero {
        padding: 28px 16px 18px;
    }

    .about-features {
        padding: 4px 12px 0;
    }

    .about-features__row {
        gap: 8px;
    }

    .about-feature {
        padding: 12px 6px;
    }

    .about-advantages {
        padding: 36px 16px 12px;
    }

    .about-advantages__title {
        margin-bottom: 22px;
    }

    .about-advantages__row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .about-compete {
        padding: 36px 16px 28px;
    }

    .about-compete__stage {
        padding: 20px 0 0;
    }

    .about-lb {
        padding: 22px 14px 14px;
    }

    .about-lb__avatar {
        width: 48px;
        height: 48px;
    }

    .about-lb__avatar--lg {
        width: 60px;
        height: 60px;
    }

    .about-lb__row {
        grid-template-columns: 28px 32px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .about-lb__row .about-lb__score {
        grid-column: 3;
        justify-self: start;
    }

    .about-examples {
        padding: 40px 16px 32px;
    }

    .about-cta {
        margin-top: 24px;
        padding: 0 16px;
        border-radius: 18px;
    }

    .about-cta__btn {
        width: 100%;
        justify-content: center;
    }

    .about-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .about-hero__btn,
    .about-hero__link {
        justify-content: center;
    }
}

@keyframes sprite-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
    html:has(.about-hero) {
        scroll-behavior: auto;
    }

    .about-hero__sprite,
    .about-cta__cat {
        animation: none;
    }

    .about-cta__cat {
        transform: translate(10%, 16%) scale(1.22);
    }
}
