.legacy-section {
    background:radial-gradient(1200px 600px at 12% 18%, rgba(59, 130, 246, 0.22), transparent 60%),
        radial-gradient(900px 500px at 88% 82%, rgba(0, 86, 210, 0.20), transparent 60%),
        linear-gradient(180deg, #020617 0%, #031a4a 100%);
    color: #eceff5;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.legacy-section::before {
    content: "";
    position: absolute;
    inset: -45% -20%;
    pointer-events: none;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 28%,
            rgba(157, 190, 255, 0.26) 44%,
            rgba(255, 255, 255, 0.12) 52%,
            rgba(255, 255, 255, 0) 72%);
    transform: translateX(-70%) rotate(6deg);
    opacity: 0.75;
    filter: blur(1px);
    animation: legacyShimmer 6.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.legacy-section::after {
    content: "";
    position: absolute;
    inset: -55% -24%;
    pointer-events: none;
background: linear-gradient(120deg,
            transparent 34%,
            rgba(227, 74, 74, 0.22) 46%,
            rgba(59, 130, 246, 0.18) 52%,
            rgba(255, 255, 255, 0.08) 58%,
            transparent 68%);
    transform: translateX(-82%) rotate(6deg);
    opacity: 0.45;
    filter: blur(2px);
    animation: legacyShimmerSoft 6.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    animation-delay: .35s;
}

@keyframes legacyShimmer {
    0% {
        transform: translateX(-72%) rotate(6deg);
        opacity: 0.22;
    }
    18% {
        opacity: 0.82;
    }
    42% {
        transform: translateX(68%) rotate(6deg);
        opacity: 0.5;
    }
    100% {
        transform: translateX(68%) rotate(6deg);
        opacity: 0.16;
    }
}

@keyframes legacyShimmerSoft {
    0% {
        transform: translateX(-82%) rotate(6deg);
        opacity: 0.1;
    }
    24% {
        opacity: 0.52;
    }
    48% {
        transform: translateX(72%) rotate(6deg);
        opacity: 0.34;
    }
    100% {
        transform: translateX(72%) rotate(6deg);
        opacity: 0.08;
    }
}

.legacy-section h2 {
    margin-top: 10px;
    max-width: 860px;
    font-size: clamp(38px, 3.7vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 500;
}

.legacy-story {
    margin-top: 42px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: end;
}

.legacy-story>p {
    font-size: 18px;
    max-width: 510px;
    color: #9da3af;
    line-height: 1.4;
}

.legacy-highlight span,
.legacy-cards span {
    color: #e34a4a;
    font-size: 26px;
}

.legacy-highlight h3,
.legacy-cards h3 {
    margin-top: 16px;
    font-size: 28px;
    letter-spacing: -0.02em;
    font-weight: 500;
}

.legacy-highlight p,
.legacy-cards p {
    margin-top: 8px;
    color: #9aa0ac;
    font-size: 16px;
    line-height: 1.35;
}

.legacy-cards {
    margin-top: 14px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legacy-highlight,
.legacy-cards article {
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg,
            rgba(59, 130, 246, 0.14),
            rgba(2, 6, 23, 0.65));
    padding: 20px;
    transition: all .35s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.legacy-highlight::before,
.legacy-cards article::before {
    content: "";
    position: absolute;
    inset: -28%;
    pointer-events: none;
    opacity: 0;
    background:
            radial-gradient(circle at 20% 18%, rgba(59, 130, 246, 0.25), transparent 44%),
            radial-gradient(circle at 80% 80%, rgba(227, 74, 74, 0.18), transparent 50%);
    filter: blur(24px);
    transition: opacity .35s ease;
}

.legacy-highlight:hover,
.legacy-cards article:hover {
    transform: translateY(-6px);
    background: linear-gradient(180deg,
                rgba(59, 130, 246, 0.22),
                rgba(2, 6, 23, 0.75));
    border-color: #6186d3;
    box-shadow:
        0 0 0 1px rgba(106, 148, 229, 0.25),
        0 18px 34px -24px rgba(70, 116, 206, 0.55);
}

.legacy-highlight:hover::before,
.legacy-cards article:hover::before {
    opacity: 1;
}

.legacy-highlight:hover h3,
.legacy-cards article:hover h3 {
    color: #ffffff;
}

.legacy-highlight:hover p,
.legacy-cards article:hover p {
    color: #c7ccd6;
}

.legacy-highlight:hover span,
.legacy-cards article:hover span {
    color: #e34a4a;
}

.legacy-story {
    margin-top: 42px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.legacy-cards {
    margin-top: 24px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legacy-cards article {
    height: 100%;
}

.legacy-cards article {
    transition: transform .35s ease, background .35s ease, border-color .35s ease;
    cursor: default;
}

.legacy-cards article:hover {
    transform: translateY(-8px);
    background: linear-gradient(180deg,
                rgba(227, 74, 74, 0.2),
                rgba(2, 6, 23, 0.75));
    border-color: rgba(227, 74, 74, 0.72);
    box-shadow:
        0 0 0 1px rgba(227, 74, 74, 0.22),
        0 20px 38px -25px rgba(227, 74, 74, 0.45);
}

.legacy-cards article:hover h3 {
    color: #ffffff;
}

.legacy-cards article:hover p {
    color: #cfd4de;
}

.legacy-cards article:hover span {
    color: #e34a4a;
}

@media (max-width: 1024px) {
    .legacy-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .legacy-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .legacy-section {
        border-radius: 18px;
        padding: 16px;
    }

    .legacy-section h2 {
        font-size: 40px;
    }

    .legacy-story {
        margin-top: 18px;
        grid-template-columns: 1fr;
    }

    .legacy-story>p {
        font-size: 16px;
    }

    .legacy-highlight,
    .legacy-cards article {
        border-radius: 14px;
        padding: 14px;
    }

    .legacy-highlight span,
    .legacy-cards span {
        font-size: 20px;
    }

    .legacy-highlight h3,
    .legacy-cards h3 {
        margin-top: 8px;
        font-size: 26px;
    }

    .legacy-highlight p,
    .legacy-cards p {
        font-size: 14px;
    }

    .legacy-cards {
        grid-template-columns: 1fr;
    }
}
