/* ============================================================
   Grace Mission Church — Core Design System & Global Shell
   Design Tokens, Typography, Layout, & Shared Components
   ============================================================ */

/* --- Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Tokens --- */
:root {
    /* Color */
    --bg-parchment: #FAF7EE;
    --bg-paper-light: #FFFDF7;
    --ink-primary: #2B231F;
    --ink-muted: #6E6259;
    --accent-mahogany: #4A120E;
    --accent-mahogany-hover: #360C09;
    --accent-gold: #C5A059;
    --accent-gold-light: #E6D7B5;
    --border-delicate: rgba(197, 160, 89, 0.35);
    --border-faint: rgba(43, 35, 31, 0.08);

    /* Geometry */
    --radius-soft: 8px;
    --radius-card: 12px;
    --radius-pill: 9999px;

    /* Spacing scale */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;
    --sp-9: 5rem;
    --sp-10: 6rem;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-card: 0 4px 20px rgba(43, 35, 31, 0.03);
    --shadow-card-hover: 0 8px 30px rgba(43, 35, 31, 0.06);
    --shadow-btn: 0 2px 8px rgba(74, 18, 14, 0.15);
    --shadow-btn-hover: 0 4px 14px rgba(74, 18, 14, 0.25);

    /* Layout */
    --max-width: 1180px;
    --ledger-width: 36px;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-parchment);
    color: var(--ink-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-mahogany);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-mahogany-hover);
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--sp-4);
    background: var(--accent-mahogany);
    color: var(--bg-paper-light);
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-soft);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: var(--sp-4);
}

/* --- Focus --- */
:focus-visible {
    outline: 2px solid var(--accent-mahogany);
    outline-offset: 2px;
    border-radius: 2px;
}

/* --- Ledger Margin Ticks (Signature Element) --- */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: var(--ledger-width);
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 19px,
            var(--border-delicate) 19px,
            var(--border-delicate) 20px);
    opacity: 0.6;
    z-index: 90;
    pointer-events: none;
}

body::before {
    left: 0;
    border-right: 1px solid var(--accent-gold);
}

body::after {
    right: 0;
    border-left: 1px solid var(--accent-gold);
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--sp-6);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent-mahogany);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: 1.35rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    color: var(--ink-primary);
    line-height: 1.7;
}

.text-muted {
    color: var(--ink-muted);
}

/* --- Gold Shimmer Animation --- */
.shimmer-gold {
    background: linear-gradient(105deg,
            var(--accent-mahogany) 0%,
            var(--accent-mahogany) 35%,
            var(--accent-gold) 50%,
            var(--accent-mahogany) 65%,
            var(--accent-mahogany) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldSweep 4s ease-in-out infinite;
}

@keyframes goldSweep {
    0% {
        background-position: 100% 0;
    }

    50% {
        background-position: 0% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* --- Gold Badge (Eyebrow Pill) --- */
.gold-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-mahogany);
    background: transparent;
    margin-bottom: var(--sp-5);
    line-height: 1;
}

.gold-badge--on-dark {
    color: var(--accent-gold);
    border-color: rgba(197, 160, 89, 0.5);
    background: rgba(74, 18, 14, 0.5);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--sp-2);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent-gold);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    line-height: 1;
    min-height: 44px;
}

.btn-primary {
    background-color: var(--accent-mahogany);
    color: var(--bg-paper-light);
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    background-color: var(--accent-mahogany-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.btn-outline {
    background: transparent;
    color: var(--accent-mahogany);
}

.btn-outline:hover {
    background: var(--bg-paper-light);
    border-color: var(--accent-mahogany);
    color: var(--accent-mahogany);
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--accent-mahogany);
    border-color: var(--accent-gold);
}

.btn-gold:hover {
    background: #b8923e;
    transform: translateY(-1px);
}

.btn-outline-light {
    background: transparent;
    color: var(--bg-paper-light);
    border-color: var(--accent-gold-light);
}

.btn-outline-light:hover {
    background: rgba(255, 253, 247, 0.1);
    color: #fff;
}

/* --- Audio Player & Track Menu --- */
.audio-player-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ambient-btn {
    background: transparent;
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-pill);
    color: var(--accent-mahogany);
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: stretch;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    user-select: none;
    overflow: hidden;
}

