/* ============================================================
 * Legal pages (Terms & Conditions, Privacy Policy)
 * Mobile-first, centered single column, readability tuned.
 * ============================================================ */

/* Force-visible override: long-form legal articles are far taller than the
 * viewport, so the global .reveal IntersectionObserver (thresholds 0.12–0.18)
 * never fires for them and the text would stay at opacity: 0. Legal docs must
 * be readable immediately — readability beats reveal animations here. */
.lg-hero .reveal,
.lg-shell .reveal,
.lg-shell .reveal-stagger,
.lg-shell .reveal-stagger > * { opacity: 1 !important; transform: none !important; }

/* ===== HERO ===== */
.lg-hero {
    position: relative;
    padding: calc(var(--header-h, 70px) + 40px) 0 44px;
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 80% 0%, rgba(235,63,67,0.10) 0%, transparent 60%),
        radial-gradient(45% 50% at 0% 100%, rgba(124,92,255,0.08) 0%, transparent 65%),
        linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-soft) 100%);
}
@media (min-width: 768px) { .lg-hero { padding: calc(var(--header-h, 70px) + 60px) 0 60px; } }
@media (min-width: 992px) { .lg-hero { padding: calc(var(--header-h, 70px) + 80px) 0 80px; } }
.lg-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(235,63,67,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(235,63,67,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, #000 30%, transparent 80%);
    pointer-events: none;
}
.lg-hero-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 var(--shell-pad);
    position: relative; z-index: 2;
    text-align: center;
}
.lg-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px;
    background: rgba(235,63,67,0.10);
    color: var(--c-primary);
    border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    margin-bottom: 22px;
}
.lg-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--c-primary);
    box-shadow: 0 0 0 0 rgba(235,63,67,0.55);
    animation: liveDot 1.6s ease-in-out infinite;
}
@keyframes liveDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(235,63,67,0.55); }
    50%      { box-shadow: 0 0 0 8px rgba(235,63,67,0); }
}
.lg-hero h1 {
    font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin: 0 auto 16px;
}
.lg-hero p {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
    color: var(--c-ink-soft);
    max-width: 640px;
    margin: 0 auto 20px;
    line-height: 1.65;
}
.lg-updated {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--c-ink-soft);
    font-weight: 500;
}
.lg-updated i { color: var(--c-primary); }
.lg-updated strong { color: var(--c-ink); font-weight: 700; }

/* ===== MAIN SHELL ===== */
.lg-section { padding: 40px 0 64px; }
@media (min-width: 768px) { .lg-section { padding: 56px 0 88px; } }
.lg-shell {
    max-width: 820px;             /* ~65–75 chars/line at body font-size */
    margin: 0 auto;
    padding: 0 var(--shell-pad);
}

