@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --navy-deep: #070e1b;
    --navy-royal: #0d1b2a;
    --navy-card: rgba(13, 27, 42, 0.78);
    --gold-primary: #d4af37;
    --gold-light: #fef1c9;
    --gold-dark: #99731e;
    --gold-gradient: linear-gradient(135deg, #c59b27 0%, #faebb1 30%, #b8860b 60%, #faecc5 85%, #8a6508 100%);
    --gold-text: linear-gradient(135deg, #ffffff 0%, #f7e199 50%, #d4af37 100%);
    --pearl-white: #fbfbfa;
    --pearl-muted: rgba(251, 251, 250, 0.75);
    
    --font-heading: 'Cinzel', serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', sans-serif;
    
    --shadow-envelope: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(212, 175, 55, 0.15);
    --shadow-seal: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: var(--navy-deep);
    font-family: var(--font-sans);
    color: var(--pearl-white);
    overflow: hidden;
    overflow-x: hidden;
}

/* ==========================================================================
   1. MUSIC FLOATING ACTION BUTTON (FAB)
   ========================================================================== */
.music-toggle {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top, 0px));
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

.music-toggle.visible {
    opacity: 1;
    pointer-events: auto;
}

.music-toggle:active {
    transform: scale(0.9);
}

.music-wave {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 12px;
}

.music-wave span {
    width: 2px;
    height: 100%;
    background-color: #070e1b;
    animation: bounceWave 0.8s ease infinite alternate;
    transform-origin: bottom;
}

.music-wave span:nth-child(2) { animation-delay: 0.15s; }
.music-wave span:nth-child(3) { animation-delay: 0.35s; }
.music-wave span:nth-child(4) { animation-delay: 0.1s; }

.music-toggle.paused .music-wave span {
    animation: none;
    height: 2px;
}

@keyframes bounceWave {
    from { transform: scaleY(0.2); }
    to { transform: scaleY(1); }
}

/* ==========================================================================
   2. ROYAL ENVELOPE INTRO SCREEN (CATHEDRAL NAVY & GOLD)
   ========================================================================== */
.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, #13243d 0%, #050a14 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), filter 1.4s ease, visibility 1.4s ease;
}

.envelope-wrapper.hidden {
    opacity: 0;
    filter: blur(10px);
    pointer-events: none;
    visibility: hidden;
}

.envelope-scene {
    perspective: 1500px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.envelope {
    position: relative;
    width: 90vw;
    max-width: 480px;
    height: 60vw;
    max-height: 320px;
    background: #0f1f33;
    border-radius: 6px;
    box-shadow: var(--shadow-envelope);
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.flap {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    z-index: 2;
}

.flap.top {
    top: 0;
    left: 0;
    border-width: 160px 240px 0 240px;
    border-color: #172c47 transparent transparent transparent;
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, z-index 0.2s 0.6s;
    z-index: 4;
}

.flap.left {
    top: 0;
    left: 0;
    border-width: 160px 0 160px 240px;
    border-color: transparent transparent transparent #12243b;
    z-index: 3;
}

.flap.right {
    top: 0;
    right: 0;
    border-width: 160px 240px 160px 0;
    border-color: transparent #12243b transparent transparent;
    z-index: 3;
}

.flap.bottom {
    bottom: 0;
    left: 0;
    border-width: 0 240px 160px 240px;
    border-color: transparent transparent #0d1a2b transparent;
    z-index: 3;
}

/* Open Envelope Animation States */
.envelope.open .flap.top {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope.open .letter {
    transform: translateY(-90px);
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s;
}

.letter.zoom {
    transform: translateY(-90px) scale(3.2) !important;
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.8s ease 0.4s !important;
}

/* The Letter inside the envelope */
.letter {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: #fdfbf7;
    color: #070e1b;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.6s ease;
    padding: 15px;
}

.letter-border {
    width: 100%;
    height: 100%;
    border: 1.5px solid #d4af37;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    background: radial-gradient(circle, #ffffff 60%, #f4ede1 100%);
}

.letter-cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.letter-cross-icon {
    width: 20px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(184, 134, 11, 0.45));
}

.letter-text-1 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: #0d1b2a;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1px;
}

.letter-text-sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: #8c734b;
    text-transform: uppercase;
    margin: 1px 0;
}

.letter-text-2 {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: #b8860b;
    line-height: 1;
    margin: 2px 0 4px;
}

.letter-text-desc {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: #334155;
    font-weight: 600;
    margin-bottom: 2px;
}

