:root {
    --ink: #161719;
    --muted: #667085;
    --paper: #ffffff;
    --soft: #f5f7f3;
    --line: rgba(22, 23, 25, 0.12);
    --teal: #0f766e;
    --coral: #d85f45;
    --gold: #c19a32;
    --night: #101314;
    --shadow: 0 24px 80px rgba(16, 19, 20, 0.18);
    --radius: 8px;
    --header-height: 78px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
    position: fixed;
    z-index: 30;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(18px, 4vw, 56px);
    color: #fff;
    background: rgba(16, 19, 20, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
}

.brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo .logo-original {
    display: none;
}

.brand-logo .logo-white {
    display: block;
}

.brand-logo .logo-filtered {
    filter: brightness(0) invert(1);
}

.site-header.is-scrolled .brand-logo .logo-original {
    display: block;
}

.site-header.is-scrolled .brand-logo .logo-white {
    display: none;
}

.brand-mark {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--teal);
    border: 2px solid rgba(255, 255, 255, 0.54);
    border-radius: 50%;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand strong {
    font-size: 0.96rem;
    line-height: 1.1;
}

.brand small {
    margin-top: 3px;
    color: currentColor;
    opacity: 0.72;
    font-size: 0.76rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
    outline: 0;
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a:focus-visible {
    background: rgba(15, 118, 110, 0.1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: inherit;
    background: transparent;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background: var(--night);
}

.hero-media,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-motion {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(120deg, rgba(15, 118, 110, 0.82), rgba(216, 95, 69, 0.6)),
        url("data:image/svg+xml,%3Csvg width='1600' height='1000' viewBox='0 0 1600 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1600' height='1000' fill='%23101314'/%3E%3Cpath d='M0 680C240 570 450 530 670 580C880 628 1048 758 1260 708C1390 676 1492 586 1600 512V1000H0Z' fill='%230f766e' opacity='.78'/%3E%3Cpath d='M0 420C196 330 362 322 560 410C760 500 910 620 1120 555C1280 505 1428 355 1600 320V1000H0Z' fill='%23d85f45' opacity='.38'/%3E%3Cpath d='M760 0H860V1000H760z' fill='%23fff' opacity='.08'/%3E%3Cpath d='M0 0h1600v1000H0z' fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='2'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-overlay {
    background: linear-gradient(180deg, rgba(16, 19, 20, 0.34), rgba(16, 19, 20, 0.72));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 36px));
    margin: 0 auto;
    padding: calc(var(--header-height) + 40px) 0 118px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 0.95;
}

.hero-subtitle {
    max-width: 680px;
    margin: 24px 0 0;
    font-size: clamp(1.15rem, 3vw, 1.8rem);
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    outline: 0;
}

.button-primary {
    color: #fff;
    background: var(--coral);
    box-shadow: 0 18px 36px rgba(216, 95, 69, 0.34);
}

.button-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.button-ghost.dark {
    color: var(--ink);
    border-color: var(--line);
    background: #fff;
}

.scroll-cue {
    position: absolute;
    z-index: 2;
    right: clamp(18px, 4vw, 56px);
    bottom: 28px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.8rem;
    font-weight: 800;
}

.section {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(76px, 10vw, 128px) 0;
}

.home-dynamic {
    display: flex;
    flex-direction: column;
}

.section-muted {
    width: 100%;
    max-width: none;
    padding-left: max(18px, calc((100vw - 1180px) / 2));
    padding-right: max(18px, calc((100vw - 1180px) / 2));
    background: var(--soft);
}

.section-split,
.about-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
}

.section-copy h2,
.section-heading h2,
.about-copy h2,
.site-footer h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1;
}

.section-copy p:not(.eyebrow),
.about-copy p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.devotional-card,
.event-card,
.church-item,
.leader-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 14px 40px rgba(16, 19, 20, 0.07);
}

.devotional-card {
    padding: clamp(28px, 5vw, 54px);
    border-left: 6px solid var(--teal);
}

.devotional-card time,
.event-card time,
.devotional-card .author {
    color: var(--teal);
    font-size: 0.86rem;
    font-weight: 800;
}

.devotional-card h3 {
    margin: 12px 0;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1.05;
}

.devotional-card p {
    color: var(--muted);
    line-height: 1.8;
}

.devotional-preview {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
}

.devotional-card .verse {
    color: var(--coral);
    font-weight: 800;
}

.devotional-card .author,
.devotional-card .text-link {
    font-size: 0.82rem;
}