/* ===== TABLE OF CONTENTS BLOCK (top of page, not sidebar) ===== */
.lg-toc {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
@media (min-width: 600px) { .lg-toc { padding: 28px 30px 24px; } }
.lg-toc::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-primary) 0%, #ff7a5e 50%, var(--c-amber) 100%);
}
.lg-toc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.lg-toc-head i {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(235,63,67,0.10);
    color: var(--c-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.lg-toc-head h2 {
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.2;
}
.lg-toc ol {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 0;
    padding: 6px 0 0;
    list-style: none;
    counter-reset: lgtoc;
}
@media (min-width: 600px) { .lg-toc ol { grid-template-columns: 1fr 1fr; gap: 4px 24px; } }
.lg-toc li {
    counter-increment: lgtoc;
    margin: 0;
}
.lg-toc a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 8px 6px;
    margin: 0 -6px;
    border-radius: 8px;
    color: var(--c-ink);
    text-decoration: none;
    font-size: 14.5px;
    line-height: 1.4;
    font-weight: 500;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}
.lg-toc a::before {
    content: counter(lgtoc, decimal-leading-zero);
    font-family: var(--font-mono, var(--font-display));
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: 0.02em;
    flex-shrink: 0;
    min-width: 22px;
}
.lg-toc a:hover {
    background: var(--c-bg-soft);
    color: var(--c-primary);
}
.lg-toc a:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* ===== ARTICLE BODY (legal text) — readability tuned ===== */
.lg-body {
    font-size: 17px;
    line-height: 1.78;
    color: var(--c-ink);
    letter-spacing: 0.005em;
    text-align: left;
    hyphens: manual;
}
@media (min-width: 768px) { .lg-body { font-size: 18px; line-height: 1.8; } }

/* Each section card */
.lg-body section {
    margin-top: 36px;
    scroll-margin-top: 96px;
}
.lg-body section:first-of-type { margin-top: 0; }

.lg-body h2 {
    font-size: clamp(1.35rem, 1.05rem + 1vw, 1.7rem);
    letter-spacing: -0.02em;
    line-height: 1.22;
    margin-bottom: 0.55em;
    color: var(--c-ink);
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.lg-body h2 .num {
    font-family: var(--font-mono, var(--font-display));
    font-size: 0.72em;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.lg-body h3 {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.18rem);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
    color: var(--c-ink);
}

.lg-body p {
    margin: 0 0 1em;
    color: var(--c-ink);
}
.lg-body p:last-child { margin-bottom: 0; }

.lg-body strong { color: var(--c-ink); font-weight: 700; }
.lg-body em { color: var(--c-ink); font-style: italic; }

/* Links */
.lg-body a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 200ms var(--ease), background 200ms var(--ease);
    border-radius: 2px;
}
.lg-body a:hover { color: var(--c-primary-dark); background: var(--c-primary-50); }

/* Lists */
.lg-body ul, .lg-body ol {
    margin: 0.8em 0 1.2em;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}
.lg-body ul { list-style: none; padding-left: 0; }
.lg-body ul li {
    position: relative;
    padding-left: 1.6em;
}
.lg-body ul li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.65em;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c-primary);
}
.lg-body ol { padding-left: 1.5em; list-style: decimal; }
.lg-body ol li::marker { color: var(--c-primary); font-weight: 700; }
.lg-body li { line-height: 1.65; }

/* Section divider between major numbered sections */
.lg-body section + section {
    padding-top: 36px;
    border-top: 1px solid var(--c-line);
}

/* "Back to top" pill at end of each section */
.lg-back-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding: 6px 14px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--c-ink-soft);
    text-decoration: none;
    font-weight: 600;
    transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.lg-back-top:hover {
    background: rgba(235,63,67,0.08);
    border-color: var(--c-primary-soft);
    color: var(--c-primary);
}

/* Contact card at end */
.lg-contact-card {
    margin-top: 56px;
    padding: 28px 24px;
    background: linear-gradient(135deg, var(--c-ink) 0%, #2a1f3d 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
}
@media (min-width: 600px) { .lg-contact-card { padding: 40px 36px; } }
.lg-contact-card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(60% 80% at 100% 0%, rgba(235,63,67,0.30) 0%, transparent 70%);
    pointer-events: none;
}
.lg-contact-card > * { position: relative; z-index: 1; }
.lg-contact-card h3 {
    color: #fff;
    font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.55rem);
    letter-spacing: -0.015em;
    margin: 0 0 10px;
}
.lg-contact-card p {
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 22px;
}
.lg-contact-card .lg-contact-row {
    display: flex; flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.lg-contact-card .btn-primary {
    background: #fff;
    color: var(--c-primary);
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}
.lg-contact-card .btn-primary:hover { background: var(--c-ink); color: #fff; }
.lg-contact-card .btn-ghost {
    color: #fff;
    border-color: rgba(255,255,255,0.30);
    background: transparent;
}
.lg-contact-card .btn-ghost:hover { background: rgba(255,255,255,0.10); border-color: #fff; color: #fff; }
