:root {
    --ivory: #fffdf8;
    --cream: #f8f1e5;
    --warm: #efe1c7;
    --gold: #b28a4a;
    --gold-soft: #d6bb89;
    --sage: #9cad8d;
    --text: #4e4a42;
    --heading: #6d5a3d;
    --white: #ffffff;
    --shadow: 0 14px 40px rgba(122, 96, 55, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--text);
    background: var(--ivory);
    font-family: "Montserrat", sans-serif;
    line-height: 1.8;
}

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

button, input, textarea { font: inherit; }

.hero {
    min-height: 92vh;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--cream);
}

.hero-image-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4vh 5vw;
}

.hero-image-wrap img {
    width: min(100%, 850px);
    height: 86vh;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(90%, 780px);
    text-align: center;
    background: rgba(255, 253, 248, .90);
    padding: 42px 45px;
    border: 1px solid rgba(178, 138, 74, .25);
    box-shadow: var(--shadow);
    border-radius: 8px;
}

.eyebrow, .small-label {
    color: var(--gold);
    letter-spacing: .22em;
    font-size: .75rem;
    font-weight: 600;
}

.hero-content h1 {
    margin: 8px 0 0;
    color: var(--heading);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: .95;
    font-weight: 600;
}

.years {
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    margin: 12px 0;
}

.hero-message {
    max-width: 600px;
    margin: 12px auto 28px;
    font-size: 1rem;
}

.ornament, .footer-ornament, .service-icon {
    color: var(--gold);
    font-size: 1.2rem;
}

.hero-button, .tribute-button, .submit-button {
    display: inline-block;
    border: 1px solid var(--gold);
    color: var(--heading);
    background: transparent;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: .25s ease;
}

.hero-button:hover, .tribute-button:hover, .submit-button:hover {
    background: var(--gold);
    color: white;
}

.section {
    width: min(1160px, 92%);
    margin: auto;
    padding: 100px 0;
}

.memory-section { max-width: 850px; text-align: center; }

.section-heading { text-align: center; margin-bottom: 45px; }

.section-heading h2 {
    margin: 5px 0 10px;
    color: var(--heading);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
}

.line {
    display: block;
    width: 58px;
    height: 2px;
    margin: 18px auto 0;
    background: var(--gold-soft);
}

.memory-copy p { margin: 0 0 20px; }

.gallery-section { max-width: 1250px; }

.carousel-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.carousel-window {
    width: 100%;
    overflow: hidden;
    padding: 10px 0 25px;
}

.carousel-track {
    display: flex;
    gap: 22px;
    will-change: transform;
    transition: transform .5s ease;
}

.gallery-card {
    flex: 0 0 clamp(250px, 31vw, 365px);
    margin: 0;
    background: white;
    padding: 10px;
    box-shadow: var(--shadow);
    border-radius: 7px;
}

.gallery-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
}

.gallery-card figcaption {
    padding: 11px 6px 4px;
    color: var(--heading);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    text-align: center;
}

.carousel-arrow {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border: 1px solid var(--gold-soft);
    background: var(--white);
    color: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    z-index: 3;
    box-shadow: 0 5px 18px rgba(122, 96, 55, .08);
}

.carousel-arrow:hover {
    background: var(--cream);
}

.tribute-section { max-width: 1250px; background: var(--cream); }

.tribute-section::before { content: ""; }

.section-intro { max-width: 650px; text-align: center; margin: -20px auto 35px; }

