.legal-hero {
    --legal-hero-accent: #235dd0;
    --legal-hero-light: #4f8afa;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-bottom: 1px solid #d9e6f8;
    background:
        radial-gradient(ellipse at 77% 15%, #d8e9ff 0, transparent 46%),
        linear-gradient(112deg, #fbfdff 5%, #f1f7ff 63%, #e4f0ff 100%);
    color: #102547;
}

.legal-hero--privacy {
    --legal-hero-accent: #1b66b3;
    --legal-hero-light: #3b9bef;
}

.legal-hero--agreement {
    --legal-hero-accent: #3b58c7;
    --legal-hero-light: #707ff9;
}

.legal-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(90deg, #79a6e929 1px, transparent 1px),
        linear-gradient(#79a6e929 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(90deg, transparent 30%, #000 74%, #0009);
    pointer-events: none;
    content: "";
}

.legal-hero-inner {
    position: relative;
    display: grid;
    align-items: center;
    width: min(var(--max-width, 1400px), calc(100% - var(--site-nav-gutter, 8px) * 2));
    min-height: clamp(220px, 22vw, 308px);
    margin-inline: auto;
    padding-block: 44px;
}

.legal-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: min(650px, 54%);
}

.legal-hero-copy::before {
    display: block;
    width: 32px;
    height: 4px;
    margin-bottom: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--legal-hero-accent), var(--legal-hero-light));
    content: "";
}

.legal-hero h1 {
    margin: 0;
    color: inherit;
    font-size: clamp(34px, 4.6vw, 64px);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.legal-hero p {
    max-width: 40em;
    margin: 15px 0 0;
    color: #405779;
    font-size: clamp(15px, 1.25vw, 17px);
    line-height: 1.75;
}

.legal-hero-art {
    position: absolute;
    overflow: hidden;
    inset: 0 0 0 auto;
    width: min(46%, 570px);
    pointer-events: none;
}

.legal-hero-art::before,
.legal-hero-art::after {
    position: absolute;
    inset: 50% auto auto 51%;
    width: 94%;
    height: 67%;
    border: 1px solid #8db8f38c;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-19deg);
    content: "";
}

.legal-hero-art::after {
    width: 75%;
    height: 48%;
    border-color: #a5c7f5a6;
}

.legal-hero-files {
    position: absolute;
    z-index: 1;
    inset: 50% auto auto 52%;
    width: 130px;
    height: 162px;
    transform: translate(-50%, -50%);
}

.legal-hero-files::before,
.legal-hero-files::after,
.legal-hero-file {
    position: absolute;
    border: 1px solid #fff;
    border-radius: 13px;
    content: "";
}

.legal-hero-files::before {
    inset: 0 5px 5px 0;
    transform: translate(-23px, 9px) rotate(-16deg);
    background: linear-gradient(155deg, #f6faff 3%, #b4d4ff 100%);
    box-shadow: 0 10px 28px #3863ad22;
}

.legal-hero-files::after {
    z-index: -1;
    inset: 5px 0 0 9px;
    transform: translate(22px, 0) rotate(17deg);
    background: linear-gradient(145deg, #f2f8ff 10%, #a9cbfa 100%);
    box-shadow: 0 10px 26px #3863ad22;
}

.legal-hero-file {
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 13px;
    transform: rotate(-3deg);
    background: linear-gradient(158deg, #fff 17%, #e4f0ff);
    box-shadow: 0 10px 28px #3a69bc36;
}

.legal-hero-file::after {
    display: block;
    width: 63px;
    height: 19px;
    background:
        linear-gradient(#bdd2ef, #bdd2ef) 0 0 / 100% 2px no-repeat,
        linear-gradient(#bdd2ef, #bdd2ef) 0 8px / 78% 2px no-repeat,
        linear-gradient(#bdd2ef, #bdd2ef) 0 16px / 91% 2px no-repeat;
    content: "";
}

.legal-hero-file i {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid #d7e6ff;
    border-radius: 12px;
    background: #e6f0ff;
    color: var(--legal-hero-accent);
    font-size: 23px;
}

.legal-hero-light {
    position: absolute;
    inset: 30% 14% auto auto;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--legal-hero-light);
    box-shadow: 0 0 0 5px #77aef32e, -94px 108px 0 -1px #98bff9, -245px 65px 0 -1px #accdfb;
}

@media (max-width: 900px) {
    .legal-hero-inner {
        min-height: 207px;
        padding-block: 36px;
    }

    .legal-hero-copy {
        max-width: 58%;
    }

    .legal-hero-art {
        width: 41%;
    }

    .legal-hero-files {
        transform: translate(-50%, -50%) scale(.76);
    }

    .legal-hero-light {
        box-shadow: 0 0 0 4px #77aef32e, -65px 85px 0 -1px #98bff9;
    }
}

@media (max-width: 600px) {
    .legal-hero-inner {
        min-height: 170px;
        padding-block: 28px;
    }

    .legal-hero-copy {
        max-width: 100%;
    }

    .legal-hero-copy::before {
        width: 24px;
        height: 3px;
        margin-bottom: 11px;
    }

    .legal-hero h1 {
        font-size: clamp(29px, 7vw, 38px);
    }

    .legal-hero p {
        max-width: 26em;
        margin-top: 11px;
    }

    .legal-hero-art {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .legal-hero::after {
        position: absolute;
        z-index: -1;
        inset: 0;
        background: linear-gradient(112deg, transparent 36%, #ffffffb3 49%, #89b7f94d 54%, transparent 67%);
        pointer-events: none;
        animation: legal-hero-sweep 3.4s ease-out both;
        content: "";
    }

    .legal-hero-file {
        animation: legal-hero-file-settle 950ms cubic-bezier(.22, 1, .36, 1) both;
    }

    .legal-hero-light {
        animation: legal-hero-light-arrive 3.3s cubic-bezier(.25, .6, .3, 1) .12s both;
    }
}

@keyframes legal-hero-sweep {
    0% { opacity: 0; transform: translateX(-65%); }
    28% { opacity: .52; }
    72% { opacity: .3; }
    100% { opacity: 0; transform: translateX(64%); }
}

@keyframes legal-hero-file-settle {
    from { transform: translateY(13px) rotate(2deg); }
    to { transform: translateY(0) rotate(-3deg); }
}

@keyframes legal-hero-light-arrive {
    0% { opacity: .3; transform: translate(-30px, 13px); }
    37% { opacity: .9; }
    100% { opacity: 1; transform: translate(0, 0); }
}
