/* ============================================================
   WEDDING INVITATION — STYLES
   Theme: White, Yellow, Light Blue, Light Purple + Lulu Pig
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
    --white:          #FFFFFF;
    --cream:          #FFF9F2;
    --yellow-pale:    #FFFDE7;
    --yellow-light:   #FFF8DC;
    --yellow:         #FFD700;
    --yellow-warm:    #F5C842;
    --blue-pale:      #E0F7FA;
    --blue-light:     #B3E5FC;
    --blue:           #81D4FA;
    --purple-pale:    #F3E5F5;
    --purple-light:   #E1BEE7;
    --purple:         #CE93D8;
    --gold:           #DAA520;
    --gold-dark:      #B8860B;
    --pink-light:     #FCE4EC;
    --pink:           #FFB7C5;
    --red-envelope:   #CC0000;
    --red-envelope-dk:#990000;
    --text-dark:      #3D2C1E;
    --text-medium:    #5D4037;
    --text-light:     #8D6E63;
    --text-muted:     #BCAAA4;
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.16);
    --radius:         16px;
    --radius-sm:      8px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Serif SC', 'Hiragino Mincho ProN', 'PMingLiU', Georgia, serif;
    background: var(--cream);
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* ---- Music Toggle Button ---- */
.music-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--yellow);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.3s ease, color 0.3s ease, transform 0.15s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.music-btn:active { transform: scale(0.9); }

.music-icon {
    font-size: 29px;
    line-height: 1;
    display: inline-block;
    position: relative;
    animation: musicNoteFloat 0.9s ease-in-out infinite alternate;
}
@keyframes musicNoteFloat {
    from { transform: scale(1) rotate(-8deg); }
    to   { transform: scale(1.25) rotate(8deg); }
}

/* Off state — red border + slash through note */
.music-btn.music-off {
    border-color: #e53935;
    color: #e53935;
}
.music-btn.music-off .music-icon {
    animation: none;
}
.music-btn.music-off .music-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    right: -4px;
    height: 2.5px;
    background: #e53935;
    border-radius: 2px;
    transform: translateY(-50%) rotate(-45deg);
}

/* ---- Language Toggle Button ---- */
.lang-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--yellow);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.lang-btn:hover { background: var(--yellow); }
.lang-btn:active { transform: scale(0.95); }

/* ---- Floating Ring ---- */
/* Ring: starts off-screen top-center, falls in winding path */
.floating-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 900;
    width: 70px;
    height: 70px;
    opacity: 0;
    pointer-events: none;
    transform: translate(calc(50vw - 35px), -100px);
    filter: drop-shadow(0 4px 8px rgba(218,165,32,0.4));
    will-change: transform, opacity;
}

.floating-ring.falling {
    animation: ringFallWinding 2s cubic-bezier(0.25, 0.1, 0.9, 1) forwards;
}

@keyframes ringFallWinding {
    0%   { transform: translate(calc(50vw - 35px), -100px) rotate(0deg);   opacity: 0; }
    4%   { opacity: 1; }
    10%  { transform: translate(calc(18vw),        8vh)   rotate(-65deg); }
    20%  { transform: translate(calc(74vw - 70px), 20vh)  rotate(45deg);  }
    30%  { transform: translate(calc(12vw),        31vh)  rotate(-110deg);}
    40%  { transform: translate(calc(70vw - 70px), 43vh)  rotate(85deg);  }
    50%  { transform: translate(calc(20vw),        54vh)  rotate(-150deg);}
    60%  { transform: translate(calc(64vw - 70px), 62vh)  rotate(180deg); }
    70%  { transform: translate(calc(28vw),        68vh)  rotate(-215deg);}
    80%  { transform: translate(calc(58vw - 35px), 73vh)  rotate(250deg); }
    90%  { transform: translate(calc(42vw - 35px), 77vh)  rotate(-290deg);}
    100% { transform: translate(calc(50vw - 35px), 80vh)  rotate(360deg); opacity: 1; }
}

