:root {
    --bg-dark: #000;
    --text-cream: #FDFBF7;
    --text-white: #FFFFFF;
    --font-serif: 'Viaoda Libre', 'Playfair Display', serif;
    --font-script: 'Pinyon Script', cursive; /* Fallback for script */
}

@font-face {
    font-family: 'Parfumerie Script';
    src: url('parfumerie-script-text.otf') format('opentype');
    font-weight: normal;
}

@font-face {
    font-family: 'Viaoda Libre';
    src: url('ViaodaLibre-Regular.ttf') format('truetype');
    font-weight: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-cream);
    font-family: var(--font-serif);
    overflow: hidden !important;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Globally hide scrollbars */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none;
}

html, body {
    overflow: hidden !important;
}

.template-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('bg.webp') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden !important; /* Block both scrolls until opened */
    overflow-x: hidden !important;
}

/* Background Overlay for depth */
.template-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7));
    pointer-events: none;
}

/* Intro Screen Wrapper */
.intro-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1), transform 1s;
    z-index: 10;
}

/* Intro Animations */
@keyframes introFadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Hero Content */
.hero-content {
    position: relative;
    text-align: center;
    z-index: 10;
    margin-top: 5vh;
    margin-bottom: -10rem;
}

.mail-from {
    font-family: var(--font-serif);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    color: rgba(253, 251, 247, 0.9);
    opacity: 0;
    animation: introFadeUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s;
}

.names-script {
    font-family: 'Parfumerie Script', 'Marck Script', 'Pinyon Script', cursive;
    font-size: 5.2rem;
    letter-spacing: -0.01em; 
    line-height: 0.75;
    margin-bottom: 1rem;
    opacity: 0;
    animation: introFadeUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.4s;
}

