/* DOWNLOAD SECTION */

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

.download-heading {
    max-width: 760px;
}

.download-heading h2 {
    margin-top: 8px;
    color: #ffffff;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.04;
    letter-spacing: -3px;
}

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

/* PANEL */

.download-panel {
    position: relative;
    overflow: hidden;
    margin-top: 58px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(126, 34, 206, 0.18),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        );
    backdrop-filter: blur(26px);
    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.download-panel::before {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -180px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(168, 85, 247, 0.22),
            transparent 70%
        );
    filter: blur(38px);
    pointer-events: none;
}

/* PLATFORM TABS */

.download-tabs {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.download-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.download-tab svg {
    width: 20px;
    height: 20px;
}

.download-tab.is-active {
    color: #ffffff;
    border-color: rgba(168, 85, 247, 0.3);
    background:
        linear-gradient(
            145deg,
            rgba(168, 85, 247, 0.18),
            rgba(109, 40, 217, 0.07)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 28px rgba(126, 34, 206, 0.1);
}

/* DETAILS */

.download-details {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;
    min-height: 260px;
    margin-top: 18px;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.015)
        );
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.download-details.is-changing {
    opacity: 0.35;
    transform: translateY(5px);
}

.download-details-icon {
    display: grid;
    place-items: center;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: 28px;
    color: #e9d5ff;
    background:
        radial-gradient(
            circle,
            rgba(168, 85, 247, 0.24),
            rgba(109, 40, 217, 0.08)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 42px rgba(126, 34, 206, 0.16);
}

.download-details-icon svg {
    width: 46px;
    height: 46px;
    stroke-width: 1.7;
    filter:
        drop-shadow(0 0 12px rgba(192, 132, 252, 0.55));
}

.download-details-copy {
    min-width: 0;
}

.download-details-label {
    display: block;
    color: rgba(192, 132, 252, 0.82);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.download-details-copy h3 {
    margin-top: 14px;
    color: #ffffff;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -2px;
}

.download-details-copy p {
    max-width: 620px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 15px;
    line-height: 1.7;
}

.download-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.download-details-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    font-weight: 650;
}

/* DOWNLOAD BUTTON */

.download-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 15px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #a855f7,
            #6d28d9
        );
    box-shadow:
        0 18px 48px rgba(126, 34, 206, 0.32);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.download-primary svg {
    width: 18px;
    height: 18px;
}

/* HOVER */

@media (hover: hover) and (pointer: fine) {
    .download-tab:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.035);
        transform: translateY(-2px);
    }

    .download-primary:hover {
        transform: translateY(-3px);
        box-shadow:
            0 24px 66px rgba(126, 34, 206, 0.46);
    }
}

/* TABLET */

@media (max-width: 900px) {
    .download-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .download-details {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .download-primary {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* MOBILE */

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

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

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

    .download-panel {
        margin-top: 32px;
        padding: 12px;
        border-radius: 24px;
    }

    .download-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .download-tab {
        min-height: 50px;
        padding: 0 12px;
        font-size: 13px;
    }

    .download-details {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
        padding: 26px 20px;
        text-align: center;
    }

    .download-details-icon {
        width: 86px;
        height: 86px;
        margin: 0 auto;
        border-radius: 24px;
    }

    .download-details-icon svg {
        width: 40px;
        height: 40px;
    }

    .download-details-meta {
        justify-content: center;
    }

    .download-primary {
        width: 100%;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .download-tab,
    .download-details,
    .download-primary {
        transition: none;
    }
}


/* ==========================================================
   DOWNLOAD DETAILS — COMPACT WIDTH
========================================================== */

.download-details {
    grid-template-columns:
        auto minmax(0, 1fr) auto;

    align-items: center;
    gap: 26px;

    width: min(980px, 100%);
    margin: 0 auto;

    min-height: 220px;
    padding: 34px 36px;
}

.download-details-copy {
    max-width: 520px;
}

.download-details-action {
    justify-self: end;
    align-self: center;
}

.download-details-button,
.download-details a {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .download-details {
        width: 100%;
        grid-template-columns:
            auto minmax(0, 1fr);

        min-height: 0;
        padding: 28px;
    }

    .download-details-action {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .download-details {
        grid-template-columns: 1fr;
        gap: 20px;

        padding: 24px 20px;
    }

    .download-details-icon {
        justify-self: start;
    }

    .download-details-action {
        grid-column: auto;
        width: 100%;
    }

    .download-details-action a,
    .download-details-action button {
        width: 100%;
    }
}


/* ==========================================================
   DOWNLOAD TABS — CENTERED
========================================================== */

.download-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 14px;

    width: 100%;
    padding-bottom: 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);
}

.download-tab {
    flex: 0 1 260px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 260px;
    min-height: 54px;
    padding: 0 18px;
}

@media (max-width: 900px) {
    .download-tab {
        flex-basis: 210px;
        width: 210px;
    }
}

@media (max-width: 620px) {
    .download-tabs {
        gap: 9px;
    }

    .download-tab {
        flex: 1 1 100%;

        width: 100%;
        min-width: 0;
    }
}
