/* ============================================================
   BetterGather — Shared styles for the public legal pages
   (/terms, /privacy, /refund-policy)

   Loaded alongside /css/public-nav.css so the three policy pages
   sit inside the same public header/footer chrome as the landing
   page. Brand colours mirror the landing page (emerald #059669).
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #f9fafb;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

:root {
    --legal-brand: #059669;
    --legal-brand-dark: #047857;
    --legal-gradient-start: #064e3b;
    --legal-border: #e5e7eb;
}

/* ===== LAYOUT ===== */
.content-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.text-center { text-align: center; }

/* ===== HERO ===== */
/* Top padding clears the fixed .pub-navbar injected by public-nav.js. */
.legal-hero {
    padding: 150px 0 3.5rem;
    background: linear-gradient(135deg, var(--legal-gradient-start) 0%, var(--legal-brand) 100%);
    color: #fff;
}

.legal-hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.legal-hero-subtitle {
    font-size: 1.125rem;
    color: #d1fae5;
    margin: 0 auto 1.5rem;
    max-width: 640px;
}

.last-updated {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ecfdf5;
}

/* ===== CONTENT ===== */
.content-section { padding: 3.75rem 0; }

.content-wrapper {
    background: #fff;
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toc {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.toc-list { list-style: none; padding-left: 0; }
.toc-list li { margin-bottom: 0.5rem; }

.toc-link {
    color: var(--legal-brand-dark);
    font-weight: 500;
    transition: color 0.2s;
}

.toc-link:hover { color: #065f46; text-decoration: underline; }

.section-heading {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111827;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--legal-border);
    scroll-margin-top: 90px;
}

.section-heading:first-of-type {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.subsection-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1.25rem;
}

.content-list { margin: 0 0 1.25rem 1.5rem; }

.content-list li {
    margin-bottom: 0.5rem;
    color: #374151;
    line-height: 1.7;
}

.emphasis { font-weight: 600; color: #111827; }

.link-green {
    color: var(--legal-brand-dark);
    text-decoration: underline;
    font-weight: 500;
}

.link-green:hover { color: #065f46; }

/* Callout used for "how to exercise your rights" style notes. */
.info-box {
    background: #f0fdf4;
    border-left: 4px solid var(--legal-brand);
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.info-box-title {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.info-box-text { color: #374151; line-height: 1.7; }

.legal-acknowledgment {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--legal-border);
    font-size: 0.875rem;
    color: #6b7280;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .legal-hero { padding: 120px 0 2.5rem; }
    .legal-hero-title { font-size: 2rem; }
    .section-heading { font-size: 1.5rem; }
    .content-wrapper { padding: 1.5rem; }
    .toc { padding: 1.25rem; }
}