.ambient-btn:hover,
.ambient-btn.active {
    background: var(--accent-mahogany);
    color: var(--bg-paper-light);
    border-color: var(--accent-mahogany);
}

.audio-main-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 0.42rem 0.65rem 0.42rem 0.9rem;
    flex: 1;
}

.audio-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.75rem;
    border-left: 1px solid rgba(197, 160, 89, 0.4);
    transition: background 0.2s ease;
    cursor: pointer;
}

.ambient-btn:hover .audio-dropdown-trigger,
.ambient-btn.active .audio-dropdown-trigger {
    border-left-color: rgba(255, 253, 247, 0.35);
}

.audio-dropdown-trigger:hover {
    background: rgba(197, 160, 89, 0.3);
}

.audio-dropdown-arrow {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
    transition: transform 0.25s ease;
}

.audio-player-widget.menu-open .audio-dropdown-arrow {
    transform: rotate(180deg);
}

.audio-track-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: auto;
    left: 0;
    min-width: 270px;
    background: var(--bg-paper-light);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card-hover);
    padding: var(--sp-2);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.audio-player-widget.menu-open .audio-track-menu {
    display: block;
    animation: fadeInAudioMenu 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInAudioMenu {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.audio-track-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold);
    padding: 0.4rem 0.6rem 0.3rem;
    border-bottom: 1px solid var(--border-delicate);
    margin-bottom: 0.3rem;
}

.audio-track-option {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-soft);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.audio-track-option:hover {
    background: var(--bg-parchment);
    border-color: var(--border-delicate);
}

.audio-track-option.selected {
    background: var(--bg-parchment);
    border-color: var(--accent-gold);
}

.audio-track-option .track-icon {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.audio-track-option .track-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.audio-track-option .track-title {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--accent-mahogany);
    line-height: 1.25;
}

.audio-track-option .track-subtitle {
    font-size: 0.7rem;
    color: var(--ink-muted);
    line-height: 1.2;
    margin-top: 2px;
}

.audio-track-option .track-status-icon {
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 700;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .audio-player-widget {
        width: 100%;
    }

    .ambient-btn {
        width: 100%;
        justify-content: center;
    }

    .audio-track-menu {
        right: auto;
        left: 0;
        min-width: 100%;
    }
}

/* --- Navigation --- */
.site-nav {
    background: var(--bg-parchment);
    border-bottom: 1px solid var(--border-delicate);
    padding: 1.15rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    line-height: 1;
    user-select: none;
}

.gmc-dynamic-logo {
    height: 38px;
    width: auto;
    max-width: 220px;
    display: block;
    transition: transform 0.25s ease, filter 0.25s ease;
    overflow: visible;
}

.nav-brand:hover .gmc-dynamic-logo {
    transform: scale(1.03);
}

.nav-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.nav-arch-svg {
    width: 28px;
    height: 36px;
    display: block;
}

.nav-arch-fill {
    fill: #4F463C;
    transition: fill 0.2s ease;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.nav-brand-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3C352E;
    line-height: 1;
    transition: color 0.2s ease;
}

.nav-brand-sub {
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: #4F463C;
    line-height: 1;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.nav-brand:hover .nav-brand-mark {
    transform: scale(1.06);
}

.nav-cross {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(74, 18, 14, 0.25));
    transition: transform 0.3s ease;
}

.nav-brand:hover .nav-cross {
    transform: scale(1.08) rotate(2deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--sp-1);
    align-items: center;
}

.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
}

.nav-menu a {
    color: var(--ink-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    transition: all 0.25s ease;
    display: inline-block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-mahogany);
    background: var(--bg-paper-light);
    box-shadow: 0 0 0 1px var(--border-delicate);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--sp-2);
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* --- Page Header --- */
.page-header {
    padding: var(--sp-8) var(--sp-4) var(--sp-7);
    text-align: center;
    border-bottom: 1px solid var(--border-delicate);
}