.letter-text-venue {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 5px;
}

.letter-text-3 {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8c734b;
    font-weight: 700;
}

/* 3D Wax Seal with Cross */
.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--gold-gradient);
    box-shadow: var(--shadow-seal);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.wax-seal::after {
    content: '';
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.45);
}

.wax-seal svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.wax-seal.pulse {
    animation: sealGlow 2.5s infinite;
}

@keyframes sealGlow {
    0%, 100% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(212, 175, 55, 0.6);
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 14px rgba(212, 175, 55, 0);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.intro-instruction {
    margin-top: 36px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-light);
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==========================================================================
   3. MAIN SLIDE-DECK & PARALLAX BACKGROUND
   ========================================================================== */
.main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
    width: 100%;
    height: 100%;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

.background-story {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.background-image-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.background-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.38;
    filter: saturate(95%) brightness(85%);
    transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(7, 14, 27, 0.55) 0%, rgba(7, 14, 27, 0.9) 100%);
    z-index: 2;
}

#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

/* Scroll snap panels container */
.scroll-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    z-index: 5;
    position: relative;
}

/* Full-Screen snap slide */
.slide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    overflow: hidden;
}

.slide-content {
    width: 100%;
    max-width: 480px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 0;
}

/* Staggered entrance animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
    transition: opacity 1.1s cubic-bezier(0.15, 0.85, 0.35, 1), 
                transform 1.1s cubic-bezier(0.15, 0.85, 0.35, 1), 
                filter 1.1s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.fade-in-up:nth-child(1) { transition-delay: 0.08s; }
.fade-in-up:nth-child(2) { transition-delay: 0.18s; }
.fade-in-up:nth-child(3) { transition-delay: 0.28s; }
.fade-in-up:nth-child(4) { transition-delay: 0.38s; }
.fade-in-up:nth-child(5) { transition-delay: 0.48s; }
.fade-in-up:nth-child(6) { transition-delay: 0.58s; }
.fade-in-up:nth-child(7) { transition-delay: 0.68s; }

.slide.active .fade-in-up {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Cross & Scripture Headers */
.holy-cross-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    line-height: 1;
}

.holy-cross-svg-icon {
    width: 26px;
    height: 35px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.75));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
}

.holy-cross-svg-icon.mini {
    width: 20px;
    height: 27px;
}

.holy-cross-icon:hover .holy-cross-svg-icon {
    transform: scale(1.14);
    filter: drop-shadow(0 0 14px rgba(254, 241, 201, 0.95));
}

.holy-invocation {
    font-family: var(--font-heading);
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-light);
    opacity: 0.9;
    margin-bottom: 10px;
}

.label-invitation {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--gold-light);
    margin-bottom: 6px;
}

/* Ornate Dividers */
.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 16px;
    width: 100%;
}

.gold-divider::before,
.gold-divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: var(--gold-gradient);
    opacity: 0.6;
}

.gold-divider.mini::before,
.gold-divider.mini::after {
    width: 35px;
}

.gold-divider .divider-cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 12px;
    line-height: 1;
}

.divider-cross-icon {
    width: 18px;
    height: 24px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.7));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
}

.gold-divider:hover .divider-cross-icon {
    transform: scale(1.18);
    filter: drop-shadow(0 0 10px rgba(254, 241, 201, 0.95));
}

/* Slide 1: Welcome & Couple Initial Hidden States */
#slide-welcome .gold-divider,
#slide-welcome .invitation-lead,
#slide-welcome .matrimony-title,
#slide-welcome .invitation-description,
#slide-welcome .bible-verse,
#slide-welcome .scroll-hint {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(4px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.1s ease;
}

#slide-welcome .invitation-lead {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 4px;
    color: var(--gold-primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

#slide-welcome .matrimony-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 5px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 12px;
}

#slide-welcome .groom-bride-names {
    font-family: var(--font-heading);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    margin: 8px 0 10px;
}

#slide-welcome .invitation-description {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(254, 241, 201, 0.92);
    max-width: 410px;
    padding: 0 16px;
    margin: 6px 0 6px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

#slide-welcome .groom-name, 
#slide-welcome .bride-name {
    font-size: 3.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--gold-light);
    text-shadow: 0 0 22px rgba(212, 175, 55, 0.65), 0 2px 12px rgba(0, 0, 0, 0.9);
    display: inline-block;
}