.ring-sparkle {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    animation: sparkleRotate 3s linear infinite;
}
.ring-sparkle::before, .ring-sparkle::after {
    content: '✦';
    position: absolute;
    color: var(--yellow);
    font-size: 10px;
    animation: sparkleFade 1.5s ease-in-out infinite alternate;
}
.ring-sparkle::before { top: 0; right: -4px; animation-delay: 0s; }
.ring-sparkle::after { bottom: 0; left: -4px; animation-delay: 0.75s; }

@keyframes sparkleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes sparkleFade {
    from { opacity: 0.2; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* ---- Falling Petals ---- */
.petals-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.petal {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 12px;
    background: var(--pink);
    border-radius: 0 100% 0 100%;
    opacity: 0;
    animation: petalFall linear infinite;
}
.petal:nth-child(1)  { left:  8%; animation-duration: 9s; animation-delay: 0.0s; background: var(--pink); }
.petal:nth-child(2)  { left: 18%; animation-duration: 7s; animation-delay: 1.2s; background: var(--yellow-warm); width:10px; height:10px; }
.petal:nth-child(3)  { left: 30%; animation-duration:11s; animation-delay: 2.4s; background: var(--purple-light); width:14px; height:14px; }
.petal:nth-child(4)  { left: 45%; animation-duration: 8s; animation-delay: 0.6s; background: var(--blue-light); width:10px; height:10px; }
.petal:nth-child(5)  { left: 58%; animation-duration:10s; animation-delay: 3.0s; background: var(--pink); }
.petal:nth-child(6)  { left: 70%; animation-duration: 7s; animation-delay: 1.8s; background: var(--yellow-warm); width:8px; height:8px; }
.petal:nth-child(7)  { left: 82%; animation-duration:12s; animation-delay: 0.9s; background: var(--purple-light); width:13px; height:13px; }
.petal:nth-child(8)  { left: 92%; animation-duration: 9s; animation-delay: 2.1s; background: var(--blue-light); }

@keyframes petalFall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.9; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.4; }
    100% { transform: translateY(105vh) rotate(480deg); opacity: 0; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-photo {
    position: absolute;
    inset: 0;
    background: url('Pic1.jpg') center 25% / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder-text {
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    user-select: none;
    opacity: 0.6;
}
.photo-placeholder-text small { font-size: 11px; }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.15) 0%,
        rgba(255,249,242,0.3) 50%,
        rgba(255,249,242,0.7) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 40px 24px 60px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}


.hero-divider {
    color: var(--pink);
    font-size: 20px;
    margin: 8px 0;
    animation: heartBeat 1.5s ease-in-out infinite;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.couple-names {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.2;
    color: var(--text-dark);
    text-shadow: 0 2px 12px rgba(255,255,255,0.8), 0 1px 3px rgba(0,0,0,0.1);
    margin: 4px 0 12px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.groom-name, .bride-name {
    display: inline-block;
    background: linear-gradient(135deg, var(--text-dark), var(--text-medium));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-tagline {
    font-size: 16px;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 2.5px;
    color: var(--text-dark);
    margin: 4px 0 18px;
    line-height: 1.9;
    text-shadow: 0 1px 12px rgba(255,255,255,0.95);
    position: relative;
    display: inline-block;
    padding: 0 8px;
    animation: taglineFadeIn 1.2s ease 0.4s both;
}
.hero-tagline::before,
.hero-tagline::after {
    content: '—';
    color: var(--yellow-warm);
    font-style: normal;
    margin: 0 6px;
    font-weight: 400;
}
@keyframes taglineFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.names-ampersand {
    color: var(--yellow-warm);
    font-size: 32px;
    font-style: italic;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

.hero-subtitle {
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--text-medium);
    margin-bottom: 16px;
}

.hero-date {
    display: inline-block;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--yellow);
    border-radius: 24px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 2px;
    box-shadow: var(--shadow-sm);
}

.scroll-hint {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 2px;
    animation: fadeInOut 2s ease-in-out infinite;
}
.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(4px); }
}
@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ============================================================
   COUNTDOWN SECTION
   ============================================================ */
.countdown-section {
    background: linear-gradient(135deg, var(--yellow-pale) 0%, var(--blue-pale) 100%);
    padding: 60px 24px;
    text-align: center;
}

.section-deco-top, .section-deco-bottom {
    color: var(--yellow-warm);
    font-size: 18px;
    letter-spacing: 8px;
    margin-bottom: 20px;
}
.section-deco-bottom { margin-top: 20px; margin-bottom: 0; }

.section-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text-dark);
    margin-bottom: 36px;
}

