:root {
    --maroon: #641E2B;
    --burgundy: #7B2638;
    --gold: #C9A45C;
    --gold-soft: rgba(201, 164, 92, 0.25);
    --cream: #F8F3E9;
    --white: #FFFFFF;
    --dark: #282326;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--dark);
    background-color: var(--cream);
    line-height: 1.65;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
    height: 100vh;
}

.font-serif, .fw-serif {
    font-family: var(--font-serif);
}

.text-gold {
    color: var(--gold) !important;
}

.text-maroon {
    color: var(--maroon) !important;
}

.text-dark-charcoal {
    color: var(--dark) !important;
}

.bg-maroon-subtle {
    background-color: rgba(100, 30, 43, 0.1) !important;
}

.border-gold {
    border: 1px solid var(--gold-soft) !important;
}

.border-light-gold {
    border-color: rgba(201, 164, 92, 0.22) !important;
}

/* Snow Canvas */
.snow-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1050;
}

/* Cover Overlay */
.cover-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    padding: 1.25rem;
    background: radial-gradient(circle at top, var(--burgundy) 0%, var(--maroon) 58%, #2F0B13 100%);
    color: var(--white);
    overflow-y: auto;
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.85s;
}

.cover-nativity-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 70% center;
    opacity: 0.24;
    pointer-events: none;
}

.cover-overlay.is-opened {
    opacity: 0;
    transform: translateY(-48px) scale(1.02);
    visibility: hidden;
    pointer-events: none;
}

.cover-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 18% 22%, rgba(201, 164, 92, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 78% 16%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 84% 72%, rgba(201, 164, 92, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 25% 80%, rgba(255, 255, 255, 0.4), transparent);
    animation: twinkle 5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes twinkle {
    0% { opacity: 0.45; }
    100% { opacity: 0.95; }
}

.cover-card {
    max-width: 520px;
    width: 100%;
    padding: 2.5rem 1.75rem;
    border-radius: 1.5rem;
    background: rgba(40, 35, 38, 0.24);
    border: 1px solid rgba(201, 164, 92, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.cover-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border-color: var(--gold);
    opacity: 0.65;
}

.cover-corner-tl {
    top: 14px;
    left: 14px;
    border-top: 1.5px solid var(--gold);
    border-left: 1.5px solid var(--gold);
}

.cover-corner-br {
    bottom: 14px;
    right: 14px;
    border-bottom: 1.5px solid var(--gold);
    border-right: 1.5px solid var(--gold);
}

.emblem-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cover-church {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    color: var(--cream);
    opacity: 0.9;
}

.cover-title {
    font-family: var(--font-serif);
    font-size: clamp(2.1rem, 6vw, 3.2rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
}

.cover-year {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    font-weight: 600;
}

.cover-date {
    color: rgba(248, 243, 233, 0.85);
    letter-spacing: 0.04em;
}

.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 180px;
    color: var(--gold);
    font-size: 0.85rem;
}

.gold-divider::before,
.gold-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.recipient-box {
    max-width: 390px;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(248, 243, 233, 0.08);
    border: 1px solid rgba(201, 164, 92, 0.35);
}

.recipient-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(248, 243, 233, 0.8);
}

.recipient-name {
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 600;
    color: var(--white);
}

.badge-category {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(201, 164, 92, 0.2);
    color: var(--gold);
    border: 1px solid rgba(201, 164, 92, 0.35);
}

.cover-hint {
    font-size: 0.76rem;
    color: rgba(248, 243, 233, 0.7);
}

/* Buttons */
.btn-gold-pill {
    background: linear-gradient(135deg, #D5B36E 0%, var(--gold) 100%);
    color: var(--dark);
    font-weight: 600;
    border: none;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(201, 164, 92, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-gold-pill:hover {
    background: linear-gradient(135deg, #DFBF7D 0%, #CFA95E 100%);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(201, 164, 92, 0.45);
}

.btn-maroon {
    background-color: var(--maroon);
    color: var(--white);
    border: none;
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn-maroon:hover {
    background-color: var(--burgundy);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-maroon-outline {
    color: var(--maroon);
    border: 1.5px solid var(--maroon);
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-maroon-outline:hover {
    background-color: var(--maroon);
    color: var(--white);
}

/* Main Navigation */
.inv-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 164, 92, 0.2);
    z-index: 1020;
}

.inv-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--maroon);
}

.brand-star {
    color: var(--gold);
}

.inv-nav-links a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.inv-nav-links a:hover {
    color: var(--maroon);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    min-height: 100svh;
    background-color: #2C0911;
    overflow: hidden;
    padding: 2.5rem 0 3.25rem;
}

.hero-nativity-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 68% center;
    opacity: 0.16;
    transform: scale(1.02);
    pointer-events: none;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(44, 9, 17, 0.72) 0%, rgba(100, 30, 43, 0.48) 48%, rgba(35, 7, 14, 0.9) 100%),
        radial-gradient(ellipse at 50% 45%, rgba(44, 9, 17, 0.65) 0%, rgba(44, 9, 17, 0.25) 60%, rgba(28, 5, 10, 0.75) 100%);
    pointer-events: none;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 4rem 0 4.5rem;
    }

    .hero-nativity-bg {
        opacity: 0.56;
        background-position: 72% center;
    }
}

.hero-nativity-mobile-frame {
    position: relative;
    max-width: 310px;
    border-radius: 1.15rem;
    overflow: hidden;
    border: 1px solid rgba(201, 164, 92, 0.42);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.hero-nativity-mobile-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 68% center;
    display: block;
}

.hero-nativity-mobile-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44, 9, 17, 0.08) 45%, rgba(44, 9, 17, 0.68) 100%);
    pointer-events: none;
}

