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

:root {
    --color-cream-light: #FBF9F6;
    --color-cream-dark: #F3EFE9;
    --color-espresso: #241416;
    --color-espresso-muted: rgba(36, 20, 22, 0.7);
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
    --gold-text: linear-gradient(135deg, #ECC870 0%, #F9E7B9 50%, #D4AF37 100%);
    
    --font-heading: 'Cinzel Decorative', serif;
    --font-serif: 'Playfair Display', serif;
    --font-script: 'Alex Brush', cursive;
    --font-sans: 'Montserrat', sans-serif;
    
    --shadow-envelope: 0 30px 60px rgba(0, 0, 0, 0.45);
    --shadow-seal: 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

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


body, html {
    width: 100%;
    height: 100%;
    height: 100dvh;
    background-color: #170A0C; /* Dark background matching the envelope scene */
    font-family: var(--font-sans);
    color: var(--color-espresso);
    overflow: hidden;
    overflow-x: hidden;
    transition: background-color 1s ease;
}

body.invitation-open, html.invitation-open {
    background-color: var(--color-cream-light);
}

/* ==========================================================================
   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; /* Stacks above all layers, including envelope wrapper */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(179, 135, 40, 0.35);
    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: var(--color-espresso);
    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. ENVELOPE INTRO SCREEN (FULLSCREEN MOCKUP)
   ========================================================================== */
.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, #351C1F 0%, #170A0C 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    visibility: visible;
    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: #472629;
    border-radius: 4px;
    box-shadow: var(--shadow-envelope);
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.1) 100%);
    border-radius: 4px;
    pointer-events: none;
}

/* Flaps */
.flap {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    z-index: 3;
}

/* Top flap: folds down/up */
.flap.top {
    top: 0;
    left: 0;
    width: 100%;
    border-width: calc(30vw) calc(45vw) 0 calc(45vw);
    border-color: #552E32 transparent transparent transparent;
    transform-origin: top center;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s, z-index 0.1s 0.8s;
    z-index: 5;
}

@media (min-width: 480px) {
    .flap.top {
        border-width: 160px 240px 0 240px;
    }
}

.flap.left {
    top: 0;
    left: 0;
    height: 100%;
    border-width: calc(30vw) 0 calc(30vw) calc(45vw);
    border-color: transparent transparent transparent #3c1e21;
}

@media (min-width: 480px) {
    .flap.left {
        border-width: 160px 0 160px 240px;
    }
}

.flap.right {
    top: 0;
    right: 0;
    height: 100%;
    border-width: calc(30vw) calc(45vw) calc(30vw) 0;
    border-color: transparent #3c1e21 transparent transparent;
}

@media (min-width: 480px) {
    .flap.right {
        border-width: 160px 240px 160px 0;
    }
}

.flap.bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    border-width: 0 calc(45vw) calc(30vw) calc(45vw);
    border-color: transparent transparent #412023 transparent;
    z-index: 4;
}

@media (min-width: 480px) {
    .flap.bottom {
        border-width: 0 240px 160px 240px;
    }
}