.countdown-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.count-box {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 16px 12px;
    min-width: 64px;
    box-shadow: var(--shadow-md),
                inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.count-number {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 48px;
    text-align: center;
    transition: transform 0.15s ease;
}
.count-number.tick { transform: scale(1.15); }

.count-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-light);
    font-weight: 400;
}

.count-dot {
    font-size: 28px;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    padding-bottom: 16px;
    opacity: 0.6;
    animation: dotBlink 1s step-end infinite;
}
@keyframes dotBlink { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.1; } }

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
    background: var(--cream);
    padding: 60px 24px;
}

.gallery-item {
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.gallery-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.gallery-photo {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 16px;
    aspect-ratio: 4/5;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* ── Replace with your photos ── */
}
.photo-1 { background: url('Pic1.jpg') center 20% / cover no-repeat; }
.photo-2 { background: url('Pic2.jpg') center / cover no-repeat; }
.photo-3 { background: url('Pic3.jpg') center / cover no-repeat; }

.gallery-caption {
    text-align: center;
    padding: 12px 16px;
}
.caption-icon { font-size: 22px; display: block; margin-bottom: 6px; }
.gallery-caption p {
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ============================================================
   GRATITUDE SECTION
   ============================================================ */
.gratitude-section {
    background: linear-gradient(160deg, var(--blue-pale) 0%, var(--purple-pale) 100%);
    padding: 70px 24px;
}

.gratitude-inner {
    max-width: 380px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.gratitude-inner.revealed { opacity: 1; transform: translateY(0); }


.gratitude-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.gratitude-divider {
    color: var(--yellow-warm);
    letter-spacing: 10px;
    font-size: 14px;
    margin-bottom: 24px;
}

.gratitude-text {
    font-size: 16px;
    font-weight: 300;
    line-height: 2.2;
    letter-spacing: 1.5px;
    color: var(--text-medium);
}

.gratitude-flowers {
    margin-top: 28px;
    font-size: 20px;
    letter-spacing: 8px;
    opacity: 0.7;
}

/* ============================================================
   RSVP SECTION
   ============================================================ */
.rsvp-section {
    background: linear-gradient(160deg, var(--purple-pale) 0%, var(--yellow-pale) 100%);
    padding: 60px 24px 80px;
    text-align: center;
}

.rsvp-main-title {
    margin-bottom: 40px;
}

/* ---- Red Envelope — Traditional Chinese 喜帖 ---- */
.envelope-container {
    width: 280px;
    margin: 0 auto 40px;
    position: relative;
    perspective: 800px;
}

.envelope-body {
    width: 280px;
    height: 200px;
    position: relative;
    border-radius: 3px 3px 10px 10px;
    background: var(--red-envelope);
    /* layered gold border + deep shadow */
    box-shadow:
        0 0 0 2px rgba(218,165,32,0.85),
        0 0 0 4px rgba(139,0,0,0.5),
        inset 0 0 50px rgba(0,0,0,0.18),
        0 10px 40px rgba(0,0,0,0.38);
    overflow: visible;
}

/* Inner gold border line */
.envelope-body::before {
    content: '';
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(218,165,32,0.42);
    border-radius: 1px 1px 6px 6px;
    z-index: 1;
    pointer-events: none;
}

/* Subtle vertical gold stripe dividers left + right */
.envelope-body::after {
    content: '';
    position: absolute;
    top: 12px; bottom: 12px;
    left: 18px; right: 18px;
    border-left: 1px solid rgba(218,165,32,0.18);
    border-right: 1px solid rgba(218,165,32,0.18);
    z-index: 1;
    pointer-events: none;
}

/* Flap — pointed triangle using clip-path (proper div, not border trick) */
.envelope-flap {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 110px;
    background: #8B0000;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transition: transform 0.95s cubic-bezier(0.4, 0, 0.2, 1), z-index 0s 0.95s;
    z-index: 5;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* gold edge simulation via filter */
    filter: drop-shadow(0 1px 0 rgba(218,165,32,0.65));
}

/* Diamond seal at flap tip */
.envelope-flap::after {
    content: '◆';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(218,165,32,0.8);
    text-shadow: 0 0 6px rgba(255,215,0,0.5);
    z-index: 1;
}

/* Open state — flap folds back; drop z-index after fold completes so letter shows above */
.envelope-container.open .envelope-flap {
    transform: perspective(600px) rotateX(-180deg);
    z-index: 2;
}

/* Front face content */
.envelope-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    gap: 5px;
}

.env-label {
    font-size: 11px;
    color: rgba(255,215,0,0.78);
    letter-spacing: 5px;
    font-family: 'Noto Serif SC', serif;
    font-weight: 300;
    margin-bottom: 2px;
}

.envelope-deco {
    font-size: 56px;
    line-height: 1;
    color: var(--yellow);
    text-shadow:
        0 0 16px rgba(255,215,0,0.85),
        0 0 36px rgba(255,215,0,0.4),
        0 3px 8px rgba(0,0,0,0.45);
    font-family: 'Noto Serif SC', serif;
    font-weight: 900;
    animation: decoGlow 2.5s ease-in-out infinite;
}

@keyframes decoGlow {
    0%, 100% { text-shadow: 0 0 12px rgba(255,215,0,0.6), 0 3px 8px rgba(0,0,0,0.45); }
    50%       { text-shadow: 0 0 28px rgba(255,215,0,1),   0 0 50px rgba(255,215,0,0.45), 0 3px 8px rgba(0,0,0,0.45); }
}

.env-ornament {
    font-size: 12px;
    color: rgba(255,215,0,0.6);
    letter-spacing: 7px;
    margin-top: 2px;
}

.envelope-shadow {
    width: 260px;
    height: 12px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.28), transparent);
    margin: 5px auto 0;
}