/* Envelope Container */
.envelope-wrapper {
    position: relative;
    width: 85%;
    max-width: 400px;
    z-index: 20;
    cursor: pointer;
    perspective: 1500px;
    margin-top: 3rem;
    opacity: 0;
    animation: introFadeUp 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.6s;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.envelope-wrapper:active {
    transform: scale(0.98);
}

.envelope-img {
    width: 100%;
    display: block;
    mix-blend-mode: screen;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-initials {
    position: absolute;
    top: 36%;
    left: 48%;
    transform: translate(-50%, -50%);
    font-family: 'Parfumerie Script', 'Marck Script', 'Pinyon Script', cursive;
    font-size: 3.5rem;
    color: #1A2B1A; /* Dark green/ink color */
    opacity: 0.9;
    pointer-events: none; /* Let taps pass to envelope */
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.tap-hint {
    position: absolute;
    bottom: 20px; /* Moved inside the envelope wrapper for visibility */
    width: 100%;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* Open State Transitions */
.opened .intro-screen {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05); /* Gentle float away */
}

/* Main Content Wrapper */
.main-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0; /* Minimized to pull everything up */
    overflow-y: hidden;
    overflow-x: hidden !important;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: 0.3s; /* Wait for envelope to start fading */
    z-index: 20;

    /* Hide scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* The Card inside */
.invitation-card {
    position: relative;
    width: 100%;
    padding: 0 0.5rem;
    margin-top: -2rem; /* Pull higher to reduce top gap */
    text-align: center;
}

/* Staggered Content Animation (Canva Style) */
.invitation-card > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Lace Heart Frame */
.lace-frame {
    position: relative;
    width: 100%;
    max-width: 520px; /* Standardize width lower than 820px screen */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 2rem auto;
    overflow: visible !important;
}

.lace-heart-img {
    opacity: 0.85;
    mix-blend-mode: screen;
    width: 100%; /* No more scale overflow */
    display: block;
}

.lace-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 65%;
}


.opened .main-content {
    opacity: 1;
    pointer-events: auto;
    /* Delay the appearance of scrolling to prevent flicker */
    animation: delayedScroll 1.5s step-end forwards;
}

@keyframes delayedScroll {
    from { overflow-y: hidden; }
    to { overflow-y: auto; overflow-x: hidden; }
}

.opened .invitation-card > * {
    opacity: 1;
    transform: translateY(0);
}

.opened .invitation-card > *:nth-child(1) { transition-delay: 0.4s; }
.opened .invitation-card > *:nth-child(2) { transition-delay: 0.7s; }
.opened .invitation-card > *:nth-child(3) { transition-delay: 0.95s; }
.opened .invitation-card > *:nth-child(4) { transition-delay: 1.1s; }
.opened .invitation-card > *:nth-child(5) { transition-delay: 1.25s; }

.card-title {
    font-family: 'Parfumerie Script', 'Pinyon Script', cursive;
    font-size: 3.4rem;
    font-weight: 300;
    line-height: 0.75;
    margin-bottom: 1.5rem;
    /* Engraved / Letterpress effect */
    text-shadow: -1px -1px 2px rgba(0,0,0,0.4), 
                 1px 1px 1px rgba(255,255,255,0.2);
}

.card-names {
    display: none;
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.card-date {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
}

.card-follow {
    display: none;
    font-family: 'Parfumerie Script', 'Pinyon Script', cursive;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.card-location {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.card-share-hint {
    font-family: 'Parfumerie', 'Pinyon Script', cursive;
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.btn-share {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text-cream);
    background: transparent;
    color: var(--text-cream);
    font-family: var(--font-serif);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-share:hover {
    background: var(--text-cream);
    color: var(--bg-dark);
}

/* Section Reveal & Typography */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 6rem 1.5rem;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-script-title {
    font-family: 'Parfumerie Script', 'Marck Script', 'Pinyon Script', cursive;
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--text-cream);
    text-align: center;
    width: 100%;
}

.story-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem !important;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.3;
    max-width: 320px;
    margin: 0 auto;
    color: var(--text-cream);
    opacity: 0.9;
}

/* Word-by-word animation */
.gossamer-word {
    display: inline-block;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(10px);
    margin-right: 0.25em;
    transition: none;
}

.story-section.visible .gossamer-word {
    animation: gossamerReveal 2.5s cubic-bezier(0.2, 0, 0.4, 1) forwards;
}

@keyframes gossamerReveal {
    0% {
        opacity: 0;
        filter: blur(6px);
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.story-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
    width: 100%;
}

.interactive-frame-wrapper,
.venue-interactive-wrapper {
    position: relative;
    perspective: 1500px;
    width: 250px; /* Mobile default */
    max-width: 85%;
    height: auto;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    margin: 0 auto;
    display: block;
}

@media (min-width: 501px) {
    .interactive-frame-wrapper,
    .venue-interactive-wrapper {
        width: 420px; /* Larger for desktop */
    }
}

.venue-interactive-wrapper {
    margin: 0 auto 2rem auto;
}

.interactive-frame-wrapper:hover,
.venue-interactive-wrapper:hover {
    transform: translateY(-10px) scale(1.02);
}

.story-image,
.venue-image-container {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    overflow: hidden;
    background: transparent !important;
}

.story-image {
    border-radius: 50% / 65%; /* Clipping to oval shape */
}

.venue-image-container {
    border-radius: 12px; /* Soft corners for venue */
}

.story-image img,
.venue-image-container img {
    width: 100%;
    display: block;
    pointer-events: none;
    background: transparent !important;
}

/* 1. Shimmer Overlay */
.shimmer-overlay {
    position: absolute;
    top: 0;
    left: -200%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        120deg, 
        transparent 30%, 
        rgba(255,255,255,0.2) 50%, 
        transparent 70%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
}

.interactive-frame-wrapper:hover .shimmer-overlay,
.venue-interactive-wrapper:hover .shimmer-overlay,
.interactive-frame-wrapper:active .shimmer-overlay,
.venue-interactive-wrapper:active .shimmer-overlay {
    opacity: 1;
    animation: sweep 1.5s ease-in-out;
}

@keyframes sweep {
    0% { left: -200%; }
    100% { left: 200%; }
}

/* 2. Bloom Effect */
.bloom-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(253, 251, 247, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.interactive-frame-wrapper.bloomed .bloom-effect,
.venue-interactive-wrapper.bloomed .bloom-effect {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
}

.venue-bloom {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(253, 251, 247, 0.2) 0%, transparent 70%);
}

.bloom-effect::before {
    content: '';
    position: absolute;
    inset: 10%;
    /* Removed dashed border to fix visual artifact */
    border-radius: 50%;
    animation: rotateBloom 20s linear infinite;
}

@keyframes rotateBloom {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.story-text {
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.9;
    font-size: 1.1rem;
    max-width: 450px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    padding-left: 20px; /* Reset to original - space for the line */
    text-align: left;
}

/* The vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    top: 20px; /* Start below the first item */
    bottom: 50px; /* End above the last item */
    left: 47px; /* Align centrally to the icons */
    width: 1px;
    background: rgba(253, 251, 247, 0.2); /* Very subtle line */
    z-index: 0;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    z-index: 1; /* Keep above the line */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-text {
    display: flex;
    flex-direction: column;
}

.timeline-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0;
    display: block;
    mix-blend-mode: multiply;
    cursor: pointer;
    
    /* Interactive state styles - Very subtle initial state */
    filter: grayscale(100%) blur(2px);
    opacity: 0.15;
    transform: scale(0.5);
    transition: filter 1.5s ease, transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.5s ease;
}

/* Lit up state applied by JS Observer - Bright, large and clear */
.timeline-item.lit-up .timeline-icon {
    filter: grayscale(0%) blur(0) drop-shadow(0 0 10px rgba(253, 251, 247, 0.3));
    opacity: 1;
    transform: scale(1.25);
}

.timeline-icon.pulse-click {
    animation: iconPulseClick 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes iconPulseClick {
    0% { 
        transform: scale(1.25); 
        filter: brightness(1); 
    }
    40% { 
        transform: scale(1.45); 
        filter: brightness(1.2) drop-shadow(0 0 20px rgba(253, 251, 247, 0.5)); 
    }
    100% { 
        transform: scale(1.25); 
        filter: brightness(1); 
    }
}

.timeline-time {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.timeline-label {
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    opacity: 0.7;
}

.venue-image {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
    opacity: 0;
}

@keyframes slideDrift {
    0% { opacity: 0; transform: translateY(80px) scale(1.2); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Activated state when user scrolls to venue section */
.venue-section.visible .venue-image {
    animation: slideDrift 2.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.2s;
}

.venue-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin: 0 auto 0.5rem auto;
    letter-spacing: 0.1em;
    width: 90%;
    line-height: 1.4;
}

.venue-address {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0 auto 2rem auto;
    letter-spacing: 0.1em;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--text-cream);
    color: var(--text-cream);
    background: transparent;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--text-cream);
    color: var(--bg-dark);
}

.registry-options {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.registry-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 0.5rem;
    font-size: 0.75rem;
    min-height: 50px;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.rsvp-form input[type="text"] {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(253, 251, 247, 0.3);
    color: var(--text-cream);
    padding: 0.5rem;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.rsvp-attendance {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.rsvp-attendance label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.info-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}

.info-block h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.info-block p {
    font-size: 0.8rem;
    font-weight: 300;
    opacity: 0.7;
    margin-bottom: 1.2rem;
}

/* Satin Circles */
.dress-code-colors {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    overflow: visible !important;
}

.info-grid, .info-block {
    overflow: visible !important;
}

.satin-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    position: relative;
    opacity: 0;
    box-shadow: 0 6px 15px rgba(0,0,0,0.5), inset 0 0 8px rgba(255,255,255,0.25);
    cursor: pointer;
}

.satin-circle:hover {
    transform: scale(1.15) translateY(-8px) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-reveal.visible .satin-circle {
    animation: rollIn 1.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.satin-circle:nth-child(1) { animation-delay: 0.8s; }
.satin-circle:nth-child(2) { animation-delay: 1.0s; }
.satin-circle:nth-child(3) { animation-delay: 1.2s; }
.satin-circle:nth-child(4) { animation-delay: 1.4s; }

@keyframes rollIn {
    0% { 
        opacity: 0; 
        transform: translateX(-150px) rotate(-360deg) scale(0.5); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0) rotate(0deg) scale(1); 
    }
}

/* Satin Texture Logic (Highlight + Base Color) */
.satin-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.45) 0%, transparent 65%);
    pointer-events: none;
}

.color-champagne { background: linear-gradient(135deg, #E5D5B3 0%, #BBAA88 100%); }
.color-rose { background: linear-gradient(135deg, #D4A5A5 0%, #A37B7B 100%); }
.color-sage { background: linear-gradient(135deg, #B2AC88 0%, #8A8566 100%); }
.color-black { background: linear-gradient(135deg, #2A2A2A 0%, #000000 100%); }

/* ── Music Player ── */
.music-toggle {
    position: fixed;
    top: 25px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    cursor: pointer;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.music-toggle img {
    width: 50px;
    height: 50px;
    opacity: 0.9;
}

.music-toggle.pulsing {
    animation: musicPulse 2s infinite ease-in-out;
}

.music-toggle.playing img {
    animation: musicSpin 4s infinite linear;
}

@keyframes musicPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@media (min-width: 501px) {
    .music-toggle {
        right: calc(50% - 410px + 20px);
    }
}

@keyframes musicSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Countdown Timer ── */
.countdown-section {
    text-align: center;
    padding: 2rem 1.5rem 6rem 1.5rem !important;
}

.countdown-clock {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.clock-icon {
    width: 120px;
    height: auto;
    mix-blend-mode: screen;
    opacity: 0.9;
    display: block;
    margin: 0 auto;
}

.pulsing-clock {
    animation: clockPulse 1s infinite cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes clockPulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 15px rgba(253, 251, 247, 0.3)); }
    100% { transform: scale(1); opacity: 0.9; }
}

.countdown-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--text-cream);
    opacity: 0.8;
    text-align: center;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 0.8rem; /* Reduced gap to fit 316px mockup */
    margin-top: 2rem;
    width: 100%;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px; /* Reduced from 60px */
}

.countdown-value {
    font-size: 2.1rem; /* Smaller as requested */
    font-family: var(--font-serif);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    opacity: 0.6;
    text-transform: uppercase;
}

.countdown-finished {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-top: 1rem;
}

.footer-section {
    padding-bottom: 0px !important; /* Minimized as requested */
    text-align: center;
    width: 100%;
}

.footer-msg {
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.footer-names {
    font-family: 'Parfumerie Script', 'Marck Script', 'Pinyon Script', cursive;
    font-size: 3.2rem;
    opacity: 1;
    margin-bottom: 2rem;
}

.scroll-top-wrapper {
    margin: 0 auto;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-top-icon {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(253, 251, 247, 0.2));
}

.scroll-top-wrapper:hover {
    opacity: 1;
    transform: translateY(-10px) scale(1.1);
}

/* Desktop Responsiveness */
@media (min-width: 768px) {
    .envelope-wrapper {
        width: 70%;
        max-width: 600px;
    }
    
    .envelope-initials {
        font-size: 4.5rem;
    }

    .lace-heart-img {
        max-width: 580px;
    }

    .section-reveal {
        padding: 10rem 2rem;
    }

    .section-script-title {
        font-size: 4.5rem;
    }

    .story-text {
        font-size: 1.2rem;
    }
}