/* Red Wax Seal */
.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: radial-gradient(circle at 35% 35%, #e32b31 0%, #a30e13 70%, #610407 100%);
    border-radius: 50%;
    box-shadow: var(--shadow-seal);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wax-seal::after {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border: 1.5px dashed rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.wax-seal svg {
    width: 38px;
    height: 38px;
    fill: rgba(255, 255, 255, 0.75);
    filter: drop-shadow(1px 2px 1.5px rgba(0,0,0,0.5));
}

.wax-seal.pulse {
    animation: sealPulse 2.2s infinite;
}

@keyframes sealPulse {
    0% { transform: translate(-50%, -50%) scale(1); box-shadow: var(--shadow-seal); }
    50% { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 12px 25px rgba(227, 43, 49, 0.45); }
    100% { transform: translate(-50%, -50%) scale(1); box-shadow: var(--shadow-seal); }
}

/* Inner Letter Card */
.letter {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background: #FDF9F0;
    border-radius: 3px;
    z-index: 2;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.7s, opacity 0.9s ease;
    border: 1.5px solid #BF953F;
}

.letter-border {
    width: 100%;
    height: 100%;
    border: 1.5px solid #BF953F;
    outline: 2px solid #FDF9F0; /* creates gap */
    outline-offset: -5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
}

.letter-border::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid #AA771C;
    opacity: 0.22;
}

.ornament-top, .ornament-bottom {
    font-size: 0.75rem;
    color: #AA771C;
    opacity: 0.8;
    margin: 4px 0;
}

.letter-text-1 {
    font-family: var(--font-heading);
    color: #5C121A;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
}

.letter-text-2 {
    font-family: var(--font-script);
    color: #9C2535;
    font-size: 2.2rem;
    margin: 8px 0;
    text-align: center;
    line-height: 1;
}

.letter-text-3 {
    font-family: var(--font-sans);
    color: #5C121A;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

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

.envelope.open .letter {
    transform: translateY(-48%) scale(0.96);
    z-index: 2;
}

.envelope.open .wax-seal {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    pointer-events: none;
}

/* Zooming inside-out transition */
.letter.zoom {
    transform: translateY(-48%) scale(3.5) !important;
    opacity: 0;
    filter: blur(8px);
    transition: transform 1.3s cubic-bezier(0.5, 0, 0.1, 1), opacity 1s ease 0.3s, filter 1.3s ease;
}

.intro-instruction {
    margin-top: 35px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-cream-light);
    opacity: 0.75;
    animation: pulseText 2.5s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* ==========================================================================
   3. SCROLL-SNAP CONTENT LAYER
   ========================================================================== */
.main-content {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 10;
    opacity: 0;
    transform: scale(1.04);
    display: none;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--color-cream-light);
    overflow: hidden;
}

.main-content.visible {
    opacity: 1;
    transform: scale(1);
    display: block;
}

/* Fixed background graphic layer */
.background-story {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

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

.background-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.42;
    filter: sepia(10%) saturate(105%) contrast(100%);
    transition: transform 3.5s ease-out, filter 1s ease, opacity 1s ease;
}

.main-content.visible .background-image-container img {
    transform: scale(1.03);
}

/* Warm gradient vignette */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(251, 249, 246, 0.15) 0%, var(--color-cream-light) 95%),
                linear-gradient(to bottom, var(--color-cream-light) 0%, transparent 15%, transparent 85%, var(--color-cream-light) 100%);
    z-index: 2;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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;
}

/* Dynamic floating text wrapper */
.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.1s; }
.fade-in-up:nth-child(2) { transition-delay: 0.22s; }
.fade-in-up:nth-child(3) { transition-delay: 0.34s; }
.fade-in-up:nth-child(4) { transition-delay: 0.46s; }
.fade-in-up:nth-child(5) { transition-delay: 0.58s; }
.fade-in-up:nth-child(6) { transition-delay: 0.7s; }

/* Trigger active transitions inside visible slide */
.slide.active .fade-in-up {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ==========================================================================
   4. DETAILED TYPOGRAPHY & CHARACTER SPLIT REVEALS
   ========================================================================== */
.label-invitation {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--color-espresso-muted);
    margin-bottom: 8px;
}

.gold-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto;
    width: 50%;
}

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

.gold-divider .diamond {
    font-size: 0.6rem;
    color: #b38728;
    margin: 0 10px;
}

.gold-divider.mini {
    width: 25%;
    margin: 14px auto;
}

.title-invited {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-espresso);
    margin-bottom: 25px;
}

.groom-bride-names {
    width: 100%;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cursive Names Style */
.groom-name, .bride-name {
    font-family: var(--font-script);
    font-size: 4rem;
    font-weight: 400;
    color: var(--color-espresso);
    line-height: 1.05;
    display: block;
    width: 100%;
    white-space: nowrap;
}

.ampersand {
    font-family: var(--font-script);
    font-size: 3.2rem;
    color: #b38728;
    display: block;
    line-height: 0.4;
    margin: 18px 0;
    opacity: 0;
    transform: scale(0.2) rotate(-45deg);
    transition: opacity 1s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition-delay: 0.6s;
}

.slide.active .ampersand {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.desc-text {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-espresso-muted);
    font-style: italic;
    margin-top: 15px;
}

.scroll-hint {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-espresso-muted);
    margin-top: 45px;
    animation: bounceDown 1.8s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ==========================================================================
   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.04s);
}