/* ---- Wedding invitation card — rises from envelope ---- */
.envelope-letter {
    position: absolute;
    top: 16px;
    left: 50%;
    width: 210px;
    background: linear-gradient(170deg, #fff8f0 0%, #fffcf0 50%, #fff5e4 100%);
    border-radius: 3px;
    padding: 16px 18px 18px;
    z-index: 6;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
    text-align: center;
    /* double-line gold border like a formal card */
    box-shadow:
        0 0 0 1.5px rgba(218,165,32,0.7),
        0 0 0 4px rgba(218,165,32,0.12),
        0 0 0 5.5px rgba(218,165,32,0.35),
        0 6px 24px rgba(0,0,0,0.18);
}

/* Inner decorative border */
.envelope-letter::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 0.5px solid rgba(218,165,32,0.3);
    border-radius: 1px;
    pointer-events: none;
}

.envelope-container.letter-out .envelope-letter {
    animation: letterEmerge 1.1s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes letterEmerge {
    0%   { opacity: 0; transform: translateX(-50%) translateY(35px) scale(0.78); }
    20%  { opacity: 1; }
    100% { opacity: 1; transform: translateX(-50%) translateY(-80px) scale(1); }
}

.letter-header-chi {
    font-size: 20px;
    font-weight: 900;
    color: var(--red-envelope);
    letter-spacing: 5px;
    font-family: 'Noto Serif SC', serif;
    margin-bottom: 10px;
    text-shadow: 0 1px 4px rgba(204,0,0,0.18);
}

.letter-lines {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 12px;
}

.letter-lines span {
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139,90,43,0.28), transparent);
    border-radius: 1px;
    margin: 0 auto;
}
.letter-lines span:nth-child(1) { width: 88%; }
.letter-lines span:nth-child(2) { width: 65%; }
.letter-lines span:nth-child(3) { width: 44%; }

