/* Legal pages (app/Views/legal/*): readable text in the site's look, same frame as the settings page. */

.legal-body {
    /* Same quiet surfaces as the studio and the admin portal */
    --bg: #08080a;
    --bg-raised: #111114;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.12);
    background: var(--bg);
}

.legal {
    width: min(760px, 100% - 2rem);
    margin: 3rem auto 5rem;
    color: var(--text-soft);
    font-size: 0.9688rem;
    line-height: 1.75;
}

.legal h1 {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.legal .last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 2.25rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.legal h2 {
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 1.1875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.legal h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
}

.legal p {
    margin-bottom: 1rem;
}

.legal strong {
    color: var(--text);
    font-weight: 600;
}

.legal ul {
    display: grid;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
}

.legal li::marker {
    color: var(--accent);
}

.legal a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
    text-underline-offset: 3px;
}

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

/* An email address written out ("contact at cnw dot bio"): the "at" and "dot" as small quiet capsules */
.legal .mail {
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}

.legal .mail__sep {
    display: inline-block;
    margin: 0 0.35em;
    padding: 0.05em 0.5em 0.1em;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.75em;
    font-weight: 500;
    letter-spacing: 0.04em;
    vertical-align: 0.1em;
}

.legal .uppercase-text {
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.legal .contact-box,
.legal .contact-info,
.legal .info-box,
.legal .highlight-box {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
}

.legal .contact-box > :last-child,
.legal .contact-info > :last-child,
.legal .info-box > :last-child,
.legal .highlight-box > :last-child {
    margin-bottom: 0;
}

.legal .highlight-box {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    background: var(--accent-soft);
}

.legal .contact-info h3 {
    margin-top: 0;
}

.legal .footer-note {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* Imprint: the legal basis under the title, then operator and contact as label / value rows on hairlines */
.legal .legal__note {
    max-width: 60ch;
    margin: 0 0 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.legal .facts {
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
    margin: 0 0 1rem;
    border-top: 1px solid var(--line);
}

.legal .facts dt,
.legal .facts dd {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.legal .facts dt {
    padding-right: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.95; /* the label's line as tall as the value's, so both sit on one baseline */
}

.legal .facts dd {
    margin: 0;
    color: var(--text);
}

@media (max-width: 560px) {
    .legal .facts {
        grid-template-columns: 1fr;
    }

    .legal .facts dt {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .legal .facts dd {
        padding-top: 0.15rem;
    }
}

/* ---------- The home page's look (as the sign-in pages): its gradient without coloured sky glows, the text on one
   glassy card, quiet boxes inside it, and the back link with the top bar's pill hover ---------- */
.legal-body {
    background: #060708 linear-gradient(135deg, #060708 0%, #060708 55%, #191c20 100%);
    background-attachment: fixed; /* long pages: the gradient stays with the window, not stretched over the text */
}

.legal-body .sky__glow {
    display: none;
}

.legal-body .page-top {
    border-bottom-color: transparent;
}

.legal {
    width: min(820px, 100% - 2rem);
    margin: 2rem auto 5rem;
    padding: clamp(1.75rem, 5vw, 3.25rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    animation: legal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes legal-in {
    from { opacity: 0; transform: translateY(10px); }
}

.legal h1 {
    font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.legal .last-updated {
    margin-top: 0.5rem;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.legal h2 {
    border-top-color: rgba(255, 255, 255, 0.06);
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.legal .contact-box,
.legal .contact-info,
.legal .info-box {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.legal .highlight-box {
    border-radius: 16px;
}

.legal .facts,
.legal .facts dt,
.legal .facts dd,
.legal .footer-note {
    border-color: rgba(255, 255, 255, 0.06);
}

/* Back link: a soft pill grows in, the arrow nudges left (as on the sign-in pages) */
.legal-body .page-top .btn--ghost {
    position: relative;
    isolation: isolate;
    border-radius: 999px;
    background: transparent;
    transition: color 0.25s ease;
}

.legal-body .page-top .btn--ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.legal-body .page-top .btn--ghost:hover {
    color: #fff;
    background: transparent;
}

.legal-body .page-top .btn--ghost:hover::before {
    opacity: 1;
    transform: scale(1);
}

.legal-body .page-top .btn--ghost i {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.legal-body .page-top .btn--ghost:hover i {
    transform: translateX(-3px);
}
