/* ==================== ROOT VARIABLES ==================== */
:root {
    --beige: #F5E6D3;
    --light-beige: #FAF3E8;
    --cream: #FFF8F0;
    --nude: #E8D5C4;
    --gold: #B8904A;
    --light-gold: #D4AF6E;
    --rose-gold: #B76E79;
    --white: #FFFFFF;
    --soft-gray: #E5E5E5;
    --text-dark: #5A4A3A;
    --text-light: #8B7F72;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body,
div,
section {
    max-width: 100%;
}

html,
body {
    overflow-x: hidden !important;
    width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    position: relative;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    overflow-x: hidden !important;
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ==================== TYPOGRAPHY ==================== */
.script-text {
    font-family: 'Great Vibes', cursive;
    color: var(--gold);
}

h1,
h2,
h3 {
    font-family: 'Cormorant Garamond', serif;
}

/* ==================== ENVELOPE ANIMATION ==================== */
.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    overflow: hidden;
    pointer-events: auto;
}

.envelope-wrapper.opened {
    z-index: 1;
    pointer-events: none;
}

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

.envelope-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 60%,
            transparent 100%);
    animation: shimmer 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        transform: translate(50%, 50%) rotate(180deg);
    }
}

.envelope-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    perspective: none;
    transform-style: flat;
    z-index: 1;
    cursor: pointer;
}

.envelope-shadow {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 80%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0.5;
    transition: all 0.5s ease;
}

.envelope-container:hover .envelope-shadow {
    width: 85%;
    max-width: 85%;
    opacity: 0.7;
}

.envelope-body {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.envelope-main {
    position: absolute;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5ede3 0%, #e8d5c4 50%, #d4c4b0 100%);
    border-radius: 8px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.3),
        0 20px 50px rgba(0, 0, 0, 0.2),
        inset 0 2px 40px rgba(255, 255, 255, 0.3),
        inset 0 -2px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    display: none;
}

.envelope-texture-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(212, 175, 55, 0.03) 3px, rgba(212, 175, 55, 0.03) 6px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(212, 175, 55, 0.03) 3px, rgba(212, 175, 55, 0.03) 6px);
    opacity: 0.6;
}

.envelope-border-design {
    position: absolute;
    top: 30px;
    left: 5%;
    right: 5%;
    bottom: 30px;
    border: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    box-shadow:
        inset 0 0 30px rgba(212, 175, 55, 0.1),
        0 0 20px rgba(212, 175, 55, 0.1);
}

.envelope-border-design::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 5px;
}

/* Gold Corner Ornaments */
.corner-ornament {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 5;
    opacity: 0;
    animation: fadeInOrnament 1s ease-out forwards;
}

.corner-ornament.top-left {
    top: 3%;
    left: 3%;
    animation-delay: 0.3s;
}

.corner-ornament.top-right {
    top: 3%;
    right: 3%;
    animation-delay: 0.4s;
}

.corner-ornament.bottom-left {
    bottom: 3%;
    left: 3%;
    animation-delay: 0.5s;
}

.corner-ornament.bottom-right {
    bottom: 3%;
    right: 3%;
    animation-delay: 0.6s;
}

.ornament-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

@keyframes fadeInOrnament {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

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

/* Decorative Lines */
.decorative-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.line-top,
.line-bottom {
    position: absolute;
    width: 90%;
    max-width: 400px;
    height: 20px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 1px 3px rgba(212, 175, 55, 0.4));
    opacity: 0;
    animation: fadeInLine 1s ease-out forwards;
}

.line-top {
    top: 60px;
    animation-delay: 0.7s;
}

.line-bottom {
    bottom: 60px;
    animation-delay: 0.8s;
}

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateX(-50%) scaleX(0.5);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }
}

.envelope-container:hover .corner-ornament {
    animation: ornamentPulse 2s ease-in-out infinite;
}

@keyframes ornamentPulse {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
    }

    50% {
        opacity: 0.8;
        filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.5));
    }
}

/* Vertical Flaps */
.envelope-flap-left,
.envelope-flap-right {
    position: fixed;
    width: calc(50% - 1px);
    height: 100vh;
    top: 0;
    background: linear-gradient(to right, #e8d5c4 0%, #d9c8b5 100%);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    box-shadow:
        2px 0 30px rgba(0, 0, 0, 0.3),
        inset -2px 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 8px 8px 0;
    pointer-events: none;
    overflow: hidden;
}

.envelope-flap-left {
    left: 0;
    transform-origin: left center;
    pointer-events: auto;
}

.envelope-flap-right {
    right: 0;
    transform-origin: right center;
    pointer-events: auto;
}

.envelope-flap-left.open {
    transform: rotateY(-120deg);
}

.envelope-flap-right.open {
    transform: rotateY(120deg);
}

.flap-design::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 80%;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.3), transparent);
}

