/* =========================================================
   Mission For Christ Evangelical Ministry
   Main stylesheet
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
    --primary: #1A3C6E;
    --secondary: #D4A017;
    --accent: #F5F5F5;
    --text: #2D2D2D;
    --highlight: #4A90D9;
    --white: #FFFFFF;
    --muted: #667085;
    --border: #E4E7EC;
    --success: #157347;
    --danger: #B42318;
    --shadow-sm: 0 4px 16px rgba(26, 60, 110, 0.08);
    --shadow-md: 0 12px 32px rgba(26, 60, 110, 0.14);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1180px;
    --transition: 220ms ease;
}

/* ---------- Reset and base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    font-family: "Playfair Display", serif;
    color: var(--primary);
    line-height: 1.2;
}

p {
    margin-top: 0;
}

ul {
    margin-top: 0;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.section {
    padding: 5.5rem 0;
}

.section-alt {
    background: var(--accent);
}

.section-heading {
    max-width: 700px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-heading-wide {
    max-width: var(--container);
}

.section-heading-wide h2 {
    white-space: nowrap;
}

.section-heading .eyebrow,
.eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--secondary);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading p {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    transform: translateY(-120%);
    padding: 0.75rem 1rem;
    background: var(--secondary);
    color: var(--primary);
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid rgba(74, 144, 217, 0.55);
    outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.78rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition),
        box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--secondary);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.24);
}

.btn-primary:hover {
    background: #E0AD21;
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.75);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-blue {
    background: var(--primary);
    color: var(--white);
}

.btn-blue:hover {
    background: #122D55;
}

/* ---------- Header and navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(228, 231, 236, 0.9);
    backdrop-filter: blur(12px);
    transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 220px;
}

.brand picture {
    display: block;
    line-height: 0;
}

.brand-logo {
    display: block;
    width: 220px;
    height: auto;
    max-height: 58px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    transition:
        background var(--transition),
        color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(74, 144, 217, 0.11);
    color: var(--highlight);
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    font-size: 1.15rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 650px;
    display: grid;
    place-items: center;
    isolation: isolate;
    color: var(--white);
    background:
        linear-gradient(110deg, rgba(12, 36, 71, 0.95), rgba(26, 60, 110, 0.73)),
        url("https://images.unsplash.com/photo-1438232992991-995b7058bbb3?auto=format&fit=crop&w=1800&q=80")
        center / cover no-repeat;
}

.hero::after {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 100px;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.16), transparent);
}

.hero-content {
    max-width: 900px;
    padding: 6rem 0;
}

.hero h1 {
    max-width: 850px;
    margin-bottom: 1.25rem;
    color: var(--white);
    font-size: clamp(2.4rem, 5.4vw, 4.3rem);
}

.hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

/* ---------- Inner-page banner ---------- */
.page-banner {
    padding: 6rem 0 5rem;
    background:
        linear-gradient(110deg, rgba(16, 44, 84, 0.96), rgba(26, 60, 110, 0.8)),
        url("https://images.unsplash.com/photo-1473177104440-ffee2f376098?auto=format&fit=crop&w=1800&q=80")
        center / cover no-repeat;
    color: var(--white);
}

.page-banner h1 {
    margin-bottom: 0.8rem;
    color: var(--white);
    font-size: clamp(2.5rem, 6vw, 4.6rem);
}

.page-banner p {
    max-width: 700px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.12rem;
}

/* ---------- Cards ---------- */
.card {
    height: 100%;
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(74, 144, 217, 0.35);
    box-shadow: var(--shadow-md);
}

.card-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 1.1rem;
    place-items: center;
    border-radius: 14px;
    background: rgba(74, 144, 217, 0.11);
    color: var(--primary);
    font-size: 1.25rem;
}

.card h3 {
    margin-bottom: 0.7rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    color: var(--secondary);
    font-family: "Playfair Display", serif;
    font-size: 2.4rem;
}

/* ---------- Split content ---------- */
.split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 3.5rem;
}

