@font-face {
    font-family: 'Miama';
    src: url('fonts/Miama.otf') format('opentype');
    font-display: swap;
}

:root {
    --bg-color: #fdfcf8;
    --gold: #c4a47c;
    --gold-dark: #a88a5d;
    --text-dark: #4a4a4a;
    --text-light: #7a7a7a;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'EB Garamond', 'Montserrat', serif;
    font-weight: 300;
    letter-spacing: 0.04em;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
    /* Default Gold Pointer */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23c4a47c' stroke='white' stroke-width='1' d='M7,2l12,11.2l-5.8,0.5l3.3,7.3l-2.2,1l-3.2-7.4L7,18.5V2z'/%3E%3C/svg%3E"), auto;
}

/* Gold Hand Pointer for interactive elements */
a,
button,
.envelope-wrapper,
input,
select,
.timeline-content,
.music-btn,
.seal {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23c4a47c' stroke='white' stroke-width='1' d='M14,4c-1.1,0-2,0.9-2,2c0,0.1,0,0.2,0.1,0.3C11.5,6.1,10.8,6,10,6c-1.1,0-2,0.9-2,2c0,0.1,0,0.1,0,0.2 C7.5,8.1,6.8,8,6,8C4.9,8,4,8.9,4,10v7c0,3.9,3.1,7,7,7h4c3.9,0,7-3.1,7-7v-3c0-1.1-0.9-2-2-2c-0.1,0-0.2,0-0.3,0.1 C19.3,11.5,18.8,11,18,11c-0.1,0-0.3,0-0.4,0.1C17.3,10.5,16.7,10,16,10c-0.1,0-0.2,0-0.3,0.1C15.3,9.5,14.7,9,14,9V4z'/%3E%3C/svg%3E"), pointer;
}

/* Digital Envelope Screen */
#envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f7f2ec 0%, #efe8df 50%, #f5f0e9 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s;
}

#envelope-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

#dust-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.envelope-wrapper {
    position: relative;
    text-align: center;
    perspective: 1800px;
    z-index: 1;
}

.envelope-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
    opacity: 0.7;
}

/* ─── The Envelope ─── */
.envelope {
    position: relative;
    width: 360px;
    height: 240px;
    background: linear-gradient(145deg, #ede4d8 0%, #e3d9cc 50%, #ddd2c4 100%);
    border-radius: 3px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.15),
        0 15px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.envelope>.linen-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0zm2 0h1v1H2zm2 0h1v1H4zm2 0h1v1H6zm2 0h1v1H8z' fill='%23c4a47c' fill-opacity='0.04'/%3E%3C/svg%3E");
    border-radius: 3px;
    pointer-events: none;
    z-index: 0;
}

.envelope-wrapper:not(.is-open):hover .envelope {
    transform: rotateX(8deg) rotateY(-2deg) translateY(-12px);
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ─── Flap ─── */
.flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 180px solid transparent;
    border-right: 180px solid transparent;
    border-top: 140px solid #d6cab9;
    z-index: 4;
    transform-origin: top center;
    transition: transform 1.2s 0.2s cubic-bezier(0.4, 0, 0.2, 1), z-index 0s 0.6s;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.flap-lining {
    position: absolute;
    top: -140px;
    left: -180px;
    width: 360px;
    height: 140px;
    background: linear-gradient(180deg, #f5efe6 0%, #ece4d8 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    z-index: -1;
}

/* ─── Pocket ─── */
.pocket {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    height: 240px;
    background: linear-gradient(180deg, #f0e8dc 0%, #ece3d6 100%);
    z-index: 3;
    border-radius: 0 0 3px 3px;
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 58%);
    box-shadow: inset 0 15px 30px rgba(0, 0, 0, 0.04);
}

.pocket .linen-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0zm2 0h1v1H2zm2 0h1v1H4z' fill='%23c4a47c' fill-opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ─── Wheat Sprigs ─── */
.wheat-sprig {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    transition: transform 1s 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s 0.3s;
    filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.1));
}

