@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #7b1544;
    --primary-dark: #5a0f32;
    --primary-light: #9f2a5e;
    --accent: #c9a84c;
    --bg: #f8f5f0;
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5b5b6b;
    --border: #e8e2d8;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-2xl: 96px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-width: 320px;
    overflow-x: hidden;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    animation: page-in 0.5s ease both;
}
h1, h2, h3, h4 {
    margin: 0 0 var(--space-sm);
    color: var(--text);
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
p, li { max-width: 68ch; }
a, button, input, textarea, select { font: inherit; }
a {
    color: var(--primary);
    text-decoration: none;
    transition: color .25s ease, background-color .25s ease, transform .25s ease;
}
a:hover { color: var(--primary-light); text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3000;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--surface);
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.container, main.container {
    width: min(1200px, calc(100% - 48px));
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}
img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* Editorial image sizing for public content pages. */
main.container > img:not(.logo) {
    width: min(100%, 760px) !important;
    max-height: 460px;
    margin: 0 auto var(--space-lg);
    object-fit: cover;
}
.new-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    max-width: 960px;
    margin-top: var(--space-lg);
}
.new-gallery img {
    flex: none !important;
    width: 100% !important;
    height: 190px;
    margin: 0 !important;
    object-fit: cover;
}
.new-gallery img:last-child {
    grid-column: 1 / -1;
    height: 360px;
}
.kelly-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: var(--space-xl);
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: var(--space-xl) 0;
}
.kelly-content { min-width: 0; }
.kelly-content img {
    width: 240px !important;
    height: 300px;
    margin: 0 var(--space-lg) var(--space-sm) 0;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.kelly-content img.kelly-image-normal { float: none; width: min(100%, 760px) !important; height: 360px !important; margin: 0 auto var(--space-lg) !important; }
.kelly-image-right { float: right; margin: 0 0 var(--space-sm) var(--space-lg) !important; }
.kelly-image-left { float: left; margin: 0 var(--space-lg) var(--space-sm) 0 !important; }
.kelly-timeline { padding: 24px; border-left: 1px solid var(--border); background: rgba(255,255,255,.55); }
.kelly-timeline ul { padding-left: 1.1rem; }
.kelly-timeline li + li { margin-top: var(--space-xs); }

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 88px;
    padding: 14px max(24px, 5vw);
    border-bottom: 1px solid rgba(232, 226, 216, .8);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}