#slide-welcome .left-name-slide {
    opacity: 0;
    transform: translateX(-45px);
    filter: blur(4px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.1s ease;
}

#slide-welcome .right-name-slide {
    opacity: 0;
    transform: translateX(45px);
    filter: blur(4px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.1s ease;
}

#slide-welcome .ampersand {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--gold-light);
    line-height: 0.6;
    margin: 14px 0;
    font-weight: normal;
    opacity: 0;
    transform: scale(0.5);
    filter: blur(4px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.9s ease;
}

/* Slide 1 Staggered Transition Delays when Active */
#slide-welcome.active .gold-divider {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 0.12s;
}

#slide-welcome.active .invitation-lead {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 0.24s;
}

#slide-welcome.active .matrimony-title {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 0.36s;
}

#slide-welcome.active .left-name-slide {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
    transition-delay: 0.50s;
}

#slide-welcome.active .ampersand {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    transition-delay: 0.86s;
}

#slide-welcome.active .right-name-slide {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
    transition-delay: 1.0s;
}

#slide-welcome.active .invitation-description {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 1.18s;
}

#slide-welcome.active .bible-verse {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 1.36s;
}

#slide-welcome.active .scroll-hint {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    transition-delay: 1.55s;
}

.bible-verse {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--pearl-muted);
    max-width: 400px;
    padding: 0 16px;
    margin-top: 10px;
}

.bible-verse-ref {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-top: 6px;
    font-style: normal;
}

.scroll-hint {
    margin-top: 30px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-light);
    opacity: 0.75;
    animation: bounceDown 2s infinite;
}

.scroll-hint .arrow-down {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(6px); }
    60% { transform: translateY(3px); }
}

/* Slide 2: The Couple (Shajo & Jesna) */
.couple-portrait-wrapper {
    position: relative;
    margin: 8px 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.couple-portrait-frame {
    position: relative;
    width: 175px;
    height: 230px;
    border-radius: 90px 90px 14px 14px;
    padding: 3.5px;
    background: var(--gold-gradient);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.couple-portrait-frame:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 32px rgba(212, 175, 55, 0.6);
}

.couple-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 30%;
    border-radius: 86px 86px 10px 10px;
    display: block;
}

.scratch-canvas {
    position: absolute;
    top: 3.5px;
    left: 3.5px;
    width: calc(100% - 7px);
    height: calc(100% - 7px);
    border-radius: 86px 86px 10px 10px;
    z-index: 4;
    cursor: grab;
    touch-action: none;
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s ease;
}

.scratch-canvas:active {
    cursor: grabbing;
}

.scratch-canvas.revealed {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}



.scratch-sparkle-particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9999;
    animation: sparkleFly 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes sparkleFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.portrait-glow {
    position: absolute;
    inset: 0;
    border-radius: 90px 90px 14px 14px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 5;
}

.couple-names-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 2px;
}

.couple-names-title .couple-name {
    color: var(--gold-light);
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.5), 0 2px 8px rgba(0, 0, 0, 0.8);
    display: inline-block;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s,
                opacity 0.9s ease 0.25s;
}

.couple-names-title .groom-side {
    opacity: 0;
    transform: translateX(-25px);
}

.couple-names-title .bride-side {
    opacity: 0;
    transform: translateX(25px);
}

.couple-names-title .couple-amp {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--gold-primary);
    font-weight: normal;
    line-height: 1;
}

.slide.active .couple-names-title .groom-side,
.slide.active .couple-names-title .bride-side {
    opacity: 1;
    transform: translateX(0);
}

.couple-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--pearl-muted);
    max-width: 380px;
    margin-top: 8px;
    padding: 0 12px;
}

.couple-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 5px 16px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 20px;
    background: rgba(13, 27, 42, 0.75);
    backdrop-filter: blur(6px);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    font-weight: 600;
    color: var(--gold-light);
    text-transform: uppercase;
}

.badge-cross-icon {
    width: 12px;
    height: 16px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.6));
}

/* ==========================================================================
   CHARACTER BY CHARACTER REVEAL ANIMATIONS (LETTER SPLITTING)
   ========================================================================== */
.char-split {
    display: inline-block;
}

.char-split .char {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s ease;
    transition-delay: calc(var(--char-index) * 0.045s);
}

.slide.active .char-split .char {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
    filter: blur(0);
}

/* ==========================================================================
   SLIDE 3: PURE TYPOGRAPHY LINEAGE (NO BOXED DIVS)
   ========================================================================== */