.wheat-left {
    width: 50px;
    height: 100px;
    bottom: 50px;
    left: 105px;
    transform: rotate(-35deg);
}

.wheat-right {
    width: 50px;
    height: 100px;
    bottom: 50px;
    right: 105px;
    transform: rotate(35deg);
}

/* ─── Letter ─── */
.letter {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 336px;
    height: 216px;
    background: linear-gradient(180deg, #fffefa 0%, #faf7f2 100%);
    border-radius: 2px;
    z-index: 2;
    transition: transform 1.4s 1.4s cubic-bezier(0.19, 1, 0.22, 1),
        box-shadow 1.4s 1.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(196, 164, 124, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.letter-content {
    border: 1px solid rgba(196, 164, 124, 0.3);
    width: 88%;
    height: 85%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    position: relative;
}

.letter-ornament-top,
.letter-ornament-bottom {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.names-initials {
    font-family: 'EB Garamond', 'Garamond', serif;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--gold);
    line-height: 1;
}

.letter-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: var(--text-light);
    margin-top: 0.2rem;
}

/* ─── Wax Seal ─── */
.wax-seal {
    position: absolute;
    top: 82px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    z-index: 6;
    transition: transform 0.6s 0.1s ease, opacity 0.5s 0.2s;
}

.wax-body {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 35%, #e8c88f, #d4af37 40%, #c4a47c 100%);
    border-radius: 50%;
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        inset 0 3px 6px rgba(255, 255, 255, 0.4),
        0 0 0 2px rgba(196, 164, 124, 0.5);
    overflow: hidden;
}

.wax-drip {
    position: absolute;
    background: #c4a47c;
    border-radius: 0 0 50% 50%;
    z-index: -1;
}

.wax-drip-1 {
    width: 12px;
    height: 18px;
    top: 68px;
    left: 15px;
    background: radial-gradient(circle, #e8c88f, #c4a47c);
}

.wax-drip-2 {
    width: 10px;
    height: 14px;
    top: 70px;
    right: 20px;
    background: radial-gradient(circle, #e8c88f, #c4a47c);
}

.wax-drip-3 {
    width: 8px;
    height: 10px;
    top: 72px;
    left: 40px;
    background: radial-gradient(circle, #e8c88f, #c4a47c);
}

.wax-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background: repeating-conic-gradient(rgba(0, 0, 0, 0.03) 0% 25%, transparent 0% 50%);
    border-radius: 50%;
}

.wax-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.seal-initial {
    font-family: 'EB Garamond', 'Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(255, 240, 240, 0.7);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5), -1px -1px 1px rgba(255, 255, 255, 0.1);
}

.wax-highlight {
    position: absolute;
    top: 8px;
    left: 12px;
    width: 25px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
    transform: rotate(-30deg);
}

/* ─── Click Hint ─── */
.click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    color: var(--gold-dark);
}

.click-to-open {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: pulseText 2.5s ease-in-out infinite;
}

.hint-arrow {
    animation: bounceArrow 2s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes bounceArrow {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(5px);
        opacity: 0.7;
    }
}

/* ─── Envelope Open States ─── */
.envelope.phase-1 .wax-seal {
    animation: waxCrack 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes waxCrack {
    0% {
        transform: translateX(-50%) scale(1);
    }

    30% {
        transform: translateX(-50%) scale(1.1);
    }

    60% {
        transform: translateX(-50%) scale(1.05) rotate(5deg);
    }

    100% {
        transform: translateX(-50%) scale(0.6) translateY(30px) rotate(15deg);
        opacity: 0;
    }
}

.envelope.phase-2 .flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope.phase-2 .wheat-left {
    transform: rotate(-65deg) translate(-25px, 15px);
    opacity: 0;
}

.envelope.phase-2 .wheat-right {
    transform: rotate(65deg) translate(25px, 15px);
    opacity: 0;
}

.envelope.phase-3 .letter {
    transform: translateY(-150px) translateZ(10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    z-index: 5;
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
}


/* Music Button */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gold);
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.music-btn:hover {
    transform: scale(1.1);
    background: var(--gold);
    color: var(--white);
}

.music-btn .icon-pause {
    display: none;
}

.music-btn.playing .icon-play {
    display: none;
}

/* Visualizer Container */
.music-visualizer {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 20px;
    height: 18px;
}

.music-visualizer .bar {
    width: 2.5px;
    height: 100%;
    background-color: var(--gold);
    border-radius: 1px;
    transform-origin: bottom;
    transform: scaleY(0.2);
    transition: background-color 0.3s ease;
}

/* Show visualizer when music is active */
.music-btn.playing .music-visualizer {
    display: flex;
}

/* Hide the standard pause icon by default when active */
.music-btn.playing .icon-pause {
    display: none;
}

/* Staggered animations for the wave bars */
.music-btn.playing .music-visualizer .bar:nth-child(1) {
    animation: bounceBar 0.8s ease-in-out infinite alternate;
}

.music-btn.playing .music-visualizer .bar:nth-child(2) {
    animation: bounceBar 1.2s ease-in-out infinite alternate 0.15s;
}

.music-btn.playing .music-visualizer .bar:nth-child(3) {
    animation: bounceBar 0.9s ease-in-out infinite alternate 0.3s;
}

.music-btn.playing .music-visualizer .bar:nth-child(4) {
    animation: bounceBar 1.1s ease-in-out infinite alternate 0.05s;
}

@keyframes bounceBar {
    0% {
        transform: scaleY(0.2);
    }
    100% {
        transform: scaleY(1);
    }
}

/* Morph on hover: hide visualizer and show pause button so guests know they can click it */
.music-btn.playing:hover .music-visualizer {
    display: none;
}

.music-btn.playing:hover .icon-pause {
    display: block;
}

/* Keep the visualizer bars white when the button background turns gold on hover */
.music-btn:hover .music-visualizer .bar {
    background-color: var(--white);
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 8000;
    background: rgba(253, 252, 248, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(196, 164, 124, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#main-nav.visible {
    opacity: 1;
    visibility: visible;
}

#main-nav ul {
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
}

#main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
    transition: var(--transition);
}

#main-nav a:hover {
    color: var(--gold);
}

/* Spotify Player */
.spotify-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9000;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.spotify-container:hover {
    transform: translateY(-5px);
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gold);
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9000;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: scale(1.1);
    background: var(--gold);
    color: var(--white);
}

/* Falling Leaves */
#leaves-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.leaf-particle {
    position: absolute;
    color: var(--gold);
    opacity: 0.3;
    pointer-events: none;
    animation: fall linear infinite;
    filter: drop-shadow(0 0 2px rgba(196, 164, 124, 0.2));
}

.leaf-particle svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(100vh) translateX(100px) rotate(720deg);
        opacity: 0;
    }
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Great Vibes', 'Marck Script', cursive;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.2;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.4rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0.9;
}

