/* Habitus+Faith page chrome shared by the landing page and the legal pages: palette, header,
   theme switch, language selector, buttons and footer. */
:root {
    --bg: #f5f2fb;
    --surface: #fff;
    --text: #1c1730;
    --text-muted: #6b6280;
    --border: #ded4ef;
    --accent: #6d4aa8;
    --accent-soft: #ece5f7;
    --highlight: #a8461c;
}

:root[data-theme="dark"] {
    --bg: #0b0b0a;
    --surface: #151412;
    --text: #f2f0ea;
    --text-muted: #a39e91;
    --border: #2a2822;
    --accent: #5fb8ae;
    --accent-soft: #16302d;
    --highlight: #e08a5c;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b0b0a;
        --surface: #151412;
        --text: #f2f0ea;
        --text-muted: #a39e91;
        --border: #2a2822;
        --accent: #5fb8ae;
        --accent-soft: #16302d;
        --highlight: #e08a5c;
    }
}

body {
    font-family: Inter, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.site-nav {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.site-nav a:not(.btn-primary, .btn-secondary) {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn-primary, .btn-secondary):hover { color: var(--text); }

.site-nav a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.theme-switch input { display: none; }

.theme-switch .theme-switch-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    transition: color .15s ease;
}
.theme-switch .theme-switch-icon.is-active { color: var(--accent); }

.theme-switch-track {
    position: relative;
    width: 2.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    background: var(--border);
    transition: background .15s ease;
}
.theme-switch input:checked ~ .theme-switch-track { background: var(--accent); }

.theme-switch-dot {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: var(--surface);
    transition: transform .15s ease;
}
.theme-switch input:checked ~ .theme-switch-track .theme-switch-dot { transform: translateX(1rem); }

/* Neutralize the shared language-selector's hardcoded purple */
.language-selector-button.bg-purple-700 {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.language-selector-button.bg-purple-700:hover {
    background-color: var(--accent-soft) !important;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-radius: 0.25rem;
    font-weight: 600;
    transition: opacity .15s ease;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-weight: 600;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

footer#page-footer, footer#page-footer * { color: var(--text-muted) !important; }
