/* ==========================================================================
   Dreams Event - legal document styles
   Layout and typography for the Privacy Policy, Terms of Service and
   Data Processing Agreement pages. Loaded after main.css, so it only
   needs to add what a long-form document needs on top of the design system.
   ========================================================================== */

/* ---------- Legal hero ---------- */
.legal-hero {
    position: relative;
    padding: clamp(56px, 8vw, 92px) 0 clamp(34px, 5vw, 50px);
    background:
        radial-gradient(900px 420px at 88% -30%, rgba(56,189,248,.22), transparent 62%),
        radial-gradient(700px 380px at 0% 120%, rgba(245,158,11,.10), transparent 60%),
        linear-gradient(170deg, var(--bg-alt), #fff 72%);
    border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin-bottom: 14px; }
.legal-hero__meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
}
.legal-hero__meta::before { content: "🕘"; }
.legal-hero__lead { margin-top: 20px; max-width: 720px; font-size: 1.08rem; color: var(--ink-soft); }

/* Document switcher */
.legal-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.legal-switch a {
    padding: 9px 17px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: #fff;
    font-weight: 600;
    font-size: .93rem;
    color: var(--ink-soft);
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.legal-switch a:hover { border-color: var(--brand-500); color: var(--brand-600); }
.legal-switch a.is-active {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
    box-shadow: 0 8px 20px rgba(2,132,199,.26);
}

/* ---------- Document shell ---------- */
.legal { padding: clamp(48px, 7vw, 82px) 0 clamp(64px, 9vw, 104px); }
.legal__layout {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 66px);
    align-items: start;
}

/* ---------- Table of contents ---------- */
.legal__toc { position: sticky; top: calc(var(--nav-h) + 28px); }
.legal__toc h2 {
    font-size: .74rem;
    font-family: var(--font-body);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}
.legal__toc ol { list-style: none; counter-reset: toc; border-left: 2px solid var(--line); }
.legal__toc li { counter-increment: toc; }
.legal__toc a {
    display: block;
    padding: 7px 4px 7px 15px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: .92rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s ease, border-color .2s ease;
}
.legal__toc a::before { content: counter(toc) ". "; color: var(--brand-600); font-weight: 700; }
.legal__toc a:hover { color: var(--brand-600); border-left-color: var(--brand-400); }
.legal__toc a.is-active { color: var(--ink); border-left-color: var(--brand-600); font-weight: 700; }

/* ---------- Document body ---------- */
.legal__doc { max-width: 820px; }
.legal__doc section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.legal__doc section + section {
    margin-top: 46px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
}
.legal__doc h2 { font-size: clamp(1.34rem, 2.4vw, 1.72rem); margin-bottom: 14px; }
.legal__doc h3 { font-size: 1.06rem; margin: 26px 0 10px; }
.legal__doc p { margin-bottom: 15px; }
.legal__doc ul, .legal__doc ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.legal__doc li { position: relative; padding-left: 26px; margin-bottom: 11px; }
.legal__doc ul li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: .62em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-500);
}
.legal__doc ol { counter-reset: doclist; }
.legal__doc ol > li { padding-left: 32px; counter-increment: doclist; }
.legal__doc ol > li::before {
    content: counter(doclist) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-600);
}
.legal__doc strong { color: var(--ink); }
.legal__doc a { color: var(--brand-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal__doc a:hover { color: var(--brand-700); }

/* ---------- Tables ---------- */
.legal__table-wrap {
    overflow-x: auto;
    margin: 0 0 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.legal-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.legal-table th, .legal-table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}
.legal-table thead th {
    background: var(--bg-alt);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: .85rem;
    letter-spacing: .01em;
}
.legal-table tbody th { font-weight: 600; color: var(--ink); }
.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Callouts ---------- */
.legal-note {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-left: 4px solid var(--brand-500);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin: 0 0 22px;
}
.legal-note > :last-child { margin-bottom: 0; }
.legal-note__title {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-700);
    margin-bottom: 8px;
}
.legal-note--warn { background: #fffbeb; border-color: #fde68a; border-left-color: var(--accent); }
.legal-note--warn .legal-note__title { color: var(--accent-dk); }

/* ---------- Rounding-off block ---------- */
.legal__footer-note {
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    font-size: .94rem;
    color: var(--muted);
}
.legal__footer-note strong { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .legal__layout { grid-template-columns: 1fr; gap: 30px; }
    .legal__toc { position: static; padding-bottom: 4px; }
    .legal__toc ol { display: flex; flex-wrap: wrap; gap: 8px; border-left: 0; }
    .legal__toc li { counter-increment: none; }
    .legal__toc a {
        margin-left: 0;
        padding: 7px 14px;
        border: 1.5px solid var(--line);
        border-radius: 999px;
        background: #fff;
        font-size: .88rem;
    }
    .legal__toc a::before { content: none; }
    .legal__toc a:hover, .legal__toc a.is-active { border-color: var(--brand-600); }
    .legal__doc section + section { margin-top: 38px; padding-top: 32px; }
}
@media (max-width: 620px) {
    .legal-hero__lead { font-size: 1rem; }
    .legal-switch a { font-size: .87rem; padding: 8px 14px; }
    .legal__doc li { padding-left: 24px; }
}