/* Wax Seal */
.wax-seal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    z-index: 4;
    cursor: pointer;
    transition: all 0.4s ease;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    pointer-events: auto;
}

.wax-seal:hover {
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
    filter: drop-shadow(0 15px 40px rgba(201, 48, 44, 0.6)) brightness(1.1);
}

.wax-seal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    animation: sealPulse 3s ease-in-out infinite;
}

@keyframes sealPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.1);
    }
}

/* Envelope Flap */
.envelope-flap {
    position: absolute;
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #e8d5c4 0%, #d4c4b0 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    z-index: 15;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.flap-texture {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 3px,
            rgba(212, 175, 55, 0.03) 3px,
            rgba(212, 175, 55, 0.03) 6px);
}

.envelope-flap.open {
    transform: rotateX(-180deg);
}

/* Letter - just a visual placeholder */
.envelope-letter {
    display: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 50;
    animation: floatIndicator 3s ease-in-out infinite;
}

@keyframes floatIndicator {

    0%,
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -15px);
        opacity: 0.7;
    }
}

.indicator-icon {
    font-size: 32px;
    color: var(--gold);
    margin-bottom: 10px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.scroll-indicator p {
    color: var(--text-dark);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 10px 0;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.indicator-arrow {
    font-size: 24px;
    color: var(--gold);
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {

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

    50% {
        transform: translateY(10px);
    }
}

/* ==================== ENVELOPE FLAP ==================== */
/* Envelope Flap */
.envelope-flap {
    position: absolute;
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    transform-origin: top center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    z-index: 15;
    will-change: transform;
    overflow: hidden;
}

.flap-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(232, 213, 196, 0.95) 0%,
            rgba(212, 196, 176, 0.95) 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.flap-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 3px,
            rgba(212, 175, 55, 0.05) 3px,
            rgba(212, 175, 55, 0.05) 6px);
}

.envelope-flap.open {
    transform: rotateX(-180deg);
}

.envelope-flap.open .flap-inner {
    box-shadow:
        0 -10px 30px rgba(0, 0, 0, 0.2),
        inset 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Remove old flap texture */
.flap-texture,
.envelope-letter {
    display: none;
}

.indicator-arrow {
    font-size: 24px;
    color: var(--gold);
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {

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

    50% {
        transform: translateY(10px);
    }
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    margin-top: 0;
    background: var(--cream);
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden !important;
    z-index: 2;
    display: none;
    opacity: 0;
}

.main-content.visible {
    display: block;
}

.main-content>* {
    pointer-events: auto;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-beige) 50%, var(--nude) 100%);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23D4AF37" opacity="0.1"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.save-date {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

.couple-names {
    font-size: 80px;
    font-weight: 300;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.bride-name,
.groom-name {
    color: var(--text-dark);
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.bride-name {
    animation-delay: 0.2s;
}

.ampersand {
    font-family: 'Great Vibes', cursive;
    font-size: 60px;
    color: var(--gold);
    animation: scaleIn 1s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.groom-name {
    animation-delay: 0.6s;
}

.date-location {
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 0.8s;
    animation-fill-mode: both;
}

.wedding-date {
    font-size: 24px;
    color: var(--gold);
    font-weight: 500;
    letter-spacing: 2px;
}

.divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 20px auto;
}

.wedding-location {
    font-size: 18px;
    color: var(--text-light);
    letter-spacing: 2px;
}

.wedding-location-sub {
    font-size: 14px;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-top: 5px;
    font-style: italic;
}

.divider-small {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 25px auto;
    opacity: 0.6;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-flower {
    position: absolute;
    font-size: 40px;
    color: var(--rose-gold);
    opacity: 0.2;
    animation: floatFlower 15s ease-in-out infinite;
}

.flower-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.flower-2 {
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.flower-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.flower-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes floatFlower {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* ==================== SECTION HEADERS ==================== */
.formal-invitation-section {
    padding: 100px 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.8), transparent 70%),
        radial-gradient(circle at 70% 50%, rgba(212, 175, 55, 0.05), transparent 70%),
        linear-gradient(135deg, var(--cream) 0%, var(--white) 50%, var(--light-beige) 100%);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.invitation-card {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff, #faf8f5);
    padding: 60px;
    border: 2px solid var(--gold);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    border-radius: 3px;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 2px;
    pointer-events: none;
}

.invitation-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.invitation-corner-flourishes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.corner-flourish-card {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.6;
}

.corner-flourish-card::before,
.corner-flourish-card::after {
    content: '';
    position: absolute;
    background: var(--gold);
}

.corner-flourish-card.top-left {
    top: 25px;
    left: 25px;
}

.corner-flourish-card.top-left::before {
    top: 0;
    left: 0;
    width: 40px;
    height: 1px;
}

.corner-flourish-card.top-left::after {
    top: 0;
    left: 0;
    width: 1px;
    height: 40px;
}

.corner-flourish-card.top-right {
    top: 25px;
    right: 25px;
}

.corner-flourish-card.top-right::before {
    top: 0;
    right: 0;
    width: 40px;
    height: 1px;
}

.corner-flourish-card.top-right::after {
    top: 0;
    right: 0;
    width: 1px;
    height: 40px;
}

.corner-flourish-card.bottom-left {
    bottom: 25px;
    left: 25px;
}

.corner-flourish-card.bottom-left::before {
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
}

.corner-flourish-card.bottom-left::after {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 40px;
}

.corner-flourish-card.bottom-right {
    bottom: 25px;
    right: 25px;
}

.corner-flourish-card.bottom-right::before {
    bottom: 0;
    right: 0;
    width: 40px;
    height: 1px;
}

.corner-flourish-card.bottom-right::after {
    bottom: 0;
    right: 0;
    width: 1px;
    height: 40px;
}

.invitation-monogram {
    margin-bottom: 15px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.monogram-image {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 3px 8px rgba(184, 144, 74, 0.2));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.monogram-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 5px 12px rgba(184, 144, 74, 0.3));
}

.monogram-svg {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(201, 168, 82, 0.25));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.monogram-svg:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 16px rgba(201, 168, 82, 0.35));
}

.monogram-text-card {
    font-family: 'Great Vibes', cursive;
    font-size: 52px;
    color: var(--gold);
    letter-spacing: 3px;
    text-shadow: 0 2px 8px rgba(201, 168, 82, 0.3);
    display: inline-block;
}

.invitation-parents {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.invitation-together {
    font-size: 13px;
    margin-bottom: 15px;
    color: var(--text-dark);
    letter-spacing: 1.2px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.invitation-request {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-style: normal;
}

.invitation-divider {
    width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 25px auto;
    position: relative;
}

.invitation-divider::before {
    content: '✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #ffffff, #faf8f5);
    padding: 0 10px;
    color: var(--gold);
    font-size: 12px;
}

.invitation-divider-thin {
    width: 250px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 25px auto;
    opacity: 0.5;
}

.invitation-celebrate {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.invitation-couple {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    color: var(--gold);
    margin: 4px 0;
    font-weight: 500;
    letter-spacing: 5px;
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.1);
}

.invitation-to {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: var(--text-dark);
    margin: 2px 0;
    font-weight: 300;
}

.invitation-son {
    font-size: 16px;
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 30px;
}

.invitation-date {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 400;
    margin: 20px 0 25px;
    letter-spacing: 2px;
}

.invitation-events {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.invitation-event {
    flex: 0 1 250px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.invitation-event-divider {
    width: 1px;
    height: 60px;
    background: var(--gold);
    margin: 0;
    position: relative;
    align-self: center;
}

.invitation-event-divider::before {
    content: '✿';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #ffffff, #faf8f5);
    padding: 0 8px;
    color: var(--gold);
    font-size: 10px;
    opacity: 0.7;
}

.event-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0.5px;
    line-height: 1.5;
    display: block;
    width: 100%;
}

.event-time {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 400;
    display: block;
    width: 100%;
}

.event-venue {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.5;
    display: block;
    width: 100%;
}

.event-address {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-style: normal;
    display: block;
    width: 100%;
}

.invitation-rsvp {
    font-size: 13px;
    color: var(--text-dark);
    margin-top: 5px;
    margin-bottom: 10px;
    font-style: italic;
}

.invitation-contact {
    font-size: 13px;
    color: var(--text-dark);
    margin: 5px 0;
    letter-spacing: 0.5px;
}

.invitation-rsvp-btn {
    display: inline-block;
    margin-top: 25px;
    padding: 15px 45px;
    background: linear-gradient(135deg, var(--gold), var(--light-gold));
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.invitation-rsvp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 48px;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 0 auto;
}

/* ==================== STORY SECTION ==================== */
.story-section {
    padding: 100px 0;
    background: var(--white);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

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

.story-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--rose-gold));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 0 0 100px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-date::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gold);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--light-beige);
}

.timeline-item:nth-child(odd) .timeline-date::after {
    right: -60px;
}

.timeline-item:nth-child(even) .timeline-date::after {
    left: -60px;
}

.timeline-content {
    flex: 1;
    background: var(--light-beige);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 40px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 40px;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Also hover the timeline date and dot when content is hovered */
.timeline-item:hover .timeline-date {
    transform: translateY(-5px);
}

.timeline-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==================== DETAILS SECTION ==================== */
.details-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-beige) 100%);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.detail-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.detail-card {
    background: var(--white);
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    border: 1px solid var(--soft-gray);
    cursor: pointer;
}

.detail-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.detail-card-link:hover .detail-card,
.detail-card-link:focus .detail-card,
.detail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
}

