/* ── Public layout offset (has fixed navbar) ── */
.legal-public .legal-wrapper,
.legal-page .legal-wrapper {
    padding-top: 0;
}

/* ── User layout offset (has user topbar) ── */
.legal-user {
    padding-bottom: 60px;
}

/* ── Hero ── */
.legal-hero {
    background: var(--forest);
    position: relative;
    overflow: hidden;
    padding: 80px 40px 64px;
}

.legal-public .legal-hero {
    padding-top: 120px;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.legal-hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.legal-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-light);
    margin-bottom: 16px;
}

.legal-hero h1 {
    font-family: var(--display);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    color: #fdfbf7;
    margin: 0 0 12px;
    line-height: 1.1;
}

.legal-hero p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    margin: 0;
}

/* ── Layout container ── */
.legal-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 40px 80px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* ── Table of Contents sidebar ── */
.legal-toc {
    position: sticky;
    top: 100px;
}

.toc-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-light);
    margin-bottom: 14px;
}

.legal-toc ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legal-toc ul li a {
    display: block;
    font-size: 13.5px;
    color: var(--ink-mid);
    padding: 7px 12px;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1.4;
}

.legal-toc ul li a:hover {
    color: var(--forest);
    background: rgba(26, 58, 32, 0.05);
    border-left-color: var(--forest);
    padding-left: 16px;
}

.toc-related {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    padding: 10px 14px;
    border: 1px solid rgba(196, 154, 60, 0.3);
    border-radius: 10px;
    background: #fffdf5;
    transition: all 0.2s;
    width: 100%;
}

.toc-related:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

/* ── Main content ── */
.legal-content {
    min-width: 0;
}

.legal-section {
    margin-bottom: 52px;
    padding-bottom: 52px;
    border-bottom: 1px solid var(--border);
    position: relative;
    scroll-margin-top: 100px;
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section-number {
    font-family: 'Poppins', sans-serif;
    font-size: 50px;
    font-weight: 800;
    color: rgba(26, 58, 32, 0.3);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -2px;
    --webkit-user-select: none;
}

.legal-section h2 {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    color: var(--forest);
    margin: 0 0 18px;
    line-height: 1.2;
}

.legal-section p {
    font-size: 15px;
    color: var(--ink-mid);
    line-height: 1.8;
    margin: 0 0 16px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* ── Highlight boxes ── */
.legal-highlight {
    display: flex;
    gap: 14px;
    background: rgba(26, 58, 32, 0.04);
    border: 1px solid rgba(26, 58, 32, 0.12);
    border-left: 3px solid var(--forest);
    border-radius: 0 12px 12px 0;
    padding: 16px 18px;
    margin-top: 20px;
}

.legal-highlight--warning {
    background: rgba(196, 154, 60, 0.05);
    border-color: rgba(196, 154, 60, 0.2);
    border-left-color: var(--gold);
}

.legal-highlight i {
    color: var(--forest);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.legal-highlight--warning i {
    color: var(--gold);
}

.legal-highlight p {
    font-size: 14px !important;
    color: var(--ink-mid) !important;
    margin: 0 !important;
    line-height: 1.65 !important;
}

/* ── Contact card ── */
.legal-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 20px;
    box-shadow: 0 4px 16px rgba(26, 58, 32, 0.04);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(26, 58, 32, 0.08);
    color: var(--forest);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.legal-contact-card strong {
    display: block;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 4px;
    font-weight: 700;
}

.legal-contact-card p {
    font-size: 14px !important;
    color: var(--forest) !important;
    margin: 0 0 4px !important;
    font-weight: 600;
}

.legal-contact-card span {
    font-size: 13px;
    color: var(--ink-light);
}

/* ── Footer nav button ── */
.legal-footer-nav {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.legal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--forest);
    color: #fdfbf7;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.legal-nav-btn:hover {
    background: var(--gold);
    color: var(--forest);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(196, 154, 60, 0.25);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.legal-hero-inner {
    animation: fadeUp 0.5s ease 0.1s both;
}

.legal-toc {
    animation: fadeUp 0.5s ease 0.3s both;
}

.legal-eyebrow {
    animation: fadeUp 0.5s ease 0.1s both;
}

.legal-hero h1 {
    animation: fadeUp 0.5s ease 0.2s both;
}

.legal-hero p {
    animation: fadeUp 0.5s ease 0.3s both;
}

.legal-section {
    animation: fadeUp 0.5s ease both;
}

.legal-section:nth-child(1) { animation-delay: 0.35s; }
.legal-section:nth-child(2) { animation-delay: 0.45s; }
.legal-section:nth-child(3) { animation-delay: 0.55s; }
.legal-section:nth-child(4) { animation-delay: 0.65s; }
.legal-section:nth-child(5) { animation-delay: 0.75s; }
.legal-section:nth-child(6) { animation-delay: 0.85s; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .legal-container {
        grid-template-columns: 1fr;
        padding: 40px 24px 60px;
        gap: 0;
    }

    .legal-toc {
        position: static;
        background: white;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 20px;
        margin-bottom: 40px;
    }

    .legal-toc ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .legal-hero {
        padding: 100px 24px 48px;
    }

    .legal-public .legal-hero {
        padding-top: 120px;
    }
}

@media (max-width: 600px) {
    .legal-container {
        padding: 28px 16px 48px;
    }

    .legal-hero {
        padding: 90px 20px 40px;
    }

    .legal-toc ul {
        grid-template-columns: 1fr;
    }

    .legal-section-number {
        font-size: 48px;
    }

    .legal-section h2 {
        font-size: 22px;
    }
}