.pure-lineage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin-top: 6px;
}

.lineage-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 2px 10px;
}

/* Role Label (Groom / Bride) - Unique Font: Cinzel Inscription */
.lineage-role {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gold-primary);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 2px;
}

/* Person Name (Shajo / Jesna) - Unique Font: Great Vibes Regal Script */
.lineage-person-name {
    font-family: var(--font-script);
    font-size: 2.85rem;
    line-height: 1.1;
    margin: 2px 0 4px;
    color: var(--gold-light);
    text-shadow: 0 0 22px rgba(212, 175, 55, 0.7), 0 2px 10px rgba(0, 0, 0, 0.9);
    font-weight: normal;
    display: inline-block;
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.lineage-groom-name {
    opacity: 0;
    transform: translateX(-35px) scale(0.9);
    transition-delay: 0.2s;
}

.lineage-bride-name {
    opacity: 0;
    transform: translateX(35px) scale(0.9);
    transition-delay: 0.2s;
}

.slide.active .lineage-groom-name,
.slide.active .lineage-bride-name {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Relation (Son of / Daughter of) - Unique Font: Cormorant Garamond Italic */
.lineage-relation {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--pearl-muted);
    margin: 2px 0 3px;
    letter-spacing: 0.5px;
}

/* Parents Full Names - Unique Font: Montserrat Elegant Semi-Bold */
.lineage-parents {
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 3px;
}

/* Address - Unique Font: Cormorant Garamond Serif */
.lineage-address {
    font-family: var(--font-serif);
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(251, 251, 250, 0.8);
    max-width: 380px;
    margin-top: 2px;
}

/* Sacred Cross Divider between Groom & Bride */
.lineage-divider-cross {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lineage-divider-cross .sacred-cross {
    font-size: 1.4rem;
    color: var(--gold-primary);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.75));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lineage-divider-cross .sacred-cross-icon {
    width: 24px;
    height: 32px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.85));
    animation: sacredCrossPulse 3.5s infinite ease-in-out;
}

@keyframes sacredCrossPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.75));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 14px rgba(254, 241, 201, 0.95));
    }
}

/* ==========================================================================
   UNIQUE DIRECTIONAL SLIDE & SCALE ANIMATIONS
   ========================================================================== */
.left-slide-unit {
    opacity: 0;
    transform: translateX(-35px);
    filter: blur(4px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1s ease;
}

.slide.active .left-slide-unit {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.right-slide-unit {
    opacity: 0;
    transform: translateX(35px);
    filter: blur(4px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1s ease;
}

.slide.active .right-slide-unit {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.scale-up-unit {
    opacity: 0;
    transform: scale(0.2);
    filter: blur(4px);
    transition: opacity 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.9s ease;
}

.slide.active .scale-up-unit {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Slide 4 & 5: Nuptials & Fellowship Lunch */
.event-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 2px 10px rgba(0, 0, 0, 0.85);
    margin-bottom: 12px;
}

.date-highlight-container {
    margin: 10px 0 16px;
}

.date-day-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 4px;
    color: #ffffff;
    font-weight: 600;
}

.date-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 4px 0;
}

.date-grid .line {
    width: 45px;
    height: 1px;
    background: var(--gold-gradient);
    opacity: 0.6;
}

.date-number {
    font-family: var(--font-serif);
    font-size: 3.4rem;
    font-weight: 600;
    line-height: 1;
    color: var(--gold-light);
    filter: drop-shadow(0 2px 10px rgba(212, 175, 55, 0.4));
}

.date-month-year {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    font-weight: 600;
}

.event-time {
    margin-top: 6px;
}

.label-sub {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-primary);
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.muhurtham-tag {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--gold-light);
    border-bottom: 1px solid rgba(212, 175, 55, 0.5);
    padding-bottom: 3px;
    display: inline-block;
}

.venue-block {
    margin-top: 14px;
    padding: 0 10px;
}

.venue-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
}

.venue-address {
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--pearl-muted);
    margin-top: 4px;
}

/* Countdown Timer */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    margin-bottom: 12px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    background: var(--navy-card);
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.countdown-val {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--gold-light);
}

.countdown-label {
    font-size: 0.52rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--pearl-muted);
    margin-top: 2px;
}

/* Map Action Button */
.map-container {
    margin-top: 14px;
    width: 100%;
    max-width: 320px;
}

.btn-map-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    border-radius: 25px;
    background: rgba(13, 27, 42, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold-light);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-map-nav:hover {
    background: var(--gold-gradient);
    color: #070e1b;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45);
}