.letter-date-chi {
    font-size: 10px;
    color: rgba(139,90,43,0.55);
    letter-spacing: 2px;
    font-family: 'Noto Serif SC', serif;
    font-weight: 300;
}

/* ---- Music consent overlay ---- */
.music-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.music-consent-overlay.dismissed {
    animation: overlayFade 0.4s ease forwards;
    pointer-events: none;
}
@keyframes overlayFade {
    to { opacity: 0; }
}

/* ---- RSVP Form ---- */
.rsvp-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    clip-path: inset(0 0 100% 0 round 16px);
    background: rgba(255,255,255,0.96);
    border-radius: 16px;
    padding: 4px 20px 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 27px,
        rgba(200,215,255,0.12) 27px,
        rgba(200,215,255,0.12) 28px
    );
}
.rsvp-form-wrapper.visible {
    animation: paperUnfurl 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.rsvp-form-wrapper.paper-in {
    animation: paperRefurl 0.5s ease-in forwards;
}

@keyframes paperUnfurl {
    0%   { clip-path: inset(0 0 100% 0 round 16px); transform: translateY(-20px); opacity: 0; }
    8%   { opacity: 1; }
    100% { clip-path: inset(0 0 0% 0 round 16px);   transform: translateY(0);    opacity: 1; }
}
@keyframes paperRefurl {
    0%   { clip-path: inset(0 0 0% 0 round 16px);   transform: translateY(0);    opacity: 1; }
    80%  { opacity: 0.2; }
    100% { clip-path: inset(0 0 100% 0 round 16px); transform: translateY(-20px); opacity: 0; }
}

.rsvp-subtitle {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 28px;
    font-weight: 300;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-medium);
}

.phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-code-select {
    flex-shrink: 0;
    width: 100px;
    padding: 14px 8px;
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.85);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}
.country-code-select:focus {
    border-color: var(--yellow-warm);
    box-shadow: 0 0 0 3px rgba(245,200,66,0.2);
}

.phone-row input {
    flex: 1;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
}
.form-group input:focus {
    border-color: var(--yellow-warm);
    box-shadow: 0 0 0 3px rgba(245,200,66,0.2);
}
.form-group input::placeholder { color: var(--text-muted); }

/* datetime-local styling */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

/* ---- Guest Stepper ---- */
.guest-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.85);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 100%;
}

.stepper-btn {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: rgba(255,248,220,0.8);
    border: none;
    font-size: 22px;
    font-weight: 300;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
}
.stepper-btn:active { background: var(--yellow); }
.stepper-btn:disabled { color: var(--text-muted); cursor: default; background: transparent; }

.stepper-value {
    flex: 1;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
    border-left: 1px solid rgba(255,215,0,0.25);
    border-right: 1px solid rgba(255,215,0,0.25);
    padding: 12px 0;
    user-select: none;
}

/* ---- Submit heart burst ---- */
@keyframes heartBurst {
    0%   { opacity: 1; transform: translate(0, 0) scale(0.4); }
    60%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--drift, 0px), -100px) scale(1.4); }
}