.devotional-read-more {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.devotional-read-more[hidden] {
    display: none;
}

.rights-note {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.rights-note a {
    color: var(--teal);
    font-weight: 800;
}

.reading-section {
    display: block;
}

.reading-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reading-tabs button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.reading-tabs button.is-active {
    color: #fff;
    background: var(--teal);
    border-color: var(--teal);
}

.reading-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 24px;
    align-items: center;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 14px 40px rgba(16, 19, 20, 0.07);
}

.reading-day {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--coral);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.reading-card p {
    color: var(--muted);
    line-height: 1.75;
}

.reading-today {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--soft);
}

.reading-today h3 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.reading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}

.reading-actions label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.reading-actions select {
    min-width: 130px;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    font-weight: 800;
}

.reader-body {
    background: var(--soft);
}

.reader-shell {
    width: min(880px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(32px, 6vw, 76px) 0;
}

.reader-body-embedded {
    min-height: 100vh;
}

.reader-shell-embedded {
    width: min(880px, calc(100% - 28px));
    padding: clamp(22px, 5vw, 46px) 0;
}

.reader-heading {
    margin: 28px 0;
}

.reader-heading h1 {
    margin: 0;
    font-size: clamp(2.2rem, 7vw, 5rem);
    line-height: 1;
}

.reader-content,
.reader-error {
    padding: clamp(24px, 5vw, 46px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 40px rgba(16, 19, 20, 0.07);
}

.reader-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.reader-links-top {
    margin: 0 0 18px;
}

.reader-content section + section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.reader-content h2,
.reader-error h2 {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 4vw, 2.6rem);
}

.reader-content p,
.reader-content div,
.reader-error p {
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.9;
}

.carousel {
    position: relative;
}

.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(290px, 380px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 6px 3px 24px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.event-card {
    min-height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
}

.event-card-clickable {
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.event-card-clickable:hover,
.event-card-clickable:focus-visible {
    box-shadow: 0 18px 48px rgba(16, 19, 20, 0.12);
    outline: 3px solid rgba(15, 118, 110, 0.18);
    outline-offset: 3px;
    transform: translateY(-3px);
}

.event-image {
    display: grid;
    height: 210px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--coral));
    font-size: 2.6rem;
    font-weight: 900;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-body {
    padding: 24px;
}

.event-body h3 {
    margin: 10px 0;
    font-size: 1.35rem;
}

.event-body p,
.event-body span {
    color: var(--muted);
    line-height: 1.65;
}

.event-detail-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--teal) !important;
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--teal);
    font-weight: 800;
}

.carousel-button {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--ink);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.carousel-button.prev {
    left: -26px;
}

.carousel-button.next {
    right: -12px;
}

.church-list {
    display: grid;
    gap: 12px;
}

.church-summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.church-summary strong,
.church-summary small {
    display: block;
}

.church-summary strong {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.church-summary small {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.45;
}

.church-plus {
    position: relative;
    display: block;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--teal);
    font-size: 0;
    line-height: 0;
}

.church-plus::before,
.church-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform 180ms ease;
}

.church-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.church-item.is-open .church-plus::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.church-item.is-open .church-plus::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.church-panel {
    height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 22px;
    transform: translateY(-8px);
    transition: height 320ms ease, opacity 240ms ease, padding 320ms ease, transform 320ms ease;
}

.church-item.is-open .church-panel {
    opacity: 1;
    padding-bottom: 24px;
    transform: translateY(0);
}

.pastor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--soft);
    border-radius: var(--radius);
}

.pastor-photo,
.leader-photo {
    display: grid;
    overflow: hidden;
    place-items: center;
    color: #fff;
    background: var(--coral);
    font-weight: 900;
}

.pastor-photo {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.pastor-photo-button {
    padding: 0;
    border: 0;
    box-shadow: 0 10px 22px rgba(16, 19, 20, 0.13);
    cursor: zoom-in;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pastor-photo-button:hover,
.pastor-photo-button:focus-visible {
    box-shadow: 0 14px 28px rgba(16, 19, 20, 0.18);
    outline: 3px solid rgba(15, 118, 110, 0.28);
    outline-offset: 3px;
    transform: scale(1.04);
}

.pastor-photo img,
.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pastor-card p,
.pastor-card h3 {
    margin: 0;
}

.pastor-card p {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
}

.church-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.church-details h4 {
    margin: 0 0 8px;
}

.church-details p {
    color: var(--muted);
    line-height: 1.65;
}

.schedule-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.schedule-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.schedule-list small {
    grid-column: 1 / -1;
    color: var(--muted);
}

.church-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 18px;
}

.church-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--teal);
    background: rgba(15, 118, 110, 0.1);
    font-size: 0.86rem;
    font-weight: 800;
}

.missions-section {
    color: var(--ink);
}

.missions-layout {
    display: grid;
    width: min(1180px, 100%);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
}

.missions-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1;
}

.missions-copy p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.missions-copy .missions-intro {
    color: var(--ink);
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 700;
}