/* Standard Pop Reveal */
.char-split:not(.groom-name):not(.bride-name):not(.left-slide):not(.right-slide) .char {
    transform: translateY(12px) scale(0.9);
}

.slide.active .char-split:not(.groom-name):not(.bride-name):not(.left-slide):not(.right-slide) .char {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Left character slide */
.groom-name.char-split .char,
.left-slide.char-split .char {
    transform: translateX(-35px) scale(0.85);
}

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

/* Right character slide */
.bride-name.char-split .char,
.right-slide.char-split .char {
    transform: translateX(35px) scale(0.85);
}

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

/* Block-level slide reveals (Preserves centered text flow alignments) */
.left-slide-block {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 1.2s cubic-bezier(0.15, 0.85, 0.35, 1),
                transform 1.2s cubic-bezier(0.15, 0.85, 0.35, 1);
    transition-delay: 0.1s;
}

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

.right-slide-block {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1.2s cubic-bezier(0.15, 0.85, 0.35, 1),
                transform 1.2s cubic-bezier(0.15, 0.85, 0.35, 1);
    transition-delay: 0.1s;
}

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

/* Center Pop Animation (Date numbers, ornaments) */
.scale-up {
    opacity: 0;
    transform: scale(0.2);
    transition: opacity 1s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition-delay: 0.5s;
}

.slide.active .scale-up {
    opacity: 1;
    transform: scale(1);
}

/* Horizontal line animations inside date grids */
.line.left-slide {
    opacity: 0;
    transform: translateX(-30px);
    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);
    transition-delay: 0.25s;
}

.slide.active .line.left-slide {
    opacity: 0.5;
    transform: translateX(0);
}

.line.right-slide {
    opacity: 0;
    transform: translateX(30px);
    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);
    transition-delay: 0.25s;
}

.slide.active .line.right-slide {
    opacity: 0.5;
    transform: translateX(0);
}

/* ==========================================================================
   LINEAGE DETAILS & VENUES
   ========================================================================== */
.lineage-section {
    width: 100%;
    margin: 15px 0;
}

.parent-block {
    margin: 10px 0;
}

.lineage-title {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #b38728;
    display: block;
    margin-bottom: 5px;
}

.parent-names {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-espresso);
}

.parent-sub {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--color-espresso-muted);
    margin: 2px 0;
}

.parent-bold {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-espresso);
}

.address-text {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--color-espresso-muted);
    line-height: 1.6;
    letter-spacing: 1px;
    margin-top: 15px;
}

/* Event Specifics */
.event-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-espresso);
}

.date-highlight-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 18px 0;
}

.date-day-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 5px;
    font-weight: 700;
    color: #b38728;
}

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

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

.date-number {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    font-weight: 500;
    line-height: 1;
    color: var(--color-espresso);
}

.date-month-year {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-espresso);
    font-weight: 500;
}

.label-sub {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-espresso-muted);
    display: block;
    margin-bottom: 6px;
}

.muhurtham-tag {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--color-espresso);
    border-bottom: 1.5px solid #e8c574;
    padding-bottom: 2px;
    display: inline-block;
}

.venue-block {
    margin-top: 18px;
}

.venue-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-espresso);
}

.venue-address {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--color-espresso-muted);
    margin-top: 4px;
}

/* ==========================================================================
   COUNTDOWN TIMER COMPONENT (MODERN SLICK)
   ========================================================================== */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.countdown-val {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: #b38728;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.countdown-container.loading .countdown-val {
    animation: countdownPulse 1.2s infinite ease-in-out;
    opacity: 0.5;
}

@keyframes countdownPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

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

/* ==========================================================================
   PREMIUM MINIMAL MAP PREVIEW
   ========================================================================== */
.map-container {
    width: 100%;
    max-width: 320px;
    margin-top: 20px;
}

