/*------------------------------------
  Goalsreach – Privacy / Legal Pages
  (Uses system font + variables from main.css)
------------------------------------*/

.legal-page {
    background: radial-gradient(circle at top left, rgba(79, 172, 254, 0.2), #03070C);
    color: var(--text-primary-dark);
}

/* Hero */

.legal-hero {
    padding: 110px 0 36px;
    position: relative;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at top left, rgba(79, 172, 254, 0.35), transparent 60%),
        radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.9), transparent 55%);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.legal-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 0 20px;
}

.legal-breadcrumb {
    font-size: 0.82rem;
    opacity: 0.75;
    margin-bottom: 6px;
}

.legal-breadcrumb a {
    color: inherit;
    text-decoration: none;
    opacity: 0.9;
}

.legal-breadcrumb a:hover {
    text-decoration: underline;
}

.legal-hero h1 {
    text-align: left;
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.legal-hero-sub {
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 640px;
    opacity: 0.92;
    margin-bottom: 10px;
}

.legal-meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Content */

.legal-content {
    padding: 20px 0 70px;
}

.legal-section {
    max-width: 900px;
    margin: 0 auto 18px;
    padding: 18px 20px 20px;
    border-radius: 20px;
    background: rgba(7, 10, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.legal-section::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top right, rgba(79, 172, 254, 0.22), transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.legal-section:hover::before {
    opacity: 1;
}

.legal-section h2 {
    text-align: left;
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.legal-section h3 {
    font-size: 1rem;
    margin-top: 10px;
    margin-bottom: 4px;
}

.legal-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 8px;
    opacity: 0.94;
}

.legal-section ul {
    margin: 4px 0 8px;
    padding-left: 20px;
}

.legal-section li {
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 4px;
    opacity: 0.94;
}

/* Footer links block */

.legal-footer-links {
    max-width: 900px;
    margin: 10px auto 0;
    padding: 10px 4px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.legal-footer-links span {
    opacity: 0.5;
}

.legal-footer-links a {
    text-decoration: none;
}

.legal-footer-links a:hover {
    text-decoration: underline;
}

.legal-links {
    font-size: 0.9rem;
    margin-top: 6px;
}

.footer-link {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 16px;
    opacity: 0.85;
}

.footer-link:hover {
    opacity: 1;
}

/* Light mode overrides */

@media (prefers-color-scheme: light) {
    .legal-page {
        background: #f5f5f7;
        color: var(--text-primary);
    }

    .legal-hero::before {
        background:
            radial-gradient(circle at top left, rgba(79, 172, 254, 0.18), transparent 60%),
            radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.03), transparent 65%);
        opacity: 1;
    }

    .legal-section {
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    }

    .legal-section::before {
        background: radial-gradient(circle at top right, rgba(79, 172, 254, 0.16), transparent 60%);
    }

    .legal-section h2,
    .legal-section h3,
    .legal-section p,
    .legal-section li {
        color: #111;
        opacity: 0.9;
    }
}

/* Responsive */

@media (max-width: 768px) {
    .legal-hero {
        padding-top: 96px;
        padding-bottom: 28px;
    }

    .legal-hero h1 {
        font-size: 2rem;
    }

    .legal-section {
        margin-inline: 16px;
    }

    .legal-footer-links {
        margin-inline: 16px;
    }
}

/* ===== Dark Mode Overrides (Properly Scoped) ===== */
@media (prefers-color-scheme: dark) {
    .legal-page {
        background: radial-gradient(circle at top, #060816 0%, #03070C 40%, #000000 100%);
    }

    .legal-hero::before {
        background:
            radial-gradient(circle at top left, rgba(79, 172, 254, 0.10), transparent 65%),
            radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.92), transparent 55%);
        opacity: 0.55;
    }
}

/* Optional: strengthen readability slightly */
.legal-hero-inner {
    backdrop-filter: blur(4px);
}
/* ===== Match Home Hero (Dark Mode Only) ===== */
@media (prefers-color-scheme: dark) {
    .legal-hero {
        background:
            radial-gradient(circle at top left, rgba(79, 172, 254, 0.28), transparent 60%),
            radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.85), #03070C);
        color: #ffffff;
        padding-top: 96px;
        padding-bottom: 72px;
    }

    .legal-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 60%);
        opacity: 0.6;
        pointer-events: none;
    }
}