.page-header h1 {
    margin-bottom: var(--sp-3);
}

.page-header p {
    color: var(--ink-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Section --- */
.section {
    padding: var(--sp-9) 0;
}

.section-eyebrow {
    text-align: center;
    margin-bottom: var(--sp-7);
}

.section-eyebrow h2 {
    margin-top: var(--sp-2);
}

/* --- Mahogany Thesis Band --- */
.thesis-band {
    background-color: var(--accent-mahogany);
    color: var(--bg-parchment);
    border-radius: var(--radius-card);
    border: 1px solid var(--accent-gold);
    padding: var(--sp-9) var(--sp-8);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.thesis-band h2 {
    color: var(--bg-parchment);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-style: italic;
    max-width: 700px;
    margin: 0 auto var(--sp-5);
    line-height: 1.4;
}

.thesis-band p {
    color: var(--accent-gold-light);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto var(--sp-6);
    line-height: 1.65;
}

/* --- Facts Row --- */
.facts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
    text-align: center;
    padding: var(--sp-8) 0;
    border-bottom: 1px solid var(--border-faint);
}

.fact-item {
    padding: var(--sp-4);
}

.fact-value {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--accent-mahogany);
    line-height: 1.2;
    margin-bottom: var(--sp-2);
}

.fact-label {
    font-size: 0.85rem;
    color: var(--ink-muted);
    font-weight: 500;
}


/* --- Standard Cards & Features --- */
.card {
    background: var(--bg-paper-light);
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    padding: var(--sp-6);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--sp-5);
    color: var(--accent-mahogany);
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-mahogany);
    stroke-width: 1.5;
    fill: none;
}

.card h3 {
    margin-bottom: var(--sp-3);
}

.card p {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-5);
}

/* --- Content Grids --- */
.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    align-items: center;
}

.welcome-text h2 {
    margin-bottom: var(--sp-4);
}

.welcome-text p {
    color: var(--ink-muted);
    margin-bottom: var(--sp-4);
    line-height: 1.7;
}

.welcome-image img {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-delicate);
    width: 100%;
    object-fit: cover;
}


/* --- Scripture Block & Drop Cap --- */
.scripture-block {
    background: var(--bg-paper-light);
    border-left: 3px solid var(--accent-gold);
    padding: var(--sp-6);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    margin: var(--sp-6) 0;
}

.scripture-block .reference {
    color: var(--accent-mahogany);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--sp-2);
    display: block;
}

.scripture-block .verse-body {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--ink-primary);
    font-style: italic;
}

.drop-cap {
    float: left;
    font-family: var(--font-heading);
    font-size: 3.25rem;
    line-height: 0.85;
    padding: 0.4rem 0.65rem;
    margin-right: 0.75rem;
    margin-bottom: 0.25rem;
    background: var(--accent-mahogany);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(74, 18, 14, 0.2);
}

/* --- Footer CTA & Footer --- */
.footer-cta {
    background-color: var(--accent-mahogany);
    color: var(--bg-parchment);
    border-radius: var(--radius-card);
    border: 1px solid var(--accent-gold);
    padding: var(--sp-9) var(--sp-8);
    text-align: center;
    margin-bottom: var(--sp-10);
}

.footer-cta h2 {
    color: var(--bg-parchment);
    margin-bottom: var(--sp-4);
}

.footer-cta p {
    color: var(--accent-gold-light);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto var(--sp-6);
}

.site-footer {
    background: var(--bg-parchment);
    border-top: 1px solid var(--border-delicate);
    padding: var(--sp-8) 0 var(--sp-6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--sp-6);
    margin-bottom: var(--sp-7);
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--accent-mahogany);
    margin-bottom: var(--sp-4);
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    font-size: 0.9rem;
    color: var(--ink-muted);
    line-height: 1.8;
    display: block;
}