.logo-area { min-width: 0 !important; }
.logo {
    width: 280px !important;
    max-width: min(280px, 44vw) !important;
    margin: 0 !important;
    border-radius: 0;
}
nav, .main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
nav > a, .main-nav > a, .dropbtn {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}
nav > a:hover, .main-nav > a:hover, .dropbtn:hover { background: #f7edf2; text-decoration: none; }
.dropdown { position: relative; }
.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1001;
    min-width: 230px;
    padding: var(--space-xs);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content, .dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-content a {
    display: block;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
}
.dropdown-content a:hover { background: #f7edf2; color: var(--primary); text-decoration: none; }
.main-nav > .dropdown:last-of-type .dropdown-content,
.main-nav > .dropdown:nth-last-child(2) .dropdown-content { right: 0; left: auto; }
.mobile-footer-pages { display: none; }

.hero {
    display: grid;
    place-items: center;
    min-height: min(720px, calc(100vh - 88px));
    padding: var(--space-2xl) 24px;
    background: linear-gradient(90deg, rgba(17, 18, 31, .82), rgba(17, 18, 31, .25)), url('../images/back-church.jpg') center / cover;
    color: var(--surface);
    text-align: center;
}
.hero-content { max-width: 940px; animation: rise-in .8s .15s ease both; }
.hero-label, .eyebrow { color: var(--accent) !important; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero h1, .hero h2, .hero p { color: var(--surface); }
.hero h1, .hero h2 { max-width: 25ch; margin: 0 auto var(--space-md); }
.hero p { max-width: 58ch; margin: 0 auto; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero .btn, .hero .btn-small { display: flex; width: fit-content; margin: var(--space-lg) auto 0; }

.btn, .btn-small, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--surface);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn:hover, .btn-small:hover, button.btn:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: var(--surface);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.btn.secondary { background: transparent; color: var(--primary); }
.hero .btn.secondary { border-color: var(--surface); color: var(--surface); }
.hero .btn.secondary:hover { background: var(--surface); color: var(--primary); }
.page-hero {
    display: grid;
    min-height: 280px;
    align-items: end;
    padding: var(--space-xl) max(24px, calc((100vw - 1152px) / 2));
    background: linear-gradient(90deg, rgba(90, 15, 50, .94), rgba(26, 26, 46, .68)), url('../images/back-church.jpg') center / cover;
    color: var(--surface);
    text-align: center;
}
.page-hero > div { width: min(100%, 960px); margin: 0 auto; }
.page-hero h1, .page-hero p { color: var(--surface); }
.page-hero h1 { max-width: 100%; margin: 0 auto var(--space-xs); overflow-wrap: anywhere; }
.page-hero p { margin: 0 auto; }
.page-hero a { color: var(--surface); }
.page-hero .eyebrow { color: #f0d98d !important; }
.home-intro { max-width: 720px; margin: var(--space-xl) auto; }
.home-intro p { margin-right: auto; margin-left: auto; }
.ghost-link { display: inline-block; margin-top: var(--space-sm); font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); margin: var(--space-xl) 0; }
.card, .content-card, .panel {
    padding: 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.card:hover, .content-card:hover, .panel:hover { border-color: var(--border); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card h3, .content-card h3, .panel h3 { color: var(--primary); }
.card .btn-small { margin-top: var(--space-md); }
.people-page { text-align: center; }
.people-page > h2 {
    max-width: 720px;
    margin: 0 auto var(--space-sm);
}
.people-page > h2 + p {
    max-width: 900px;
    margin: 0 auto var(--space-xl);
}
.people-page .team-member {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    max-width: 960px;
    margin: 0 auto var(--space-xl);
    padding: 0;
}
.people-page .team-member img {
    flex: 0 0 200px;
    width: 200px;
    height: 260px;
    margin: 0;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.people-page .member-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}
.people-page .member-info h3 { margin-bottom: var(--space-xs); }
.people-page .member-info p { margin: 0 0 var(--space-sm); }
main > h1, main > h2, main > h3, main > p, main > ul, main > form, main > section { margin-bottom: var(--space-md); }
main ul { padding-left: 1.35rem; }
main li + li { margin-top: var(--space-xs); }
form { max-width: 680px; }
label { display: inline-block; margin-bottom: 4px; font-weight: 600; }
input, textarea, select {
    width: 100%;
    min-height: 48px;
    margin: 0 0 var(--space-sm);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}
textarea { min-height: 150px; resize: vertical; }

.about-section {
    position: relative;
    isolation: isolate;
    min-height: 520px;
    margin: var(--space-2xl) calc(50% - 50vw);
    padding: var(--space-2xl) max(24px, calc((100vw - 1152px) / 2));
    background: linear-gradient(90deg, rgba(26, 26, 46, .92), rgba(26, 26, 46, .6)), url('../images/back-church.jpg') center / cover;
    color: var(--surface);
}
.about-section h2, .about-section h3, .about-section p { color: var(--surface); }
.about-section > div { position: relative; z-index: 1; }
.about-section > div > div { max-width: 820px !important; margin: 0 auto !important; }

.site-footer, footer {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) max(24px, 5vw) var(--space-md);
    background: #1a1a2e;
    color: #f7f4ef;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.footer-links a { color: #f7f4ef; }
.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    text-decoration: none;
}
.footer-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px !important; margin: var(--space-lg) 0 !important; }
.footer-bottom { width: 100%; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,.15); text-align: center; font-size: .9rem; }
.footer-bottom p { width: 100%; max-width: none; margin: 0 auto; overflow-wrap: anywhere; text-align: center; }
.menu-toggle {
    display: none;
    min-width: 48px;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.navigation-progress { position: fixed; top: 0; left: 0; z-index: 2000; width: 35%; height: 3px; background: var(--accent); animation: progress .7s ease forwards; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes progress { from { width: 0; } to { width: 100%; opacity: 0; } }

@media (max-width: 980px) {
    body { font-size: 16px; }
    header { min-height: 76px; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        padding: var(--space-sm) 24px var(--space-md);
        border-top: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.active { display: flex; }
    .main-nav > a, .main-nav .dropbtn { width: 100%; text-align: left; border-bottom: 1px solid var(--border); border-radius: 0; }
    .dropdown-content { position: static; display: none; min-width: 0; padding: 0 0 0 var(--space-sm); border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
    .dropdown.active .dropdown-content, .dropdown:focus-within .dropdown-content { display: block; }
    .dropdown:hover .dropdown-content { display: none; }
    .dropdown.active:hover .dropdown-content { display: block; }
    .container, main.container { width: min(calc(100% - 32px), 1200px); padding: var(--space-xl) 0; }
    .hero { min-height: 620px; padding: var(--space-xl) 16px; }
    .page-hero { min-height: 220px; padding: var(--space-xl) 16px; }
    .about-section { margin: var(--space-xl) -16px; padding: var(--space-xl) 16px; }
    .people-page .team-member { gap: var(--space-md); }
    .kelly-wrapper { grid-template-columns: 1fr; width: min(calc(100% - 32px), 1200px); padding: var(--space-xl) 0; }
    .kelly-timeline { border-top: 1px solid var(--border); border-left: 0; }
}
@media (max-width: 600px) {
    .logo { max-width: 210px !important; }
    .hero h1, .hero h2 { max-width: 18ch; }
    .hero .btn, .hero .btn.secondary { width: min(100%, 300px); margin: 10px auto 0; }
    .cards { grid-template-columns: 1fr; }
    .card, .content-card, .panel { padding: 24px; }
    .about-section { min-height: 0; }
    .people-page .team-member { display: block; margin-bottom: var(--space-xl); }
    .people-page .team-member img { width: 180px; height: 230px; margin: 0 0 var(--space-md); }
    .new-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
    .new-gallery img { height: 150px; }
    .new-gallery img:last-child { height: 240px; }
    .kelly-content img,
    .kelly-image-right,
    .kelly-image-left { float: none; width: 180px !important; height: 230px !important; margin: 0 0 var(--space-md) !important; }
    .kelly-content img.kelly-image-normal { width: 100% !important; height: 260px !important; }
    .footer-links { flex-direction: column; align-items: center; gap: 12px; }
    .footer-links a { display: block; width: 100%; text-align: center; }
    .footer-social { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

.hero-block,
.callout-block,
.two-column-block {
    margin: 32px 0;
    padding: 32px;
    border-radius: var(--radius-md);
}

.hero-block {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.hero-block h2,
.callout-block h3,
.two-column-block h3 {
    margin-top: 0;
}

.hero-block a {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    font-weight: 700;
}

.callout-block {
    border-left: 5px solid var(--accent);
    background: #fff8e8;
}

.two-column-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 700px) {
    .hero-block,
    .callout-block,
    .two-column-block { padding: 24px; }
    .two-column-block { grid-template-columns: 1fr; gap: var(--space-md); }
}

/* =====================================================
   GLOBAL TEXT ALIGNMENT STANDARD
   Applies to every public page automatically.
   ===================================================== */

/* Headings are always centered inside the main content area */
main.container h1,
main.container h2,
main.container h3,
main.container h4,
main h1,
main h2,
main h3,
main h4 {
    text-align: center;
}

/* Paragraphs and lists are always left-aligned inside the column */
main.container p,
main.container ul,
main.container ol,
main.container li,
main p,
main ul,
main ol,
main li {
    text-align: left;
}

/* Paragraphs should never stretch wider than 68 characters,
   but the wrapper should still be centered */
main.container p,
main p {
    max-width: 68ch;
    margin-left: auto;
    margin-right: auto;
}

/* Blockquotes and captions stay left-aligned and can be wider */
main.container blockquote,
main blockquote,
main.container figcaption,
main figcaption {
    text-align: left;
    max-width: 68ch;
    margin-left: auto;
    margin-right: auto;
}

/* People page keeps its special structure */
.people-page .member-info p,
.people-page .member-info h3 {
    text-align: left;
}

/* Kelly page biography keeps left-aligned paragraphs */
.kelly-content p {
    text-align: left;
}

/* <details> blocks keep their paragraphs left-aligned */
details p,
details ul,
details ol,
details li {
    text-align: left;
}