:root {
    --sage-green: #9FAF8E;
    --dark-sage: #738468;
    --light-sage: #C8D5BB;
    --cream: #F5F3ED;
    --gold: #C9A961;
    --dark-text: #3D4436;
    --shadow: rgba(61, 68, 54, 0.15);
}

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

body {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #E8EBE4 0%, #D4D9CD 100%);
    color: var(--dark-text);
    overflow-x: hidden;
    min-height: 100vh;
}

html.intro-active,
body.intro-active {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Hide scrollbar */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Envelope Container - Full Screen Mobile */
.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: linear-gradient(135deg, #E8EBE4 0%, #D4D9CD 100%);
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    filter: none;
    transition:
        opacity 0.9s ease,
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.9s ease,
        visibility 0s linear 0.9s;
    padding: 0;
}

.envelope-wrapper.zooming {
    opacity: 0;
    transform: scale(1.35);
    filter: blur(2px);
}

.envelope-wrapper.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition-delay: 0s;
}

.envelope-wrapper.opening {
    background: transparent;
    backdrop-filter: none;
}

.envelope-wrapper.opening::before,
.envelope-wrapper.opening::after {
    opacity: 0;
}

.envelope {
    position: relative;
    width: min(980px, 92vw);
    height: min(680px, 86dvh);
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
    transform-style: preserve-3d;
}

@media (max-width: 768px) {
    .envelope {
        width: 100%;
        height: 100dvh;
    }
}

/* Paper texture background */
.envelope-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(61, 68, 54, 0.035) 0, transparent 48%),
        radial-gradient(circle at 85% 15%, rgba(61, 68, 54, 0.025) 0, transparent 42%),
        radial-gradient(circle at 20% 85%, rgba(61, 68, 54, 0.02) 0, transparent 45%),
        linear-gradient(180deg, rgba(61, 68, 54, 0.02) 0%, transparent 45%, rgba(61, 68, 54, 0.02) 100%);
    overflow: hidden;
    border-radius: 26px;
    box-shadow:
        0 24px 70px rgba(61, 68, 54, 0.18),
        0 8px 20px rgba(61, 68, 54, 0.12);
}

/* Paper texture effect */
.envelope-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(61, 68, 54, 0.025) 1px, transparent 1px),
        radial-gradient(rgba(61, 68, 54, 0.02) 1px, transparent 1px);
    background-size: 18px 18px, 28px 28px;
    background-position: 0 0, 8px 10px;
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Card preview (for zoom transition) */
.card-preview {
    position: absolute;
    left: 50%;
    top: 58%;
    width: min(460px, 78%);
    height: min(520px, 74%);
    transform: translate(-50%, 18%) scale(0.88);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 243, 237, 0.95) 100%);
    border: 1px solid rgba(61, 68, 54, 0.08);
    box-shadow:
        0 20px 60px rgba(61, 68, 54, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 4;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease;
}

.card-preview::before {
    content: '';
    position: absolute;
    inset: 16px;
    border-radius: 16px;
    border: 1px solid rgba(201, 169, 97, 0.35);
    pointer-events: none;
}

.card-preview-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px 28px;
    gap: 14px;
    color: var(--dark-text);
}

.card-preview-ornament {
    color: var(--gold);
    opacity: 0.85;
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.card-preview-names {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-style: italic;
    letter-spacing: 0.5px;
}

.card-preview-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.card-preview-place {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.75;
}

/* Top floral border decoration */
.floral-decoration-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
    z-index: 5;
}

.floral-decoration-top svg {
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

/* Bottom floral border decoration */
.floral-decoration-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
    z-index: 5;
}

.floral-decoration-bottom svg {
    width: 100%;
    height: 100%;
    opacity: 0.15;
    transform: rotate(180deg);
}

/* --- ENVELOPE PARTS --- */

/* 1. Side Flaps (Left & Right) */
.envelope-flap-left,
.envelope-flap-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, rgba(245, 243, 237, 0.95) 100%);
    z-index: 6;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(61, 68, 54, 0.06);
}

.envelope-flap-left {
    left: 0;
    background-position: left center;
}

.envelope-flap-right {
    right: 0;
    background-position: right center;
    transform: scaleX(-1);
    /* Mirror the image/clip-path for the right side */
}


/* 2. Bottom Flap (The "Pocket") */
.envelope-flap-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48%;
    /* Covers slightly less than half to leave room for top flap overlap */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 243, 237, 0.95) 100%);
    z-index: 7;
    /* Rectangular shape with a slight trapezoid top or shallow triangle to look like a pocket */
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 15%, 0 0);
    box-shadow:
        0 -5px 15px rgba(0, 0, 0, 0.1),
        inset 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(61, 68, 54, 0.06);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom center;
}

/* 3. Top Flap */
.envelope-flap-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55%;
    /* Long enough to overlap the bottom flap and seal */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 243, 237, 0.92) 100%);
    transform-origin: top center;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 8;
    /* On top of everything */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    /* Classic sharp triangle for top flap */
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(61, 68, 54, 0.06);
    backface-visibility: hidden;
}

/* Fold line effect logic (simplified for new structure) */
.envelope-flap-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.08));
    pointer-events: none;
}


/* Opening Animations */
.envelope.opening .envelope-flap-top {
    transform: rotateX(180deg);
    z-index: 1;
    /* Moves behind when open */
    opacity: 0.8;
}

.envelope.opening .envelope-flap-bottom {
    transform: translateY(100%);
    opacity: 0;
}

.envelope.opening .card-preview {
    opacity: 1;
    transform: translate(-50%, -16%) scale(1.02);
    transition-delay: 0.25s;
}

.envelope-wrapper.zooming .card-preview {
    transform: translate(-50%, -24%) scale(1.18);
}

.envelope.opening .envelope-flap-left,
.envelope.opening .envelope-flap-right {
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.envelope.opening .tap-instruction {
    opacity: 0;
}

/* Wax seal position update */
.envelope-seal {
    position: absolute;
    top: 55%;
    /* Tip of the triangle */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle at 30% 30%, #F8F6F0, var(--cream));
    border-radius: 50%;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25),
        inset 0 2px 8px rgba(255, 255, 255, 0.5),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
    border: 3px solid rgba(159, 175, 142, 0.3);
}

/* Wax drip effect */
.envelope-seal::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, transparent 40%, rgba(0, 0, 0, 0.05) 100%);
}

.envelope.opening .envelope-seal {
    opacity: 0;
    pointer-events: none;
}

/* Botanical seal design */
.seal-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seal-initials {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--dark-sage);
    font-style: italic;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.seal-botanical {
    width: 50px;
    height: 50px;
    opacity: 0.4;
}

.seal-botanical svg {
    width: 100%;
    height: 100%;
    fill: var(--dark-sage);
}

.tap-instruction {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--cream);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
    z-index: 20;
    background: rgba(115, 132, 104, 0.6);
    padding: 12px 24px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-8px);
    }
}

/* Main Content */
.main-content {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.985);
    filter: blur(2px);
    transition:
        opacity 0.9s ease,
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.9s ease;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.music-toggle {
    position: fixed;
    z-index: 1200;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(201, 169, 97, 0.52);
    border-radius: 50%;
    color: #59664f;
    background: rgba(255, 253, 248, 0.94);
    box-shadow:
        0 14px 34px rgba(61, 68, 54, 0.2),
        inset 0 0 0 5px rgba(200, 213, 187, 0.17);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 180ms ease, color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.music-toggle[hidden] { display: none; }

.music-toggle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(201, 169, 97, 0.48);
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
}

.music-toggle.needs-action::before {
    animation: music-attention 1.8s ease-out infinite;
}

.music-toggle:hover {
    color: #3d4436;
    background: #fffdf8;
    box-shadow: 0 18px 40px rgba(61, 68, 54, 0.24), inset 0 0 0 5px rgba(200, 213, 187, 0.23);
    transform: translateY(-2px);
}

.music-toggle:active { transform: scale(.95); }
.music-toggle:focus-visible { outline: 3px solid #c9a961; outline-offset: 4px; }

.music-toggle svg {
    width: 25px;
    height: 25px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.music-toggle-speaker { fill: rgba(115, 132, 104, 0.14); }
.music-toggle-waves,
.music-toggle-slash { transition: opacity 220ms ease, transform 220ms ease; transform-origin: center; }
.music-toggle-waves { opacity: 0; transform: scale(.72); }
.music-toggle-slash { opacity: 1; }
.music-toggle.is-playing .music-toggle-waves { opacity: 1; transform: scale(1); }
.music-toggle.is-playing .music-toggle-slash { opacity: 0; transform: scale(.72); }

@keyframes music-attention {
    0% { opacity: .7; transform: scale(.92); }
    75%, 100% { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 560px) {
    .music-toggle {
        right: max(.85rem, env(safe-area-inset-right, 0px));
        bottom: max(.85rem, calc(env(safe-area-inset-bottom, 0px) + .85rem));
        width: 48px;
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .music-toggle,
    .music-toggle-waves,
    .music-toggle-slash { transition: none; }
    .music-toggle.needs-action::before { animation: none; opacity: .72; }
}

.main-content.visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    filter: none;
}

/* Hero Section with Video */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    overflow: visible;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(159, 175, 142, 0.15) 0%,
            rgba(245, 243, 237, 0.4) 50%,
            rgba(159, 175, 142, 0.15) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.decorative-line {
    width: 80px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1.5rem;
    opacity: 0.7;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: white;
    margin-bottom: 1rem;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-names {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 400;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-style: italic;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.ampersand {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--gold);
    margin: 0 0.5rem;
}

.hero-date {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: white;
    margin-top: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.55;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-date-detail {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.95;
}

.floral-ornament {
    margin: 2rem auto;
    font-size: 2rem;
    color: white;
    opacity: 0.8;
}

/* Sections */
.section {
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--dark-text);
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
    font-style: italic;
}

.section-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-align: center;
    color: var(--dark-sage);
    margin-bottom: 3rem;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Countdown */
.countdown-container {
    background-image: url('imagenes/carta2.jpg');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    position: relative;
}

.countdown-container .section-title {
    color: var(--cream);
    font-weight: 700;
}

.countdown-container .section-subtitle {
    color: var(--cream);
    font-weight: 600;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.countdown-item {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(61, 68, 54, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow);
}

.countdown-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.countdown-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Location Section */
.location-section {
    background: linear-gradient(135deg, #E8EBE4 0%, #F0F3ED 50%, #E8EBE4 100%);
    position: relative;
    overflow: visible;
    padding-top: 5rem;
}

.location-section .section-title {
    color: var(--dark-sage);
    font-weight: 700;
    margin-bottom: 1rem;
}

.location-section .section-subtitle {
    color: var(--sage-green);
    font-weight: 500;
    margin-bottom: 3rem;
}

.location-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 0;
}

.location-details-grid .location-info {
    margin-top: 0;
}

.location-address i {
    color: var(--gold);
    margin-right: 0.5rem;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 12px 48px rgba(115, 132, 104, 0.15),
        0 0 1px rgba(115, 132, 104, 0.1);
    margin-top: 2.5rem;
    border: 1px solid rgba(159, 175, 142, 0.2);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.location-info {
    background: linear-gradient(135deg, rgba(200, 213, 187, 0.25) 0%, rgba(159, 175, 142, 0.15) 100%);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    margin-top: 3rem;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(115, 132, 104, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(159, 175, 142, 0.3);
    backdrop-filter: blur(10px);
}

.location-name {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--dark-sage);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-style: italic;
}

.location-address {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    font-size: 16px;
    line-height: 2;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Dress Code Section */
.dress-code-section {
    background: var(--cream);
    position: relative;
    padding-top: 5rem;
}

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

.dress-code-item {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(115, 132, 104, 0.08);
    border: 1px solid rgba(159, 175, 142, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dress-code-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(115, 132, 104, 0.2);
    border-color: var(--gold);
}

.dress-code-icon-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-dress-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--light-sage) 0%, var(--sage-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 8px 25px rgba(159, 175, 142, 0.4);
    transition: transform 0.3s ease;
    z-index: 2;
}

.dress-code-item:hover .main-dress-icon {
    transform: scale(1.1);
}

.symbol-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-sage);
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--light-sage);
    z-index: 3;
}

.dress-code-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark-sage);
    margin-bottom: 1rem;
    font-weight: 700;
}

.dress-code-desc {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.dress-code-desc strong {
    display: block;
    margin-top: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    font-style: italic;
}

/* RSVP Section */
.rsvp-section {
    background: var(--cream);
    position: relative;
    padding-top: 5rem;
}

.rsvp-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--dark-sage);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow);
    margin-top: 2rem;
}

