/* ==================== LEGAL & CONTACT PAGES ==================== */
/* Shared styles for /privacy, /terms and /contact. Builds on the design
   tokens defined in navbar.css (:root) so it stays consistent with the rest
   of the site (cards, borders, shadows, primary blue). */

:root {
    --premium-border: #e6ebf4;
    --premium-border-soft: #eef2f7;
    --premium-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.045);
    --radius-lg: 18px;
}

body {
    background: var(--bg-page, #f5f6fa);
    font-family: var(--font-ecommerce, "Inter", sans-serif);
    color: var(--text-dark, #0b1430);
    -webkit-font-smoothing: antialiased;
}

/* ==================== PAGE CONTAINERS ==================== */
.legal-page,
.contact-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* ==================== PAGE HEADER ==================== */
.legal-page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 32px 34px 28px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, var(--bg-white, #ffffff) 0%, var(--surface-alt, #f8faff) 100%);
    border: 1px solid var(--border, #e2e8f2);
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--premium-shadow-soft);
}

.legal-page-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--primary-light, #1f67ff) 0%, var(--primary, #1358ff) 100%);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(19, 88, 255, 0.28);
    margin-bottom: 2px;
}

.legal-page-icon svg {
    width: 22px;
    height: 22px;
}

.legal-page-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    color: var(--text-dark, #0b1430);
}

.legal-page-subtitle {
    margin: 0;
    max-width: 62ch;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-light, #66758d);
}

.legal-page-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 8px 14px;
    border: 1px solid var(--border, #e2e8f2);
    border-radius: 999px;
    background: var(--bg-white);
    color: var(--text-light, #66758d);
    font-size: 12.5px;
    font-weight: 650;
    text-align: left;
}

.legal-page-updated svg {
    width: 14px;
    height: 14px;
    color: var(--primary, #1358ff);
    flex-shrink: 0;
}

/* ==================== TABLE OF CONTENTS ==================== */
.legal-toc {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 14px 24px;
    padding: 18px 22px;
    margin-bottom: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border, #e2e8f2);
    border-radius: 16px;
    box-shadow: var(--premium-shadow-soft);
}

.legal-toc-title {
    padding-top: 5px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #96a0b2);
    white-space: nowrap;
}

.legal-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 4px 18px;
}

.legal-toc-grid a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-mid, #263044);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.legal-toc-grid a:hover {
    color: var(--primary, #1358ff);
    background: var(--primary-bg, #edf3ff);
}

/* ==================== LEGAL CONTENT ==================== */
.legal-content {
    background: var(--bg-white);
    border: 1px solid var(--border, #e2e8f2);
    border-radius: var(--radius-lg, 18px);
    padding: 6px 36px 30px;
    box-shadow: var(--premium-shadow-soft);
}

.legal-section {
    padding: 26px 0 22px;
    border-bottom: 1px solid var(--border, #e2e8f2);
    scroll-margin-top: 96px;
}

.legal-section:last-child {
    border-bottom: none;
    padding-bottom: 6px;
}

.legal-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.legal-section-number {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-bg, #edf3ff);
    color: var(--primary, #1358ff);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.legal-section h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--text-dark, #0b1430);
}

.legal-section-body p {
    margin: 0 0 10px;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-mid, #263044);
}

.legal-section-body ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal-section-body li {
    position: relative;
    padding-left: 26px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-mid, #263044);
}

.legal-section-body li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--primary-bg, #edf3ff);
    border: 1.5px solid var(--primary, #1358ff);
}

.legal-section-body strong {
    color: var(--text-dark, #0b1430);
    font-weight: 700;
}

.legal-section-body a {
    color: var(--primary, #1358ff);
    font-weight: 600;
    text-decoration: none;
}

.legal-section-body a:hover {
    text-decoration: underline;
}

/* ==================== CONTACT PAGE ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px 26px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border, #e2e8f2);
    border-radius: var(--radius-lg, 18px);
    box-shadow: var(--premium-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong, #d8e0ec);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.contact-card-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--primary-bg, #edf3ff);
    color: var(--primary, #1358ff);
    margin-bottom: 4px;
}

.contact-card-icon svg {
    width: 22px;
    height: 22px;
}

.contact-card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.015em;
    color: var(--text-dark, #0b1430);
}

.contact-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-light, #66758d);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--primary-bg, #edf3ff);
    color: var(--primary, #1358ff);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.contact-email:hover {
    background: var(--primary, #1358ff);
    color: #ffffff;
}

.contact-email svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.contact-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 24px;
    background: var(--primary-bg, #edf3ff);
    border: 1px solid var(--primary-soft-border, #d7e4ff);
    border-radius: 16px;
}

.contact-note > svg {
    width: 20px;
    height: 20px;
    color: var(--primary, #1358ff);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-note strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 750;
    color: var(--text-dark, #0b1430);
}

.contact-note p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-mid, #263044);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .legal-page,
    .contact-page {
        padding: 24px 16px 44px;
    }

    .legal-page-header {
        padding: 26px 22px;
    }

    .legal-content {
        padding: 4px 22px 24px;
    }

    .legal-toc {
        grid-template-columns: 1fr;
    }

    .legal-toc-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}