.tribute-card {
    flex: 0 0 min(390px, 78vw);
    min-height: 290px;
    background: var(--white);
    border: 1px solid rgba(178, 138, 74, .18);
    border-radius: 8px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.quote-mark {
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: 4rem;
    line-height: .6;
}

.tribute-card p { min-height: 125px; }

.tribute-author {
    color: var(--heading);
    font-weight: 600;
}

.tribute-church {
    color: var(--gold);
    font-size: .82rem;
    margin-top: 2px;
}

.tribute-button {
    display: block;
    margin: 25px auto 0;
}

.service-section { max-width: 1050px; }

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.service-card {
    background: var(--cream);
    padding: 42px;
    border: 1px solid rgba(178, 138, 74, .18);
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.service-card h3 {
    margin: 5px 0 25px;
    color: var(--heading);
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
}

.service-detail {
    display: flex;
    flex-direction: column;
    margin: 15px 0;
}

.service-detail strong {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
}

footer {
    padding: 65px 20px;
    text-align: center;
    background: var(--cream);
    color: var(--heading);
}

footer p {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.2rem;
    margin: 8px 0 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.open { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(244, 235, 216, .84);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 2;
    width: min(100%, 600px);
    max-height: 90vh;
    overflow: auto;
    background: var(--white);
    padding: 40px;
    border: 1px solid var(--gold-soft);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.modal-card h2 {
    color: var(--heading);
    font-family: "Cormorant Garamond", serif;
    font-size: 2.8rem;
    margin: 3px 0;
}

.modal-card label {
    display: block;
    color: var(--heading);
    font-size: .85rem;
    font-weight: 600;
    margin: 18px 0 6px;
}

.modal-card input, .modal-card textarea {
    width: 100%;
    border: 1px solid #dfd4c2;
    border-radius: 5px;
    padding: 12px 14px;
    color: var(--text);
    background: #fffdf9;
    outline: none;
}

.modal-card input:focus, .modal-card textarea:focus {
    border-color: var(--gold);
}

.modal-close, #lightboxClose {
    position: absolute;
    top: 14px;
    right: 18px;
    border: 0;
    background: transparent;
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
}

.submit-button {
    margin-top: 22px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    place-items: center;
    padding: 30px;
    background: rgba(255, 253, 248, .96);
}

.lightbox.open { display: grid; }

.lightbox img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    box-shadow: var(--shadow);
}

#lightboxClose {
    position: fixed;
    top: 20px;
    right: 25px;
}

@media (max-width: 800px) {
    .hero { min-height: auto; padding: 30px 0 55px; }
    .hero-image-wrap { position: relative; padding: 15px 15px 0; }
    .hero-image-wrap img { height: 58vh; width: 100%; }
    .hero-content { margin-top: -50px; padding: 32px 22px; }
    .section { padding: 75px 0; }
    .service-grid { grid-template-columns: 1fr; }
    .carousel-arrow { flex-basis: 40px; width: 40px; height: 40px; font-size: 1.7rem; }
    .gallery-card img { height: 270px; }
}

@media (max-width: 520px) {
    .hero-content h1 { font-size: 3.2rem; }
    .hero-content { width: 94%; }
    .section { width: 90%; }
    .modal-card { padding: 30px 22px; }
}

/* Short tribute previews and full tribute page */
.tribute-track { align-items: flex-start; }
.tribute-track .tribute-card { min-height: 290px; }
.tribute-card .tribute-preview { min-height: 125px; overflow-wrap: anywhere; }
.tribute-card .tribute-author, .tribute-card .tribute-church { overflow-wrap: anywhere; }
.tribute-read { color: var(--gold); font-weight: 600; text-underline-offset: 4px; white-space: nowrap; }
.tribute-read:hover { color: var(--heading); }
.tribute-read:focus-visible, .tribute-return:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.tribute-detail-page { background: var(--cream); }
.tribute-detail-shell { width: min(850px, 92%); margin: auto; padding: 65px 0; text-align: center; }
.tribute-detail-shell .section-heading { margin-bottom: 30px; }
.tribute-full-card { position: relative; isolation: isolate; overflow: hidden; padding: clamp(25px, 6vw, 65px); background: var(--ivory); border: 1px solid var(--gold-soft); border-radius: 12px; box-shadow: var(--shadow); text-align: left; }
.tribute-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .09; z-index: -1; pointer-events: none; }
.tribute-full-card h1 { margin: 18px 0 0; font-family: "Cormorant Garamond", serif; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; color: var(--heading); overflow-wrap: anywhere; }
.tribute-full-card .tribute-church { margin-bottom: 28px; }
.tribute-full-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2; }
.tribute-floral { display: block; width: min(320px, 100%); height: 70px; margin: 35px auto 0; color: var(--gold); }
.tribute-return { margin-top: 30px; }

