@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
    --legal-bg: #061019;
    --legal-panel: rgba(8, 21, 32, 0.84);
    --legal-panel-strong: rgba(8, 20, 31, 0.96);
    --legal-blue: #2185d5;
    --legal-blue-soft: #83cbff;
    --legal-text: #eef5fa;
    --legal-muted: #91a6b5;
    --legal-border: rgba(255, 255, 255, 0.09);
    --legal-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--legal-bg);
    color: var(--legal-text);
    font-family: Poppins, system-ui, sans-serif;
    line-height: 1.75;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.legal-page { position: relative; isolation: isolate; min-height: 100vh; }
.legal-container { width: min(calc(100% - 40px), 1180px); margin-inline: auto; }

.legal-background {
    position: fixed;
    inset: -7%;
    z-index: -4;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    filter: saturate(0.9) contrast(1.08) brightness(0.42);
    transform: scale(1.1);
    transition: opacity 0.5s ease;
}
.legal-background.ready { opacity: 0.32; }
.legal-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6,16,25,.75), rgba(6,16,25,.93) 52%, #061019 94%),
        radial-gradient(circle at 14% 10%, rgba(33,133,213,.2), transparent 28%);
}
.legal-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(116,190,246,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116,190,246,.035) 1px, transparent 1px);
    background-size: 76px 76px;
    mask-image: linear-gradient(#000 0 64%, transparent 96%);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--legal-border);
    background: rgba(5, 14, 22, 0.88);
    backdrop-filter: blur(18px);
}
.legal-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.legal-brand { display: inline-flex; align-items: center; line-height: 0; }
.legal-brand img { display: block; width: 117px; height: auto; }
.legal-back-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border: 1px solid rgba(123,199,255,.44);
    border-radius: 999px;
    background: rgba(33,133,213,.1);
    color: #e8f6ff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
    transition: .2s ease;
}
.legal-back-button:hover { transform: translateY(-1px); border-color: rgba(123,199,255,.85); background: rgba(33,133,213,.18); }

.legal-hero { padding: 82px 0 38px; }
.legal-hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 5vw, 58px);
    border: 1px solid rgba(123,199,255,.16);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(9,27,41,.9), rgba(7,18,28,.74));
    box-shadow: var(--legal-shadow);
}
.legal-hero-card::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -120px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33,133,213,.25), transparent 68%);
    pointer-events: none;
}
.legal-eyebrow {
    display: inline-block;
    color: #86ccff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .18em;
}
.legal-hero h1 {
    max-width: 850px;
    margin: 12px 0 16px;
    font-size: clamp(2.25rem, 6vw, 4.8rem);
    line-height: 1.04;
    letter-spacing: -.045em;
}
.legal-hero p { max-width: 760px; margin: 0; color: #a9bac6; font-size: clamp(.9rem, 2vw, 1.02rem); }
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.legal-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--legal-border);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: #7f95a5;
    font-size: .67rem;
    font-weight: 700;
}

.legal-layout {
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 10px 0 90px;
}
.legal-toc {
    position: sticky;
    top: 102px;
    padding: 19px;
    border: 1px solid var(--legal-border);
    border-radius: 18px;
    background: rgba(7,19,29,.78);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.legal-toc strong {
    display: block;
    margin-bottom: 10px;
    color: #dceaf3;
    font-size: .7rem;
    letter-spacing: .11em;
}
.legal-toc a {
    display: block;
    padding: 6px 0;
    color: #7890a0;
    font-size: .69rem;
    line-height: 1.45;
    text-decoration: none;
}
.legal-toc a:hover { color: #9fd7ff; }

.legal-article { min-width: 0; display: grid; gap: 14px; }
.legal-section {
    scroll-margin-top: 104px;
    padding: clamp(22px, 3.4vw, 34px);
    border: 1px solid var(--legal-border);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(8,22,34,.9), rgba(7,17,27,.76));
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 45px rgba(0,0,0,.13);
}
.legal-section-number {
    display: inline-flex;
    margin-bottom: 10px;
    color: #6fbaf0;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .13em;
}
.legal-section h2 {
    margin: 0 0 14px;
    color: #f0f7fb;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    line-height: 1.22;
    letter-spacing: -.025em;
}
.legal-section p,
.legal-section li { color: var(--legal-muted); font-size: .86rem; }
.legal-section p { margin: 0 0 12px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 8px 0 0; padding-left: 20px; }
.legal-section li + li { margin-top: 6px; }
.legal-section strong { color: #e8f2f8; }
.legal-section a { color: var(--legal-blue-soft); text-underline-offset: 3px; overflow-wrap: anywhere; }

.legal-contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 6px;
    padding: 20px 22px;
    border: 1px solid rgba(33,133,213,.24);
    border-radius: 18px;
    background: rgba(33,133,213,.07);
}
.legal-contact-card div { min-width: 0; }
.legal-contact-card strong { display: block; color: #dff2ff; font-size: .83rem; }
.legal-contact-card span { display: block; margin-top: 3px; color: #7890a0; font-size: .72rem; }
.legal-contact-card a {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border-radius: 999px;
    background: #2185d5;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    text-decoration: none;
}

.legal-footer {
    border-top: 1px solid var(--legal-border);
    background: #050d14;
}
.legal-footer-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #6f8392;
    font-size: .72rem;
}
.legal-footer p { margin: 0; }
.legal-footer a { color: #93a7b5; text-decoration: none; }
.legal-footer a:hover { color: #c7e7ff; }

.legal-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 70;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1fbc63;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 15px 40px rgba(16,150,75,.35);
    transition: .2s ease;
}
.legal-whatsapp:hover { transform: translateY(-3px) scale(1.03); }
.legal-whatsapp svg { width: 28px; height: 28px; fill: currentColor; }

@media (max-width: 850px) {
    .legal-layout { grid-template-columns: 1fr; gap: 18px; }
    .legal-toc { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 18px; }
    .legal-toc strong { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .legal-container { width: min(calc(100% - 28px), 1180px); }
    .legal-header-inner { min-height: 68px; }
    .legal-back-button { min-height: 40px; padding: 0 12px; font-size: .58rem; }
    .legal-hero { padding: 44px 0 24px; }
    .legal-hero-card { border-radius: 22px; }
    .legal-toc { grid-template-columns: 1fr; }
    .legal-section { border-radius: 17px; }
    .legal-section p, .legal-section li { font-size: .82rem; }
    .legal-contact-card { align-items: flex-start; flex-direction: column; }
    .legal-contact-card a { width: 100%; justify-content: center; }
    .legal-footer-inner { padding: 24px 0; align-items: flex-start; flex-direction: column; min-height: 0; }
    .legal-whatsapp { right: 15px; bottom: 15px; width: 52px; height: 52px; }
}
@media (max-width: 390px) {
    .legal-back-button span { display: none; }
    .legal-hero h1 { font-size: 2.05rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
