/* ═══════════════════════════════════════════════════════════════
   Adam Demos Foundation — shared design system
   Used by: index.html, signin.html, register.html, dashboard.html
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2035;
    --primary-light: #234b73;
    --accent: #c8972b;
    --accent-hover: #daa832;
    --accent-light: #f0e0b0;
    --accent-glow: rgba(200, 151, 43, 0.3);
    --white: #ffffff;
    --off-white: #f8f9fb;
    --cream: #fbf6ec;
    --text-dark: #1c2331;
    --text-mid: #4a5568;
    --text-light: #718096;
    --border: #e2e8f0;
    --success: #2d7a4f;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Reusable buttons ─── */
.btn-gold {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 13px 32px;
    border-radius: 28px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.3s ease;
    display: inline-block;
}
.btn-gold:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-navy {
    background: var(--primary);
    color: var(--white);
    padding: 13px 32px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: inherit;
}
.btn-navy:hover { background: var(--primary-dark); }

.btn-outline-navy {
    background: transparent;
    color: var(--primary);
    padding: 13px 32px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}
.btn-outline-navy:hover { background: var(--primary); color: var(--white); }

/* ─── Form fields ─── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-mid);
    margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}
.form-group input.invalid ~ .form-error,
.form-group textarea.invalid ~ .form-error,
.form-group select.invalid ~ .form-error { display: block; }

/* ─── Auth page layout (shared by signin / register) ─── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
}
.auth-side {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--white);
    padding: 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-side::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(200, 151, 43, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-side::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(35, 75, 115, 0.5) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-side-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--white);
    margin-bottom: 56px;
}
.auth-brand img {
    background: #fffdf6;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(200, 151, 43, 0.4);
    object-fit: contain;
}
/* Page-nav brand sits on a white nav — no chip needed */
.page-nav-brand img {
    background: transparent;
    object-fit: contain;
}
.auth-brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.auth-side h1 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 18px;
}
.auth-side h1 .accent { color: var(--accent); font-style: italic; }
.auth-side .lede {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    margin-bottom: 36px;
}
.auth-trustlist {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-trustlist li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    list-style: none;
}
.auth-trustlist li svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--accent);
}
.auth-side-footer {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 56px;
    background: var(--white);
}
.auth-form-card {
    width: 100%;
    max-width: 440px;
}
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 32px;
    transition: color 0.2s ease;
}
.auth-back-link:hover { color: var(--primary); }
.auth-back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.auth-form-card h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 8px;
}
.auth-form-card .auth-subtitle {
    color: var(--text-mid);
    font-size: 15px;
    margin-bottom: 32px;
}

.auth-submit {
    width: 100%;
    padding: 15px;
    margin-top: 8px;
    background: var(--accent);
    color: var(--primary-dark);
    border: none;
    border-radius: 28px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: all 0.3s ease;
}
.auth-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px var(--accent-glow);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    margin-top: 28px;
    color: var(--text-mid);
    font-size: 14px;
}
.auth-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-side { padding: 40px 28px; min-height: 280px; }
    .auth-side h1 { font-size: 32px; }
    .auth-side .lede { font-size: 15px; margin-bottom: 24px; }
    .auth-trustlist { display: none; }
    .auth-side-footer { display: none; }
    .auth-form-side { padding: 40px 28px; }
    .auth-form-card h2 { font-size: 28px; }
}

/* ─── Page shell (used by reports, legacy, faqs, terms, partners) ─── */
.page-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.page-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Center-nav links (cross-page navigation) */
.page-nav-center {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}
.page-nav-center a {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 6px 2px;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.page-nav-center a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease, left 0.25s ease;
    border-radius: 2px;
}
.page-nav-center a:hover { color: var(--primary-dark); }
.page-nav-center a:hover::after,
.page-nav-center a.active::after {
    width: 100%;
    left: 0;
}
.page-nav-center a.active { color: var(--primary-dark); font-weight: 600; }

/* Mobile menu toggle */
.page-nav-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-mid);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.page-nav-mobile-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 1024px) {
    .page-nav-center { gap: 18px; }
    .page-nav-center a { font-size: 13px; }
}
@media (max-width: 880px) {
    .page-nav-center {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 10px 16px 16px;
        gap: 0;
        box-shadow: 0 12px 24px rgba(15, 32, 53, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .page-nav-center.open {
        max-height: 400px;
    }
    .page-nav-center a {
        padding: 12px 8px;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
    }
    .page-nav-center a:last-child { border-bottom: none; }
    .page-nav-center a::after { display: none; }
    .page-nav-center a.active { color: var(--accent); }
    .page-nav-mobile-toggle { display: inline-flex; }
    .page-nav-actions .page-nav-link { display: none; }
    .page-nav { position: relative; }
}
.page-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
}
.page-nav-brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--primary);
}
.page-nav-actions { display: flex; align-items: center; gap: 14px; }
.page-nav-link {
    color: var(--text-mid);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.page-nav-link:hover { color: var(--primary); }
.page-nav-donate {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 9px 20px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}
.page-nav-donate:hover { background: var(--accent-hover); }
@media (max-width: 600px) {
    .page-nav-link { display: none; }
}

.page-hero {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(200, 151, 43, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}
.page-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    position: relative;
}
.page-hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 18px;
    max-width: 800px;
    position: relative;
}
.page-hero .lede {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.78);
    max-width: 660px;
    line-height: 1.65;
    position: relative;
}
@media (max-width: 768px) {
    .page-hero { padding: 60px 0 50px; }
    .page-hero h1 { font-size: 36px; }
    .page-hero .lede { font-size: 16px; }
}

.page-body { padding: 70px 0 100px; background: var(--off-white); }
.page-body .container { max-width: 880px; }
.page-section { margin-bottom: 56px; }
.page-section h2 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 14px;
}
.page-section h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin: 30px 0 10px;
}
.page-section p {
    color: var(--text-mid);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 14px;
}
.page-section ul, .page-section ol { padding-left: 22px; margin-bottom: 14px; }
.page-section li { color: var(--text-mid); font-size: 16px; line-height: 1.75; margin-bottom: 6px; }
.page-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.fact-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(15, 32, 53, 0.04);
}
.fact-card h3 { margin-top: 0; }

.split-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.split-stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}
.split-stat-card .num {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    line-height: 1;
}
.split-stat-card .num-suffix { font-size: 18px; color: var(--accent); margin-left: 4px; }
.split-stat-card .lbl {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.split-stat-card .desc {
    font-size: 14px;
    color: var(--text-mid);
    margin-top: 10px;
    line-height: 1.55;
}

.page-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 28px;
    font-size: 14px;
}
.page-footer .container { max-width: 1200px; }
.page-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.page-footer h4 {
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
    font-weight: 700;
}
.page-footer ul { list-style: none; padding: 0; }
.page-footer li { margin-bottom: 10px; }
.page-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}
.page-footer a:hover { color: var(--accent); }
.page-footer-tagline {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin: 18px 0;
    font-size: 14px;
}
.page-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}
.page-footer-bottom a { color: rgba(255, 255, 255, 0.5); margin-left: 18px; }
@media (max-width: 768px) {
    .page-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 480px) {
    .page-footer-grid { grid-template-columns: 1fr; }
}