.missions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.missions-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 14px 40px rgba(16, 19, 20, 0.07);
}

.missions-media {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--gold));
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
}

.missions-media img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.missions-points {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.missions-points span {
    padding: 11px 12px;
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--soft);
    font-size: 0.92rem;
    font-weight: 800;
}

body.modal-open {
    overflow: hidden;
}

.devotional-modal[hidden],
.event-modal[hidden],
.reading-modal[hidden],
.photo-modal[hidden] {
    display: none;
}

.devotional-modal,
.event-modal,
.reading-modal,
.photo-modal {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(18px, 5vw, 56px);
}

.devotional-modal-backdrop,
.event-modal-backdrop,
.reading-modal-backdrop,
.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 19, 20, 0.78);
    cursor: zoom-out;
}

.devotional-modal-panel,
.event-modal-panel,
.reading-modal-panel,
.photo-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
}

.devotional-modal-panel {
    width: min(860px, 100%);
    max-height: min(86vh, 860px);
    overflow: auto;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.devotional-modal-content {
    display: grid;
    width: 100%;
    gap: 16px;
    padding: clamp(28px, 6vw, 58px);
}

.devotional-modal-content time,
.devotional-modal-content .author {
    color: var(--teal);
    font-size: 0.86rem;
    font-weight: 800;
}

.devotional-modal-content h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}

.devotional-modal-content .verse {
    margin: 0;
    color: var(--coral);
    font-weight: 800;
}

.devotional-full-text {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.85;
}

.event-modal-panel {
    width: min(1040px, 100%);
    max-height: min(86vh, 860px);
    overflow: auto;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.event-modal-layout {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.event-modal-media {
    display: grid;
    min-height: 100%;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--night), var(--teal));
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 900;
}

.event-modal-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: min(86vh, 860px);
    object-fit: contain;
}

.event-modal-content {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: clamp(28px, 5vw, 56px);
}

.event-modal-content h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1;
}

.event-modal-date {
    margin: 0;
    color: var(--teal);
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
}

.event-modal-description,
.event-modal-meta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.event-modal-meta {
    display: grid;
    gap: 8px;
}

.reading-modal-panel {
    width: min(1040px, 100%);
    height: min(86vh, 860px);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--soft);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.reading-modal-panel iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--soft);
}

.photo-modal-panel {
    width: min(760px, 100%);
    max-height: min(82vh, 760px);
}

.photo-modal-panel img {
    display: block;
    max-width: 100%;
    max-height: min(82vh, 760px);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
    object-fit: contain;
}

.devotional-modal-close,
.event-modal-close,
.reading-modal-close,
.photo-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.devotional-modal-close,
.event-modal-close,
.reading-modal-close {
    top: 12px;
    right: 12px;
}

.devotional-modal-close:hover,
.devotional-modal-close:focus-visible,
.event-modal-close:hover,
.event-modal-close:focus-visible,
.reading-modal-close:hover,
.reading-modal-close:focus-visible,
.photo-modal-close:hover,
.photo-modal-close:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: 2px;
}

.about-section {
    align-items: start;
}

.auto-count {
    color: var(--ink) !important;
    font-weight: 800;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.leader-card {
    padding: 18px;
}

.leader-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    font-size: 3rem;
}

.leader-card h3 {
    margin: 16px 0 6px;
}

.leader-card p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    padding: clamp(48px, 8vw, 84px) clamp(18px, 4vw, 56px);
    color: #fff;
    background: var(--night);
}

.site-footer p {
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 640ms ease, transform 640ms ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes heroDrift {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.07) translate3d(-1.5%, 1.5%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .church-panel {
        transform: none;
    }
}

@media (max-width: 880px) {
    :root {
        --header-height: 68px;
    }

    .site-header {
        padding: 0 16px;
    }

    .brand strong {
        max-width: 180px;
    }

    .brand small {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        display: none;
        padding: 12px;
        color: var(--ink);
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a {
        border-radius: var(--radius);
    }

    .hero-content {
        padding-bottom: 94px;
    }

    .section-split,
    .about-section,
    .missions-layout,
    .event-modal-layout,
    .church-details,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .event-modal-media {
        min-height: 260px;
        aspect-ratio: 16 / 9;
    }

    .event-modal-media img {
        max-height: none;
    }

    .section-heading {
        display: block;
    }

    .carousel-button {
        display: none;
    }
}

@media (max-width: 540px) {
    .brand-mark,
    .brand-logo,
    .brand img {
        width: 44px;
        height: 44px;
    }

    .hero-actions,
    .button {
        width: 100%;
    }

    .carousel-track {
        grid-auto-columns: minmax(260px, 88vw);
    }

    .reading-card {
        grid-template-columns: 1fr;
    }

    .pastor-card {
        align-items: flex-start;
    }
}