.rsvp-button:hover {
    background: var(--sage-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow);
}

.rsvp-button:focus-visible {
    outline: 3px solid rgba(201, 169, 97, 0.9);
    outline-offset: 4px;
}

.rsvp-deadline {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: var(--dark-text);
    margin-top: 1.5rem;
    font-weight: 300;
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--dark-sage);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    margin-top: 5rem;
}

footer::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--cream);
    clip-path: polygon(0 0%, 1% 15%, 2% 8%, 3% 20%, 4% 12%, 5% 18%, 6% 10%, 7% 15%, 8% 8%, 9% 22%, 10% 12%, 11% 20%, 12% 8%, 13% 18%, 14% 10%, 15% 15%, 16% 8%, 17% 20%, 18% 12%, 19% 18%, 20% 8%, 21% 15%, 22% 12%, 23% 20%, 24% 8%, 25% 18%, 26% 10%, 27% 15%, 28% 8%, 29% 22%, 30% 12%, 31% 20%, 32% 8%, 33% 18%, 34% 10%, 35% 15%, 36% 8%, 37% 20%, 38% 12%, 39% 18%, 40% 8%, 41% 15%, 42% 12%, 43% 20%, 44% 8%, 45% 18%, 46% 10%, 47% 15%, 48% 8%, 49% 22%, 50% 12%, 51% 20%, 52% 8%, 53% 18%, 54% 10%, 55% 15%, 56% 8%, 57% 20%, 58% 12%, 59% 18%, 60% 8%, 61% 15%, 62% 12%, 63% 20%, 64% 8%, 65% 18%, 66% 10%, 67% 15%, 68% 8%, 69% 20%, 70% 12%, 71% 18%, 72% 8%, 73% 15%, 74% 12%, 75% 20%, 76% 8%, 77% 18%, 78% 10%, 79% 15%, 80% 8%, 81% 20%, 82% 12%, 83% 18%, 84% 8%, 85% 15%, 86% 12%, 87% 20%, 88% 8%, 89% 18%, 90% 10%, 91% 15%, 92% 8%, 93% 20%, 94% 12%, 95% 18%, 96% 8%, 97% 15%, 98% 12%, 99% 20%, 100% 8%, 100% 0%, 0 0%);
    pointer-events: none;
    z-index: 10;
}

.footer-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.footer-hashtag {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* Scroll Animation */
.js .fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.js .fade-in.visible {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .map-container {
        height: 350px;
    }

    .envelope-seal {
        width: 120px;
        height: 120px;
    }

    .seal-initials {
        font-size: 30px;
    }
}

/* Gallery Section */
.gallery-section {
    background: #fdfdfb;
    position: relative;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
    position: relative;
    z-index: 5;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1/1;
    border: 8px solid white;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item.vertical {
    grid-row: span 2;
    aspect-ratio: 2/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-item:hover {
    transform: scale(1.02) translateY(-5px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(115, 132, 104, 0.25);
    z-index: 10;
    border-color: var(--cream);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(159, 175, 142, 0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item.large {
        grid-column: span 2;
    }
}
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-sage);
    border-top-color: var(--dark-sage);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Wavy Couple Section */
.couple-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    width: 100%;
    margin: 0;
}

.wavy-frame {
    position: relative;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
}

.wavy-frame-content {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
}

.wavy-frame-content img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.wavy-top,
.wavy-bottom {
    width: 100%;
    height: 30px;
    display: block;
    background: white;
}

.wavy-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: white;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    text-align: center;
    z-index: 10;
}

/* Accessibility */
#envelope[role="button"]:focus-visible {
    outline: 3px solid rgba(201, 169, 97, 0.9);
    outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .tap-instruction {
        animation: none !important;
    }
}

/* Personalized guests section */
.main-content .guests-section {
    background:
        radial-gradient(circle at 12% 18%, rgba(200, 213, 187, 0.36), transparent 25%),
        radial-gradient(circle at 88% 82%, rgba(201, 169, 97, 0.1), transparent 23%),
        linear-gradient(180deg, #f7f5ef 0%, #eef1e9 100%);
}

.main-content .guests-section::before {
    content: '';
    position: absolute;
    inset: 28px;
    z-index: -1;
    border: 1px solid rgba(201, 169, 97, 0.16);
    pointer-events: none;
}

.guests-section .section-heading {
    position: relative;
    isolation: isolate;
    min-height: clamp(250px, 30vw, 340px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.guests-section .section-heading > :not(.guests-floral-cluster) {
    position: relative;
    z-index: 2;
}

.guests-floral-cluster {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: clamp(-3rem, 1vw, 1rem);
    width: clamp(235px, 31vw, 390px);
    aspect-ratio: 0.92;
    transform: translateY(-48%);
    pointer-events: none;
    will-change: transform;
}

.guest-flower {
    position: absolute;
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(61, 68, 54, 0.12));
    transform-origin: 12% 88%;
    will-change: transform, opacity;
}

.guest-flower-leaves {
    z-index: 1;
    left: -2%;
    bottom: 7%;
    width: 66%;
    transform: rotate(-11deg);
}

.guest-flower-eucalyptus {
    z-index: 2;
    left: 15%;
    bottom: 0;
    width: 58%;
    transform: rotate(14deg);
}

.guest-flower-bloom {
    z-index: 3;
    left: -5%;
    bottom: 2%;
    width: 78%;
    transform: rotate(-7deg);
}

.guests-section .section-title {
    max-width: 760px;
    text-shadow:
        0 2px 0 rgba(247, 245, 239, 0.86),
        0 10px 34px rgba(247, 245, 239, 0.88);
}

.guests-section .section-subtitle {
    text-shadow: 0 1px 12px rgba(247, 245, 239, 0.96);
}

.guests-heading-icon svg { width: 26px; height: 26px; }

.guest-invitation {
    position: relative;
    max-width: 980px !important;
    min-height: 510px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 7vw, 6rem);
    overflow: hidden;
    border: 1px solid rgba(201, 169, 97, 0.34);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 0%, rgba(200, 213, 187, 0.28), transparent 44%),
        rgba(255, 253, 248, 0.79);
    box-shadow:
        0 34px 78px rgba(61, 68, 54, 0.12),
        0 8px 24px rgba(61, 68, 54, 0.06),
        inset 0 0 0 9px rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
}

.guest-invitation::before {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(115, 132, 104, 0.15);
    border-radius: 4px;
    pointer-events: none;
}

.guest-invitation::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.32;
    background-image: radial-gradient(rgba(61, 68, 54, 0.12) 0.55px, transparent 0.55px);
    background-size: 7px 7px;
    mix-blend-mode: multiply;
}

.guest-seal,
.guest-intro,
.guest-list,
.guest-divider,
.guest-closing {
    position: relative;
    z-index: 2;
}

.guest-seal {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin-bottom: 1.35rem;
    border-radius: 50%;
    color: #8c7035;
    background: linear-gradient(145deg, #f8f1de, #e8dab7);
    box-shadow:
        0 12px 28px rgba(61, 68, 54, 0.13),
        inset 0 0 0 1px rgba(201, 169, 97, 0.55),
        inset 0 0 0 6px rgba(255, 253, 248, 0.38);
}

.guest-seal svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.guest-intro {
    max-width: 560px;
    margin: 0 auto clamp(1.8rem, 4vw, 2.7rem);
    color: rgba(61, 68, 54, 0.72);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.78rem, 1.6vw, 0.9rem);
    line-height: 1.7;
    letter-spacing: 0.07em;
    text-align: center;
    text-wrap: balance;
}

.guest-list {
    width: min(760px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guest-list[data-count="1"] {
    width: min(490px, 100%);
    grid-template-columns: 1fr;
}

.guest-list[data-count="2"] {
    width: min(720px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guest-list:has(.guest-name:last-child:nth-child(odd)):not([data-count="1"]) .guest-name:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 0.425rem);
    justify-self: center;
}

.guest-name {
    min-width: 0;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid rgba(115, 132, 104, 0.16);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.69), rgba(236, 238, 231, 0.7));
    color: var(--ink);
    box-shadow:
        0 14px 32px rgba(61, 68, 54, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.76);
    transition-property: transform, box-shadow, border-color, background-color;
    transition-duration: 320ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.guest-name::before {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    border: 1px solid rgba(201, 169, 97, 0.8);
    background: rgba(255, 253, 248, 0.76);
}

.guest-name-text {
    min-width: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.45rem, 3.1vw, 2rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    text-align: center;
    text-wrap: balance;
}

.guest-name:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 169, 97, 0.48);
    background-color: rgba(255, 253, 248, 0.9);
    box-shadow:
        0 22px 46px rgba(61, 68, 54, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.guest-divider {
    width: min(280px, 70%);
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin: clamp(2rem, 4vw, 2.8rem) auto 1.2rem;
}

.guest-divider::before,
.guest-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.55));
}

.guest-divider::after { transform: scaleX(-1); }
.guest-divider span { width: 6px; height: 6px; transform: rotate(45deg); background: var(--antique-gold); opacity: 0.72; }

.guest-closing {
    max-width: 610px;
    margin: 0;
    color: var(--sage);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
    font-style: italic;
    line-height: 1.35;
    text-align: center;
    text-wrap: balance;
}

.js .fade-in .guest-invitation {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    filter: blur(7px);
    transition: opacity 850ms ease 120ms, transform 850ms cubic-bezier(0.2, 0, 0, 1) 120ms, filter 850ms ease 120ms;
}

.js .fade-in.visible .guest-invitation { opacity: 1; transform: none; filter: none; }
.js .fade-in .guest-name { opacity: 0; transform: translateY(14px); }
.js .fade-in.visible .guest-name { opacity: 1; transform: none; }
.js .fade-in.visible .guest-name:nth-child(2) { transition-delay: 90ms; }
.js .fade-in.visible .guest-name:nth-child(3) { transition-delay: 180ms; }
.js .fade-in.visible .guest-name:nth-child(4) { transition-delay: 270ms; }

.js .fade-in .guest-flower {
    opacity: 0;
    filter: blur(5px) drop-shadow(0 12px 18px rgba(61, 68, 54, 0.1));
    transition:
        opacity 760ms ease,
        transform 1050ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 900ms ease;
}

.js .fade-in .guest-flower-leaves { transform: translate3d(-58px, 30px, 0) rotate(-23deg) scale(0.86); }
.js .fade-in .guest-flower-eucalyptus { transform: translate3d(-42px, 38px, 0) rotate(3deg) scale(0.84); transition-delay: 150ms; }
.js .fade-in .guest-flower-bloom { transform: translate3d(-62px, 42px, 0) rotate(-18deg) scale(0.82); transition-delay: 300ms; }

.js .fade-in.visible .guest-flower {
    opacity: 0.94;
    filter: blur(0) drop-shadow(0 12px 18px rgba(61, 68, 54, 0.12));
}

.js .fade-in.visible .guest-flower-leaves { transform: rotate(-11deg); }
.js .fade-in.visible .guest-flower-eucalyptus { transform: rotate(14deg); }
.js .fade-in.visible .guest-flower-bloom { transform: rotate(-7deg); }
.js .fade-in.visible .guests-floral-cluster { animation: guests-floral-breathe 7s ease-in-out 1.5s infinite alternate; }

@keyframes guests-floral-breathe {
    from { transform: translateY(-48%) rotate(-0.7deg); }
    to { transform: translateY(-50%) rotate(1deg); }
}

