/* ==========================================================
   legal.css — Night Ops legal documents.
   FULLY STANDALONE: /legal/* pages load nothing else, so this
   file owns the entire canvas — chrome, background, typography.
   ========================================================== */

:root {
    --accent: #c4853a;
    --accent-light: #d9a55c;
    --accent-bright: #f0be76;
    --bg: #0a0908;
    --text: #ece6dd;
    --text-dim: #b3a894;
    --muted: #93897e;
    --border: rgba(255,255,255,.07);
}

* { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: rgba(196,133,58,.45) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(196,133,58,.38); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(196,133,58,.6); background-clip: content-box; }

body.legal-page {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    background:
        radial-gradient(1100px 680px at 50% -10%, rgba(196,133,58,.12), transparent 62%),
        radial-gradient(760px 420px at 92% 112%, rgba(196,133,58,.05), transparent 60%),
        var(--bg);
}
body.legal-page a { color: inherit; text-decoration: none; }
body.legal-page img { max-width: 100%; }

/* ---------- Top bar ---------- */
.lg-topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10,9,8,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.lg-topbar-inner {
    display: flex; align-items: center; gap: 16px;
    height: 60px; padding: 0 clamp(16px, 3vw, 32px);
}
.lg-brand img { height: 30px; width: auto; display: block; mix-blend-mode: screen; }
.lg-pill {
    display: inline-flex; align-items: center;
    padding: 5px 14px; border-radius: 999px;
    border: 1px solid rgba(196,133,58,.35); color: #d9a55c;
    font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
}
.lg-spacer { flex: 1; }
.lg-back { color: var(--muted); font-size: 12.5px; font-weight: 600; transition: color .2s; }
.lg-back:hover { color: var(--accent-bright); }

/* ---------- Document column (single grid for every element) ---------- */
main.legal-document-page {
    display: block;
    width: 100%;
    max-width: 780px;
    margin-inline: auto;
    box-sizing: border-box;
    padding: clamp(40px, 5vw, 64px) clamp(1rem, 3vw, 2.5rem) 40px;
}