.footer-col a:hover {
    color: var(--accent-mahogany);
}

.footer-col .footer-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink-muted);
    line-height: 1.5;
    max-width: 280px;
}

.footer-bottom {
    border-top: 1px solid var(--border-faint);
    padding-top: var(--sp-5);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.825rem;
    color: var(--ink-muted);
}


/* --- Temple Canvas Watermark --- */
#templeCanvas {
    opacity: 0.04;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Cursor Field Canvas (gold comet / cross / verse field) --- */
#cursorFieldCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}


/* --- Map Section --- */
.map-section {
    text-align: center;
}

.map-section h2 {
    margin-bottom: var(--sp-5);
}

.map-container {
    border: 1px solid var(--border-delicate);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    line-height: 0;
}

.map-container iframe {
    display: block;
}

.map-caption {
    margin-top: var(--sp-4);
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* --- Table of Contents description --- */
.toc-description {
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-bottom: var(--sp-4);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-content {
        opacity: 1;
        transform: none;
    }

    .shimmer-gold {
        animation: none;
        -webkit-text-fill-color: initial;
        background: none;
    }
}

/* --- Responsive Layouts --- */
@media (max-width: 768px) {
    :root {
        --ledger-width: 0px;
    }

    body::before,
    body::after {
        display: none !important;
    }

    .container {
        padding: 0 var(--sp-4);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-parchment);
        border-bottom: 1px solid var(--border-delicate);
        padding: var(--sp-4);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        max-height: 300px;
        overflow: hidden;
    }

    .hero-image img {
        max-height: 280px;
    }

    .features-grid,
    .process-grid,
    .protocol-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-comparison,
    .staircase-grid,
    .story-two-col {
        grid-template-columns: 1fr;
    }

    .pillars-three-row {
        grid-template-columns: 1fr;
    }

    .facts-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--sp-6);
    }

    .footer-col {
        text-align: center;
    }

    .footer-col .footer-tagline {
        margin: 0 auto;
    }

    .faith-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--sp-6) 0;
    }

    .section-eyebrow {
        margin-bottom: var(--sp-4);
    }

    .thesis-band {
        padding: var(--sp-6) var(--sp-4);
    }

    .thesis-band h2 {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
        line-height: 1.35;
        margin-bottom: var(--sp-3);
    }

    .thesis-band p {
        font-size: 0.95rem;
        margin-bottom: var(--sp-5);
    }

    .thesis-band .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .footer-cta {
        padding: var(--sp-6) var(--sp-4);
        margin-bottom: var(--sp-6);
    }

    .footer-cta h2 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
        margin-bottom: var(--sp-2);
    }

    .footer-cta p {
        font-size: 0.95rem;
        margin-bottom: var(--sp-5);
    }

    .footer-cta .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .facts-row {
        padding: var(--sp-5) 0;
        gap: var(--sp-2);
    }

    .fact-item {
        padding: var(--sp-2);
    }

    .fact-value {
        font-size: 1.6rem;
    }

    .fact-label {
        font-size: 0.78rem;
    }

    .scripture-block {
        padding: var(--sp-4);
        margin: var(--sp-4) 0;
    }

    .scripture-block .reference {
        font-size: 1.1rem;
    }

    .scripture-block .verse-body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .drop-cap {
        font-size: 2.4rem;
        padding: 0.25rem 0.5rem;
        margin-right: 0.5rem;
    }

    .site-footer {
        padding: var(--sp-6) 0 calc(var(--sp-6) + 24px);
    }

    .footer-bottom {
        padding-top: var(--sp-4);
        padding-bottom: var(--sp-2);
    }
}

@media (max-width: 480px) {
    :root {
        --ledger-width: 0px;
    }

    .container {
        padding: 0 var(--sp-4);
    }

    .features-grid,
    .process-grid,
    .protocol-grid {
        grid-template-columns: 1fr;
    }

    .facts-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .leadership-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }
}