@media (max-width: 720px) {
    .main-content .guests-section::before { inset: 14px; }
    .guests-section .section-heading {
        min-height: 320px;
        padding-top: 1.25rem;
    }
    .guests-floral-cluster {
        top: 53%;
        left: -4.2rem;
        width: clamp(210px, 70vw, 280px);
        opacity: 0.88;
    }
    .guests-section .section-heading .section-icon { margin-inline: 0; }
    .guests-section .section-eyebrow { margin-inline: 0; }
    .guests-section .section-title {
        width: min(330px, 92%);
        margin-inline: auto;
    }
    .guests-section .section-subtitle {
        width: min(310px, 86%);
        margin-inline: auto;
    }
    .guest-invitation { min-height: 470px; padding: 4.5rem 1.25rem; }
    .guest-invitation::before { inset: 10px; }
    .guest-list[data-count="2"] { grid-template-columns: 1fr; width: min(490px, 100%); }
    .guest-list:has(.guest-name:last-child:nth-child(odd)):not([data-count="1"]) .guest-name:last-child { width: 100%; }
}

@media (max-width: 430px) {
    .main-content .guests-section { padding-inline: 1rem; }
    .guest-name { min-height: 82px; padding-inline: 1rem; }
    .guest-name-text { font-size: clamp(1.35rem, 7.5vw, 1.75rem); }
}

@media (prefers-reduced-motion: reduce) {
    .js .fade-in .guest-invitation,
    .js .fade-in .guest-name { opacity: 1; transform: none; filter: none; }
    .js .fade-in .guest-flower { opacity: 0.94; filter: none; transition: none; }
    .js .fade-in .guest-flower-leaves { transform: rotate(-11deg); }
    .js .fade-in .guest-flower-eucalyptus { transform: rotate(14deg); }
    .js .fade-in .guest-flower-bloom { transform: rotate(-7deg); }
    .js .fade-in.visible .guests-floral-cluster { animation: none; }
}

/* Cinematic moments carousel */
.main-content .gallery-section {
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 253, 248, 0.72), transparent 35%),
        linear-gradient(180deg, #e8ebe3 0%, #f2f2ec 100%);
    padding-bottom: clamp(6rem, 11vw, 9rem);
}

.wedding-carousel {
    position: relative;
    max-width: 1240px !important;
    user-select: none;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 8px;
    background: #d6dbd0;
    box-shadow:
        0 35px 80px rgba(61, 68, 54, 0.18),
        0 8px 24px rgba(61, 68, 54, 0.09),
        0 0 0 1px rgba(61, 68, 54, 0.08);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    cursor: grab;
}

.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-viewport.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

.carousel-track {
    display: flex;
    width: 100%;
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    background: #cbd1c5;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 45%;
    transform: scale(1.015);
    filter: saturate(0.92) contrast(1.02);
    will-change: transform;
}

.carousel-slide:nth-child(2) img { object-position: center 52%; }
.carousel-slide:nth-child(3) img { object-position: center 40%; }
.carousel-slide:nth-child(4) img { object-position: center 34%; }

.carousel-slide.is-active img {
    animation: galleryKenBurns 6.4s cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes galleryKenBurns {
    from { transform: scale(1.015); }
    to { transform: scale(1.075); }
}

.carousel-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(22, 29, 20, 0.04), transparent 35%, rgba(22, 29, 20, 0.2)),
        radial-gradient(circle at center, transparent 55%, rgba(22, 29, 20, 0.13));
}

.carousel-ui {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0.25rem 0;
}

.carousel-status {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--sage);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.carousel-current { color: var(--ink); }
.carousel-rule { width: 42px; height: 1px; background: rgba(115, 132, 104, 0.38); }

.carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.carousel-dot {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.carousel-dot::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(115, 132, 104, 0.38);
    transition: width 260ms cubic-bezier(0.2, 0, 0, 1), border-radius 260ms ease, background-color 260ms ease;
}

.carousel-dot.is-active::before {
    width: 24px;
    border-radius: 999px;
    background: var(--sage);
}

.carousel-nav {
    justify-self: end;
    display: flex;
    gap: 0.45rem;
}

.carousel-arrow {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(115, 132, 104, 0.22);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.58);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(61, 68, 54, 0.07);
    transition-property: transform, background-color, color, box-shadow;
    transition-duration: 240ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.carousel-arrow svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel-arrow:hover {
    transform: translateY(-2px);
    background: var(--sage);
    color: #fffdf8;
    box-shadow: 0 12px 26px rgba(61, 68, 54, 0.16);
}

.carousel-arrow:active { transform: scale(0.96); }

.carousel-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    height: 2px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.carousel-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 248, 231, 0.64), #ead7a6);
    transform: scaleX(0);
    transform-origin: left;
}

.wedding-carousel.is-playing .carousel-progress span {
    animation: carouselProgress 5.8s linear forwards;
}

@keyframes carouselProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.js .fade-in .wedding-carousel {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    filter: blur(7px);
    transition: opacity 850ms ease 120ms, transform 850ms cubic-bezier(0.2, 0, 0, 1) 120ms, filter 850ms ease 120ms;
}

.js .fade-in.visible .wedding-carousel {
    opacity: 1;
    transform: none;
    filter: none;
}

@media (max-width: 820px) {
    .carousel-slide { aspect-ratio: 4 / 3; }
    .carousel-ui { padding-inline: 0; }
}

@media (max-width: 560px) {
    .main-content .gallery-section { padding-inline: 1rem; }
    .main-content .gallery-section .section-heading { padding-inline: 0.25rem; }
    .carousel-slide { aspect-ratio: 4 / 5; }
    .carousel-slide img { object-position: center center; }
    .carousel-slide:nth-child(2) img { object-position: center center; }
    .carousel-slide:nth-child(3) img { object-position: 58% center; }
    .carousel-slide:nth-child(4) img { object-position: center center; }
    .carousel-ui { grid-template-columns: 1fr auto; min-height: 68px; }
    .carousel-status { display: none; }
    .carousel-dots { justify-self: start; }
    .carousel-nav { grid-column: 2; }
    .carousel-arrow { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-viewport { scroll-behavior: auto; }
    .carousel-slide.is-active img,
    .wedding-carousel.is-playing .carousel-progress span { animation: none !important; }
    .js .fade-in .wedding-carousel { opacity: 1; transform: none; filter: none; }
}

/* Matrimonial envelope redesign */
:root {
    --paper: #fffdf8;
    --paper-warm: #f7f2e8;
    --sage-mist: rgba(200, 213, 187, 0.72);
    --sage-veil: rgba(232, 235, 228, 0.62);
    --gold-soft: rgba(201, 169, 97, 0.72);
    --olive-ink: #343b2f;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 253, 248, 0.72), transparent 34%),
        linear-gradient(135deg, #E8EBE4 0%, #D4D9CD 100%);
}

.envelope-wrapper {
    background:
        linear-gradient(135deg, rgba(232, 235, 228, 0.68), rgba(212, 217, 205, 0.58)),
        radial-gradient(circle at 50% 42%, rgba(255, 253, 248, 0.78), transparent 42%);
    backdrop-filter: blur(1px) saturate(0.9);
    transition:
        opacity 1s ease,
        transform 1s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 1s ease,
        visibility 0s linear 1s;
}

.envelope-wrapper::before,
.envelope-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.envelope-wrapper::before {
    background:
        linear-gradient(rgba(255, 253, 248, 0.28), rgba(255, 253, 248, 0.1)),
        url('imagenes/roses.png') center 8% / min(560px, 72vw) auto no-repeat;
    opacity: 0.08;
    mix-blend-mode: multiply;
}

.envelope-wrapper::after {
    background:
        radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(61, 68, 54, 0.18) 100%),
        linear-gradient(180deg, rgba(255, 253, 248, 0.38), rgba(245, 243, 237, 0.2));
}

.envelope-wrapper.zooming {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(3px);
}

.envelope {
    width: min(1040px, 88vw);
    height: min(650px, 78dvh);
    isolation: isolate;
    transform: translateY(0);
    transition: transform 0.35s ease;
}

.envelope:hover {
    transform: translateY(-4px);
}

.envelope::before {
    content: '';
    position: absolute;
    inset: -18px;
    z-index: -1;
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.22);
    box-shadow:
        0 38px 100px rgba(61, 68, 54, 0.22),
        0 10px 28px rgba(61, 68, 54, 0.16);
    filter: blur(0.2px);
    transition: opacity 0.45s ease;
}

.envelope.opening::before {
    opacity: 0;
}

.envelope-back {
    border-radius: 10px;
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, rgba(201, 169, 97, 0.08), transparent 12%, transparent 88%, rgba(201, 169, 97, 0.07)),
        radial-gradient(circle at 24% 18%, rgba(201, 169, 97, 0.13), transparent 26%),
        radial-gradient(circle at 80% 74%, rgba(159, 175, 142, 0.13), transparent 31%),
        radial-gradient(rgba(61, 68, 54, 0.035) 0.7px, transparent 0.7px);
    background-size: auto, auto, auto, 17px 17px;
    border: 1px solid rgba(201, 169, 97, 0.22);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.75),
        inset 0 16px 48px rgba(255, 255, 255, 0.56),
        0 30px 80px rgba(61, 68, 54, 0.18);
    clip-path: polygon(0 1.2%, 1.2% 0, 12% 0.8%, 24% 0, 38% 0.9%, 50% 0, 63% 0.7%, 75% 0, 88% 0.9%, 98.8% 0, 100% 1.2%, 99.2% 17%, 100% 34%, 99.2% 51%, 100% 69%, 99.1% 87%, 100% 98.8%, 98.8% 100%, 84% 99.2%, 68% 100%, 51% 99.1%, 35% 100%, 18% 99.2%, 1.2% 100%, 0 98.8%, 0.8% 82%, 0 64%, 0.8% 47%, 0 29%, 0.8% 12%);
}

.envelope-back::before {
    opacity: 0.58;
    background-image:
        radial-gradient(rgba(61, 68, 54, 0.03) 1px, transparent 1px),
        linear-gradient(105deg, transparent 0 48%, rgba(115, 132, 104, 0.08) 49%, transparent 51%),
        linear-gradient(75deg, transparent 0 49%, rgba(201, 169, 97, 0.06) 50%, transparent 52%);
    background-size: 18px 18px, 100% 100%, 100% 100%;
}

.envelope-back::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(201, 169, 97, 0.32);
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
    pointer-events: none;
}

.floral-decoration-top,
.floral-decoration-bottom {
    height: 160px;
    z-index: 9;
}

.floral-decoration-top svg,
.floral-decoration-bottom svg {
    opacity: 0.22;
    filter: drop-shadow(0 1px 0 rgba(201, 169, 97, 0.2));
}

.floral-decoration-top path,
.floral-decoration-bottom path {
    stroke: var(--dark-sage);
}

.floral-decoration-top circle,
.floral-decoration-bottom circle,
.floral-decoration-top ellipse,
.floral-decoration-bottom ellipse {
    fill: var(--dark-sage);
}

.envelope-flap-left,
.envelope-flap-right,
.envelope-flap-bottom,
.envelope-flap-top {
    border-color: rgba(201, 169, 97, 0.2);
}

.envelope-flap-left,
.envelope-flap-right {
    background:
        linear-gradient(120deg, rgba(255, 253, 248, 0.98), rgba(245, 243, 237, 0.92) 58%, rgba(200, 213, 187, 0.2)),
        radial-gradient(circle at 35% 50%, rgba(201, 169, 97, 0.1), transparent 38%);
    box-shadow:
        inset -18px 0 42px rgba(61, 68, 54, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: opacity 0.55s ease 0.32s, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.envelope-flap-bottom {
    height: 50%;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(247, 242, 232, 0.96)),
        radial-gradient(circle at 50% 0%, rgba(201, 169, 97, 0.14), transparent 34%);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 18%, 0 0);
    box-shadow:
        0 -8px 26px rgba(61, 68, 54, 0.12),
        inset 0 10px 24px rgba(255, 255, 255, 0.7),
        inset 0 -24px 44px rgba(115, 132, 104, 0.08);
    transition: transform 1.15s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.75s ease;
}

.envelope-flap-bottom::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(173deg, transparent 0 45%, rgba(115, 132, 104, 0.12) 46%, transparent 48%),
        linear-gradient(7deg, transparent 0 45%, rgba(115, 132, 104, 0.1) 46%, transparent 48%);
    opacity: 0.7;
}