/* ---------- Masthead ---------- */
.legal-document-hero {
    text-align: center;
    padding: 30px 4px 28px;
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--border);
}
.legal-pill {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 17px; border-radius: 999px;
    border: 1px solid rgba(196,133,58,.35);
    background: rgba(20,18,16,.85);
    color: #d9a55c; font-size: 10.5px; font-weight: 700;
    letter-spacing: .26em; text-transform: uppercase;
}
.legal-pill i { color: var(--accent-bright); font-style: normal; }
.legal-document-title {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: clamp(30px, 4.6vw, 44px);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
    margin: 18px 0 12px;
    background: linear-gradient(120deg, #f0be76, #c4853a 85%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal-document-lede {
    color: var(--text-dim);
    font-size: 15.5px; line-height: 1.75;
    max-width: 600px; margin: 0 auto 10px;
}
.legal-document-meta {
    color: var(--muted); font-size: 11px;
    letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- Contents box ---------- */
.legal-toc {
    border: 1px solid rgba(196,133,58,.25);
    background: rgba(20,18,16,.66);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 26px auto 34px;
}
.legal-toc > strong {
    display: flex; align-items: center; gap: 9px;
    color: #c4853a; font-size: 10.5px; font-weight: 700;
    letter-spacing: .26em; text-transform: uppercase; margin-bottom: 10px;
}
.legal-toc ol {
    list-style: none; margin: 0; padding: 0;
    counter-reset: toc; columns: 2; column-gap: 34px;
}
@media(max-width:640px){ .legal-toc ol { columns: 1; } }
.legal-toc li { counter-increment: toc; break-inside: avoid; padding: 4px 0; font-size: 13.5px; }
.legal-toc li::before {
    content: counter(toc, decimal-leading-zero);
    color: rgba(196,133,58,.65);
    font-family: "Space Grotesk", monospace;
    font-weight: 700; margin-right: 10px; font-size: 11px;
}
.legal-toc a { color: var(--text-dim); }
.legal-toc a:hover { color: var(--accent-bright); }

/* ---------- Policy sections ---------- */
.policy-divider { display: none; }
.policy-block {
    border-bottom: 1px solid rgba(255,255,255,.07);
    padding: 30px 0 26px;
    margin: 0;
}
.policy-block:last-of-type { border-bottom: none; }
.policy-block--form {
    display: flex; flex-direction: column;
    gap: clamp(1.25rem, 3vw, 2rem);
}
.policy-section-title {
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 19px; font-weight: 700;
    color: var(--accent-bright);
    line-height: 1.35;
    margin: 0 0 16px;
    scroll-margin-top: 80px;
}
.policy-section-title::before {
    content: "\00A7";
    color: rgba(196,133,58,.55);
    margin-right: 10px; font-size: 15px;
}
.policy-paragraph {
    color: var(--text-dim);
    font-size: 14.5px; line-height: 1.85;
    margin: 0 0 14px;
}
.policy-paragraph strong { color: var(--text); font-weight: 600; }
.policy-list {
    list-style: none;
    margin: 4px 0 16px; padding-left: 4px;
}
.policy-list li {
    position: relative;
    color: var(--text-dim);
    font-size: 14px; line-height: 1.75;
    padding: 6px 0 6px 28px;
    border-bottom: 1px dashed rgba(255,255,255,.06);
}
.policy-list li:last-child { border-bottom: none; }
.policy-list li::before {
    content: "\25B8";
    position: absolute; left: 6px; color: #c4853a;
}
.policy-address {
    font-family: "Space Grotesk", ui-monospace, monospace;
    white-space: pre-line;
    color: var(--text);
    border: 1px solid rgba(196,133,58,.22);
    background: rgba(196,133,58,.05);
    border-radius: 12px;
    padding: 14px 18px;
    max-width: 420px;
    font-size: 13.5px; line-height: 1.7;
}

/* ---------- DMCA form ---------- */
.legal-dmca-form {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    max-width: 46rem;
    margin: 0 auto;
    text-align: left;
}
.legal-form-row { display: flex; flex-direction: column; gap: .5rem; }
.legal-form-row--split { flex-direction: row; gap: clamp(1rem, 3vw, 1.75rem); }
.legal-form-row--split .legal-form-field { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.legal-form-row--checkbox { flex-direction: row; align-items: flex-start; }
.legal-form-row label,
.legal-form-row--split label { font-size: .95rem; font-weight: 600; color: var(--text-dim); }
.legal-form-row--checkbox label { font-weight: 500; line-height: 1.4; }
.legal-form-row--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.65;
    color: var(--text-dim);
}
.legal-form-row--checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: 8px;
    border: 1.5px solid rgba(196,133,58,.45);
    background: rgba(20,18,16,.72);
    cursor: pointer;
    position: relative;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.legal-form-row--checkbox input[type="checkbox"]:hover {
    border-color: rgba(240,190,118,.75);
    box-shadow: 0 0 0 3px rgba(196,133,58,.12);
}
.legal-form-row--checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #d9a55c, #c4853a);
    border-color: #f0be76;
}
.legal-form-row--checkbox input[type="checkbox"]:checked::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0908;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}
.legal-form-row--checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(240,190,118,.55);
    outline-offset: 2px;
}
.legal-dmca-form input:not([type="checkbox"]),
.legal-dmca-form textarea {
    width: 100%;
    padding: .75rem .9rem;
    border-radius: 12px;
    border: 1px solid rgba(196,133,58,.22);
    background: rgba(20,18,16,.7);
    color: var(--text);
    font-size: .95rem;
    outline: none;
    transition: border-color .2s ease;
}
.legal-dmca-form input:not([type="checkbox"]):focus,
.legal-dmca-form textarea:focus {
    border-color: rgba(196,133,58,.55);
    box-shadow: 0 0 0 3px rgba(196,133,58,.14);
}
.legal-form-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.75rem;
    border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(120deg, #d9a55c, #c4853a);
    color: #0a0908; font-weight: 700; font-size: 1rem;
    transition: transform .2s ease, filter .2s ease;
}
.legal-form-submit:hover,
.legal-form-submit:focus { transform: translateY(-2px); filter: brightness(1.08); outline: none; }
.legal-form-disclaimer { font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- Crosslinks + footer ---------- */
.legal-crosslinks {
    border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    padding: 22px clamp(1rem,3vw,2.5rem) 0;
}
.legal-crosslinks a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 999px;
    border: 1px solid rgba(196,133,58,.3);
    color: #d9a55c; font-size: 12px; font-weight: 600;
    transition: background .2s, color .2s;
}
.legal-crosslinks a:hover { background: rgba(196,133,58,.1); color: var(--accent-bright); }
.legal-crosslinks a.current { opacity: .45; pointer-events: none; }

@media print {
    .lg-topbar, .lg-foot, .legal-crosslinks, .legal-toc { display: none !important; }
    body.legal-page { background: #fff; color: #111; }
    .policy-section-title, .policy-paragraph, .policy-list li { color: #111; }
    .legal-document-title { color: #000; -webkit-text-fill-color: #000; }
}
