/* ============================================================
   Legal pages — Modern SaaS (light, refined purple brand)
   Consumes the shared design tokens defined in site.css :root.
   Used by Pages/Shared/_LegalLayout.cshtml
   (Privacy, Terms, Refund)
   ============================================================ */

.legal-page {
    background: var(--bg);
    min-height: 60vh;
}

/* ---- Soft brand header band ---- */
.legal-hero {
    background: var(--grad-soft);
    border-bottom: 1px solid var(--border);
    padding: 3.25rem 1rem 5.5rem;
    text-align: center;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-2);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.95rem;
    box-shadow: var(--shadow-sm);
}

    .legal-eyebrow i {
        font-size: 0.95rem;
        color: var(--accent);
    }

/* ---- Content column: card pulled up over the header band ---- */
.legal-shell {
    padding: 0 1rem 5rem;
}

.legal-doc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 3.25rem 3.5rem;
    margin-top: -3.75rem;
    position: relative;
    color: var(--body);
    line-height: 1.75;
}

/* ---- Document header (h1 + last-updated meta) ---- */
.legal-doc h1 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 1rem;
}

.legal-doc .meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink) !important;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-2);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.85rem;
    margin: 0 0 1.75rem;
}

    .legal-doc .meta::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--grad);
        flex: 0 0 auto;
    }

/* First paragraph after the header reads as a lead-in */
.legal-doc .meta + p {
    color: var(--body);
    font-size: 1.075rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ---- Headings ---- */
.legal-doc h2 {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 2.75rem 0 0.85rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

    .legal-doc h2::before {
        content: "";
        flex: 0 0 auto;
        width: 4px;
        height: 1.05em;
        border-radius: var(--radius-pill);
        background: var(--grad);
        transform: translateY(0.12em);
    }

.legal-doc h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink);
    margin: 1.85rem 0 0.6rem;
}

/* ---- Body copy ---- */
.legal-doc p {
    color: var(--body);
    font-size: 1.02rem;
    margin: 0 0 1.05rem;
}

.legal-doc strong {
    color: var(--ink);
    font-weight: 700;
}

/* ---- Lists ---- */
.legal-doc ul {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
}

    .legal-doc ul li {
        position: relative;
        padding-left: 1.75rem;
        margin-bottom: 0.7rem;
        color: var(--body);
        font-size: 1.02rem;
    }

        .legal-doc ul li::before {
            content: "\2713"; /* check mark */
            position: absolute;
            left: 0;
            top: 0.02em;
            font-size: 0.85rem;
            font-weight: 700;
            line-height: 1.4;
            color: var(--accent);
        }

/* ---- Links ---- */
.legal-doc a {
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--accent-soft-2);
    transition: color 0.15s ease, border-color 0.15s ease;
}

    .legal-doc a:hover {
        color: var(--accent);
        border-bottom-color: var(--accent);
    }

/* ---- Back-to-home / CTA ---- */
.legal-cta {
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

    .legal-cta .btn,
    .legal-cta a.btn {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        font-weight: 600;
        color: var(--ink) !important;
        background: var(--surface);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-pill);
        padding: 0.6rem 1.35rem;
        text-decoration: none;
        transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

        .legal-cta .btn:hover,
        .legal-cta a.btn:hover {
            border-color: var(--accent);
            color: var(--accent) !important;
            transform: translateY(-2px);
        }

/* ---- Footer note inside a policy ---- */
.legal-doc footer {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .legal-hero {
        padding: 2.5rem 1rem 4.5rem;
    }

    .legal-doc {
        padding: 2rem 1.5rem;
        margin-top: -3rem;
        border-radius: var(--radius);
    }

        .legal-doc h2 {
            font-size: 1.2rem;
            margin-top: 2.25rem;
        }

        .legal-doc p,
        .legal-doc ul li {
            font-size: 1rem;
        }
}

/* ============================================================
   Cookie consent banner (retained; re-themed to brand)
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: var(--ink);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 1050;
}

.cookie-actions {
    display: flex;
    gap: 8px;
}

.cookie-details {
    display: none;
    color: #cbd5e1;
    font-size: 0.85rem;
}

    .cookie-details.show {
        display: block;
    }