.envelope-flap-top {
    height: 56%;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(247, 242, 232, 0.92)),
        radial-gradient(circle at 50% 82%, rgba(201, 169, 97, 0.14), transparent 30%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow:
        0 16px 38px rgba(61, 68, 54, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: transform 1.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.65s ease;
}

.envelope-flap-top::after {
    height: 44%;
    background:
        linear-gradient(to bottom, transparent, rgba(61, 68, 54, 0.11)),
        radial-gradient(circle at 50% 100%, rgba(201, 169, 97, 0.12), transparent 40%);
}

.envelope.opening .envelope-flap-top {
    transform: rotateX(178deg);
    opacity: 0.72;
}

.envelope.opening .envelope-flap-bottom {
    transform: translateY(86%) scaleY(0.96);
}

.envelope.opening .envelope-flap-left {
    transform: translateX(-11%) rotateY(-18deg);
}

.envelope.opening .envelope-flap-right {
    transform: translateX(11%) rotateY(18deg) scaleX(-1);
}

.card-preview {
    top: 53%;
    width: min(430px, 70%);
    height: min(500px, 70%);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 242, 232, 0.98)),
        url('imagenes/carta.jpg') center / cover no-repeat;
    background-blend-mode: screen;
    border: 1px solid rgba(201, 169, 97, 0.28);
    box-shadow:
        0 26px 70px rgba(61, 68, 54, 0.2),
        inset 0 0 0 10px rgba(255, 253, 248, 0.5);
}

.card-preview::before {
    inset: 18px;
    border-radius: 5px;
    border-color: rgba(201, 169, 97, 0.48);
}

.card-preview-content {
    color: var(--olive-ink);
    gap: 12px;
}

.card-preview-ornament {
    color: var(--gold);
    font-size: 1.4rem;
}

.card-preview-names {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.05;
}

.card-preview-date {
    font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.card-preview-place {
    font-size: 0.75rem;
    letter-spacing: 2.8px;
}

.envelope-seal {
    top: 55%;
    width: clamp(104px, 10vw, 136px);
    height: clamp(104px, 10vw, 136px);
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), transparent 18%),
        radial-gradient(circle at 62% 72%, rgba(115, 132, 104, 0.22), transparent 28%),
        linear-gradient(145deg, #f9f4e9, #e9dfca);
    border: 1px solid rgba(201, 169, 97, 0.68);
    box-shadow:
        0 16px 36px rgba(61, 68, 54, 0.25),
        inset 0 2px 8px rgba(255, 255, 255, 0.72),
        inset 0 -8px 18px rgba(115, 132, 104, 0.14),
        0 0 0 8px rgba(245, 243, 237, 0.54);
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.envelope-seal::before {
    inset: 10px;
    width: auto;
    height: auto;
    border: 1px solid rgba(201, 169, 97, 0.55);
    background:
        radial-gradient(circle at 50% 50%, transparent 50%, rgba(115, 132, 104, 0.08) 100%);
}

.envelope-seal::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px dashed rgba(115, 132, 104, 0.38);
}

.seal-content {
    gap: 5px;
    color: var(--dark-sage);
}

.seal-initials {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1;
    color: var(--dark-sage);
}

.seal-divider {
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.seal-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 1.8px;
    color: var(--olive-ink);
}

.envelope.opening .envelope-seal {
    transform: translate(-50%, -50%) scale(0.78) rotate(-8deg);
}

.tap-instruction {
    bottom: clamp(26px, 5.2vh, 44px);
    color: var(--olive-ink);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3.6px;
    background: rgba(255, 253, 248, 0.72);
    border: 1px solid rgba(201, 169, 97, 0.46);
    box-shadow:
        0 10px 28px rgba(61, 68, 54, 0.12),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    padding: 11px 22px;
    border-radius: 999px;
    text-shadow: none;
}

.main-content {
    opacity: 0.48;
    pointer-events: none;
    transform: scale(1.018);
    filter: blur(7px) saturate(0.78);
    transition:
        opacity 1.05s ease,
        transform 1.05s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 1.05s ease;
}

.main-content::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999;
    background:
        linear-gradient(135deg, rgba(245, 243, 237, 0.62), rgba(200, 213, 187, 0.44)),
        radial-gradient(circle at 50% 42%, rgba(255, 253, 248, 0.5), transparent 52%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.9s ease;
}

.main-content.revealing,
.main-content.visible,
.main-content.revealed {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    filter: none;
}

.main-content.revealing::before,
.main-content.visible::before,
.main-content.revealed::before {
    opacity: 0;
}

.hero-overlay {
    background:
        linear-gradient(180deg, rgba(61, 68, 54, 0.38), rgba(245, 243, 237, 0.18) 52%, rgba(61, 68, 54, 0.34)),
        radial-gradient(circle at 50% 42%, rgba(201, 169, 97, 0.2), transparent 46%);
}

.hero-content {
    max-width: 860px;
}

.hero-subtitle,
.section-subtitle,
.countdown-label,
.rsvp-button,
.footer-hashtag {
    font-weight: 400;
}