/* --- Mobile Sticky Action Bar --- */
.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-parchment);
    border-top: 1px solid var(--border-delicate);
    padding: var(--sp-2) var(--sp-4) calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
    z-index: 99;
    box-shadow: 0 -4px 20px rgba(43, 35, 31, 0.1);
    gap: var(--sp-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
    .mobile-sticky-bar {
        display: flex;
    }

    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
}

/* --- Night Theme / Dark Mode Red Overrides --- */
body.reader-night {
    --accent-mahogany: #C25E56;
    --accent-mahogany-hover: #D47068;
}

body.reader-night .site-title {
    color: var(--accent-mahogany);
}

body.reader-night .ambient-btn {
    border-color: rgba(197, 160, 89, 0.32);
    color: var(--accent-mahogany);
}

body.reader-night .ambient-btn:hover,
body.reader-night .ambient-btn.active {
    background: #6E221D;
    color: #FAF8F2;
    border-color: #C25E56;
}

body.reader-night .nav-arch-fill {
    fill: #E8DDC9;
}

body.reader-night .nav-brand-title {
    color: #F5F2E9;
}

body.reader-night .nav-brand-sub {
    color: #D6CBB8;
}
/* PWA Install Banner — liquid glass */
.pwa-banner {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: rgba(250, 247, 238, 0.42);
    border: 1px solid var(--border-delicate);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow:
        inset 2px 2px 1px -2px rgba(255, 255, 255, 0.65),
        inset -2px -2px 1px -2px rgba(74, 18, 14, 0.18),
        inset 0 0 12px rgba(255, 255, 255, 0.12),
        0 8px 24px rgba(43, 35, 31, 0.18),
        0 1px 2px rgba(43, 35, 31, 0.1);
    /* Smooth frost first (universal fallback)… */
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    /* …then re-declare with the SVG refraction filter for engines that support it. */
    -webkit-backdrop-filter: blur(12px) saturate(150%) url(#gmcGlassFilter);
    backdrop-filter: blur(12px) saturate(150%) url(#gmcGlassFilter);
    z-index: 1000;
    animation: slideUp 0.5s ease-out;
}

/* Hidden inline SVG defs injected by script.js showInstallBanner() */
.pwa-banner .pwa-glass-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.pwa-banner-content p {
    margin: 0 0 15px 0;
    color: var(--ink-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.pwa-banner-actions {
    display: flex;
    gap: 10px;
}

.pwa-btn-primary {
    position: relative;
    background: rgba(197, 160, 89, 0.16);
    color: var(--accent-mahogany);
    border: 1px solid rgba(197, 160, 89, 0.45);
    padding: 9px 22px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow:
        inset 1.5px 1.5px 1px -1.5px rgba(255, 255, 255, 0.7),
        inset -1.5px -1.5px 1px -1.5px rgba(74, 18, 14, 0.25),
        0 4px 14px rgba(43, 35, 31, 0.15);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%) url(#gmcGlassFilter);
    backdrop-filter: blur(8px) saturate(140%) url(#gmcGlassFilter);
}

.pwa-btn-primary:hover {
    background: rgba(197, 160, 89, 0.28);
    transform: translateY(-1px) scale(1.04);
    box-shadow:
        inset 1.5px 1.5px 1px -1.5px rgba(255, 255, 255, 0.75),
        inset -1.5px -1.5px 1px -1.5px rgba(74, 18, 14, 0.22),
        0 6px 18px rgba(43, 35, 31, 0.2);
}

.pwa-btn-primary:focus-visible,
.pwa-btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.4);
}

.pwa-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-muted);
    border: 1px solid var(--border-faint);
    padding: 9px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.pwa-btn-secondary:hover {
    background: rgba(197, 160, 89, 0.12);
    transform: translateY(-1px);
}

/* Browsers without backdrop-filter get a readable near-solid card instead */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pwa-banner {
        background: rgba(255, 253, 247, 0.94);
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 768px) {
    .pwa-banner {
        width: 400px;
        left: auto;
        right: 40px;
        bottom: 40px;
    }
}