.map-link-card {
    display: block;
    text-decoration: none;
    border: 1px solid rgba(179, 135, 40, 0.25);
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-cream-dark);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.map-link-card:hover, .map-link-card:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(179, 135, 40, 0.12);
    border-color: #b38728;
}

.map-image-wrapper {
    position: relative;
    width: 100%;
    height: 105px;
    overflow: hidden;
}

.map-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.5s ease;
}

.map-link-card:hover .map-image-wrapper img {
    transform: scale(1.04);
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(251,249,246,0.1), rgba(36,20,22,0.6));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
}

.map-btn-text {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-cream-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-btn-text svg {
    width: 12px;
    height: 12px;
    fill: var(--color-cream-light);
}

/* Footer elements */
.footer-block {
    margin-top: 15px;
}

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

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

/* ==========================================================================
   THE COUPLE SLIDE (#slide-couple)
   ========================================================================== */
#slide-couple .slide-content {
    max-width: 440px;
}

.couple-portrait-wrapper {
    position: relative;
    margin: 14px 0 10px;
    display: flex;
    justify-content: center;
}

.couple-portrait-frame {
    position: relative;
    width: 175px;
    height: 230px;
    border-radius: 88px 88px 14px 14px;
    padding: 3.5px;
    background: var(--gold-gradient);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(179, 135, 40, 0.35);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.couple-portrait-frame:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25), 0 0 30px rgba(179, 135, 40, 0.5);
}

.couple-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 84px 84px 10px 10px;
    display: block;
}

.portrait-glow {
    position: absolute;
    inset: 0;
    border-radius: 88px 88px 14px 14px;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.couple-names-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--color-espresso);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.couple-names-title .c-name {
    letter-spacing: 2px;
    font-weight: 700;
}

.couple-names-title .c-amp {
    font-family: var(--font-script);
    font-size: 1.9rem;
    color: #b38728;
    margin: 0 2px;
    font-weight: normal;
}

.couple-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--color-espresso-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(179, 135, 40, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    font-weight: 600;
    color: #8c671a;
    text-transform: uppercase;
}

.couple-date-badge .badge-dot {
    font-size: 0.5rem;
    color: #b38728;
}

/* ==========================================================================
   NEXTDOT SOLUTIONS CREATOR BADGE & BUTTON
   ========================================================================== */
.agency-credit-block {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(179, 135, 40, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 310px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.agency-credit-block:hover {
    transform: translateY(-2px);
    border-color: rgba(179, 135, 40, 0.6);
    box-shadow: 0 10px 25px rgba(179, 135, 40, 0.15);
}

.agency-credit-tag {
    font-family: var(--font-sans);
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--color-espresso-muted);
    font-weight: 500;
    margin: 0;
}

.agency-brand {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--color-espresso);
    display: flex;
    align-items: center;
    gap: 2px;
}

.agency-brand .gold-accent {
    color: #b38728;
}

.nextdot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 4px;
    padding: 6px 18px;
    border-radius: 20px;
    background: var(--gold-gradient);
    color: #241416;
    font-family: var(--font-sans);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(179, 135, 40, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.nextdot-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px rgba(179, 135, 40, 0.45);
    filter: brightness(1.06);
}

.nextdot-btn:active {
    transform: scale(0.96);
}

.nextdot-btn svg {
    transition: transform 0.25s ease;
}

.nextdot-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Adjustments for smaller mobile viewports */
@media (max-height: 620px) {
    .slide-content {
        transform: scale(0.92);
    }
}

/* ==========================================================================
   7. MOBILE AND TOUCH SCREEN OVERRIDES
   ========================================================================== */
