/* Юридические страницы и cookie-баннер */

.legal-page {
    position: relative;
    z-index: 2;
}

.legal-page__section {
    position: relative;
    padding: calc(var(--header-height) + var(--hero-top-gap) + 24px) 0 80px;
    overflow: hidden;
}

.legal-page__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.legal-page__ambient .hero__orb--1 {
    top: -15%;
    left: -8%;
    width: min(55vw, 520px);
    height: min(55vw, 520px);
}

.legal-page__ambient .hero__orb--2 {
    top: 20%;
    right: -12%;
    width: min(50vw, 480px);
    height: min(50vw, 480px);
}

.legal-page__ambient .hero__dots {
    opacity: 0.55;
}

html[data-theme="light"] .legal-page__ambient {
    display: none;
}

.legal-page__section > .container {
    position: relative;
    z-index: 1;
}

.legal-page .section-kicker-head {
    margin-bottom: clamp(32px, 4vw, 48px);
    max-width: 100%;
}

.legal-page .section-kicker-head__intro {
    max-width: 100%;
}

.legal-page .section-kicker-head__desc {
    max-width: 720px;
}

.legal-doc {
    width: 100%;
    padding: clamp(32px, 4vw, 48px) clamp(28px, 4vw, 56px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

html[data-theme="dark"] .legal-doc {
    background: rgba(12, 16, 38, 0.72);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .legal-page__section {
    background:
        radial-gradient(ellipse 70% 55% at 18% 15%, rgba(124, 92, 255, 0.2), transparent 58%),
        radial-gradient(ellipse 65% 50% at 82% 45%, rgba(0, 212, 255, 0.12), transparent 55%),
        linear-gradient(180deg, #0a0e27 0%, #06081a 45%, #0a0e27 100%);
}

.legal-doc__meta {
    margin: 0 0 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}

.legal-doc h2 {
    margin: 28px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.legal-doc h2:first-of-type {
    margin-top: 0;
}

.legal-doc p,
.legal-doc li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-2);
}

.legal-doc p {
    margin: 0 0 14px;
}

.legal-doc ul {
    margin: 0 0 16px;
    padding-left: 1.25em;
}

.legal-doc li {
    margin-bottom: 8px;
}

.legal-doc a {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-doc a:hover {
    color: var(--text);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px var(--container-padding) calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    overflow-x: clip;
    transition: opacity 0.35s var(--easing), transform 0.35s var(--easing);
}

.cookie-banner.is-hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.cookie-banner__panel {
    pointer-events: auto;
    width: 100%;
    max-width: min(1100px, 100%);
    min-width: 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124, 92, 255, 0.08);
    backdrop-filter: blur(16px);
}

html[data-theme="dark"] .cookie-banner__panel {
    background: rgba(14, 18, 42, 0.94);
    border-color: rgba(124, 92, 255, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(124, 92, 255, 0.12);
}

.cookie-banner__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: #fff;
}

.cookie-banner__icon svg {
    width: 22px;
    height: 22px;
}

.cookie-banner__text {
    flex: 1;
    min-width: 0;
}

.cookie-banner__title {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.cookie-banner__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2);
}

.cookie-banner__desc a {
    color: var(--accent-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.cookie-banner__actions .btn {
    min-height: 44px;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .cookie-banner {
        padding: 10px var(--container-padding) calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .cookie-banner__panel {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .cookie-banner__icon {
        width: 36px;
        height: 36px;
        align-self: center;
    }

    .cookie-banner__text {
        text-align: center;
        min-width: 0;
    }

    .cookie-banner__actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-banner__actions .btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .cookie-banner__title {
        font-size: 14px;
    }

    .cookie-banner__desc {
        font-size: 13px;
    }
}