.detail-map-hint {
    font-size: 13px;
    color: var(--gold);
    margin-top: 10px;
    font-weight: 600;
    opacity: 0.8;
}

.detail-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: grayscale(30%);
}

.detail-card h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.detail-time {
    font-size: 20px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.detail-info {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.detail-address {
    font-size: 14px;
    color: var(--text-light);
}

/* ==================== COUNTDOWN SECTION ==================== */
.countdown-section {
    padding: 100px 0;
    background: var(--nude);
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.countdown-title {
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: 2px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.time-unit {
    background: var(--white);
    padding: 30px 40px;
    border-radius: 15px;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.time-unit:hover {
    transform: scale(1.05);
}

.time-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
}

.time-label {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-top: 10px;
}

/* ==================== GALLERY SECTION ==================== */
/* ==================== GALLERY SECTION ==================== */
.gallery-section {
    padding: 100px 0;
    background: var(--white);
}

.gallery-carousel {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px;
}

.gallery-track {
    display: flex;
    gap: 20px;
    transition: transform 0.6s ease-in-out;
    width: fit-content;
}

.gallery-item {
    position: relative;
    flex: 0 0 calc((100vw - 80px) / 3);
    max-width: calc((1200px - 40px) / 3);
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
    opacity: 1;
    transform: scale(1);
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease, transform 0.5s ease;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gold);
    color: var(--gold);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-nav:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: -25px;
}

.gallery-nav.next {
    right: -25px;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nude);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.gallery-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* ==================== RSVP SECTION ==================== */
.rsvp-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--light-beige) 0%, var(--cream) 100%);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.rsvp-subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-top: 15px;
    letter-spacing: 1px;
}

