.legal-hero {
    position: relative;
    overflow: hidden;
    padding:
        clamp(3rem, 7vw, 6.5rem)
        0;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(255, 255, 255, .5),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #e7dfcc 0%,
            #c8d0b7 58%,
            #a7b391 100%
        );
}

.legal-hero--terms {
    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(255, 255, 255, .48),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #ece3d3 0%,
            #d1c2a6 56%,
            #aeb894 100%
        );
}

.legal-hero::after {
    position: absolute;
    right: -8rem;
    bottom: -11rem;
    width: 27rem;
    height: 27rem;
    border: 1px solid rgba(64, 77, 50, .16);
    border-radius: 50%;
    content: "";
}

.legal-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.legal-hero h1 {
    margin: .75rem 0 1rem;
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    line-height: .98;
}

.legal-hero p {
    max-width: 720px;
    margin: 0 0 1.25rem;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.7;
}

.legal-hero small {
    font-weight: 700;
}

.legal-page-section {
    background: #faf8f2;
}

.legal-page-layout {
    display: grid;
    grid-template-columns:
        minmax(220px, .34fr)
        minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 110px;
    padding: 1.5rem;
    border: 1px solid rgba(70, 82, 55, .13);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(62, 70, 51, .07);
}

.legal-toc > strong {
    display: block;
    margin-bottom: 1rem;
    color: #4f5d3f;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal-toc nav {
    display: grid;
    gap: .2rem;
}

.legal-toc a {
    padding: .55rem .7rem;
    border-radius: 9px;
    color: #4d5148;
    font-size: .9rem;
    line-height: 1.35;
    text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
    background: #eef0e7;
    color: #4f5d3f;
}

.legal-document {
    min-width: 0;
}

.legal-document > section {
    scroll-margin-top: 120px;
    margin-bottom: 1.25rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid rgba(70, 82, 55, .12);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(62, 70, 51, .06);
}

.legal-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 30px;
    margin-bottom: .9rem;
    border-radius: 999px;
    background: #e8ecdf;
    color: #526044;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.legal-document h2 {
    margin-bottom: 1.2rem;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.legal-document h3 {
    margin: 1.5rem 0 .65rem;
    font-size: 1.2rem;
}

.legal-document p,
.legal-document li {
    color: #51554d;
    font-size: 1rem;
    line-height: 1.78;
}

.legal-document ul,
.legal-document ol {
    display: grid;
    gap: .55rem;
    padding-left: 1.4rem;
}

.legal-business-card {
    display: grid;
    gap: .55rem;
    margin: 1.25rem 0;
    padding: 1.5rem;
    border-left: 4px solid #657453;
    border-radius: 0 18px 18px 0;
    background: #f3f1e9;
}

.legal-business-card strong {
    margin-bottom: .2rem;
    color: #3f4936;
    font-size: 1.2rem;
}

.legal-business-card span {
    line-height: 1.55;
}

.legal-purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.legal-purpose-grid > div {
    padding: 1.35rem;
    border-radius: 17px;
    background: #f6f3eb;
}

.legal-purpose-grid h3 {
    margin-top: 0;
}

.legal-purpose-grid small {
    display: block;
    color: #67705e;
    font-weight: 700;
    line-height: 1.5;
}

.legal-notice,
.legal-model,
.legal-guarantee-banner {
    margin: 1.5rem 0;
    padding: 1.4rem;
    border-radius: 18px;
    background: #edf1e7;
}

.legal-notice--warning {
    background: #f7eee0;
}

.legal-notice strong,
.legal-model strong,
.legal-guarantee-banner strong {
    display: block;
    margin-bottom: .5rem;
    color: #45513b;
    font-size: 1.05rem;
}

.legal-notice p,
.legal-model p,
.legal-guarantee-banner p {
    margin-bottom: 0;
}

.legal-guarantee-banner {
    border: 1px solid rgba(82, 103, 63, .2);
    background:
        linear-gradient(
            135deg,
            #e8eee0,
            #f8f6ef
        );
}

.legal-contact-box {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin: 1.25rem 0;
}

.legal-contact-box a,
.legal-contact-box span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: .65rem 1rem;
    border-radius: 999px;
    background: #eef0e8;
    color: #4f5d3f;
    font-weight: 750;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.footer-legal-business {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .68);
    font-size: .76rem;
    line-height: 1.45;
}

.checkout-legal-notice {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(70, 82, 55, .15);
    border-radius: 14px;
    background: #f4f1e8;
}

.checkout-legal-notice p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.6;
}

.checkout-legal-notice a {
    font-weight: 750;
}

.contact-privacy-check a {
    font-weight: 750;
}

@media (max-width: 991.98px) {
    .legal-page-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
    }

    .legal-toc nav {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .legal-hero {
        padding: 3rem 0;
    }

    .legal-document > section,
    .legal-toc {
        border-radius: 19px;
    }

    .legal-purpose-grid,
    .legal-toc nav {
        grid-template-columns: 1fr;
    }

    .legal-contact-box {
        display: grid;
    }

    .legal-contact-box a,
    .legal-contact-box span {
        justify-content: center;
        border-radius: 13px;
        text-align: center;
    }
}