@media (max-width: 480px) {
    /* Responsive Envelope size */
    .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::after {
        width: 48px;
        height: 48px;
    }
    
    .wax-seal svg {
        width: 28px;
        height: 28px;
    }
    
    /* Typography optimizations */
    .groom-name, .bride-name {
        font-size: 2.85rem; /* Prevents wrapping/colliding on narrow widths */
    }
    
    .ampersand {
        font-size: 2.5rem;
        margin: 10px 0;
        line-height: 0.3;
    }
    
    .title-invited {
        font-size: 1.05rem;
        letter-spacing: 3px;
        margin-bottom: 18px;
    }
    
    .desc-text {
        font-size: 0.85rem;
        line-height: 1.65;
        padding: 0 8px;
    }
    
    .parent-names {
        font-size: 1.15rem;
    }
    
    .parent-bold {
        font-size: 0.82rem;
    }
    
    .address-text {
        font-size: 0.68rem;
        line-height: 1.5;
        margin-top: 10px;
    }
    
    /* Date highlight container for mobile */
    .date-number {
        font-size: 2.5rem;
    }
    
    .date-day-name {
        font-size: 0.95rem;
        letter-spacing: 3.5px;
    }
    
    .date-month-year {
        font-size: 0.72rem;
        letter-spacing: 3px;
    }
    
    .muhurtham-tag {
        font-size: 0.95rem;
        padding-bottom: 1px;
    }
    
    .venue-name {
        font-size: 1.05rem;
    }
    
    .venue-address {
        font-size: 0.68rem;
    }
    
    .countdown-container {
        gap: 12px;
        margin-top: 15px;
    }

    .countdown-val {
        font-size: 1.35rem;
    }
    
    .countdown-label {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }
    
    /* Slide padding to prevent vertical overflows */
    .slide {
        padding: 0 16px;
    }
    
    .slide-content {
        padding: 10px 0;
        transform: scale(0.96);
    }
    
    /* Map element size on narrow viewports */
    .map-container {
        max-width: 280px;
        margin-top: 15px;
    }
    
    .map-image-wrapper {
        height: 90px;
    }
    
    .footer-text {
        font-size: 2.2rem;
    }

    /* Couple slide mobile tuning */
    .couple-portrait-frame {
        width: 155px;
        height: 205px;
        border-radius: 78px 78px 12px 12px;
    }
    
    .couple-portrait-img {
        border-radius: 74px 74px 10px 10px;
    }
    
    .couple-names-title {
        font-size: 1.25rem;
    }
    
    .couple-names-title .c-amp {
        font-size: 1.55rem;
    }
    
    .couple-quote {
        font-size: 0.76rem;
        line-height: 1.5;
        padding: 0 6px;
    }
    
    .couple-date-badge {
        font-size: 0.58rem;
        letter-spacing: 2px;
        padding: 4px 14px;
    }
    
    .agency-credit-block {
        margin-top: 12px;
        padding: 8px 14px;
    }
    
    .agency-brand {
        font-size: 0.85rem;
    }
    
    .nextdot-btn {
        padding: 5px 14px;
        font-size: 0.6rem;
    }
}

/* Adjustments for smaller mobile viewports (e.g. short screens like iPhone SE) */
@media (max-height: 660px) {
    .slide {
        padding: 0 12px;
    }
    .slide-content {
        transform: scale(0.88);
    }
    .groom-bride-names {
        margin: 5px 0;
    }
    .ampersand {
        margin: 8px 0;
    }
    .desc-text {
        margin-top: 8px;
    }
    .scroll-hint {
        margin-top: 25px;
    }

    .couple-portrait-frame {
        width: 135px;
        height: 175px;
    }
    
    .couple-portrait-wrapper {
        margin: 4px 0;
    }
    
    .couple-names-title {
        font-size: 1.1rem;
        margin-top: 4px;
    }
    
    .couple-quote {
        font-size: 0.7rem;
        margin-top: 4px;
    }
    
    .couple-date-badge {
        margin-top: 6px;
        padding: 3px 10px;
    }
    
    .agency-credit-block {
        margin-top: 8px;
        padding: 6px 10px;
    }
    
    .agency-credit-tag {
        font-size: 0.5rem;
    }
    
    .agency-brand {
        font-size: 0.78rem;
    }
    
    .nextdot-btn {
        padding: 4px 12px;
        font-size: 0.58rem;
    }
}

/* Shift the welcome slide content down slightly so it centers visually on the screen and doesn't overlap faces */
#slide-welcome .slide-content {
    padding-top: 8vh;
}

@media (max-width: 480px) {
    #slide-welcome .slide-content {
        padding-top: 10vh;
    }
}