.script {
    font-family: 'Miama', cursive;
}

/* Sections */
section {
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Hero Section */
.hero {
    overflow: hidden;
    background: radial-gradient(circle at center, #ffffff 0%, #fdfcf8 100%);
}

.floral-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    background-image: url('botanical.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
}

.floral-top-left {
    top: -50px;
    left: -50px;
    transform: rotate(15deg);
}

.floral-bottom-right {
    bottom: -50px;
    right: -50px;
    transform: rotate(195deg);
}

/* ─── Elegant Background Leaves ─── */
.bg-leaves {
    position: fixed;
    width: 500px;
    height: 500px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.bg-top-left {
    top: -50px;
    left: -50px;
    animation: gentleBreeze 12s ease-in-out infinite alternate;
    transform-origin: top left;
}

.bg-bottom-right {
    bottom: -50px;
    right: -50px;
    animation: gentleBreeze 14s ease-in-out infinite alternate-reverse;
    transform-origin: bottom right;
}

@keyframes gentleBreeze {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(2deg) scale(1.02);
    }
}

.invitation-container {
    max-width: 650px;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    padding: 4rem 2.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 164, 124, 0.2);
    z-index: 2;
}

.save-the-date {
    margin-bottom: 1.5rem;
    color: var(--gold);
    font-size: 2rem;
}

.save-the-date .the {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: -10px 0;
}

.names {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    letter-spacing: 0.08em;
}

.intro-text {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-family: 'Playfair Display', serif;
}

.date-container {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.line {
    width: 100px;
    height: 1px;
    background: var(--gold);
    margin: 1rem 0;
}

.date-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.day-name,
.month {
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--text-dark);
}

.day-number {
    font-family: 'Great Vibes', cursive;
    font-size: 3.2rem;
    color: var(--gold);
    line-height: 1;
}

.year {
    font-size: 1.2rem;
    letter-spacing: 8px;
    color: var(--text-light);
}

.details {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.footer-details {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    border-top: 1px solid rgba(196, 164, 124, 0.2);
    padding-top: 3rem;
}

.footer-details h3 {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.footer-details p {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
}

/* Timeline Section */
.timeline-section {
    background-color: var(--bg-color);
    padding: 8rem 2rem;
}

.timeline-container {
    max-width: 800px;
    margin: 4rem auto 0;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-color), 0 0 10px rgba(196, 164, 124, 0.5);
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 80%;
    margin-right: 3rem;
    position: relative;
    border: 1px solid rgba(196, 164, 124, 0.1);
    transition: var(--transition);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 0;
    margin-left: 3rem;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

/* Modern Randomly Scattered Images */
.timeline-image {
    position: absolute;
    width: 45%;
    max-height: 280px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0.95;
    z-index: 1;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.timeline-image:hover {
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

.timeline-image:hover img {
    transform: scale(1.08);
}

.timeline-image-right {
    right: 5%;
}

.timeline-image-left {
    left: 5%;
}

/* Random modern offsets for each item */
.timeline-item:nth-child(1) .timeline-image {
    margin-top: -30px;
    transform: translateY(-50%) rotate(3deg);
}

.timeline-item:nth-child(2) .timeline-image {
    margin-top: 40px;
    transform: translateY(-50%) rotate(-4deg);
}

.timeline-item:nth-child(3) .timeline-image {
    margin-top: -15px;
    transform: translateY(-50%) rotate(2deg);
}

/* Fix hover state rotations so they straighten up */
.timeline-item:nth-child(1) .timeline-image:hover,
.timeline-item:nth-child(2) .timeline-image:hover,
.timeline-item:nth-child(3) .timeline-image:hover {
    transform: translateY(-50%) rotate(0deg) scale(1.05);
}

.timeline-content .time {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Countdown Section improvement */
.countdown-section {
    position: relative;
    background-color: var(--bg-color);
    padding: 6rem 2rem;
    text-align: center;
    overflow: hidden;
}

/* Orthodox Church SVG Background */
.church-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 450px;
    height: 450px;
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(196, 164, 124, 0.1));
}

.countdown-container {
    position: relative;
    z-index: 1;
}

.draw-church {
    transition: stroke-dashoffset 3.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-section.revealed .draw-church {
    stroke-dashoffset: 0 !important;
}

/* Stagger the drawing of the church paths */
.countdown-section.revealed .draw-church:nth-child(1) {
    transition-delay: 0.1s;
}

.countdown-section.revealed .draw-church:nth-child(2) {
    transition-delay: 0.3s;
}

.countdown-section.revealed .draw-church:nth-child(3) {
    transition-delay: 0.6s;
}

.countdown-section.revealed .draw-church:nth-child(4) {
    transition-delay: 0.9s;
}

.countdown-section.revealed .draw-church:nth-child(5) {
    transition-delay: 1.1s;
}

.countdown-section.revealed .draw-church:nth-child(6) {
    transition-delay: 1.3s;
}

.countdown-section.revealed .draw-church:nth-child(7) {
    transition-delay: 1.5s;
}

.countdown-section.revealed .draw-church:nth-child(8) {
    transition-delay: 1.7s;
}

.countdown-section.revealed .draw-church:nth-child(n+9) {
    transition-delay: 1.9s;
}

.countdown-title {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    font-style: italic;
}

.timer-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 100px;
    border: 1px solid rgba(196, 164, 124, 0.2);
}

.timer-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.timer-label {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-light);
}

/* Clever Polaroid Gallery */
.venue-gallery {
    margin: 4rem auto;
    width: 300px;
    height: 300px;
    position: relative;
    perspective: 1200px;
}

.polaroid-stack {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.polaroid-stack:hover {
    transform: translateY(-10px);
}

.polaroid {
    position: absolute;
    width: 250px;
    height: 250px;
    object-fit: cover;
    background: #fff;
    padding: 10px 10px 45px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: bottom center;
    cursor: pointer;
    left: 25px;
}

/* Default stacked state with realistic scattering */
.p1 {
    transform: rotate(-5deg) translate(-10px, 10px);
    z-index: 1;
}

.p2 {
    transform: rotate(3deg) translate(5px, 0px);
    z-index: 2;
}

.p3 {
    transform: rotate(-2deg) translate(-5px, -5px);
    z-index: 3;
}

.p4 {
    transform: rotate(6deg) translate(15px, -15px);
    z-index: 4;
}

/* Fan out on hover */
.polaroid-stack:hover .p1 {
    transform: rotate(-25deg) translate(-100px, 30px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.polaroid-stack:hover .p2 {
    transform: rotate(-8deg) translate(-35px, -10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.polaroid-stack:hover .p3 {
    transform: rotate(8deg) translate(35px, -10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.polaroid-stack:hover .p4 {
    transform: rotate(25deg) translate(100px, 30px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}


/* RSVP Section */
.rsvp-section {
    background-color: var(--white);
}

.container {
    max-width: 600px;
    width: 100%;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    color: var(--gold);
    margin-bottom: 1rem;
}

.rsvp-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.rsvp-deadline {
    text-align: center;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.animated-text {
    background: linear-gradient(90deg, var(--text-light), var(--gold), var(--text-light));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.rsvp-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(196, 164, 124, 0.2);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

input[type="text"],
input[type="tel"],
select {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(196, 164, 124, 0.3);
    background: var(--white);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(196, 164, 124, 0.1);
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.radio-label input {
    margin-right: 10px;
    accent-color: var(--gold);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.submit-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(196, 164, 124, 0.3);
}

.form-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

/* Additional Info */
.reception-info {
    margin-top: 3rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.wedding-list {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(196, 164, 124, 0.2);
}

.wedding-list h3 {
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.wedding-list p {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--gold-dark);
    word-break: break-all;
}

/* Locations Section */
.locations-section {
    background-color: var(--white);
    padding: 6rem 2rem;
}

.maps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 3rem;
}

.map-card {
    flex: 1;
    min-width: 300px;
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.map-card h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.map-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.map-wrapper {
    position: relative;
    padding-bottom: 75%;
    /* 4:3 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(196, 164, 124, 0.3);
}

.styled-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: sepia(0.5) hue-rotate(-20deg) saturate(1.2) contrast(1.1) brightness(1.05);
}

/* Reveal Animation */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease-out;
}

[data-reveal="left"] {
    transform: translateX(-60px) rotate(-3deg);
}

[data-reveal="right"] {
    transform: translateX(60px) rotate(3deg);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
}

[data-reveal="left"].revealed {
    animation: wiggleRevealLeft 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[data-reveal="right"].revealed {
    animation: wiggleRevealRight 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes wiggleRevealLeft {
    0% {
        transform: translateX(-60px) rotate(-4deg);
        opacity: 0;
    }

    45% {
        transform: translateX(12px) rotate(2deg);
        opacity: 1;
    }

    75% {
        transform: translateX(-4px) rotate(-1deg);
        opacity: 1;
    }

    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes wiggleRevealRight {
    0% {
        transform: translateX(60px) rotate(4deg);
        opacity: 0;
    }

    45% {
        transform: translateX(-12px) rotate(-2deg);
        opacity: 1;
    }

    75% {
        transform: translateX(4px) rotate(1deg);
        opacity: 1;
    }

    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

/* Info Section */
.info-section {
    background-color: var(--bg-color);
    padding: 8rem 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.info-item {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(196, 164, 124, 0.1);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
}

.info-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-icon svg {
    transition: transform 0.4s ease;
}

.info-item:hover .info-icon svg {
    transform: scale(1.15);
}

.info-item h3 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-item p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ─── Photo Gallery Section ─── */
.gallery-section {
    position: relative;
    background-color: transparent;
    padding: 6rem 2rem;
    text-align: center;
    z-index: 2;
}

.modern-fine-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    margin: 0 auto 2rem;
}

.modern-fine-line-horizontal {
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 2rem auto;
}

/* Wedding Crowns Drawing Animation */
.wedding-crown-container {
    width: 140px;
    height: 70px;
    margin: 1rem auto 2rem;
    position: relative;
    transition: transform 0.5s ease;
    cursor: default;
}

.wedding-crown-container:hover {
    transform: scale(1.05) translateY(-3px);
}

.wedding-crown-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(196, 164, 124, 0.2));
}

.draw-crown {
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed .draw-crown {
    stroke-dashoffset: 0 !important;
}

/* Stagger drawing paths */
[data-reveal].revealed .draw-crown:nth-child(1),
[data-reveal].revealed .draw-crown:nth-child(3) {
    transition-delay: 0.1s;
}

[data-reveal].revealed .draw-crown:nth-child(2),
[data-reveal].revealed .draw-crown:nth-child(4) {
    transition-delay: 0.4s;
}

[data-reveal].revealed .draw-crown:nth-child(5) {
    transition-delay: 0.8s;
}

[data-reveal].revealed .draw-crown:nth-child(n+6) {
    transition-delay: 1.0s;
}

.photo-frame {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background: #fdfbf8;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(196, 164, 124, 0.2);
    border-radius: 2px;
}

.couple-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    filter: sepia(0.2) contrast(1.05) brightness(1.02);
}

/* Floral Bouquet Drawing Animation */
.floral-bouquet-container {
    width: 70px;
    height: 80px;
    margin: 2rem auto;
    position: relative;
    transition: transform 0.5s ease;
    cursor: default;
}

.floral-bouquet-container:hover {
    transform: scale(1.05) rotate(2deg);
}

.floral-bouquet-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(196, 164, 124, 0.2));
}

.draw-path {
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed .draw-path {
    stroke-dashoffset: 0 !important;
}

/* Stagger the drawing of paths */
[data-reveal].revealed .draw-path:nth-child(1) {
    transition-delay: 0.1s;
}

[data-reveal].revealed .draw-path:nth-child(2) {
    transition-delay: 0.3s;
}

[data-reveal].revealed .draw-path:nth-child(3) {
    transition-delay: 0.5s;
}

[data-reveal].revealed .draw-path:nth-child(4) {
    transition-delay: 0.7s;
}

[data-reveal].revealed .draw-path:nth-child(5) {
    transition-delay: 0.9s;
}

[data-reveal].revealed .draw-path:nth-child(6) {
    transition-delay: 1.1s;
}

[data-reveal].revealed .draw-path:nth-child(n+7) {
    transition-delay: 1.3s;
}

.photo-corners {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.photo-corners::before,
.photo-corners::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold);
    opacity: 0.6;
}

.photo-corners::before {
    top: 15px;
    left: 15px;
    border-bottom: none;
    border-right: none;
}

.photo-corners::after {
    bottom: 15px;
    right: 15px;
    border-top: none;
    border-left: none;
}

.photo-caption {
    font-family: 'Great Vibes', 'Marck Script', cursive;
    font-size: 1.8rem;
    color: var(--gold);
    margin-top: 1.5rem;
    line-height: 1.2;
    opacity: 0.9;
}

/* ─── Global Touch & Scroll ─── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

/* ─── Mobile Responsive: Tablets & Landscape Phones ─── */
@media (max-width: 768px) {

    /* Core typography */
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    /* Hero / Invitation */
    .names {
        font-size: 1.6rem;
        letter-spacing: 0.06em;
    }

    .save-the-date {
        font-size: 1.6rem;
    }

    .save-the-date .the {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }

    .intro-text {
        font-size: 0.8rem;
        margin-bottom: 2rem;
    }

    .day-number {
        font-size: 2.6rem;
    }

    .day-name,
    .month {
        font-size: 0.8rem;
    }

    .year {
        font-size: 1rem;
        letter-spacing: 6px;
    }

    .date-grid {
        gap: 0.8rem;
    }

    .details {
        font-size: 0.85rem;
        margin-bottom: 2rem;
    }

    .footer-details {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-details h3 {
        font-size: 0.65rem;
    }

    .footer-details p {
        font-size: 0.85rem;
    }

    .invitation-container {
        padding: 2.5rem 1.5rem;
    }

    .reception-info {
        font-size: 0.9rem;
        margin-top: 2rem;
    }

    .wedding-list h3 {
        font-size: 0.7rem;
    }

    .wedding-list p {
        font-size: 0.85rem;
    }

    /* Envelope */
    .envelope-wrapper {
        transform: scale(0.85);
        margin-top: -20px;
    }

    .envelope-label {
        font-size: 0.7rem;
        letter-spacing: 3px;
    }

    /* Gallery */
    .photo-caption {
        font-size: 1.3rem;
        padding: 0 1rem;
    }

    .photo-frame {
        max-width: 90%;
    }

    .gallery-section {
        padding: 3rem 1.5rem;
    }

    /* Timeline */
    .timeline-section {
        padding: 4rem 1rem;
    }

    .timeline-container::before {
        left: 20px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 45px;
        padding-right: 0;
        flex-wrap: wrap;
        margin-bottom: 2.5rem;
    }

    .timeline-item:nth-child(even) {
        padding-left: 45px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 1.2rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-content p {
        font-size: 0.8rem;
    }

    .timeline-content .time {
        font-size: 0.8rem;
    }

    .timeline-image {
        position: relative;
        width: 100%;
        max-height: 200px;
        top: auto;
        transform: none !important;
        margin-top: 0.8rem !important;
        margin-left: 0;
        border-radius: 6px;
    }

    .timeline-image-right,
    .timeline-image-left {
        right: auto;
        left: auto;
    }

    .timeline-image:hover {
        transform: scale(1.02) !important;
    }

    /* Countdown */
    .countdown-section {
        padding: 3rem 1.5rem;
    }

    .countdown-title {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .timer-grid {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .timer-item {
        min-width: 42%;
        padding: 1rem 0.5rem;
        min-height: auto;
    }

    .timer-value {
        font-size: 2rem;
    }

    .timer-label {
        font-size: 0.65rem;
        letter-spacing: 1.5px;
    }

    .church-bg {
        width: 280px;
        height: 280px;
    }

    /* Polaroid — auto-fan on mobile since hover doesn't work on touch */
    .venue-gallery {
        transform: scale(0.75);
        margin: 1.5rem auto;
    }

    .polaroid {
        width: 200px;
        height: 200px;
        padding: 8px 8px 35px 8px;
    }

    .polaroid-stack .p1 {
        transform: rotate(-18deg) translate(-70px, 20px);
    }

    .polaroid-stack .p2 {
        transform: rotate(-6deg) translate(-25px, -5px);
    }

    .polaroid-stack .p3 {
        transform: rotate(6deg) translate(25px, -5px);
    }

    .polaroid-stack .p4 {
        transform: rotate(18deg) translate(70px, 20px);
    }

    /* RSVP */
    .rsvp-section {
        padding: 3rem 1rem;
    }

    .rsvp-intro {
        font-size: 0.95rem;
    }

    .rsvp-deadline {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .rsvp-form {
        padding: 1.5rem 1.2rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    input[type="text"],
    input[type="tel"],
    select {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 1rem;
        font-size: 0.9rem;
        min-height: 48px;
        /* Touch-friendly */
    }

    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }

    .radio-label {
        min-height: 44px;
    }

    /* Touch target */

    /* Locations */
    .locations-section {
        padding: 3rem 1rem;
    }

    .maps-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .map-card {
        min-width: unset;
        padding: 1.5rem;
    }

    .map-card h3 {
        font-size: 1.1rem;
    }

    .map-card p {
        font-size: 0.8rem;
    }

    /* Info */
    .info-section {
        padding: 4rem 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .info-item {
        padding: 1.5rem 1rem;
    }

    .info-item h3 {
        font-size: 1rem;
    }

    .info-item p {
        font-size: 0.8rem;
    }

    .info-icon svg {
        width: 36px;
        height: 36px;
    }

    /* Nav */
    #main-nav {
        padding: 0.8rem 1rem;
    }

    #main-nav ul {
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    #main-nav a {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
        padding: 0.3rem 0;
    }

    /* Misc */
    .floral-bg {
        width: 200px;
        height: 200px;
    }

    .bg-leaves {
        width: 300px;
        height: 300px;
    }

    .music-btn {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    #back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        left: 20px;
    }

    section {
        min-height: auto;
        padding: 3rem 1rem;
    }
}

/* ─── Mobile Responsive: Portrait Phones ─── */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .names {
        font-size: 1.3rem;
        letter-spacing: 0.04em;
    }

    .save-the-date {
        font-size: 1.3rem;
    }

    .save-the-date .the {
        font-size: 0.75rem;
    }

    .intro-text {
        font-size: 0.75rem;
    }

    .day-number {
        font-size: 2.2rem;
    }

    .day-name,
    .month {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .year {
        font-size: 0.9rem;
        letter-spacing: 5px;
    }

    .details {
        font-size: 0.78rem;
    }

    .invitation-container {
        padding: 2rem 1.2rem;
    }

    .footer-details h3 {
        font-size: 0.6rem;
    }

    .footer-details p {
        font-size: 0.78rem;
    }

    .envelope-wrapper {
        transform: scale(0.78);
        margin-top: -25px;
    }

    .photo-caption {
        font-size: 1.1rem;
    }

    .countdown-title {
        font-size: 1rem;
    }

    .timer-value {
        font-size: 1.8rem;
    }

    .timer-label {
        font-size: 0.6rem;
    }

    .timer-item {
        padding: 0.8rem 0.4rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .venue-gallery {
        transform: scale(0.6);
        margin: 0.5rem auto;
    }
}

/* ─── Ultra-Small Phones ─── */
@media (max-width: 360px) {
    .envelope-wrapper {
        transform: scale(0.68);
        margin-top: -35px;
    }

    .names {
        font-size: 1.1rem;
    }

    .save-the-date {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .invitation-container {
        padding: 1.8rem 1rem;
    }

    .timer-item {
        min-width: 44%;
    }

    .timer-value {
        font-size: 1.5rem;
    }

    .venue-gallery {
        transform: scale(0.5);
    }

    #main-nav ul {
        gap: 0.4rem;
    }

    #main-nav a {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
}

/* ─── Lightbox Styles ─── */
.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    display: block;
    max-width: 92%;
    max-height: 85vh;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #f1f1f1;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    font-family: sans-serif;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
        border-width: 3px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
        width: 44px;
        height: 44px;
    }
}