/* ================================================================
   legal.css — Shared styles for Privacy Policy, T&C, Disclaimer
   Uses CSS variables from style.css (must be loaded first)
   ================================================================ */

/* ── Page Hero ── */
.legal-hero {
    background: var(--bg);
    padding: calc(var(--navbar-h) + 0.5rem) 0 3rem;
    border-bottom: 1px solid var(--border);
}

.legal-hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.25rem;
    align-items: center;
}

.legal-hero-copy {
    min-width: 0;
}

.about-hero-no-visual .legal-hero-layout {
    grid-template-columns: 1fr;
}

.about-hero-no-visual .legal-hero-copy {
    max-width: 820px;
}

.legal-hero-visual {
    position: relative;
    margin: 0;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    overflow: visible;
    transform: translateY(0);
}

.legal-hero-visual::before {
    content: "";
    position: absolute;
    inset: 1rem 1.25rem 1.5rem 1.25rem;
    border-radius: 38% 62% 30% 70% / 42% 30% 70% 58%;
    background:
        radial-gradient(circle at 30% 25%, rgba(244, 195, 79, 0.28), transparent 34%),
        radial-gradient(circle at 72% 24%, rgba(42, 99, 186, 0.34), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(11, 31, 79, 0.18));
    border: 1px solid rgba(169, 193, 235, 0.22);
    box-shadow: var(--shadow-lg);
    z-index: -1;
}

.legal-hero-visual::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 4%;
    bottom: -0.25rem;
    height: 40px;
    border-radius: 50%;
    background: rgba(4, 16, 44, 0.22);
    filter: blur(20px);
    z-index: -1;
}

.legal-hero-visual img {
    width: min(100%, 400px);
    max-height: 480px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform: translateY(0);
    clip-path: ellipse(39% 47% at 50% 48%);
    -webkit-mask-image: radial-gradient(circle at 50% 34%, #000 38%, rgba(0, 0, 0, 0.98) 53%, rgba(0, 0, 0, 0.74) 67%, transparent 80%);
    mask-image: radial-gradient(circle at 50% 34%, #000 38%, rgba(0, 0, 0, 0.98) 53%, rgba(0, 0, 0, 0.74) 67%, transparent 80%);
    filter: drop-shadow(0 20px 30px rgba(3, 10, 28, 0.2));
}

.careers-hero-visual {
    min-height: 520px;
    transform: translateY(-6px);
}

.careers-hero-visual::before {
    inset: 0.8rem 1rem 1rem;
    border-radius: 36% 64% 34% 66% / 44% 34% 66% 56%;
}

.careers-hero-visual img {
    width: 100%;
    max-width: 400px;
    max-height: 480px;
    border-radius: 0;
    object-fit: contain;
    object-position: center bottom;
    transform: scale(1);
    clip-path: none;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 20px 30px rgba(3, 10, 28, 0.15));
}

.careers-page-hero .container {
    position: relative;
    padding-right: 0;
}

.careers-page-hero::after {
    content: none;
}

.legal-hero .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.legal-hero .breadcrumb a {
    color: var(--highlight);
}

.legal-hero .breadcrumb a:hover {
    text-decoration: underline;
}

.legal-hero .breadcrumb span {
    color: var(--text-light);
}

.legal-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.legal-hero .legal-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.legal-hero .legal-meta span {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Content Layout ── */
.legal-content {
    padding: 5rem 0 8rem;
}

.legal-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    align-items: start;
}

/* ── Sidebar TOC ── */
.legal-toc {
    position: sticky;
    top: calc(var(--navbar-h) + 2rem);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.legal-toc h5 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.legal-toc ul {
    list-style: none;
}

.legal-toc li {
    margin-bottom: 0.5rem;
}

.legal-toc a {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.legal-toc a:hover {
    color: var(--text);
    background: var(--bg-alt);
    border-left-color: var(--highlight);
}

/* ── Body Content ── */
.legal-body {
    min-width: 0;
}

.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.4em;
    background: var(--highlight);
    border-radius: 4px;
    flex-shrink: 0;
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    list-style: none;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legal-section ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.975rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.legal-section ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--highlight);
    margin-top: 0.6em;
    flex-shrink: 0;
}

.legal-section a {
    color: var(--highlight);
}

.legal-section a:hover {
    text-decoration: underline;
}

/* ── Highlight Card ── */
.legal-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.legal-card p {
    margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .legal-hero-layout {
        grid-template-columns: 1fr;
    }

    .legal-hero-visual {
        min-height: 450px;
        justify-content: center;
        transform: none;
    }

    .legal-hero-visual img {
        width: min(100%, 360px);
        max-height: 400px;
        transform: scale(1.1) translateY(8px);
    }

    .legal-hero-visual::before {
        inset: 2.5rem 1rem 1.25rem;
    }

    .legal-hero-visual::after {
        left: 10%;
        right: 10%;
    }

    .careers-hero-visual {
        min-height: 360px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .careers-hero-visual img {
        width: min(92vw, 460px);
        max-width: 460px;
        max-height: 320px;
        margin-inline: auto;
        display: block;
        transform: none;
        clip-path: none;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .careers-page-hero .container {
        padding-right: 0;
    }

    .careers-page-hero::after {
        display: none;
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        display: none;
    }
}

@media (max-width: 600px) {
    .legal-hero {
        padding-top: calc(var(--navbar-h) + 1rem);
    }

    .careers-hero-visual {
        min-height: 300px;
    }

    .careers-hero-visual img {
        width: min(86vw, 340px);
        max-height: 260px;
    }

    .legal-content {
        padding: 3rem 0 5rem;
    }
}
