:root {
    --navy: #11233d;
    --blue: #315d9c;
    --orange: #f6a515;
    --coral: #ef5c3f;
    --bg: #f6f8fc;
    --surface: rgba(255, 255, 255, 0.92);
    --text: #18283e;
    --muted: #61718a;
    --line: rgba(17, 35, 61, 0.08);
    --shadow: 0 24px 60px rgba(17, 35, 61, 0.12);
    --radius: 26px;
    --shell: min(980px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(246, 165, 21, 0.14), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(49, 93, 156, 0.18), transparent 30%),
        linear-gradient(180deg, #fbfcff 0%, #f4f7fb 22%, #ffffff 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(10px);
    pointer-events: none;
}

body::before {
    top: 88px;
    right: -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(246, 165, 21, 0.16), transparent 68%);
}

body::after {
    bottom: 40px;
    left: -120px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(49, 93, 156, 0.14), transparent 70%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell,
.shell {
    width: var(--shell);
    margin: 0 auto;
}

.legal-header {
    padding: 24px 0 16px;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 40px rgba(17, 35, 61, 0.08);
    backdrop-filter: blur(16px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-mark img {
    width: 158px;
}

.legal-main {
    padding: 10px 0 48px;
}

.legal-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.94)),
        radial-gradient(circle at top right, rgba(246, 165, 21, 0.12), transparent 30%);
    box-shadow: var(--shadow);
}

.legal-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--orange), var(--coral), var(--blue));
}

.legal-card::after {
    content: "";
    position: absolute;
    top: -84px;
    right: -64px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49, 93, 156, 0.08), transparent 68%);
    pointer-events: none;
}

.legal-title {
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(17, 35, 61, 0.08);
    font-family: "Sora", sans-serif;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--navy);
}

.legal-content {
    position: relative;
    font-size: 1.03rem;
    line-height: 1.9;
    color: var(--muted);
}

.legal-content p,
.legal-content div {
    margin: 0;
}

.legal-content a {
    color: var(--blue);
    font-weight: 700;
}

.legal-content a:hover,
.legal-content a:focus-visible {
    color: var(--navy);
}

.legal-card--plain .legal-content {
    color: var(--text);
    font-weight: 600;
}

.fade {
    opacity: 0;
    transform: translateY(18px);
    animation: fade-up 0.7s ease forwards;
}

.d1 {
    animation-delay: 0.08s;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    .legal-main {
        padding-bottom: 40px;
    }

    .legal-card {
        padding: 28px 24px;
    }
}

@media (max-width: 640px) {
    .legal-header {
        padding-top: 18px;
    }

    .header-bar {
        justify-content: center;
        padding: 14px 16px;
        border-radius: 22px;
    }

    .brand-mark img {
        width: 136px;
    }

    .legal-main {
        padding-top: 6px;
        padding-bottom: 32px;
    }

    .legal-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .legal-title {
        text-align: center;
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .legal-content {
        font-size: 0.98rem;
        line-height: 1.8;
    }
}

.footer {
    padding: 26px 0 54px;
}

.footer-shell {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--radius) + 2px);
    color: rgba(255, 255, 255, 0.94);
    background:
        radial-gradient(circle at top right, rgba(246, 165, 21, 0.3), transparent 24%),
        radial-gradient(circle at bottom left, rgba(49, 93, 156, 0.22), transparent 28%),
        linear-gradient(135deg, #071222 0%, #10233d 46%, #1a3d69 100%);
    box-shadow: 0 34px 70px rgba(9, 21, 39, 0.24);
}

.footer-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%);
    pointer-events: none;
}

.footer-shell::after {
    content: "";
    position: absolute;
    inset: auto -140px -160px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.18), transparent 68%);
    pointer-events: none;
}

.footer-top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.footer-logo img {
    width: 132px;
}

.footer-brand h5 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 800;
}

.footer-brand p {
    margin: 0;
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.footer-card {
    position: relative;
    padding: 20px 20px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.footer-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.footer-card h5 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.footer-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.footer-card p + p {
    margin-top: 8px;
}

.footer-card a {
    color: #fff;
    font-weight: 700;
    word-break: break-word;
    transition: opacity .22s ease, color .22s ease;
}

.footer-card a:hover,
.footer-card a:focus-visible {
    color: #ffffff;
    opacity: 0.82;
}

.footer-card.footer-accent {
    background: linear-gradient(180deg, rgba(37, 211, 102, 0.18), rgba(255, 255, 255, 0.08));
    border-color: rgba(37, 211, 102, 0.24);
}

.footer-bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.94rem;
}

.footer-bottom span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--coral));
}

@media (max-width: 900px) {
    .footer-top,
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .footer {
        padding-bottom: 34px;
    }

    .footer-shell,
    .footer-card {
        text-align: center;
    }

    .footer-shell {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .footer-brand {
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