/* ---- Field Validation ---- */
.input-error {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229,57,53,0.15) !important;
}
.phone-row .input-error {
    border-color: #e53935 !important;
}

.field-error-msg {
    display: block;
    font-size: 12px;
    color: #e53935;
    margin-top: 5px;
    letter-spacing: 0.5px;
    min-height: 16px;
}

.submit-btn {
    margin-top: 12px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--yellow-warm), var(--gold));
    color: var(--text-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 4px 0 var(--gold-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 6px 0 var(--gold-dark); }
.submit-btn:active { transform: translateY(1px); box-shadow: var(--shadow-sm), 0 2px 0 var(--gold-dark); }

/* Success Message */
.success-message {
    text-align: center;
    padding: 32px 20px;
}
.success-message.hidden { display: none; }
.success-icon { font-size: 48px; margin-bottom: 16px; animation: successPop 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes successPop { from { transform: scale(0); } to { transform: scale(1); } }
.success-message p {
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 1.5px;
    color: var(--text-medium);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--text-dark);
    color: var(--cream);
    padding: 48px 24px;
    text-align: center;
}
.footer-pig { font-size: 28px; margin-bottom: 12px; display: block; }
.footer-names {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 8px;
    color: var(--yellow);
}
.footer-date { font-size: 13px; letter-spacing: 3px; color: var(--text-muted); margin-bottom: 16px; }
.footer-text { font-size: 13px; font-weight: 300; letter-spacing: 2px; color: var(--text-muted); }
.footer-flowers { margin-top: 24px; font-size: 16px; letter-spacing: 10px; opacity: 0.5; }

/* ============================================================
   SCROLL REVEAL (generic)
   ============================================================ */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — already mobile-first, these handle wider screens
   ============================================================ */
/* ---- English overrides (longer text) ---- */
html[data-lang="en"] .hero-tagline {
    font-size: clamp(11px, 3.4vw, 14px);
    letter-spacing: 1px;
    white-space: nowrap;
}
html[data-lang="en"] .hero-tagline::before,
html[data-lang="en"] .hero-tagline::after {
    margin: 0 4px;
}
html[data-lang="en"] .countdown-section .section-title {
    font-size: clamp(14px, 4.2vw, 20px);
    letter-spacing: 1px;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .couple-names { font-size: 36px; }
    .count-box { min-width: 72px; padding: 18px 14px; }
    .count-number { font-size: 42px; }
    .gallery-photo { max-width: 420px; }
}

@media (min-width: 768px) {
    .hero-content { padding: 60px 40px 100px; }
    .couple-names { font-size: 42px; }
    .gallery-section { padding: 80px 48px; }
    .gallery-photo { max-width: 460px; }
    .floating-ring { right: 32px; }
}

/* ============================================================
   EVENT SCHEDULE SECTION
   ============================================================ */
.schedule-section {
    background: linear-gradient(160deg, var(--yellow-pale) 0%, var(--purple-pale) 100%);
    padding: 60px 24px;
    text-align: center;
}

.schedule-timeline {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.schedule-day {
    text-align: left;
}

.day-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.75);
    border: 1.5px solid var(--purple-light);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-medium);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.day-badge--gold {
    background: rgba(255,215,0,0.15);
    border-color: var(--yellow);
    color: var(--text-dark);
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-row {
    display: grid;
    grid-template-columns: 80px 28px 1fr;
    align-items: flex-start;
    min-height: 56px;
}

.event-time-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
    padding-top: 10px;
    text-align: right;
    padding-right: 4px;
}
.event-time-badge--main { color: var(--gold); }

.event-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
}

.event-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--purple-light);
    border: 2px solid var(--purple);
    flex-shrink: 0;
}
.event-dot--star {
    width: 20px;
    height: 20px;
    background: var(--yellow);
    border-color: var(--gold);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-style: normal;
}

.spine-line {
    width: 2px;
    flex: 1;
    min-height: 28px;
    background: linear-gradient(to bottom, var(--purple-light), var(--yellow-pale));
    margin-top: 3px;
}