.btn-map-nav svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Footer & Nextdot Agency Credit */
.footer-block {
    margin-top: 14px;
}

.footer-text {
    font-family: var(--font-script);
    font-size: 2.8rem;
    color: var(--gold-light);
    line-height: 0.95;
}

.footer-sub {
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    color: var(--pearl-muted);
    text-transform: uppercase;
    margin-top: 4px;
}


/* ==========================================================================
   MOBILE RESPONSIVENESS (REFINED PROPORTIONS & BREATHING ROOM)
   ========================================================================== */
@media (max-width: 600px) {
    /* Slide & Container Padding on X and Y Axis */
    .slide {
        padding: 24px 20px;
        box-sizing: border-box;
    }

    .slide-content {
        width: 100%;
        max-width: 360px;
        padding: 10px 8px;
        box-sizing: border-box;
    }

    /* Envelope Opening Screen */
    .envelope {
        width: 86vw;
        height: 58vw;
    }
    .flap.top {
        border-width: calc(29vw) calc(43vw) 0 calc(43vw);
    }
    .flap.left {
        border-width: calc(29vw) 0 calc(29vw) calc(43vw);
    }
    .flap.right {
        border-width: calc(29vw) calc(43vw) calc(29vw) 0;
    }
    .flap.bottom {
        border-width: 0 calc(43vw) calc(29vw) calc(43vw);
    }
    .wax-seal {
        width: 58px;
        height: 58px;
    }
    .wax-seal svg {
        width: 28px;
        height: 28px;
    }

    /* Icons & Dividers */
    .holy-cross-svg-icon {
        width: 22px;
        height: 30px;
    }
    .holy-cross-svg-icon.mini {
        width: 18px;
        height: 24px;
    }
    .divider-cross-icon {
        width: 15px;
        height: 20px;
    }
    .gold-divider {
        margin: 6px 0 10px;
    }
    .gold-divider.mini::before,
    .gold-divider.mini::after {
        width: 28px;
    }

    /* Slide 1: Welcome & Matrimony */
    #slide-welcome .holy-invocation {
        font-size: 0.52rem;
        letter-spacing: 2.2px;
        margin-bottom: 6px;
    }
    #slide-welcome .invitation-lead {
        font-size: 0.65rem;
        letter-spacing: 3px;
        margin-bottom: 2px;
    }
    #slide-welcome .matrimony-title {
        font-size: 1.05rem;
        letter-spacing: 4px;
        margin-bottom: 8px;
    }
    #slide-welcome .groom-bride-names {
        margin: 4px 0 8px;
    }
    #slide-welcome .groom-name,
    #slide-welcome .bride-name,
    .groom-name,
    .bride-name {
        font-size: 2.15rem;
        letter-spacing: 1.5px;
    }
    #slide-welcome .ampersand,
    .ampersand {
        font-size: 1.75rem;
        margin: 4px 0;
    }
    #slide-welcome .invitation-description,
    .invitation-description {
        font-size: 0.78rem;
        line-height: 1.5;
        max-width: 320px;
        padding: 0 10px;
        margin: 4px 0 6px;
    }
    #slide-welcome .bible-verse,
    .bible-verse {
        font-size: 0.74rem;
        line-height: 1.45;
        max-width: 310px;
        padding: 0 8px;
        margin-top: 8px;
    }
    .bible-verse-ref {
        font-size: 0.56rem;
        margin-top: 4px;
    }
    #slide-welcome .scroll-hint,
    .scroll-hint {
        font-size: 0.58rem;
        letter-spacing: 2px;
        margin-top: 14px;
    }
    .scroll-hint .arrow-down {
        font-size: 0.85rem;
    }

    /* Slide 2: The Couple (Shajo & Jesna) */
    .label-invitation {
        font-size: 0.62rem;
        letter-spacing: 3px;
        margin-bottom: 4px;
    }
    .couple-portrait-frame {
        width: 140px;
        height: 185px;
        border-radius: 75px 75px 12px 12px;
    }
    .couple-portrait-img {
        border-radius: 72px 72px 10px 10px;
    }
    .couple-names-title {
        font-size: 1.15rem;
        margin-top: 8px;
    }
    .couple-names-title .couple-amp {
        font-size: 1.6rem;
    }
    .couple-quote {
        font-size: 0.74rem;
        line-height: 1.45;
        max-width: 300px;
        margin-top: 6px;
        padding: 0 8px;
    }
    .couple-date-badge {
        padding: 4px 12px;
        font-size: 0.56rem;
        letter-spacing: 2px;
        margin-top: 8px;
    }
    .badge-cross-icon {
        width: 10px;
        height: 13px;
    }

    /* Slide 3: Parents & Lineage */
    .pure-lineage-container {
        max-width: 330px;
        margin-top: 2px;
    }
    .lineage-unit {
        padding: 1px 6px;
    }
    .lineage-role {
        font-size: 0.58rem;
        letter-spacing: 3.5px;
        margin-bottom: 1px;
    }
    .lineage-person-name {
        font-size: 1.85rem;
        line-height: 1.05;
        margin: 1px 0 2px;
    }
    .lineage-relation {
        font-size: 0.78rem;
        margin: 1px 0 2px;
    }
    .lineage-parents {
        font-size: 0.78rem;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }
    .lineage-address {
        font-size: 0.66rem;
        line-height: 1.4;
        max-width: 290px;
        margin-top: 1px;
    }
    .lineage-divider-cross {
        margin: 4px 0;
    }
    .lineage-divider-cross .sacred-cross-icon {
        width: 20px;
        height: 26px;
    }

    /* Slide 4 & 5: Nuptials & Lunch */
    .event-title {
        font-size: 1.35rem;
        letter-spacing: 2.5px;
        margin-bottom: 8px;
    }
    .date-highlight-container {
        margin: 6px 0 10px;
    }
    .date-day-name {
        font-size: 0.76rem;
        letter-spacing: 3.5px;
    }
    .date-grid {
        gap: 12px;
        margin: 2px 0;
    }
    .date-grid .line {
        width: 32px;
    }
    .date-number {
        font-size: 2.25rem;
    }
    .date-month-year {
        font-size: 0.72rem;
        letter-spacing: 3px;
    }
    .event-time {
        margin-top: 4px;
    }
    .label-sub {
        font-size: 0.54rem;
        letter-spacing: 2px;
        margin-bottom: 2px;
    }
    .muhurtham-tag {
        font-size: 1.05rem;
        padding-bottom: 2px;
    }
    .venue-block {
        margin-top: 8px;
        padding: 0 6px;
    }
    .venue-name {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }
    .venue-address {
        font-size: 0.66rem;
        line-height: 1.4;
        margin-top: 3px;
        max-width: 290px;
    }
    .countdown-container {
        gap: 8px;
        margin-top: 10px;
        margin-bottom: 8px;
    }
    .countdown-item {
        min-width: 44px;
        padding: 4px 6px;
    }
    .countdown-val {
        font-size: 1.15rem;
    }
    .countdown-label {
        font-size: 0.45rem;
        letter-spacing: 1px;
    }
    .map-container {
        margin-top: 10px;
        max-width: 280px;
    }
    .btn-map-nav {
        padding: 7px 14px;
        font-size: 0.65rem;
        letter-spacing: 1.2px;
    }
    .btn-map-nav svg {
        width: 12px;
        height: 12px;
    }
    .footer-block {
        margin-top: 8px;
    }
    .footer-text {
        font-size: 1.85rem;
        line-height: 0.9;
    }
    .footer-sub {
        font-size: 0.55rem;
        letter-spacing: 2px;
        margin-top: 3px;
    }
}

/* Very Narrow Devices (e.g. Galaxy Fold, iPhone SE 1st gen) */
@media (max-width: 380px) {
    .slide {
        padding: 18px 14px;
    }
    .slide-content {
        max-width: 310px;
        padding: 8px 4px;
    }
    #slide-welcome .groom-name,
    #slide-welcome .bride-name,
    .groom-name,
    .bride-name {
        font-size: 1.95rem;
    }
    .lineage-person-name {
        font-size: 1.7rem;
    }
    .couple-portrait-frame {
        width: 126px;
        height: 168px;
    }
    .date-number {
        font-size: 2rem;
    }
}

/* Short Mobile Screens (Landscape or Screen with Heavy Browser Bars) */
@media (max-height: 700px) {
    .slide {
        padding: 14px 16px;
    }
    .slide-content {
        transform: scale(0.92);
        transform-origin: center center;
    }
    .scroll-hint {
        margin-top: 8px;
    }
    .couple-portrait-frame {
        width: 130px;
        height: 170px;
    }
}

@media (max-height: 600px) {
    .slide-content {
        transform: scale(0.84);
    }
}
