/* =============================================================
   Leveredge Media — legal.css
   Loaded on the Legal (Privacy / Terms) template only.
   v1.0.0
============================================================= */

/* ── SECTION BACKGROUNDS ────────────────────────────────────── */

#legal-hero { background: var(--ink); border-bottom: 1px solid var(--border); }
#legal-body { background: var(--ink); padding: 72px 24px 96px; }


/* ============================================================
   LEGAL HERO
============================================================= */

#legal-hero { padding: 148px 24px 56px; position: relative; overflow: hidden; }

#legal-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 70% at 50% -10%, rgba(255, 95, 31, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

.legal-hero-inner {
    position: relative; z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.legal-page-title {
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 16px;
}

.legal-page-meta {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.legal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted-2);
    font-family: var(--font-display);
}
.legal-meta-dot {
    width: 5px; height: 5px;
    background: var(--orange);
    border-radius: 50%;
    flex-shrink: 0;
}


/* ============================================================
   LEGAL LAYOUT — sidebar TOC + content
============================================================= */

.legal-layout {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 64px;
    align-items: start;
}


/* ── TOC SIDEBAR ────────────────────────────────────────────── */

.lm-toc {
    display: none;                  /* hidden by default; shown by legal.js when H2s are found */
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-2) transparent;
}
.lm-toc::-webkit-scrollbar       { width: 4px; }
.lm-toc::-webkit-scrollbar-track { background: transparent; }
.lm-toc::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.toc-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 14px;
}

.lm-toc-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lm-toc-list li { list-style: none; }
.lm-toc-list a {
    display: block;
    font-size: 13px;
    color: var(--muted);
    padding: 6px 10px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    line-height: 1.45;
    text-decoration: none;
}
.lm-toc-list a:hover {
    color: var(--white);
    background: var(--card);
    border-left-color: var(--border-2);
}
.lm-toc-list a.toc-active {
    color: var(--orange);
    background: var(--orange-soft);
    border-left-color: var(--orange);
}

/* Sub-items (H3 level) */
.lm-toc-list .toc-sub a {
    font-size: 12px;
    padding-left: 20px;
    color: var(--muted-2);
}
.lm-toc-list .toc-sub a:hover { color: var(--muted); }


/* ============================================================
   LEGAL CONTENT TYPOGRAPHY
============================================================= */

.legal-content {
    min-width: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.78;
}

/* Headings */
.legal-content h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin: 52px 0 18px;
    padding-top: 4px;
    scroll-margin-top: 100px;
}
.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin: 28px 0 10px;
    scroll-margin-top: 100px;
}

.legal-content h4 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--white-2);
    margin: 20px 0 8px;
}

/* Section divider below H2 */
.legal-content h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--orange);
    opacity: 0.5;
    margin-top: 8px;
    border-radius: 2px;
}

/* Paragraphs */
.legal-content p { margin-bottom: 16px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content strong { color: var(--white); font-weight: 600; }
.legal-content em     { font-style: italic; }

/* Links */
.legal-content a { color: var(--orange); text-decoration: none; border-bottom: 1px solid var(--orange-border); }
.legal-content a:hover { opacity: 0.8; }

/* Lists */
.legal-content ul,
.legal-content ol {
    margin: 14px 0 16px 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.legal-content ul li,
.legal-content ol li {
    padding-left: 20px;
    position: relative;
    font-size: 15px;
    line-height: 1.65;
}
.legal-content ul li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--orange);
    opacity: 0.5;
}
.legal-content ol { counter-reset: legalol; }
.legal-content ol li { counter-increment: legalol; }
.legal-content ol li::before {
    content: counter(legalol) '.';
    position: absolute;
    left: 0; top: 0;
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--orange);
    opacity: 0.7;
}

/* Horizontal rules */
.legal-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

/* Blockquotes / highlighted text */
.legal-content blockquote {
    border-left: 3px solid var(--orange);
    padding: 14px 18px;
    margin: 20px 0;
    background: var(--orange-soft);
    border-radius: 0 var(--r) var(--r) 0;
}
.legal-content blockquote p { font-size: 15px; color: var(--muted); margin: 0; }

/* No-content placeholder */
.legal-no-content {
    background: var(--card);
    border: 1px dashed var(--border-2);
    border-radius: var(--r);
    padding: 32px;
    text-align: center;
    color: var(--muted);
}
.legal-no-content a { color: var(--orange); }


/* ============================================================
   RESPONSIVE
============================================================= */

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .lm-toc { display: none; } /* Hidden on mobile — users scroll naturally */
}

@media (max-width: 580px) {
    #legal-hero { padding: 128px 20px 48px; }
    .legal-page-title { font-size: clamp(28px, 8vw, 42px); }
}