.gift-note {
    max-width: 650px;
    margin: 40px auto 30px;
    padding: 35px 45px;
    background: linear-gradient(135deg, #FFF8F0 0%, var(--light-beige) 100%);
    border: 3px solid var(--gold);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    position: relative;
}

.gift-note::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--gold), var(--light-gold));
    border-radius: 15px;
    z-index: -1;
    opacity: 0.3;
}

.gift-icon {
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.gift-message {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.8;
}

.gift-emphasis {
    color: var(--gold);
    font-weight: 700;
    font-size: 18px;
    text-decoration-color: var(--rose-gold);
    text-underline-offset: 3px;
}

.rsvp-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.prefilled-info {
    background: linear-gradient(145deg, #ffffff, #faf8f5);
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.prefilled-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.prefilled-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    font-family: 'Cormorant Garamond', serif;
}

.form-label {
    display: block;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px 25px;
    border: 2px solid var(--soft-gray);
    border-radius: 10px;
    background: var(--cream);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.radio-option:hover {
    border-color: var(--gold);
    background: var(--white);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--soft-gray);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked~.radio-custom {
    border-color: var(--gold);
    background: var(--gold);
}

.radio-option input[type="radio"]:checked~.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked~.radio-label {
    color: var(--gold);
    font-weight: 600;
}

.radio-label {
    font-size: 16px;
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--soft-gray);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    padding: 18px 50px;
    background: linear-gradient(135deg, var(--gold), var(--light-gold));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 60px 0;
    background: var(--nude);
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.footer-text {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-family: 'Cormorant Garamond', serif;
}

.footer-divider {
    width: 100px;
    height: 2px;
    background: var(--gold);
    margin: 20px auto;
}

.footer-hashtag {
    font-size: 20px;
    color: var(--gold);
    margin: 20px 0;
    font-weight: 500;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== GUEST CUSTOMIZATION ==================== */
.detail-card-link.hidden,
.invitation-event.hidden,
.invitation-event-divider.hidden {
    display: none !important;
}

/* Adjust grid layout when church card is hidden */
.details-grid:has(.detail-church-card[style*="display: none"]) {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Medium screens (tablets in portrait) */
@media (max-width: 1024px) {
    .invitation-card {
        max-width: 700px;
        padding: 50px 40px;
    }

    .invitation-couple {
        font-size: 48px;
    }

    .invitation-parents {
        font-size: 15px;
    }

    .event-title,
    .event-venue {
        font-size: 14px;
    }

    /* Stack events vertically on tablets */
    .invitation-events {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .invitation-event {
        flex: none;
        width: 100%;
        max-width: 400px;
    }

    .invitation-event-divider {
        width: 80px;
        height: 2px;
        margin: 0 auto;
    }
}

/* Tablets and small screens */
@media (max-width: 768px) {

    /* Envelope Responsiveness - Keep full screen on tablets */
    .envelope-container {
        width: 100%;
        height: 100vh;
    }

    .envelope-container:hover {
        transform: none;
    }

    .wax-seal {
        width: 110px;
        height: 110px;
    }

    .envelope-flap-left,
    .envelope-flap-right {
        width: 51%;
    }

    .corner-ornament {
        width: 80px;
        height: 80px;
    }

    .decorative-line {
        width: 120px;
    }

    .scroll-indicator {
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
    }

    .scroll-indicator p {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .indicator-icon {
        font-size: 28px;
    }

    .indicator-icon {
        font-size: 24px;
    }

    .indicator-arrow {
        font-size: 18px;
    }

    .corner-flourish {
        width: 40px;
        height: 40px;
    }

    .corner-flourish.top-left::before,
    .corner-flourish.top-right::before,
    .corner-flourish.bottom-left::before,
    .corner-flourish.bottom-right::before {
        width: 20px;
    }

    .corner-flourish.top-left::after,
    .corner-flourish.top-right::after,
    .corner-flourish.bottom-left::after,
    .corner-flourish.bottom-right::after {
        height: 20px;
    }

    /* Other elements */
    .couple-names {
        font-size: 48px;
        flex-direction: column;
        gap: 10px;
    }

    .ampersand {
        font-size: 40px;
    }

    .section-title {
        font-size: 36px;
    }

    .story-timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column !important;
        margin-left: 50px;
    }

    .timeline-date {
        justify-content: flex-start;
        margin-bottom: 15px;
    }

    .timeline-date::after {
        left: -25px !important;
        right: auto !important;
    }

    .timeline-content {
        margin: 0 !important;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .gallery-track {
        gap: 15px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 7.5px);
    }

    .countdown-timer {
        gap: 20px;
    }

    .time-unit {
        padding: 20px 30px;
        min-width: 100px;
    }

    .time-value {
        font-size: 36px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 10px);
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .gallery-nav.prev {
        left: 5px;
    }

    .gallery-nav.next {
        right: 5px;
    }

    .rsvp-form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {

    /* Envelope Responsiveness - Full screen on mobile */
    .envelope-container {
        width: 100%;
        height: 100vh;
    }

    .envelope-container:hover {
        transform: none;
    }

    .wax-seal {
        width: 100px;
        height: 100px;
    }

    .wax-seal:hover {
        transform: translate(-50%, -50%) scale(1.1);
    }

    .envelope-flap-left,
    .envelope-flap-right {
        width: 51%;
    }

    .corner-ornament {
        width: 60px;
        height: 60px;
    }

    .decorative-line {
        width: 100px;
    }

    .scroll-indicator {
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
    }

    .scroll-indicator p {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .indicator-icon {
        font-size: 24px;
    }

    .indicator-arrow {
        font-size: 20px;
    }

    /* Other elements - Mobile */
    .couple-names {
        font-size: 36px;
    }

    .ampersand {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }

    .countdown-timer {
        flex-direction: column;
        align-items: center;
    }

    .time-unit {
        width: 100%;
        max-width: 200px;
    }

    .gallery-section {
        padding: 60px 0;
    }

    .gallery-carousel {
        padding: 0;
        overflow: hidden;
        width: 100vw;
        margin: 0 -20px;
    }

    .gallery-track {
        gap: 0;
        padding: 0;
    }

    .gallery-item {
        flex: 0 0 100vw;
        min-width: 100vw;
        max-width: 100vw;
        margin: 0;
        flex-shrink: 0;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }
}

/* Smooth scroll behavior for all sections */
section {
    scroll-margin-top: 20px;
}