html {
    scroll-behavior: smooth;
}

/* ADVANTAGES SECTION */

.advantages-section {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 45px 0 70px;
}

.section-heading {
    max-width: 780px;
}

.section-kicker {
    color: rgba(192, 132, 252, 0.85);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin-top: 8px;
    color: #ffffff;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -3px;
}

.section-heading p {
    max-width: 650px;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 17px;
    line-height: 1.75;
}

/* GRID */

.advantages-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(340px, 0.75fr);
    gap: 22px;
    margin-top: 64px;
}

.advantages-main,
.advantages-side {
    min-width: 0;
}

.advantages-main {
    display: flex;
}

.advantages-side {
    display: grid;
    gap: 22px;
}

/* CARDS */

.advantage-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 22px;
    background:
    linear-gradient(
        145deg,
        rgba(14, 14, 20, 0.94),
        rgba(6, 6, 10, 0.9)
    );
    backdrop-filter: blur(20px);
    box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.022);
    cursor: default;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease;
}

.advantage-card::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(126, 34, 206, 0.24),
            transparent 70%
        );
    filter: blur(30px);
    pointer-events: none;
}

.advantage-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            115deg,
            transparent 25%,
            rgba(255, 255, 255, 0.035) 50%,
            transparent 75%
        );
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.advantage-index {
    position: relative;
    z-index: 2;
    color: rgba(192, 132, 252, 0.82);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.advantage-card h3 {
    position: relative;
    z-index: 2;
    margin-top: 32px;
    color: #ffffff;
    font-size: 25px;
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -0.8px;
}

.advantage-card p {
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 15px;
    line-height: 1.7;
}

.advantage-line {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 25px;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            rgba(168, 85, 247, 0.55),
            rgba(255, 255, 255, 0.04)
        );
}

/* FEATURED CARD */

.advantage-card-featured {
    width: 100%;
    min-height: 100%;
    padding: 38px;
}

.advantage-card-featured h3 {
    max-width: 520px;
    margin-top: 42px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -2px;
}

.advantage-card-featured p {
    max-width: 560px;
    font-size: 17px;
}

/* SPEED VISUAL */

.advantage-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    min-height: 220px;
    margin-top: 44px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 28% 46%,
            rgba(168, 85, 247, 0.22),
            transparent 42%
        ),
        rgba(255, 255, 255, 0.025);
}

.speed-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 158px;
    height: 158px;
    flex: 0 0 158px;
    border: 1px solid rgba(192, 132, 252, 0.25);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(168, 85, 247, 0.18),
            transparent 65%
        );
    box-shadow:
        0 0 42px rgba(126, 34, 206, 0.16),
        inset 0 0 34px rgba(126, 34, 206, 0.1);
}

.speed-ring::before {
    content: "";
    position: absolute;
    inset: 13px;
    border: 2px solid transparent;
    border-top-color: #c084fc;
    border-right-color: rgba(168, 85, 247, 0.45);
    border-radius: 50%;
    animation: advantageSpin 8s linear infinite;
}

.speed-ring span {
    color: #ffffff;
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
}

.speed-ring small {
    margin-top: -18px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    letter-spacing: 1px;
}

.speed-lines {
    display: grid;
    align-items: end;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: min(100%, 260px);
    height: 130px;
}

.speed-lines span {
    display: block;
    width: 100%;
    border-radius: 999px 999px 6px 6px;
    background:
        linear-gradient(
            to top,
            rgba(109, 40, 217, 0.25),
            #c084fc
        );
    box-shadow:
        0 0 20px rgba(168, 85, 247, 0.18);
}

.speed-lines span:nth-child(1) {
    height: 42%;
}

.speed-lines span:nth-child(2) {
    height: 68%;
}

.speed-lines span:nth-child(3) {
    height: 100%;
}

/* HOVER */

@media (hover: hover) and (pointer: fine) {
    .advantage-card:hover {
        transform: translateY(-8px);
        border-color: rgba(168, 85, 247, 0.36);
        background:
            linear-gradient(
                145deg,
                rgba(255, 255, 255, 0.08),
                rgba(255, 255, 255, 0.025)
            );
        box-shadow:
            0 30px 80px rgba(0, 0, 0, 0.42),
            0 0 60px rgba(126, 34, 206, 0.12);
    }

    .advantage-card:hover::after {
        transform: translateX(120%);
    }
}

/* ANIMATION */

@keyframes advantageSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* TABLET */

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

    .advantage-card-featured {
        min-height: auto;
    }
}

/* MOBILE */

@media (max-width: 700px) {
    .advantages-section {
        width: min(100% - 28px, 1180px);
        padding: 48px 0 20px;
    }

    .section-heading h2 {
        font-size: clamp(32px, 9vw, 38px);
        line-height: 1.02;
        letter-spacing: -1.3px;
    }

    .section-heading p {
        font-size: 15px;
        line-height: 1.65;
    }

    .advantages-grid {
        gap: 14px;
        margin-top: 32px;
    }

    .advantages-side {
        gap: 14px;
    }

    .advantage-card,
    .advantage-card-featured {
        min-height: auto;
        padding: 24px;
        border-radius: 24px;
    }

    .advantage-card h3,
    .advantage-card-featured h3 {
        margin-top: 28px;
        font-size: 25px;
        line-height: 1.08;
        letter-spacing: -0.8px;
    }

    .advantage-card p,
    .advantage-card-featured p {
        font-size: 15px;
        line-height: 1.65;
    }

    .advantage-line {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 24px;
    }

    .advantage-visual {
        align-items: center;
        flex-direction: column;
        min-height: auto;
        margin-top: 28px;
        padding: 20px;
    }

    .speed-ring {
        width: 138px;
        height: 138px;
        flex-basis: 138px;
    }

    .speed-lines {
        width: 100%;
        height: 110px;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .speed-ring::before {
        animation: none;
    }

    .advantage-card,
    .advantage-card::after {
        transition: none;
    }
}


/* Отступ для прокрутки к секциям под фиксированный навбар */

#advantages,
#dashboard-preview,
#download {
    scroll-margin-top: 88px;
}


/* Быстрый старт */

#how-it-works {
    scroll-margin-top: 88px;
}