.split.align-start {
    align-items: start;
}

.split-media {
    position: relative;
}

.split-media img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.floating-note {
    position: absolute;
    right: -1rem;
    bottom: 1.5rem;
    max-width: 240px;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    background: var(--secondary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    font-weight: 800;
}

/* ---------- Events ---------- */
.event-card {
    overflow: hidden;
    padding: 0;
}

.event-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.event-content {
    padding: 1.5rem;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.event-meta i {
    color: var(--secondary);
}

/* ---------- Leadership ---------- */
.person-card {
    overflow: hidden;
    padding: 0;
}

.person-card img {
    width: 100%;
    height: 290px;
    object-fit: cover;
}

.person-info {
    padding: 1.4rem;
}

.person-info span {
    color: var(--secondary);
    font-weight: 800;
}

/* ---------- Lists ---------- */
.check-list {
    display: grid;
    gap: 0.8rem;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    gap: 0.75rem;
}

.check-list i {
    margin-top: 0.32rem;
    color: var(--secondary);
}

/* ---------- CTA ---------- */
.cta {
    padding: 4rem 0;
    background: linear-gradient(120deg, var(--primary), #24599B);
    color: var(--white);
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cta h2 {
    margin-bottom: 0.5rem;
    color: var(--white);
}

.cta p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.84);
}

/* ---------- Giving ---------- */
.giving-card.featured {
    border: 2px solid var(--secondary);
}

.bank-details {
    display: grid;
    gap: 0.8rem;
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
}

.bank-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px dashed #CCD2DA;
    padding-bottom: 0.55rem;
}

.bank-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.bank-row span {
    color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 2rem;
}

.contact-info {
    display: grid;
    gap: 1rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-item .card-icon {
    flex: 0 0 auto;
    margin: 0;
}

.contact-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--primary);
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #C9D0D9;
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-control:focus {
    border-color: var(--highlight);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.12);
}

.form-control.error {
    border-color: var(--danger);
}

.field-error {
    display: none;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.82rem;
}

.form-status {
    display: none;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.form-status.success {
    display: block;
    background: #EAF8F0;
    color: var(--success);
}

.form-status.error {
    display: block;
    background: #FDECEC;
    color: var(--danger);
}

.map-frame {
    width: 100%;
    min-height: 430px;
    border: 0;
    border-radius: var(--radius-md);
}

/* ---------- Footer ---------- */
.site-footer {
    padding-top: 4.5rem;
    background: #102A4E;
    color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr 1fr;
    gap: 2rem;
}

.site-footer h3,
.site-footer h4 {
    color: var(--white);
}

.footer-links {
    display: grid;
    gap: 0.6rem;
    padding: 0;
    list-style: none;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.social-links a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--white);
    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    background: var(--secondary);
    color: var(--primary);
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

/* ---------- Reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 650ms ease,
        transform 650ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 900;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition:
        opacity var(--transition),
        transform var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.hidden, .hide {
    display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: fixed;
        inset: 78px 0 auto;
        display: grid;
        max-height: 0;
        overflow: hidden;
        padding: 0 1rem;
        background: var(--white);
        box-shadow: var(--shadow-md);
        transition:
            max-height 320ms ease,
            padding 320ms ease;
    }

    .nav-links.open {
        max-height: 480px;
        padding: 1rem;
    }

    .nav-links a {
        padding: 0.8rem 1rem;
    }

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

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

    .split,
    .contact-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 680px) {
    .section {
        padding: 4rem 0;
    }

    .eyebrow,
    .section-heading .eyebrow {
        font-size: 1.05rem;
    }

    .section-heading-wide h2 {
        white-space: normal;
    }

    .brand {
        max-width: 175px;
    }

    .brand-logo {
        width: 175px;
        max-height: 46px;
    }

    .hero {
        min-height: 590px;
    }

    .hero-actions,
    .cta-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .floating-note {
        position: static;
        max-width: none;
        margin-top: 1rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    .bank-row {
        flex-direction: column;
        gap: 0.1rem;
    }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