/* Royal blue and luminous gold */
:root {
    --ivory: #f7faff; --cream: #eaf1ff; --warm: #dae6ff;
    --gold: #916519; --gold-soft: #d9b75c; --sage: #658dd0;
    --text: #263959; --heading: #112d68; --white: #fff;
    --shadow: 0 16px 45px rgba(12, 40, 99, .13);
}
body { background: radial-gradient(ellipse at top right, #e2edff, transparent 55%), var(--ivory); }
.hero { background: linear-gradient(140deg, #081b48, #204b98 60%, #0c265a); }
.hero-image-wrap img { border: 1px solid rgba(235, 205, 123, .5); box-shadow: 0 20px 65px #0005; }
.hero-content { background: rgba(247, 250, 255, .70); border: 1px solid rgba(237, 204, 122, .8); box-shadow: 0 15px 55px #061a4433, inset 0 1px 0 #fff9; }
.hero-content h1 { color: #0b2458; font-weight: 700; text-shadow: 0 1px 1px #fff8; }
.hero-content .eyebrow, .hero-content .years, .hero-content .ornament { color: #674812; font-weight: 600; }
.hero-content .hero-message { color: #172d50; font-weight: 600; }
.line { background: linear-gradient(90deg, #c79730, #fae8a7, #c79730); width: 80px; }
.hero-button, .tribute-button, .submit-button { color: #102755; font-weight: 600; border-color: #c5a34f; background: linear-gradient(115deg, #d3ad53, #fff1be 48%, #d4ad50); box-shadow: 0 5px 18px #14376c19, inset 0 1px 0 #fff9; }
.hero-button:hover, .tribute-button:hover, .submit-button:hover { color: white; background: linear-gradient(120deg, #102d68, #315ca7, #132c5d); }
.tribute-section { background: linear-gradient(135deg, #eef4ff, #dce8fc); padding-left: 24px; padding-right: 24px; border-radius: 18px; border: 1px solid #d4b97266; }
.tribute-card, .service-card, .modal-card, .tribute-full-card { background: linear-gradient(135deg, #fff, #f0f5ff); border-color: #d5b15e88; box-shadow: var(--shadow), inset 0 1px 0 #fff; }
.service-card { border-top: 3px solid #d5b15e; }
.quote-mark { color: #ac812b; }
.carousel-arrow { color: #153a7c; background: linear-gradient(135deg, #fff9dc, #ebd28d); }
footer { background: linear-gradient(125deg, #081b46, #174083, #0a2358); color: #f4df9b; border-top: 1px solid #cfab59; }
.footer-ornament { color: #edcf7a; }
.modal-backdrop { background: rgba(7, 24, 58, .72); }
.modal-card input, .modal-card textarea { background: #f7faff; border-color: #cbd8ed; }
.tribute-detail-page { background: radial-gradient(ellipse at top, #dbe8ff, #f7faff 70%); }
.tribute-read { color: #174887; }
:where(a, button):focus-visible { outline: 3px solid #d6aa42; outline-offset: 4px; }
section, header { scroll-margin-top: 75px; }
[hidden] { display: none !important; }
.menu-toggle { position: fixed; top: max(18px, env(safe-area-inset-top)); right: 18px; z-index: 80; border: 1px solid #dfbd64; border-radius: 999px; padding: 9px 16px; color: #fbe8af; background: linear-gradient(120deg, #0b265b, #224b8d); box-shadow: 0 4px 18px #061b4833; cursor: pointer; }
.nav-overlay { position: fixed; inset: 0; z-index: 300; background: #061b48a6; backdrop-filter: blur(3px); }
.site-navigation { position: fixed; inset: 0 0 0 auto; width: min(360px, 90vw); z-index: 310; padding: 85px 30px 35px; background: linear-gradient(150deg, #081b46, #1d4383); color: #f4e3ae; border-left: 1px solid #cfa84d; box-shadow: -12px 0 50px #0004; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; }
.site-navigation.open { transform: translateX(0); }
.site-navigation .small-label { color: #e4c876; }
.site-navigation h2 { font-family: "Cormorant Garamond", serif; font-size: 2.4rem; line-height: 1.1; margin: 15px 0 28px; }
.site-navigation nav { display: grid; gap: 6px; }
.site-navigation nav a { color: #f5f8ff; text-decoration: none; padding: 14px 10px; border-bottom: 1px solid #dbc07433; border-radius: 5px; }
.site-navigation nav a:hover { background: #ffffff12; color: #ffe9a6; }
.nav-close { position: absolute; top: 18px; right: 23px; background: transparent; border: 0; color: #f4df9b; font-size: 2rem; cursor: pointer; }
.nav-remembrance { margin-top: 40px; font-family: "Cormorant Garamond", serif; font-size: 1.4rem; }
.mobile-tribute-shortcut { display: none; }
@media (max-width: 600px) {
    .mobile-tribute-shortcut { display: inline-flex; gap: 10px; align-items: center; position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; z-index: 70; padding: 9px 15px; border-radius: 999px; background: linear-gradient(115deg, #133872, #244f99); color: #fff1c1; border: 1px solid #d9b75c; box-shadow: 0 5px 20px #061b4833; font-size: .8rem; font-weight: 600; text-decoration: none; }
    .tribute-section { width: calc(100% - 24px); padding: 55px 12px; }
    .tribute-carousel { display: block; padding-bottom: 48px; }
    .tribute-carousel .carousel-window { width: 100%; }
    .tribute-carousel .carousel-track { gap: 16px; }
    .tribute-carousel .tribute-card { flex: 0 0 100%; width: 100%; min-width: 0; min-height: 0; padding: 26px 22px; }
    .tribute-carousel .tribute-preview { min-height: 0; height: auto; max-height: none; overflow: visible; white-space: normal; line-height: 1.8; margin: 22px 0; }
    .tribute-carousel .carousel-arrow { position: absolute; bottom: 0; }
    .tribute-carousel .prev { left: calc(50% - 48px); }
    .tribute-carousel .next { right: calc(50% - 48px); }
    .menu-toggle { top: 12px; right: 12px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .carousel-track, .site-navigation { transition: none; }
    
    
    
/* Wider gallery cards; keep the top of every photo visible */
.gallery-card {
    flex: 0 0 clamp(320px, 38vw, 460px);
}

.gallery-card img {
    height: 360px;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 600px) {
    .gallery-section .carousel-shell {
        display: block;
        padding-bottom: 48px;
    }

    .gallery-section .gallery-card {
        flex: 0 0 100%;
        min-width: 0;
    }

    .gallery-section .gallery-card img {
        height: 340px;
        object-position: center top;
    }

    .gallery-section .carousel-arrow {
        position: absolute;
        bottom: 0;
    }

    .gallery-section .prev {
        left: calc(50% - 48px);
    }

    .gallery-section .next {
        right: calc(50% - 48px);
    }
}    


.gallery-section .gallery-card img {
    width: 100%;
    height: 360px;
    object-fit: contain;
    object-position: center top;
    background: #eaf1ff;
}

@media (max-width: 600px) {
    .gallery-section .gallery-card img {
        height: 340px;
    }
}
}











/* Let every photo display at its natural proportions */
#galleryTrack .gallery-card img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: top center !important;
}

#galleryTrack {
    align-items: flex-start;
}

#galleryTrack .gallery-card {
    height: auto !important;
    overflow: visible !important;
}