.event-detail {
    padding: 8px 0 8px 12px;
}
.event-detail--main {
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 0 0 4px 8px;
    border-left: 3px solid var(--yellow);
    box-shadow: var(--shadow-sm);
}

.event-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-dark);
}

.event-venue {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-medium);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.event-tag {
    display: inline-block;
    background: var(--yellow-pale);
    border: 1px solid var(--yellow);
    border-radius: 10px;
    padding: 2px 10px;
    font-size: 11px;
    color: var(--gold-dark);
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 6px;
}

/* ============================================================
   WEDDING DETAILS CARD (in RSVP section)
   ============================================================ */
.wedding-details-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,215,0,0.35);
    border-radius: var(--radius);
    padding: 20px 20px 16px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    text-align: left;
}

.wd-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
}

.wd-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }

.wd-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wd-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.wd-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

.wd-venue-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wd-star-badge {
    display: inline-block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 4px;
}

.wd-note {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.map-link-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,248,220,0.9);
    border: 1.5px solid rgba(255,215,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, background 0.2s ease;
    margin-left: auto;
    align-self: center;
}
.map-link-btn:active { transform: scale(0.9); background: var(--yellow); }

.wd-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,215,0,0.3), transparent);
    margin: 4px 0;
}

/* ============================================================
   INTERNATIONAL GUEST TOGGLE
   ============================================================ */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-row input[type="checkbox"] { display: none; }

.toggle-track {
    width: 46px;
    height: 26px;
    background: var(--text-muted);
    border-radius: 13px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s ease;
}
.toggle-track.active { background: var(--yellow-warm); }

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.toggle-track.active .toggle-thumb { transform: translateX(20px); }

.toggle-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.toggle-hint {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 6px;
    padding-left: 58px;
}

/* ============================================================
   CONDITIONAL INTERNATIONAL FIELDS
   ============================================================ */
.intl-fields {
    display: none;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    border-left: 3px solid var(--yellow);
    padding-left: 16px;
    margin-top: -4px;
    animation: slideDown 0.4s ease;
}

.airport-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255,248,220,0.9), rgba(255,249,242,0.9));
    border: 1.5px solid rgba(255,215,0,0.4);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}
.airport-icon { font-size: 18px; flex-shrink: 0; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   POST-RSVP MODAL
   ============================================================ */
.rsvp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(61, 44, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.rsvp-modal.visible {
    opacity: 1;
    pointer-events: all;
}

.rsvp-modal-card {
    background: linear-gradient(160deg, var(--white) 0%, var(--yellow-pale) 60%, var(--purple-pale) 100%);
    border-radius: 28px;
    padding: 44px 32px 36px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25);
    transform: scale(0.85) translateY(20px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255,215,0,0.25);
}
.rsvp-modal.visible .rsvp-modal-card {
    transform: scale(1) translateY(0);
}

.modal-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 16px;
    animation: modalIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
@keyframes modalIconPop {
    from { transform: scale(0) rotate(-20deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.modal-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: taglineFadeIn 0.6s ease 0.5s both;
}

.modal-sub {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1.5px;
    line-height: 1.9;
    color: var(--text-medium);
    margin-bottom: 28px;
    animation: taglineFadeIn 0.6s ease 0.65s both;
}

.modal-close-btn {
    background: linear-gradient(135deg, var(--yellow-warm), var(--gold));
    color: var(--text-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    border: none;
    border-radius: 50px;
    padding: 12px 36px;
    cursor: pointer;
    box-shadow: var(--shadow-md), 0 3px 0 var(--gold-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: taglineFadeIn 0.6s ease 0.8s both;
    -webkit-appearance: none;
}
.modal-close-btn:active { transform: translateY(1px); box-shadow: var(--shadow-sm), 0 1px 0 var(--gold-dark); }