.hero-inner {
    max-width: 680px;
}

.hero-kicker {
    font-size: 0.82rem;
    letter-spacing: 0.34em;
    color: var(--gold);
    font-weight: 600;
}

.hero-heading {
    font-family: var(--font-serif);
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-theme {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.08rem, 2.3vw, 1.38rem);
    color: var(--cream);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero-verse-ref {
    font-size: 0.84rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(201, 164, 92, 0.94);
    font-weight: 600;
}

.hero-event-meta {
    max-width: 500px;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(201, 164, 92, 0.35);
    border-bottom: 1px solid rgba(201, 164, 92, 0.35);
    background: rgba(34, 7, 13, 0.34);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
}

.hero-datetime {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.03em;
}

.hero-church-place {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.hero-guest-pill {
    padding: 0.52rem 1.25rem;
    border-radius: 999px;
    background: rgba(34, 7, 13, 0.45);
    border: 1px solid rgba(201, 164, 92, 0.48);
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

/* Countdown */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(64px, 110px));
    justify-content: center;
    gap: 0.75rem;
}

.countdown-item {
    background: rgba(40, 35, 38, 0.35);
    border: 1px solid rgba(201, 164, 92, 0.35);
    border-radius: 1rem;
    padding: 0.85rem 0.5rem;
}

.countdown-value {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 4vw, 2.35rem);
    font-weight: 700;
    color: var(--gold);
    line-height: 1.05;
}

.countdown-label {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cream);
    opacity: 0.85;
    margin-top: 0.25rem;
}

.countdown-done {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.06em;
}

/* Sections & Cards */
.section-cream {
    background-color: var(--cream);
}

.section-white {
    background-color: var(--white);
}

.section-maroon {
    background: linear-gradient(160deg, var(--maroon) 0%, var(--burgundy) 100%);
}

.section-eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--burgundy);
    font-weight: 700;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--maroon);
}

.section-subtitle {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--maroon);
}

.elegant-card {
    background-color: var(--white);
    border-radius: 1.25rem;
    border: 1px solid rgba(201, 164, 92, 0.24);
    box-shadow: 0 10px 30px rgba(40, 35, 38, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.elegant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(100, 30, 43, 0.09);
}

.ornament-icon,
.detail-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-inline: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 164, 92, 0.14);
    color: var(--maroon);
    font-size: 1.45rem;
}