.hero-names {
    letter-spacing: 0;
    line-height: 1.02;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero-date {
    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
}

.section-title {
    color: var(--olive-ink);
    margin-bottom: 1.6rem;
}

.location-info,
.dress-code-item,
.countdown-item {
    border-radius: 8px;
}

.gallery-item {
    border-radius: 8px;
}

@media (max-width: 768px) {
    .envelope {
        width: min(92vw, 440px);
        height: min(74dvh, 620px);
    }

    .envelope::before {
        inset: -10px;
        border-radius: 12px;
    }

    .floral-decoration-top,
    .floral-decoration-bottom {
        height: 120px;
    }

    .card-preview {
        width: 68%;
        height: 58%;
        top: 52%;
    }

    .envelope-seal {
        width: 104px;
        height: 104px;
    }

    .tap-instruction {
        max-width: calc(100vw - 48px);
        white-space: nowrap;
        font-size: 10px;
        letter-spacing: 2.8px;
        padding: 10px 18px;
    }

    .hero-content {
        padding: 1.25rem;
    }
}

@media (max-width: 430px) {
    .envelope {
        width: min(94vw, 380px);
        height: min(68dvh, 560px);
    }

    .card-preview-content {
        padding: 36px 18px;
    }

    .card-preview-place {
        letter-spacing: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-content {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .main-content::before {
        opacity: 0;
    }
}

/* Clean reveal: remove the inner paper preview and fade the envelope body while opening */
.card-preview {
    display: none !important;
}

.envelope-back,
.floral-decoration-top,
.floral-decoration-bottom {
    transition: opacity 0.55s ease, filter 0.55s ease;
}

.envelope.opening .envelope-back,
.envelope.opening .floral-decoration-top,
.envelope.opening .floral-decoration-bottom {
    opacity: 0;
    filter: blur(2px);
}

.envelope.opening .envelope-flap-top {
    opacity: 0;
}

.envelope.opening .envelope-flap-left,
.envelope.opening .envelope-flap-right,
.envelope.opening .envelope-flap-bottom {
    opacity: 0;
}

/* Welcome cover: replaces the envelope with a botanical entrance screen */
.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--cream);
    background:
        linear-gradient(180deg, rgba(61, 68, 54, 0.14), rgba(61, 68, 54, 0.24)),
        linear-gradient(180deg, rgba(115, 132, 104, 0.96), rgba(103, 117, 82, 0.98));
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.8s;
}

.welcome-screen::before,
.welcome-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.welcome-background-stage {
    position: absolute;
    z-index: 0;
    inset: -2.5%;
    overflow: hidden;
    pointer-events: none;
    animation: welcome-botanical-reveal 1400ms cubic-bezier(.16, 1, .3, 1) both;
}

.welcome-background-art {
    position: absolute;
    inset: -2.5%;
    background: url('imagenes/welcome-botanical-desktop.png') center / cover no-repeat;
    transform-origin: 50% 50%;
    will-change: transform;
    animation: welcome-botanical-breathe 14s ease-in-out 1.4s infinite alternate;
}

@keyframes welcome-botanical-reveal {
    from { opacity: 0; transform: scale(1.065); filter: blur(5px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes welcome-botanical-breathe {
    0% { transform: translate3d(0, -0.35%, 0) scale(1.018); }
    48% { transform: translate3d(.25%, .2%, 0) scale(1.028); }
    100% { transform: translate3d(-.2%, .55%, 0) scale(1.038); }
}

.welcome-screen::before {
    background:
        radial-gradient(circle at 50% 48%, rgba(61, 68, 54, 0.06), transparent 33%),
        radial-gradient(circle at 50% 48%, rgba(245, 243, 237, 0.08), transparent 38%);
    opacity: 1;
}

.welcome-screen::after {
    background:
        radial-gradient(circle at 50% 50%, transparent 0 44%, rgba(23, 31, 22, 0.25) 100%),
        linear-gradient(90deg, rgba(23, 31, 22, 0.2), transparent 22%, transparent 78%, rgba(23, 31, 22, 0.2));
}

.welcome-screen.leaving {
    opacity: 0;
    transform: scale(1.025);
    visibility: hidden;
    pointer-events: none;
}

.welcome-screen.content-hidden .welcome-content,
.welcome-screen.content-hidden .welcome-florals,
.welcome-screen.content-hidden .welcome-background-stage {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    margin: auto;
    padding: clamp(7rem, 19vh, 11rem) 1.25rem clamp(6rem, 15vh, 9rem);
    text-align: center;
    text-shadow: 0 4px 24px rgba(25, 35, 22, 0.44);
}

.welcome-florals {
    display: none;
}

.welcome-florals svg {
    display: block;
    width: 100%;
    height: auto;
}

.welcome-florals-top {
    top: -92px;
    transform: translateX(-50%);
}

.welcome-florals-bottom {
    bottom: -116px;
    transform: translateX(-50%);
}

.welcome-ornament {
    width: min(280px, 58vw);
    height: 32px;
    margin: 0 auto clamp(1rem, 2.7vh, 1.8rem);
    position: relative;
}

.welcome-ornament::before,
.welcome-ornament::after,
.welcome-ornament span::before,
.welcome-ornament span::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    background: rgba(245, 243, 237, 0.72);
}

.welcome-ornament::before {
    left: 0;
    width: 42%;
    transform: rotate(-12deg);
}

.welcome-ornament::after {
    right: 0;
    width: 42%;
    transform: rotate(12deg);
}

.welcome-ornament span::before,
.welcome-ornament span::after {
    width: 62px;
}

.welcome-ornament span::before {
    left: 34%;
    transform: translateY(-10px) rotate(18deg);
}

.welcome-ornament span::after {
    right: 34%;
    transform: translateY(-10px) rotate(-18deg);
}

.welcome-kicker {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1.35;
    color: rgba(255, 253, 248, 0.95);
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: clamp(1.1rem, 3vh, 1.8rem);
}

.welcome-names {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4.35rem, 8.35vw, 6.85rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0;
    color: #fffdf8;
    margin: 0 auto;
    white-space: nowrap;
}

.welcome-names span {
    display: inline-flex;
    width: clamp(3.8rem, 7vw, 5.4rem);
    height: clamp(3.8rem, 7vw, 5.4rem);
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 clamp(0.3rem, 1.1vw, 0.8rem);
    border-radius: 50%;
    background: linear-gradient(180deg, #fff8df, var(--cream));
    color: var(--dark-text);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.3rem, 5.2vw, 4.1rem);
    line-height: 1;
    box-shadow:
        0 14px 34px rgba(23, 31, 22, 0.26),
        inset 0 0 0 1px rgba(201, 169, 97, 0.26);
}

.welcome-line {
    width: min(560px, 80vw);
    height: 1px;
    margin: clamp(1.6rem, 3.4vh, 2.3rem) auto clamp(1.1rem, 2.5vh, 1.65rem);
    background: linear-gradient(90deg, transparent, rgba(245, 243, 237, 0.78), transparent);
}

.welcome-event {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.1rem, 5vw, 3.7rem);
    color: rgba(255, 248, 222, 0.92);
    margin-bottom: clamp(1.55rem, 4vh, 2.7rem);
    line-height: 1;
}

.welcome-note {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.4vw, 1.45rem);
    color: rgba(255, 253, 248, 0.95);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.welcome-actions {
    display: flex;
    justify-content: center;
}

.welcome-button {
    min-width: min(290px, 100%);
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    border: 1px solid rgba(201, 169, 97, 0.34);
    border-radius: 12px;
    padding: 1.05rem clamp(1.5rem, 4vw, 3rem);
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(245, 243, 237, 0.94));
    color: var(--dark-text);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.3vw, 1.35rem);
    font-weight: 400;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow:
        0 18px 42px rgba(23, 31, 22, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.welcome-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.welcome-button:hover {
    transform: translateY(-3px);
    background: #fffdf8;
    box-shadow:
        0 22px 50px rgba(23, 31, 22, 0.3),
        inset 0 0 0 1px rgba(201, 169, 97, 0.24);
}

.welcome-button:hover svg {
    transform: translateX(4px);
}

.welcome-button:active {
    transform: scale(0.96);
}

.welcome-button:focus-visible {
    outline: 3px solid rgba(201, 169, 97, 0.92);
    outline-offset: 4px;
}

.main-content {
    opacity: 0;
    pointer-events: none;
    transform: scale(1);
    filter: none;
}

.main-content::before {
    display: none;
}

.main-content.visible,
.main-content.revealed {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 720px) {
    .welcome-screen {
        min-height: 100svh;
        background:
            linear-gradient(180deg, rgba(61, 68, 54, 0.1), rgba(61, 68, 54, 0.24)),
            linear-gradient(180deg, rgba(115, 132, 104, 0.96), rgba(103, 117, 82, 0.98));
    }

    .welcome-background-art {
        background-image: url('imagenes/welcome-botanical-mobile.png');
    }

    .welcome-content {
        width: min(100%, calc(100% - 28px));
        padding-top: clamp(4.5rem, 12svh, 7.5rem);
        padding-bottom: clamp(8.75rem, 23svh, 12rem);
        transform: translateY(-3svh);
    }

    .welcome-names {
        font-size: clamp(3.15rem, 14vw, 5rem);
        white-space: normal;
    }

    .welcome-names span {
        display: flex;
        margin: 0.45rem auto;
    }

    .welcome-actions {
        position: fixed;
        z-index: 4;
        right: 1.1rem;
        bottom: max(4.4rem, calc(env(safe-area-inset-bottom, 0px) + 4.4rem));
        left: 1.1rem;
        flex-direction: column;
        align-items: center;
        pointer-events: none;
    }

    .welcome-button {
        width: min(100%, 340px);
        min-width: 0;
        min-height: 56px;
        pointer-events: auto;
    }
}

/* =========================================================
   Invitation interior — botanical editorial system
   The welcome cover above intentionally remains untouched.
   ========================================================= */
.main-content {
    --paper: #f7f5ef;
    --paper-deep: #eceee7;
    --ink: #3d4436;
    --sage: #738468;
    --sage-soft: #9faf8e;
    --sage-pale: #c8d5bb;
    --antique-gold: #c9a961;
    background: var(--paper);
    color: var(--ink);
    overflow: clip;
    -webkit-font-smoothing: antialiased;
}

.main-content .section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(5.5rem, 10vw, 9rem) max(5vw, 1.25rem);
    isolation: isolate;
}

.main-content .section > * {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.section-heading {
    text-align: center;
    margin-bottom: clamp(2.8rem, 6vw, 4.75rem);
}

.flower-decorated-heading {
    position: relative;
    min-height: clamp(250px, 29vw, 330px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.flower-decorated-heading > :not(.section-floral-cluster) {
    position: relative;
    z-index: 2;
}

.section-floral-cluster {
    position: absolute;
    z-index: 0;
    top: 50%;
    width: clamp(230px, 30vw, 370px);
    aspect-ratio: .9;
    pointer-events: none;
    will-change: transform;
}

.section-floral-location {
    left: clamp(-2.6rem, 0vw, .5rem);
    transform: translateY(-50%) rotate(-2deg);
}

.section-floral-dress {
    right: clamp(-2.6rem, 0vw, .5rem);
    transform: translateY(-50%) scaleX(-1) rotate(-2deg);
}

.section-floral-gallery {
    left: clamp(-2rem, 1vw, 1.2rem);
    transform: translateY(-47%) rotate(5deg) scale(.94);
}

.section-floral-piece {
    position: absolute;
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    object-fit: contain;
    transform-origin: 12% 88%;
    filter: drop-shadow(0 12px 20px rgba(61, 68, 54, .12));
    will-change: opacity, transform, filter;
}

.section-floral-leaves {
    z-index: 1;
    left: 1%;
    bottom: 8%;
    width: 66%;
    transform: rotate(-13deg);
}

.section-floral-eucalyptus {
    z-index: 2;
    left: 18%;
    bottom: 0;
    width: 58%;
    transform: rotate(15deg);
}

.section-floral-blossoms {
    z-index: 3;
    left: -4%;
    bottom: 1%;
    width: 78%;
    transform: rotate(-6deg);
}

.flower-decorated-heading .section-title,
.flower-decorated-heading .section-subtitle,
.flower-decorated-heading .section-eyebrow {
    text-shadow:
        0 2px 0 rgba(247, 245, 239, .84),
        0 8px 24px rgba(247, 245, 239, .94);
}

.js .fade-in .section-floral-piece {
    opacity: 0;
    filter: blur(5px) drop-shadow(0 12px 20px rgba(61, 68, 54, .08));
    transition:
        opacity 760ms ease,
        transform 1050ms cubic-bezier(.16, 1, .3, 1),
        filter 900ms ease;
}

.js .fade-in .section-floral-leaves { transform: translate3d(-58px, 32px, 0) rotate(-25deg) scale(.84); }
.js .fade-in .section-floral-eucalyptus { transform: translate3d(-44px, 40px, 0) rotate(3deg) scale(.82); transition-delay: 140ms; }
.js .fade-in .section-floral-blossoms { transform: translate3d(-68px, 44px, 0) rotate(-18deg) scale(.8); transition-delay: 280ms; }

.js .fade-in.visible .section-floral-piece {
    opacity: .92;
    filter: blur(0) drop-shadow(0 12px 20px rgba(61, 68, 54, .12));
}

.js .fade-in.visible .section-floral-leaves { transform: rotate(-13deg); }
.js .fade-in.visible .section-floral-eucalyptus { transform: rotate(15deg); }
.js .fade-in.visible .section-floral-blossoms { transform: rotate(-6deg); }
.js .fade-in.visible .section-floral-location { animation: section-floral-left-drift 7.5s ease-in-out 1.4s infinite alternate; }
.js .fade-in.visible .section-floral-dress { animation: section-floral-right-drift 8.5s ease-in-out 1.6s infinite alternate; }
.js .fade-in.visible .section-floral-gallery { animation: section-floral-gallery-drift 8s ease-in-out 1.5s infinite alternate; }

@keyframes section-floral-left-drift {
    from { transform: translateY(-50%) rotate(-2.6deg); }
    to { transform: translateY(-52%) rotate(.4deg); }
}

@keyframes section-floral-right-drift {
    from { transform: translateY(-50%) scaleX(-1) rotate(-2.6deg); }
    to { transform: translateY(-52%) scaleX(-1) rotate(.4deg); }
}

@keyframes section-floral-gallery-drift {
    from { transform: translateY(-47%) rotate(4deg) scale(.94); }
    to { transform: translateY(-49%) rotate(7deg) scale(.96); }
}

@media (max-width: 720px) {
    .flower-decorated-heading {
        min-height: 315px;
        padding-block: 1rem;
    }

    .section-floral-cluster {
        top: 51%;
        width: clamp(225px, 66vw, 275px);
        opacity: .86;
    }

    .section-floral-location,
    .section-floral-gallery { left: -5.4rem; }
    .section-floral-dress { right: -5.4rem; }

    .flower-decorated-heading .section-title {
        max-width: min(340px, 92%);
    }

    .flower-decorated-heading .section-subtitle {
        max-width: min(315px, 88%);
    }
}

@media (max-width: 430px) {
    .section-floral-cluster { width: 235px; }
    .section-floral-location,
    .section-floral-gallery { left: -5.8rem; }
    .section-floral-dress { right: -5.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .js .fade-in .section-floral-piece {
        opacity: .92;
        filter: none;
        transition: none;
    }

    .js .fade-in .section-floral-leaves { transform: rotate(-13deg); }
    .js .fade-in .section-floral-eucalyptus { transform: rotate(15deg); }
    .js .fade-in .section-floral-blossoms { transform: rotate(-6deg); }
    .js .fade-in.visible .section-floral-cluster { animation: none; }
}

.section-icon,
.location-icon {
    display: inline-grid;
    place-items: center;
    color: var(--sage);
}

.section-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(200, 213, 187, 0.25);
    box-shadow: inset 0 0 0 1px rgba(115, 132, 104, 0.18), 0 8px 24px rgba(61, 68, 54, 0.08);
}

.calendar-save-button {
    border: 0;
    cursor: pointer;
    transition: color 240ms ease, background-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.calendar-save-button:hover {
    color: #fffdf8;
    background: var(--sage);
    box-shadow: 0 12px 28px rgba(61, 68, 54, 0.2), inset 0 1px rgba(255,255,255,.22);
    transform: translateY(-3px);
}

.calendar-save-button:active { transform: translateY(0) scale(.94); }

.section-icon svg,
.location-icon svg,
.main-dress-icon svg,
.rsvp-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.section-eyebrow {
    margin: 0 0 0.65rem;
    color: var(--antique-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.main-content .section-title {
    margin: 0;
    color: var(--ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3.2rem, 7vw, 5.75rem);
    font-style: italic;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0;
    text-wrap: balance;
}

.main-content .section-subtitle {
    max-width: 660px;
    margin: 1.2rem auto 0;
    color: rgba(61, 68, 54, 0.78);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.85rem, 1.7vw, 1rem);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.055em;
    text-wrap: pretty;
}

/* Video hero: controlled cinematic aspect and stronger text legibility */
.main-content .hero-section {
    min-height: min(900px, 100dvh);
    height: 100dvh;
    overflow: hidden;
}

.main-content .hero-section::after {
    content: none;
}

.main-content .video-container video {
    transform: scale(1.035);
    transition: transform 1.6s cubic-bezier(0.2, 0, 0, 1);
}

.main-content.visible .video-container video {
    transform: scale(1);
}

.main-content .hero-overlay {
    background: linear-gradient(180deg, rgba(35, 42, 31, 0.38), rgba(35, 42, 31, 0.15) 42%, rgba(35, 42, 31, 0.62)),
        radial-gradient(circle at 50% 42%, transparent 0 25%, rgba(22, 29, 20, 0.25) 100%);
}

.main-content .hero-content {
    position: absolute;
    top: clamp(2rem, 4.5vh, 3.5rem);
    left: 50%;
    width: min(900px, calc(100% - 2rem));
    padding: 2rem;
    margin-top: 0;
    transform: translateX(-50%);
    animation: none;
}

.main-content .hero-names {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.86;
}

.main-content .hero-date {
    max-width: 760px;
    margin-inline: auto;
}

.main-content .hero-section .decorative-line,
.main-content .hero-section .floral-ornament,
.main-content .hero-section .hero-names,
.main-content .hero-section .hero-date {
    display: none !important;
}

.main-content .hero-section .hero-subtitle {
    position: relative;
    display: inline-block;
    margin: 0;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    letter-spacing: 0.42em;
    padding-bottom: 0.85rem;
}

.main-content .hero-section .hero-subtitle::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(170px, 62%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(234, 215, 166, 0.96), transparent);
    box-shadow: 0 1px 10px rgba(201, 169, 97, 0.48);
}

.hero-couple-signature {
    position: absolute;
    z-index: 4;
    right: 1.25rem;
    bottom: clamp(7rem, 12vh, 9rem);
    left: 1.25rem;
    margin: 0;
    color: rgba(255, 253, 248, 0.96);
    font-family: 'Great Vibes', 'Brush Script MT', cursive;
    font-size: clamp(2.8rem, 5.4vw, 4.5rem);
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    text-shadow:
        0 3px 12px rgba(18, 24, 17, 0.62),
        0 10px 34px rgba(18, 24, 17, 0.42);
    pointer-events: none;
}

.hero-couple-signature span {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
    transform: translateY(14px);
    transition:
        opacity 720ms ease,
        transform 900ms cubic-bezier(.16, 1, .3, 1),
        filter 720ms ease;
}

.hero-couple-signature .hero-signature-amp {
    margin: 0 .18em;
    color: #e2c46f;
    font-family: inherit;
    font-size: .82em;
    font-style: normal;
    line-height: 1;
    transform: translateY(-.05em);
}

.main-content.visible .hero-couple-signature span,
.main-content.revealed .hero-couple-signature span {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.main-content.visible .hero-couple-signature span:nth-child(1),
.main-content.revealed .hero-couple-signature span:nth-child(1) { transition-delay: 360ms; }
.main-content.visible .hero-couple-signature span:nth-child(2),
.main-content.revealed .hero-couple-signature span:nth-child(2) { transition-delay: 470ms; }
.main-content.visible .hero-couple-signature span:nth-child(3),
.main-content.revealed .hero-couple-signature span:nth-child(3) { transition-delay: 580ms; }

.hero-scroll-cue {
    position: absolute;
    right: clamp(1.5rem, 4vw, 4rem);
    bottom: clamp(2rem, 4vh, 3.25rem);
    z-index: 6;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
    border: 0;
    color: rgba(255, 253, 248, 0.9);
    background: transparent;
    cursor: pointer;
    text-shadow: 0 2px 14px rgba(20, 27, 18, 0.48);
    transition-property: opacity, transform;
    transition-duration: 320ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.hero-scroll-cue.dismissed {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.hero-scroll-label {
    font: 500 0.68rem/1 'Montserrat', sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-scroll-icon {
    position: relative;
    width: 31px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 253, 248, 0.55);
    border-radius: 18px;
    background: rgba(61, 68, 54, 0.16);
    box-shadow: 0 8px 24px rgba(20, 27, 18, 0.18), inset 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    transition-property: border-color, background-color;
    transition-duration: 260ms;
}

.hero-scroll-icon span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--antique-gold);
    transform: translateX(-50%);
    animation: scrollCueDot 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hero-scroll-icon svg {
    position: absolute;
    bottom: 6px;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: scrollCueArrow 1.8s ease-in-out infinite;
}

.hero-scroll-cue:hover .hero-scroll-icon {
    border-color: rgba(201, 169, 97, 0.9);
    background: rgba(61, 68, 54, 0.28);
}

.hero-scroll-cue:active {
    scale: 0.96;
}

.hero-scroll-cue:focus-visible {
    outline: 2px solid var(--antique-gold);
    outline-offset: 5px;
}

@keyframes scrollCueDot {
    0% { opacity: 0; transform: translate(-50%, 0); }
    25%, 75% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, 12px); }
}

@keyframes scrollCueArrow {
    0%, 100% { opacity: 0.55; transform: translateY(-1px); }
    50% { opacity: 1; transform: translateY(2px); }
}

/* Countdown: embroidered sage surface and faceted glass tiles */
.main-content .countdown-container {
    min-height: 690px;
    display: grid;
    align-content: center;
    background-color: #657456;
    background-image: linear-gradient(135deg, rgba(42, 52, 36, 0.22), rgba(115, 132, 104, 0.08)), url('imagenes/carta2-clean.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), inset 0 -1px rgba(20, 28, 18, 0.2);
}

.countdown-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(115, 132, 104, 0.12) 0, rgba(35, 44, 31, 0.55) 100%);
}

.section-heading-light .section-icon {
    color: #fff8e7;
    background: rgba(255, 253, 248, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 231, 0.24), 0 10px 30px rgba(23, 31, 22, 0.18);
}

.countdown-container .section-eyebrow { color: #ead7a6; }
.countdown-container .section-title { color: #fffdf8; text-shadow: 0 3px 24px rgba(20, 28, 18, 0.34); }
.countdown-container .section-subtitle { color: rgba(255, 253, 248, 0.82); }

.main-content .countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.35rem);
    max-width: 900px;
}

.main-content .countdown-item {
    position: relative;
    min-height: 190px;
    display: grid;
    align-content: center;
    padding: 1.5rem 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 248, 231, 0.34);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(255, 253, 248, 0.19), rgba(200, 213, 187, 0.11));
    box-shadow: 0 24px 50px rgba(26, 35, 23, 0.2), inset 0 1px rgba(255, 255, 255, 0.26), inset 0 0 28px rgba(255, 253, 248, 0.045);
    backdrop-filter: blur(10px) saturate(0.85);
    transition-property: transform, background-color, box-shadow;
    transition-duration: 360ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.main-content .countdown-item::before,
.main-content .countdown-item::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-color: rgba(234, 215, 166, 0.52);
    pointer-events: none;
}

.main-content .countdown-item::before { inset: 8px auto auto 8px; border-top: 1px solid; border-left: 1px solid; }
.main-content .countdown-item::after { inset: auto 8px 8px auto; border-right: 1px solid; border-bottom: 1px solid; }
.main-content .countdown-item:hover { transform: translateY(-5px); background-color: rgba(255,255,255,.05); box-shadow: 0 30px 60px rgba(26,35,23,.28), inset 0 1px rgba(255,255,255,.3); }

.main-content .countdown-number {
    color: #fffdf8;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3.6rem, 7vw, 5.5rem);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 0.85;
    text-shadow: 0 5px 18px rgba(22, 30, 20, 0.25);
    transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.main-content .countdown-number.ticking { opacity: 0.4; transform: translateY(-5px); filter: blur(2px); }
.main-content .countdown-label { margin-top: 1rem; color: rgba(255, 253, 248, 0.72); font-size: .67rem; font-weight: 500; letter-spacing: .22em; }

.botanical-divider { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3.5rem; }
.botanical-divider::before, .botanical-divider::after { content: ''; width: min(180px, 20vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(234,215,166,.62)); }
.botanical-divider::after { transform: scaleX(-1); }
.botanical-divider span { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid rgba(234,215,166,.75); }

/* Date and places */
.main-content .location-section {
    background: radial-gradient(circle at 8% 12%, rgba(200, 213, 187, 0.34), transparent 27%), linear-gradient(180deg, var(--paper), #eff1ea);
}

.main-content .location-section::after,
.main-content .dress-code-section::after {
    content: '';
    position: absolute;
    inset: 28px;
    z-index: -1;
    border: 1px solid rgba(201, 169, 97, 0.16);
    pointer-events: none;
}

.main-content .location-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }

.main-content .location-info {
    position: relative;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: clamp(2.25rem, 5vw, 4rem);
    border: 0;
    border-radius: 6px;
    background: rgba(255, 253, 248, 0.68);
    box-shadow: 0 24px 65px rgba(61, 68, 54, 0.1), inset 0 0 0 1px rgba(115, 132, 104, 0.13);
    backdrop-filter: blur(12px);
    transition-property: transform, box-shadow;
    transition-duration: 400ms;
}

.main-content .location-info:hover { transform: translateY(-6px); box-shadow: 0 32px 75px rgba(61,68,54,.16), inset 0 0 0 1px rgba(201,169,97,.35); }
.location-index { position: absolute; top: 1.25rem; right: 1.5rem; color: rgba(115,132,104,.3); font: italic 2rem/1 'Cormorant Garamond', serif; }
.location-icon { width: 68px; height: 68px; margin-bottom: 1.4rem; border-radius: 50%; color: var(--sage); background: var(--paper-deep); box-shadow: inset 0 0 0 1px rgba(115,132,104,.14); }
.location-icon svg { width: 30px; height: 30px; }
.location-type { margin-bottom: .75rem; color: var(--antique-gold); font: 600 .68rem/1.4 'Montserrat', sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.main-content .location-name { max-width: 410px; margin: 0 0 2rem; color: var(--ink); font: 400 clamp(1.85rem, 3.4vw, 2.6rem)/1.1 'Cormorant Garamond', serif; text-wrap: balance; }
.event-details { width: 100%; max-width: 390px; display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid rgba(115,132,104,.16); padding-top: 1.25rem; }
.event-details > div + div { border-left: 1px solid rgba(115,132,104,.16); }
.event-details dt { color: var(--sage); font: 600 .63rem/1.5 'Montserrat',sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.event-details dd { margin: .35rem 0 0; color: var(--ink); font: 400 1.15rem/1.3 'Cormorant Garamond',serif; }

.event-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    margin-top: 1.7rem;
    padding: 0.32rem 1.15rem 0.32rem 0.45rem;
    border: 1px solid rgba(115, 132, 104, 0.42);
    border-radius: 999px;
    color: var(--sage);
    background: rgba(255, 253, 248, 0.82);
    box-shadow: 0 7px 18px rgba(61, 68, 54, 0.09), inset 0 1px rgba(255, 255, 255, 0.78);
    cursor: pointer;
    font: 600 0.67rem/1 'Montserrat', sans-serif;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 260ms ease, color 260ms ease, background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.event-map-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: #fffdf8;
    background: var(--sage);
    box-shadow: 0 3px 8px rgba(61, 68, 54, 0.17);
}

.event-map-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.event-map-link:hover { color: #fffdf8; border-color: var(--ink); background: var(--ink); box-shadow: 0 13px 26px rgba(61,68,54,.22); transform: translateY(-3px); }
.event-map-link:hover .event-map-icon { color: var(--ink); background: #fffdf8; }
.event-map-link:active { transform: translateY(0) scale(.97); }

body.map-modal-open { overflow: hidden; }
.map-modal[hidden] { display: none; }
.map-modal { --paper: #f7f5ef; --paper-deep: #eceee7; --ink: #3d4436; --sage: #738468; --antique-gold: #c9a961; position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: max(1rem, 4vw); opacity: 0; transition: opacity 220ms ease; }
.map-modal.is-open { opacity: 1; }
.map-modal-backdrop { position: absolute; inset: 0; background: rgba(37, 45, 32, 0.68); backdrop-filter: blur(8px); }
.map-modal-panel { position: relative; width: min(900px, 100%); overflow: hidden; border: 1px solid rgba(201,169,97,.45); border-radius: 7px; background: #fffdf8; box-shadow: 0 30px 90px rgba(20,28,18,.38); transform: translateY(18px) scale(.985); transition: transform 260ms cubic-bezier(.2,0,0,1); }
.map-modal.is-open .map-modal-panel { transform: none; }
.map-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem 1.15rem; border-bottom: 1px solid rgba(115,132,104,.14); }
.map-modal-eyebrow { margin: 0 0 .35rem; color: var(--antique-gold); font: 600 .62rem/1 'Montserrat',sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.map-modal-header h2 { margin: 0; color: var(--ink); font: 400 clamp(1.5rem,3vw,2rem)/1.1 'Cormorant Garamond',serif; }
.map-modal-close { display: grid; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid rgba(115,132,104,.22); border-radius: 50%; color: var(--sage); background: var(--paper); cursor: pointer; transition: color 220ms ease, background-color 220ms ease, transform 220ms ease; }
.map-modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.map-modal-close:hover { color: #fffdf8; background: var(--ink); transform: rotate(90deg); }
.map-modal-frame { height: min(62vh, 600px); background: var(--paper-deep); }
.map-modal-frame iframe { display: block; width: 100%; height: 100%; border: 0; filter: saturate(.78) sepia(.06) contrast(.98); }

.main-content .map-container { height: clamp(350px, 45vw, 520px); margin-top: 1.5rem; border: 10px solid rgba(255,253,248,.82); border-radius: 6px; box-shadow: 0 24px 65px rgba(61,68,54,.14); outline: 1px solid rgba(115,132,104,.13); }
.main-content .map-container iframe { filter: saturate(.72) sepia(.08) contrast(.96); }

/* Dress code */
.main-content .dress-code-section { background: linear-gradient(150deg, #f7f5ef, #eef1e9 55%, #f7f5ef); }
.main-content .dress-code-grid { max-width: 900px; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 0; }
.main-content .dress-code-item { padding: clamp(2.5rem, 5vw, 4rem) 2rem; border: 0; border-radius: 6px; background: rgba(255,255,255,.62); box-shadow: 0 22px 58px rgba(61,68,54,.09), inset 0 0 0 1px rgba(115,132,104,.12); transition-property: transform, box-shadow; transition-duration: 400ms; }
.main-content .dress-code-item:hover { transform: translateY(-6px); box-shadow: 0 30px 68px rgba(61,68,54,.15), inset 0 0 0 1px rgba(201,169,97,.35); }
.main-content .dress-code-icon-container { width: 112px; height: 112px; margin-bottom: 1.75rem; }
.main-content .main-dress-icon { width: 94px; height: 94px; border-radius: 50%; background: linear-gradient(145deg, var(--sage-pale), var(--sage)); color: white; box-shadow: 0 18px 38px rgba(61,68,54,.2), inset 0 1px rgba(255,255,255,.3); }
.main-content .main-dress-icon svg { width: 39px; height: 39px; }
.main-content .symbol-badge { top: 0; right: 0; border: 0; color: var(--sage); box-shadow: 0 8px 20px rgba(61,68,54,.14), inset 0 0 0 1px rgba(115,132,104,.14); }
.main-content .dress-code-title { color: var(--ink); font: 400 2.2rem/1 'Cormorant Garamond', serif; }
.main-content .dress-code-desc { color: rgba(61,68,54,.78); line-height: 1.8; }
.main-content .dress-code-desc strong { color: #8c7035; font-weight: 500; }

/* Gifts */
.main-content .gifts-section {
    background:
        radial-gradient(circle at 50% 10%, rgba(200, 213, 187, 0.36), transparent 29%),
        linear-gradient(160deg, #eef1e9 0%, #f7f5ef 48%, #eef1e9 100%);
}

.gifts-inner {
    position: relative;
    max-width: 900px !important;
    padding: clamp(4rem, 8vw, 6.4rem) clamp(1.5rem, 7vw, 5.5rem) clamp(3.8rem, 7vw, 5.6rem);
    overflow: hidden;
    isolation: isolate;
    text-align: center;
    border: 1px solid rgba(201, 169, 97, 0.48);
    background:
        radial-gradient(circle at 92% 8%, rgba(200, 213, 187, 0.25), transparent 27%),
        radial-gradient(circle at 8% 93%, rgba(201, 169, 97, 0.09), transparent 24%),
        rgba(255, 253, 248, 0.9);
    box-shadow:
        0 30px 74px rgba(61, 68, 54, 0.12),
        0 8px 24px rgba(61, 68, 54, 0.05),
        inset 0 0 0 9px rgba(255, 255, 255, 0.35);
}

.gifts-inner::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 17px;
    border: 1px solid rgba(115, 132, 104, 0.14);
    pointer-events: none;
}

.gifts-inner > :not(.gifts-botanical-layer) {
    position: relative;
    z-index: 2;
}

.gifts-botanical-layer {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    left: 0;
    height: clamp(220px, 34vw, 310px);
    overflow: hidden;
    pointer-events: none;
    will-change: transform;
}

.gifts-botanical {
    position: absolute;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 16px 22px rgba(61, 68, 54, 0.1));
    transform-origin: bottom left;
    will-change: opacity, transform;
}

.gifts-botanical-branch {
    top: -3.1rem;
    right: -7.4rem;
    width: clamp(310px, 39vw, 410px);
    transform: rotate(-12deg);
    transform-origin: 78% 20%;
    opacity: 0.38;
}

.gifts-inner .section-icon { margin-inline: auto; }
.gifts-inner .section-title { margin-bottom: 1.45rem; }
.gift-icon { color: var(--antique-gold); background: rgba(255, 253, 248, 0.62); }
.gift-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }

.gifts-message {
    max-width: 700px;
    margin: 0 auto;
    color: rgba(61, 68, 54, 0.82);
    font: 400 clamp(1.3rem, 2.35vw, 1.7rem)/1.55 'Cormorant Garamond', serif;
}

.gifts-divider { display: flex; align-items: center; justify-content: center; margin: clamp(2.6rem, 5vw, 3.75rem) auto; }
.gifts-divider::before, .gifts-divider::after { content: ''; width: min(120px, 24vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(201,169,97,.78)); }
.gifts-divider::after { transform: scaleX(-1); }
.gifts-divider span { width: 8px; height: 8px; margin: 0 .9rem; border: 1px solid var(--antique-gold); border-radius: 50%; transform: rotate(45deg); }

.gifts-addresses { display: grid; gap: 0; max-width: 700px; margin-inline: auto; }
.gifts-address { display: flex; align-items: flex-start; justify-content: center; gap: 1rem; max-width: 680px; margin: 0 auto; text-align: left; }
.gifts-address + .gifts-address { width: 100%; margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(115, 132, 104, 0.13); }
.gifts-address-icon { display: grid; flex: 0 0 auto; width: 42px; height: 42px; margin-top: .15rem; place-items: center; border-radius: 50%; color: var(--sage); background: rgba(200, 213, 187, 0.42); box-shadow: inset 0 0 0 1px rgba(115,132,104,.17); }
.gifts-address-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.gifts-address h3, .gifts-bank h3 { margin: 0; color: var(--sage); font: 600 .68rem/1.4 'Montserrat', sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.gifts-address address { margin-top: .55rem; color: var(--ink); font: 600 clamp(1.12rem, 2vw, 1.35rem)/1.45 'Cormorant Garamond', serif; font-style: normal; }
.gifts-address address span { color: rgba(61,68,54,.76); font-size: .91em; font-weight: 400; }

.gifts-bank { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: clamp(2.7rem, 5vw, 3.8rem); padding-top: 1.65rem; border-top: 1px solid rgba(115,132,104,.16); }
.gifts-bank-mark { color: var(--antique-gold); font-size: 1.15rem; line-height: 1; }
.gifts-bank h3 { color: var(--ink); }

/* Gallery: editorial mosaic */
.main-content .gallery-section { background: #e8ebe3; }
.main-content .gallery-grid { grid-template-columns: 1.2fr .8fr .8fr; grid-template-rows: repeat(2, minmax(220px, 310px)); gap: clamp(.75rem, 1.6vw, 1.25rem); padding: 0; }
.main-content .gallery-item, .main-content .gallery-item.large, .main-content .gallery-item.vertical { grid-column: auto; grid-row: auto; aspect-ratio: auto; border: 6px solid rgba(255,253,248,.86); border-radius: 3px; box-shadow: 0 18px 45px rgba(61,68,54,.14); }
.main-content .gallery-item.large { grid-row: 1 / 3; }
.main-content .gallery-item.vertical { grid-row: 1 / 3; grid-column: 3; }
.main-content .gallery-item:hover { transform: translateY(-5px); border-color: rgba(255,253,248,.96); box-shadow: 0 26px 55px rgba(61,68,54,.22); }
.main-content .gallery-item img { outline: 1px solid rgba(61,68,54,.08); transition: transform 900ms cubic-bezier(.2,0,0,1), filter 500ms ease; }
.main-content .gallery-item:hover img { transform: scale(1.045); filter: saturate(1.04); }
.main-content .gallery-overlay { background: linear-gradient(to top, rgba(61,68,54,.22), transparent 45%); opacity: .28; }

/* RSVP and footer */
.main-content .rsvp-section { background: var(--paper); padding-block: clamp(6rem, 12vw, 10rem); }
.rsvp-inner { position: relative; max-width: 900px !important; padding: clamp(3rem, 7vw, 6rem) 1.5rem clamp(7.5rem, 14vw, 10rem); overflow: hidden; isolation: isolate; text-align: center; border: 1px solid rgba(201,169,97,.3); background: radial-gradient(circle at 50% 0, rgba(200,213,187,.34), transparent 50%), rgba(255,253,248,.72); box-shadow: 0 28px 75px rgba(61,68,54,.11), inset 0 0 0 10px rgba(255,253,248,.42); }
.rsvp-inner > :not(.rsvp-botanical-layer) { position: relative; z-index: 2; }
.rsvp-botanical-layer { position: absolute; z-index: 0; right: 0; bottom: 0; left: 0; height: 48%; pointer-events: none; will-change: transform; }
.rsvp-botanical { position: absolute; bottom: clamp(-7.5rem, -9vw, -4.8rem); left: 50%; width: clamp(280px, 48vw, 470px); max-width: none; opacity: .42; filter: drop-shadow(0 14px 24px rgba(61,68,54,.13)); transform: translateX(-50%) scale(1.02); transform-origin: 50% 100%; will-change: opacity, transform; }
.rsvp-inner .section-icon { margin-inline: auto; }
.rsvp-inner .section-title { max-width: 680px; margin-inline: auto; }
.rsvp-action { text-align: center; }
.main-content .rsvp-button { min-height: 54px; display: inline-flex; align-items: center; gap: .75rem; margin-top: 2rem; padding: 1rem 2rem; border-radius: 3px; background: var(--sage); box-shadow: 0 14px 35px rgba(61,68,54,.22), inset 0 1px rgba(255,255,255,.18); transition-property: transform, background-color, box-shadow; transition-duration: 260ms; }
.main-content .rsvp-button svg { width: 19px; height: 19px; }
.main-content .rsvp-button:hover { background: var(--ink); transform: translateY(-3px); box-shadow: 0 20px 42px rgba(61,68,54,.28); }
.main-content .rsvp-button:active { transform: scale(.96); }
.main-content .rsvp-deadline { color: rgba(61,68,54,.7); font-size: .75rem; letter-spacing: .03em; }
.main-content .footer { margin: 0; padding: 5.5rem 1.5rem 4rem; background: #59664f; }
.main-content .footer::before { height: 26px; background: var(--paper); opacity: .98; }
.main-content .footer-text { font-size: clamp(1.8rem,4vw,2.7rem); }

/* Parents — a quiet, letterpress-style dedication after the film */
.main-content .parents-section {
    padding-block: clamp(5rem, 10vw, 8.5rem);
    background:
        radial-gradient(circle at 50% 0, rgba(200, 213, 187, 0.42), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(236, 238, 231, 0.72)),
        var(--paper);
}

.parents-paper {
    position: relative;
    max-width: 980px !important;
    padding: clamp(3.2rem, 7vw, 5.8rem) clamp(1.5rem, 6vw, 5.5rem);
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(201, 169, 97, 0.45);
    background:
        radial-gradient(circle at 7% 10%, rgba(200, 213, 187, 0.25), transparent 24%),
        radial-gradient(circle at 93% 92%, rgba(201, 169, 97, 0.11), transparent 25%),
        rgba(255, 253, 248, 0.88);
    box-shadow: 0 28px 68px rgba(61, 68, 54, 0.1), inset 0 0 0 9px rgba(255, 253, 248, 0.45);
}

.parents-paper > :not(.parents-floral-frame) {
    position: relative;
    z-index: 2;
}

.parents-floral-frame {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    will-change: transform;
}

.parents-floral {
    position: absolute;
    display: block;
    width: clamp(300px, 43vw, 500px);
    max-width: none;
    opacity: 0.66;
    object-fit: contain;
    filter: drop-shadow(0 14px 22px rgba(61, 68, 54, 0.1));
    will-change: opacity, transform;
}

.parents-floral-left {
    top: -1.25rem;
    left: -2.4rem;
    transform: rotate(-8deg);
    transform-origin: 22% 24%;
}

.parents-floral-right {
    right: -2.3rem;
    bottom: -1.4rem;
    transform: rotate(9deg);
    transform-origin: 80% 76%;
}

.parents-floral-center {
    top: 61%;
    left: 50%;
    width: clamp(135px, 17vw, 185px);
    opacity: 0.13;
    transform: translate(-50%, -50%) rotate(-8deg);
    transform-origin: 50% 88%;
    filter: saturate(.78);
}

.parents-verse,
.parents-title,
.parents-family {
    text-shadow: 0 2px 16px rgba(255, 253, 248, 0.96);
}

.parents-paper::before,
.parents-paper::after {
    content: '';
    position: absolute;
    width: 170px;
    height: 170px;
    opacity: 0.5;
    border: 1px solid rgba(115, 132, 104, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.parents-paper::before { top: -104px; left: -104px; }
.parents-paper::after { right: -104px; bottom: -104px; }

.parents-ornament {
    width: min(160px, 56%);
    margin: 0 auto 1.5rem;
    color: var(--antique-gold);
}

.parents-ornament svg { display: block; width: 100%; height: auto; }
.parents-ornament path { stroke: currentColor; stroke-width: 1; stroke-linecap: round; }

.parents-verse {
    max-width: 730px;
    margin: 0 auto;
    color: rgba(61, 68, 54, 0.82);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.45rem, 2.7vw, 2.05rem);
    font-style: italic;
    line-height: 1.3;
}

.parents-divider {
    display: block;
    width: min(80px, 28%);
    height: 1px;
    margin: clamp(2rem, 4vw, 2.8rem) auto 1.65rem;
    background: linear-gradient(90deg, transparent, var(--antique-gold), transparent);
}

.parents-title {
    margin: 0;
    color: var(--sage);
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-weight: 400;
}

.parents-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.3rem, 4vw, 3.5rem);
    margin-top: clamp(2.5rem, 5vw, 3.7rem);
}

.parents-family { min-width: 0; }

.parents-label {
    margin: 0 0 0.9rem;
    color: var(--antique-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.parents-names {
    margin: 0;
    color: var(--ink);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 600;
    line-height: 1.35;
}

.parents-heart {
    color: var(--antique-gold);
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1;
}

/* Scroll choreography */
.js .main-content .fade-in { opacity: 0; transform: translateY(28px); filter: blur(7px); transition: opacity 900ms ease, transform 900ms cubic-bezier(.2,0,0,1), filter 900ms ease; }
.js .main-content .fade-in.visible { opacity: 1; transform: none; filter: none; }
.js .fade-in .section-heading, .js .fade-in .countdown-item, .js .fade-in .location-info, .js .fade-in .map-container, .js .fade-in .dress-code-item, .js .fade-in .gallery-item, .js .fade-in .rsvp-action, .js .fade-in .parents-paper, .js .fade-in .gifts-inner { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,0,0,1); }
.js .fade-in.visible .section-heading, .js .fade-in.visible .countdown-item, .js .fade-in.visible .location-info, .js .fade-in.visible .map-container, .js .fade-in.visible .dress-code-item, .js .fade-in.visible .gallery-item, .js .fade-in.visible .rsvp-action, .js .fade-in.visible .parents-paper, .js .fade-in.visible .gifts-inner { opacity: 1; transform: none; }
.js .fade-in.visible .countdown-item:nth-child(2), .js .fade-in.visible .location-info:nth-child(2), .js .fade-in.visible .dress-code-item:nth-child(2), .js .fade-in.visible .gallery-item:nth-child(2) { transition-delay: 90ms; }
.js .fade-in.visible .countdown-item:nth-child(3), .js .fade-in.visible .gallery-item:nth-child(3) { transition-delay: 180ms; }
.js .fade-in.visible .countdown-item:nth-child(4), .js .fade-in.visible .gallery-item:nth-child(4) { transition-delay: 270ms; }
.js .fade-in.visible .map-container, .js .fade-in.visible .rsvp-action { transition-delay: 180ms; }

/* Botanical scroll choreography */
.js .fade-in .parents-floral,
.js .fade-in .gifts-botanical,
.js .fade-in .rsvp-botanical {
    opacity: 0;
    filter: blur(6px) drop-shadow(0 14px 22px rgba(61, 68, 54, 0.08));
    transition:
        opacity 900ms ease,
        transform 1200ms cubic-bezier(.16, 1, .3, 1),
        filter 950ms ease;
}

.js .fade-in .parents-floral-left { transform: translate3d(-75px, -28px, 0) rotate(-18deg) scale(.86); }
.js .fade-in .parents-floral-right { transform: translate3d(75px, 32px, 0) rotate(19deg) scale(.86); transition-delay: 180ms; }
.js .fade-in .parents-floral-center { transform: translate(-50%, -38%) rotate(-14deg) scale(.72); transition-delay: 360ms; }
.js .fade-in.visible .parents-floral { opacity: .66; filter: blur(0) drop-shadow(0 14px 22px rgba(61, 68, 54, 0.1)); }
.js .fade-in.visible .parents-floral-left { transform: rotate(-8deg); }
.js .fade-in.visible .parents-floral-right { transform: rotate(9deg); }
.js .fade-in.visible .parents-floral-center { opacity: .13; transform: translate(-50%, -50%) rotate(-8deg); filter: saturate(.78); }
.js .fade-in.visible .parents-floral-frame { animation: parents-floral-drift 8s ease-in-out 1.4s infinite alternate; }

.js .fade-in .gifts-botanical-branch { transform: translate3d(70px, -35px, 0) rotate(4deg) scale(.86); transition-delay: 280ms; }
.js .fade-in.visible .gifts-botanical { filter: blur(0) drop-shadow(0 16px 22px rgba(61, 68, 54, 0.1)); }
.js .fade-in.visible .gifts-botanical-branch { opacity: .38; transform: rotate(-12deg); }
.js .fade-in.visible .gifts-botanical-layer { animation: gifts-floral-drift 9s ease-in-out 1.7s infinite alternate; }

.js .fade-in .rsvp-botanical { transform: translate3d(-50%, 90px, 0) scale(.78); transition-delay: 230ms; }
.js .fade-in.visible .rsvp-botanical { opacity: .42; transform: translateX(-50%) scale(1.02); filter: blur(0) drop-shadow(0 14px 24px rgba(61,68,54,.13)); }
.js .fade-in.visible .rsvp-botanical-layer { animation: rsvp-bouquet-breathe 7.5s ease-in-out 1.8s infinite alternate; }

@keyframes parents-floral-drift {
    from { transform: translate3d(0, -2px, 0) rotate(-.25deg); }
    to { transform: translate3d(0, 4px, 0) rotate(.45deg); }
}

@keyframes gifts-floral-drift {
    from { transform: translate3d(0, -3px, 0); }
    to { transform: translate3d(0, 5px, 0); }
}

@keyframes rsvp-bouquet-breathe {
    from { transform: translateY(2px) scale(1); }
    to { transform: translateY(-5px) scale(1.018); }
}

:where(.main-content a, .main-content button):focus-visible { outline: 3px solid var(--antique-gold); outline-offset: 4px; }

@media (max-width: 820px) {
    .main-content .section { padding-inline: max(1.25rem, 4vw); }
    .main-content .countdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
    .main-content .countdown-item { min-height: 160px; }
    .main-content .location-details-grid { grid-template-columns: 1fr; max-width: 660px; }
    .main-content .location-info { min-height: 340px; }
    .main-content .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: 390px 230px 330px; }
    .main-content .gallery-item.large { grid-column: 1 / 3; grid-row: 1; }
    .main-content .gallery-item.vertical { grid-column: 2; grid-row: 2 / 4; }
    .main-content .location-section::after, .main-content .dress-code-section::after { inset: 14px; }
    .parents-grid { gap: 1.4rem; }
}

@media (max-width: 560px) {
    .main-content .hero-section { min-height: 720px; height: 100dvh; }
    .main-content .hero-content { top: 2.25rem; padding: 1rem; margin-top: 0; }
    .hero-couple-signature {
        right: .75rem;
        bottom: 6.5rem;
        left: .75rem;
        font-size: clamp(2.15rem, 9.6vw, 2.9rem);
        line-height: 1;
    }
    .main-content .hero-names { font-size: clamp(3.5rem, 19vw, 5.4rem); }
    .main-content .hero-date-detail { display: inline-block; margin-top: .45rem; font-size: .76rem; line-height: 1.55; }
    .hero-scroll-cue { right: 50%; bottom: 1.15rem; transform: translateX(50%); }
    .hero-scroll-cue.dismissed { transform: translate(50%, 8px); }
    .hero-scroll-label { display: none; }
    .main-content .parents-section { padding-inline: 1rem; }
    .parents-paper { padding: 4.25rem 1.35rem 4rem; }
    .parents-floral { width: 340px; opacity: .56; }
    .parents-floral-left { top: -1.6rem; left: -2.2rem; }
    .parents-floral-right { right: -2.1rem; bottom: -1.8rem; }
    .parents-floral-center { top: 61%; left: 50%; width: 145px; opacity: .12; }
    .parents-verse { font-size: 1.45rem; }
    .parents-grid { grid-template-columns: 1fr; gap: 1.7rem; }
    .parents-heart { order: 0; font-size: 2.35rem; margin: -0.15rem 0; }
    .parents-family:first-child { order: -1; }
    .parents-label { font-size: 0.68rem; }
    .parents-names { font-size: 1.45rem; }
    .main-content .gifts-section { padding-inline: 1rem; }
    .gifts-inner { padding: 4.75rem 1.35rem 4.5rem; }
    .gifts-inner::before { inset: 10px; }
    .gifts-botanical-layer { height: 245px; }
    .gifts-botanical-branch { top: -2.4rem; right: -9.6rem; width: 345px; opacity: .3; }
    .gifts-message { font-size: 1.35rem; }
    .gifts-address { align-items: center; gap: .75rem; }
    .gifts-address-icon { width: 38px; height: 38px; }
    .gifts-address address { font-size: 1.12rem; }
    .main-content .section-title { font-size: clamp(2.8rem, 14vw, 4rem); }
    .main-content .countdown-container { min-height: 720px; padding-block: 5rem; }
    .main-content .countdown-grid { gap: .65rem; }
    .main-content .countdown-item { min-height: 138px; padding: 1rem .35rem; }
    .main-content .countdown-number { font-size: clamp(3.15rem, 16vw, 4.35rem); }
    .main-content .countdown-label { font-size: .58rem; letter-spacing: .16em; }
    .main-content .location-info { min-height: 0; padding: 3rem 1.25rem 2.25rem; }
    .event-details { grid-template-columns: 1fr; gap: 1rem; }
    .event-details > div + div { border-left: 0; border-top: 1px solid rgba(115,132,104,.14); padding-top: 1rem; }
    .event-map-link { margin-top: 1.45rem; }
    .map-modal { padding: .75rem; }
    .map-modal-header { padding: 1rem 1.1rem; }
    .map-modal-frame { height: min(66vh, 520px); }
    .main-content .map-container { height: 330px; border-width: 6px; }
    .main-content .dress-code-grid { grid-template-columns: 1fr; }
    .main-content .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 285px 180px 260px; gap: .55rem; }
    .main-content .gallery-item { border-width: 3px; }
    .rsvp-inner { padding: 3.5rem 1rem 8.5rem; box-shadow: 0 22px 55px rgba(61,68,54,.1), inset 0 0 0 6px rgba(255,253,248,.45); }
    .rsvp-botanical { bottom: -6.5rem; width: 310px; opacity: .34; }
    .main-content .rsvp-button { width: 100%; max-width: 310px; justify-content: center; padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-background-stage,
    .welcome-background-art {
        animation: none !important;
        transform: none !important;
        filter: none !important;
    }

    .main-content *, .main-content *::before, .main-content *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .main-content .fade-in, .js .fade-in .section-heading, .js .fade-in .countdown-item, .js .fade-in .location-info, .js .fade-in .map-container, .js .fade-in .dress-code-item, .js .fade-in .gallery-item, .js .fade-in .rsvp-action, .js .fade-in .parents-paper, .js .fade-in .gifts-inner { opacity: 1; transform: none; filter: none; }
    .hero-couple-signature span { opacity: 1; transform: none; filter: none; transition: none; }
    .js .fade-in .parents-floral-left { opacity: .66; transform: rotate(-8deg); filter: none; }
    .js .fade-in .parents-floral-right { opacity: .66; transform: rotate(9deg); filter: none; }
    .js .fade-in .parents-floral-center { opacity: .13; transform: translate(-50%, -50%) rotate(-8deg); filter: none; }
    .js .fade-in .gifts-botanical-branch { opacity: .38; transform: rotate(-12deg); filter: none; }
    .js .fade-in .rsvp-botanical { opacity: .42; transform: translateX(-50%) scale(1.02); filter: none; }
}
