/* =========================
   Nordec Legal Pages
========================= */

.legal-page {
    --legal-navy: var(--color-navy, #080f1c);
    --legal-teal: var(--color-teal, #029488);
    --legal-white: var(--color-white, #ffffff);
    --legal-off-white: var(--color-off-white, #f7f7f5);
    --legal-muted: var(--color-muted, #858e95);
    --legal-border: var(--color-border, rgba(8, 15, 28, 0.12));
    min-width: 320px;
    margin: 0;
    background: var(--legal-off-white);
    color: var(--legal-navy);
    font-family: var(--font-primary, "Inter", sans-serif);
}

.legal-page * {
    box-sizing: border-box;
}

.legal-page a {
    color: inherit;
    text-decoration: none;
}

.legal-container {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

/* Header */

.legal-site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(8, 15, 28, 0.08);
    background-color: rgba(247, 247, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.legal-nav {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.legal-logo {
    display: inline-flex;
    align-items: center;
}

.legal-logo img {
    width: 150px;
    height: auto;
    display: block;
}

.legal-nav-actions {
    display: flex;
    align-items: center;
    gap: 28px;
}

.legal-home-link {
    color: var(--legal-navy);
    font-size: 14px;
    font-weight: 700;
    transition: color 180ms ease;
}

.legal-home-link:hover {
    color: var(--legal-teal);
}

.legal-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background-color: var(--legal-teal);
    color: var(--legal-white);
    font-size: 13px;
    font-weight: 800;
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.legal-header-cta:hover {
    background-color: var(--legal-navy);
    transform: translateY(-2px);
}

/* Hero */

.legal-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(78px, 10vw, 140px) 0 clamp(145px, 17vw, 235px);
    background:
        radial-gradient(circle at 15% 18%, rgba(2, 148, 136, 0.23), transparent 35%),
        radial-gradient(circle at 87% 15%, rgba(2, 148, 136, 0.1), transparent 28%),
        linear-gradient(145deg, #eef8f6 0%, #f7f7f5 55%, #e7f1ef 100%);
}

.legal-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(8, 15, 28, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 15, 28, 0.035) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 92%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 92%);
}

.legal-hero-content {
    max-width: 900px;
    margin-inline: auto;
    text-align: center;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--legal-teal);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-eyebrow::before {
    content: "";
    width: 34px;
    height: 2px;
    background-color: var(--legal-teal);
}

.legal-hero h1 {
    margin: 0;
    color: var(--legal-navy);
    font-size: clamp(50px, 7vw, 88px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.legal-hero h1 span {
    display: block;
    margin-top: 6px;
    color: var(--legal-teal);
    font-family: var(--font-accent, "Caveat", cursive);
    font-size: 0.82em;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.legal-hero-description {
    max-width: 670px;
    margin: 30px auto 0;
    color: #596168;
    font-size: 16px;
    line-height: 1.75;
}

/* Legal document */

.legal-document-wrap {
    position: relative;
    z-index: 4;
    margin-top: clamp(-125px, -10vw, -85px);
    padding-bottom: clamp(85px, 10vw, 140px);
}

.legal-document {
    width: min(100%, 1030px);
    margin-inline: auto;
    padding: clamp(32px, 6vw, 78px);
    border: 1px solid rgba(8, 15, 28, 0.08);
    border-radius: 28px;
    background-color: var(--legal-white);
    box-shadow: 0 35px 90px rgba(8, 15, 28, 0.1);
}

.legal-updated {
    display: inline-flex;
    margin-bottom: 28px;
    padding: 8px 13px;
    border: 1px solid rgba(2, 148, 136, 0.2);
    border-radius: 999px;
    background-color: rgba(2, 148, 136, 0.07);
    color: var(--legal-teal);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legal-introduction {
    margin: 0 0 52px;
    padding-bottom: 46px;
    border-bottom: 1px solid var(--legal-border);
    color: #596168;
    font-size: 17px;
    line-height: 1.85;
}

.legal-section + .legal-section {
    margin-top: 44px;
}

.legal-section h2 {
    display: flex;
    align-items: baseline;
    gap: 13px;
    margin: 0 0 15px;
    color: var(--legal-navy);
    font-size: clamp(22px, 2.5vw, 29px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.legal-section-number {
    flex: 0 0 auto;
    color: var(--legal-teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.legal-section p,
.legal-section li {
    color: #596168;
    font-size: 15px;
    line-height: 1.85;
}

.legal-section p {
    margin: 0;
}

.legal-section ul {
    display: grid;
    gap: 10px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none;
}

.legal-section li {
    position: relative;
    padding-left: 22px;
}

.legal-section li::before {
    content: "";
    position: absolute;
    top: 0.77em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--legal-teal);
}

.legal-section a {
    color: var(--legal-teal);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.legal-contact-card {
    margin-top: 22px;
    padding: 25px 27px;
    border-left: 4px solid var(--legal-teal);
    border-radius: 0 16px 16px 0;
    background-color: rgba(2, 148, 136, 0.065);
}

.legal-contact-card address {
    display: grid;
    gap: 7px;
    color: #596168;
    font-size: 14px;
    font-style: normal;
    line-height: 1.65;
}

.legal-contact-card strong {
    color: var(--legal-navy);
}

.legal-page-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 58px;
    padding-top: 30px;
    border-top: 1px solid var(--legal-border);
}

.legal-page-switch p {
    margin: 0;
    color: var(--legal-muted);
    font-size: 12px;
}

.legal-page-switch a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--legal-navy);
    font-size: 12px;
    font-weight: 800;
    transition: color 180ms ease;
}

.legal-page-switch a span {
    color: var(--legal-teal);
    font-size: 16px;
}

.legal-page-switch a:hover {
    color: var(--legal-teal);
}

/* Footer */

.legal-footer {
    padding: 38px 0;
    background-color: var(--legal-navy);
}

.legal-footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
}

.legal-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
}

.legal-footer p:last-child {
    text-align: right;
}

.legal-footer-links,
.footer-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px 20px;
}

.legal-footer-links a,
.footer-legal-links a {
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 700;
    transition: color 180ms ease;
}

.legal-footer-links a:hover,
.footer-legal-links a:hover {
    color: var(--legal-teal, #029488);
}

/* Add this class to the footer-bottom on index.html. */

.site-footer .footer-bottom.has-legal-links {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.site-footer .footer-bottom.has-legal-links>p:last-child {
    text-align: right;
}

/* Responsive */

@media (max-width: 760px) {
    .legal-container {
        width: min(100% - 32px, 1180px);
    }

    .legal-nav {
        min-height: 78px;
    }

    .legal-logo img {
        width: 126px;
    }

    .legal-home-link {
        display: none;
    }

    .legal-header-cta {
        min-height: 44px;
        padding-inline: 17px;
        font-size: 11px;
    }

    .legal-hero {
        padding: 70px 0 145px;
    }

    .legal-hero-description {
        font-size: 14px;
    }

    .legal-document-wrap {
        margin-top: -92px;
        padding-bottom: 75px;
    }

    .legal-document {
        padding: 32px 22px 38px;
        border-radius: 20px;
    }

    .legal-introduction {
        margin-bottom: 42px;
        padding-bottom: 37px;
        font-size: 15px;
        line-height: 1.75;
    }

    .legal-section + .legal-section {
        margin-top: 37px;
    }

    .legal-section h2 {
        align-items: flex-start;
        gap: 10px;
    }

    .legal-section p,
    .legal-section li {
        font-size: 14px;
        line-height: 1.78;
    }

    .legal-contact-card {
        padding: 21px 19px;
    }

    .legal-page-switch {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-footer-content,
    .site-footer .footer-bottom.has-legal-links {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .legal-footer p:last-child,
    .site-footer .footer-bottom.has-legal-links>p:last-child {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-page *,
    .legal-page *::before,
    .legal-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
