/* Qaydalar / Məxfilik — premium legal */

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

.legal-page {
    --legal-ink: #0f172a;
    --legal-muted: #64748b;
    --legal-line: #e2e8f0;
    --legal-accent: #ea580c;
    --legal-accent-soft: #f7971c;
    --legal-accent-deep: #c2410c;
    --legal-surface: #f8fafc;
    --legal-card: #ffffff;
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--legal-ink);
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(247, 151, 28, 0.07), transparent 55%),
        radial-gradient(ellipse 50% 30% at 0% 40%, rgba(15, 23, 42, 0.04), transparent 50%),
        var(--legal-surface);
    padding-bottom: 72px;
    min-height: 60vh;
}

/* Hero */
.legal-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 48px 0 64px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(154, 52, 18, 0.7)),
        linear-gradient(125deg, #0f172a 0%, #1e293b 48%, #334155 100%);
}

.legal-hero__glow {
    position: absolute;
    inset: auto -8% -35% 35%;
    height: 75%;
    background: radial-gradient(circle, rgba(247, 151, 28, 0.38), transparent 65%);
    pointer-events: none;
}

.legal-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
    pointer-events: none;
    opacity: 0.7;
}

.legal-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    animation: legalIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes legalIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-hero__crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.62);
}

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

.legal-hero__crumb a:hover {
    color: #fff;
}

.legal-hero__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fdba74;
}

.legal-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 3.4vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.legal-hero__lead {
    margin: 0 0 22px;
    max-width: 34rem;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
}

.legal-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.legal-hero__btn:hover {
    transform: translateY(-1px);
}

.legal-hero__btn--primary {
    background: linear-gradient(135deg, #f7971c, #ea580c);
    color: #fff;
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.legal-hero__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

.legal-hero__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Body layout */
.legal-page__body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    max-width: 1080px;
    margin: -28px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* TOC */
.legal-toc {
    position: sticky;
    top: 88px;
    align-self: start;
    padding: 18px 16px;
    border-radius: 18px;
    background: var(--legal-card);
    border: 1px solid var(--legal-line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    animation: legalIn 0.55s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.legal-toc__label {
    margin: 0 0 12px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--legal-muted);
}

.legal-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-toc__list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 11px;
    text-decoration: none;
    color: var(--legal-ink);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    transition: background 0.15s ease, color 0.15s ease;
}

.legal-toc__list a:hover {
    background: #fff7ed;
    color: var(--legal-accent-deep);
}

.legal-toc__num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #fff7ed;
    color: var(--legal-accent);
    font-size: 0.72rem;
    font-weight: 800;
}

/* Main */
.legal-main {
    min-width: 0;
    animation: legalIn 0.55s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.legal-main--solo {
    grid-column: 1 / -1;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
}

.legal-intro {
    margin-bottom: 18px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--legal-card);
    border: 1px solid var(--legal-line);
    border-left: 4px solid var(--legal-accent-soft);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.legal-intro p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: #334155;
    font-weight: 500;
}

.legal-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legal-card {
    scroll-margin-top: 96px;
    padding: 22px 24px 24px;
    border-radius: 18px;
    background: var(--legal-card);
    border: 1px solid var(--legal-line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-card:hover {
    border-color: #fdba74;
    box-shadow: 0 14px 36px rgba(234, 88, 12, 0.08);
}

.legal-card__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.legal-card__num {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    color: var(--legal-accent-deep);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.legal-card__head h2 {
    margin: 6px 0 0;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--legal-ink);
}

.legal-card__body {
    font-size: 0.96rem;
    line-height: 1.7;
    color: #475569;
    font-weight: 500;
}

.legal-card__body p {
    margin: 0 0 0.75em;
}

.legal-card__body p:last-child {
    margin-bottom: 0;
}

.legal-prose {
    padding: 28px;
    border-radius: 18px;
    background: var(--legal-card);
    border: 1px solid var(--legal-line);
    font-size: 1rem;
    line-height: 1.75;
    color: #334155;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.legal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 24px;
    text-align: center;
    border-radius: 18px;
    background: var(--legal-card);
    border: 1px dashed #cbd5e1;
    color: var(--legal-muted);
}

.legal-empty i {
    font-size: 1.75rem;
    color: #94a3b8;
}

.legal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding: 20px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #1e293b 60%, #9a3412);
    color: #fff;
}

.legal-footer__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.legal-footer__text strong {
    font-size: 1rem;
    font-weight: 800;
}

.legal-footer__text span {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
}

.legal-footer__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7971c, #ea580c);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.legal-footer__btn:hover {
    transform: translateY(-1px);
    color: #fff;
}

@media (max-width: 900px) {
    .legal-page__body {
        grid-template-columns: 1fr;
        margin-top: -20px;
        gap: 16px;
    }

    .legal-toc {
        position: static;
        padding: 14px 12px;
    }

    .legal-toc__list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
}

@media (max-width: 560px) {
    .legal-hero {
        padding: 36px 0 52px;
    }

    .legal-toc__list {
        grid-template-columns: 1fr;
    }

    .legal-card,
    .legal-intro {
        padding: 18px 16px;
    }

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

    .legal-footer__btn {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legal-hero__inner,
    .legal-toc,
    .legal-main {
        animation: none;
    }
}