.bible-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    color: var(--dark);
    line-height: 1.55;
}

.bible-ref {
    font-style: normal;
    font-weight: 600;
    color: var(--maroon);
    font-size: 0.95rem;
}

.welcome-text {
    color: #4B4347;
    max-width: 650px;
    margin-inline: auto;
}

.detail-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--maroon);
}

.detail-primary {
    font-weight: 600;
    color: var(--dark);
}

.detail-secondary {
    font-size: 0.9rem;
    color: #5C5458;
}

/* Gallery Masonry / Grid */
.gallery-masonry {
    columns: 1;
    column-gap: 1.25rem;
}

@media (min-width: 576px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (min-width: 992px) {
    .gallery-masonry {
        columns: 3;
    }
}

.gallery-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.25rem;
    border-radius: 1.1rem;
    overflow: hidden;
    cursor: pointer;
    background: var(--white);
    border: 1px solid rgba(201, 164, 92, 0.25);
    box-shadow: 0 8px 24px rgba(40, 35, 38, 0.08);
    break-inside: avoid;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.45s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem 1.15rem;
    background: linear-gradient(to top, rgba(40, 35, 38, 0.88), rgba(40, 35, 38, 0));
    color: var(--white);
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
}

.gallery-caption {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Lightbox */
.lightbox-img {
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(201, 164, 92, 0.5);
    background: rgba(40, 35, 38, 0.7);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.lightbox-nav:hover {
    background: var(--maroon);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* RSVP Card */
.rsvp-card {
    background-color: var(--white);
    color: var(--dark);
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(201, 164, 92, 0.35);
}

.rsvp-status-banner {
    background-color: #FCF9F4;
    border: 1px solid rgba(201, 164, 92, 0.45);
    border-left: 4px solid var(--gold);
}

.btn-rsvp-option {
    border: 1.5px solid #E5DDD0;
    border-radius: 0.95rem;
    color: var(--dark);
    background: #FCF9F4;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: all 0.2s ease;
}

.btn-rsvp-option:hover {
    border-color: rgba(100, 30, 43, 0.45);
    background: #F8F3E9;
    color: var(--maroon);
}

.rsvp-opt-icon {
    font-size: 1.35rem;
    line-height: 1;
}

@media (min-width: 576px) {
    .btn-rsvp-option {
        flex-direction: column;
        gap: 0.35rem;
    }
}

.btn-check:checked + .btn-rsvp-option {
    border-color: var(--maroon);
    background-color: rgba(100, 30, 43, 0.08);
    color: var(--maroon);
    box-shadow: 0 4px 14px rgba(100, 30, 43, 0.12);
}

.rsvp-card .form-control:focus,
.rsvp-card .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(201, 164, 92, 0.22);
}

/* Wishes */
.wishes-list {
    max-height: 540px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.wish-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--maroon), var(--burgundy));
    color: var(--gold);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wish-author {
    font-size: 1rem;
    font-weight: 700;
    color: var(--maroon);
}

.wish-text {
    font-size: 0.93rem;
    color: #463F43;
}

/* Footer */
.inv-footer {
    background-color: var(--dark);
    border-top: 2px solid var(--gold);
}

/* Floating Music Widget */
.music-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.9rem 0.5rem 0.55rem;
    border-radius: 999px;
    background: rgba(40, 35, 38, 0.9);
    border: 1px solid rgba(201, 164, 92, 0.55);
    color: var(--white);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
}

.music-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.music-play-btn:hover {
    transform: scale(1.06);
}

.music-play-btn.is-playing {
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(201, 164, 92, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(201, 164, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 164, 92, 0); }
}

.music-title-text {
    font-size: 0.78rem;
    font-weight: 500;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

#musicVolumeSlider {
    width: 68px;
    accent-color: var(--gold);
    cursor: pointer;
}

/* Scroll Reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
