:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5e7eb;
    background:
        radial-gradient(circle at top left, rgba(74, 144, 226, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(127, 158, 178, 0.18), transparent 28%),
        linear-gradient(180deg, #0f172a 0%, #111827 55%, #0b1220 100%);
}

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

.legal-shell {
    width: min(72rem, 100%);
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.legal-brand img {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: contain;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.55);
    padding: 0.35rem;
    border: 1px solid rgba(125, 211, 252, 0.24);
}

.legal-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.legal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.34);
    background: rgba(15, 23, 42, 0.74);
    color: #dbeafe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.legal-link:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(125, 211, 252, 0.5);
    transform: translateY(-1px);
}

.legal-link--primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    color: #ffffff;
}

.legal-link--primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.legal-language {
    --lang-switch-padding: 0.3rem;
    --lang-switch-gap: 0.35rem;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--lang-switch-gap);
    padding: var(--lang-switch-padding);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(125, 211, 252, 0.24);
    isolation: isolate;
    overflow: hidden;
}

.legal-language::before {
    content: "";
    position: absolute;
    top: var(--lang-switch-padding);
    bottom: var(--lang-switch-padding);
    left: var(--lang-switch-padding);
    width: calc((100% - (var(--lang-switch-padding) * 2) - var(--lang-switch-gap)) / 2);
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
    transform: translateX(0);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
    z-index: 0;
}

.legal-language[data-active-lang="en"]::before {
    transform: translateX(calc(100% + var(--lang-switch-gap)));
}

.lang-btn {
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    min-width: 2.9rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: color 0.24s ease, transform 0.2s ease;
}

.lang-btn:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.lang-btn.active {
    background: transparent;
    color: #ffffff;
}

.legal-card {
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(125, 211, 252, 0.32);
    border-radius: 1.5rem;
    padding: clamp(1rem, 2vw + 0.5rem, 2.25rem);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(14px);
}

.legal-eyebrow {
    display: inline-flex;
    margin: 0 0 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-title {
    margin: 0;
    max-width: 16ch;
    color: #f8fafc;
    font-size: clamp(2rem, 4.6vw, 3.35rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.legal-summary {
    margin: 1rem 0 0;
    max-width: 52rem;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.75;
}

.legal-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.25rem 0 0;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(125, 211, 252, 0.22);
    color: #94a3b8;
    font-size: 0.9rem;
}

.legal-sections {
    margin-top: 2rem;
}

.legal-section + .legal-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(125, 211, 252, 0.18);
}

.legal-section h2 {
    margin: 0 0 0.9rem;
    max-width: 24ch;
    color: #93c5fd;
    font-size: clamp(1.35rem, 1.8vw, 1.6rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.legal-section p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.8;
}

.legal-section p + p {
    margin-top: 0.95rem;
}

.legal-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: #d1d5db;
}

.legal-list li + li {
    margin-top: 0.75rem;
}

.legal-call-button {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(14px);
    color: #93c5fd;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}

.legal-call-button__icon {
    display: inline-grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
    line-height: 1;
}

.legal-call-button__icon svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.legal-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .legal-shell {
        padding: 0.75rem 0.75rem 2rem;
    }

    .legal-header {
        align-items: stretch;
    }

    .legal-header__actions {
        width: 100%;
        justify-content: stretch;
    }

    .legal-link {
        flex: 1 1 100%;
    }

    .legal-language {
        --lang-switch-padding: 0.35rem;
        width: 100%;
        justify-content: center;
    }

    .lang-btn {
        flex: 1 1 0;
    }

    .legal-call-button {
        display: inline-flex;
    }
}
