/* ==========================================================================
   DASUN & BETHMI · WEDDING SYSTEM STYLING
   ========================================================================== */

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

:root {
    --midnight:     #0e1a17;
    --deep-water:   #152620;
    --leaf-dark:    #1e3328;
    --mist:         #c5dbd0;
    --blush-deep:   #e8a9bf;
    --blush-mid:    #f5c8d8;
    --blush-pale:   #fdeaf2;
    --gold:         #c9a84c;
    --ivory:        #fdfaf6;
    --text-dark:    #1c2820;
    --text-mid:     #4a5e54;
    --radius-card:  28px;
}

body {
    background-color: var(--ivory);
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

/* ==========================================================================
   🔒 THE ENVELOPE GATE LAYER
   ========================================================================== */
.gate {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, var(--deep-water) 0%, var(--midnight) 100%);
    z-index: 1000;
    display: flex; justify-content: center; align-items: center; text-align: center;
    padding: 24px;
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1), opacity 1s ease;
}

.gate.open {
    transform: translateY(-100vh);
    opacity: 0;
    pointer-events: none;
}

.gate-content { max-width: 480px; width: 100%; }
.gate-subtitle { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--mist); font-style: italic; letter-spacing: 1px; margin-bottom: 16px; font-weight: 300; }
.gate-title { font-family: 'Cinzel', serif; font-size: 2.5rem; color: #fff; font-weight: 400; letter-spacing: 2px; margin-bottom: 40px; }

/* Interactive Wax Seal & Lotus Bloom Graphic Container */
.gate-seal-wrapper { 
    position: relative; 
    width: 200px; 
    height: 200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.gate-btn {
    width: 120px; 
    height: 120px; 
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 40%, var(--blush-pale) 100%);
    border: 2px solid var(--gold); 
    cursor: pointer; 
    z-index: 25;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 15px rgba(255,255,255,0.8);
    display: flex; 
    justify-content: center; 
    align-items: center;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s;
}

.gate-btn:hover { 
    transform: scale(1.06); 
}

.gate-btn-text { 
    font-size: 0.65rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--text-dark); 
    font-family: 'Montserrat', sans-serif; 
    z-index: 30;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Master Lotus Flower Structural Arrangement */
.lotus-flower {
    position: absolute;
    width: 140px;
    height: 140px;
    z-index: 15;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base individual petal layout structure */
.lotus-petal {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 35px;
    height: 65px;
    background: linear-gradient(to top, var(--blush-mid), var(--blush-deep));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform-origin: bottom center;
    opacity: 0;
    box-shadow: 0 0 10px rgba(232, 169, 191, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease, bottom 1.2s cubic-bezier(0.19, 1, 0.22, 1), left 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Closed state geometry profiles */
.lotus-petal.p1 { transform: translate(-50%, 0) rotate(0deg) scale(0.3); opacity: 0.9; z-index: 5; background: linear-gradient(to top, var(--blush-deep), #fff); }
.lotus-petal.p2 { transform: translate(-50%, 0) rotate(-10deg) scale(0.25); opacity: 0.8; z-index: 4; }
.lotus-petal.p3 { transform: translate(-50%, 0) rotate(10deg) scale(0.25); opacity: 0.8; z-index: 4; }
.lotus-petal.p4 { transform: translate(-50%, 0) rotate(-25deg) scale(0.2); opacity: 0.7; z-index: 3; }
.lotus-petal.p5 { transform: translate(-50%, 0) rotate(25deg) scale(0.2); opacity: 0.7; z-index: 3; }
.lotus-petal.p6 { transform: translate(-50%, 0) rotate(-45deg) scale(0.15); opacity: 0.6; z-index: 2; }
.lotus-petal.p7 { transform: translate(-50%, 0) rotate(45deg) scale(0.15); opacity: 0.6; z-index: 2; }

/* Blooming engine animation updates */
.gate-btn.blooming {
    transform: scale(0.9);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
.gate-btn.blooming .gate-btn-text {
    opacity: 0;
}

.gate-btn.blooming + .lotus-flower .lotus-petal {
    opacity: 1;
    bottom: 20%;
}
.gate-btn.blooming + .lotus-flower .lotus-petal.p1 { transform: translate(-50%, 0) rotate(0deg) scale(1.4); z-index: 10; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p2 { transform: translate(-50%, 0) rotate(-25deg) scale(1.25); z-index: 9; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p3 { transform: translate(-50%, 0) rotate(25deg) scale(1.25); z-index: 9; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p4 { transform: translate(-50%, 0) rotate(-55deg) scale(1.15); z-index: 8; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p5 { transform: translate(-50%, 0) rotate(55deg) scale(1.15); z-index: 8; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p6 { transform: translate(-50%, 0) rotate(-85deg) scale(1.05); z-index: 7; }
.gate-btn.blooming + .lotus-flower .lotus-petal.p7 { transform: translate(-50%, 0) rotate(85deg) scale(1.05); z-index: 7; }

.pulse-ring { position: absolute; width: 120px; height: 120px; border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; pointer-events: none; animation: ripple 3s infinite linear; z-index: 5; }
.ring-2 { animation-delay: 1.5s; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }

/* ==========================================================================
   🎯 MAIN CENTERED INVITATION CARD CONTAINER
   ========================================================================== */
.wrapper {
    display: none; 
    width: 100%;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 5;
}

.wrapper.visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    background: #ffffff;
    max-width: 480px; width: 100%;
    border-radius: var(--radius-card);
    padding: 50px 30px;
    text-align: center;
    border: 1px solid rgba(30,51,40,0.08);
    box-shadow: 0 30px 70px rgba(14,26,23,0.08);
}

.h-sub { font-family: 'Great Vibes', cursive; font-size: 2.2rem; color: var(--text-mid); margin-bottom: 4px; }
.h-title { font-family: 'Cinzel', serif; font-size: 2.4rem; font-weight: 600; color: var(--midnight); letter-spacing: 1px; }

.decor-divider { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 20px 0 30px; }
.decor-divider .line { height: 1px; width: 50px; background: linear-gradient(to right, transparent, var(--gold), transparent); }
.decor-divider .lotus-glyph { color: var(--gold); font-size: 1rem; }

/* Portrait Image Frame */
.photo-frame { width: 100%; aspect-ratio: 1/1; margin-bottom: 30px; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.photo { width: 100%; height: 100%; object-fit: cover; }
.shimmer { position: absolute; top: 0; left: -150%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%); transform: skewX(-25deg); animation: shine 6s infinite ease-in-out; }
@keyframes shine { 0%, 70% { left: -150%; } 100% { left: 150%; } }

/* Family Lineage Details */
.lineage { margin-bottom: 30px; }
.lineage h3 { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--text-mid); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.p-name { font-size: 0.95rem; color: var(--text-dark); line-height: 1.4; }
.ampersand { font-family: 'Great Vibes', cursive; font-size: 2.4rem; color: var(--gold); margin: 6px 0; }

/* Badges and Venues */
.date-badge { border-top: 1px solid var(--blush-mid); border-bottom: 1px solid var(--blush-mid); padding: 14px 0; max-width: 80%; margin: 0 auto 20px; }
.day { display: block; font-size: 0.75rem; letter-spacing: 3px; color: var(--text-mid); margin-bottom: 2px; }
.full-date { font-size: 1.3rem; font-weight: 600; color: var(--gold); letter-spacing: 1px; }

.v-time { font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 600; color: var(--gold); letter-spacing: 0.5px; margin-bottom: 10px; margin-top: 20px; }
.v-at { font-family: 'Great Vibes', cursive; font-size: 1.8rem; color: var(--text-mid); }
.venue h2 { font-family: 'Cinzel', serif; font-size: 1.4rem; color: var(--midnight); margin: 2px 0; }
.v-city { font-size: 0.9rem; color: var(--text-mid); }

/* Countdown Clock Graphic */
.countdown-wrap { background-color: var(--blush-pale); padding: 20px; border-radius: 16px; margin: 30px 0; border: 1px solid var(--blush-mid); }
.cd-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-mid); margin-bottom: 12px; }
.cd-block { display: flex; justify-content: center; gap: 10px; }
.cd-seg { background: #ffffff; min-width: 60px; padding: 8px; border-radius: 8px; border: 1px solid var(--blush-mid); }
.cd-seg span { font-size: 1.4rem; font-weight: 600; color: var(--text-dark); display: block; }
.cd-seg label { font-size: 0.65rem; color: var(--text-mid); text-transform: uppercase; display: block; }

/* Button Controls Layout */
.actions { display: flex; flex-direction: column; gap: 10px; }
.btn { display: block; width: 100%; padding: 15px; font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; border-radius: 30px; cursor: pointer; text-decoration: none; text-align: center; transition: all 0.3s; }
.btn-primary { background: var(--deep-water); color: #fff; border: none; }
.btn-primary:hover { background: var(--leaf-dark); }
.btn-secondary { background: transparent; color: var(--text-dark); border: 1px solid var(--blush-deep); }
.btn-secondary:hover { background: var(--blush-pale); }
.btn-full { width: 100%; margin-top: 10px; }

/* Visual Reveal System Styles */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* 🖼️ LIGHTBOX MODAL CONFIGURATION LAYOUT */
.modal-overlay { display: none; position: fixed; z-index: 5000; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(14,26,23,0.5); backdrop-filter: blur(4px); justify-content: center; align-items: center; }
.modal-overlay.open { display: flex; }
.modal-box { background-color: #ffffff; padding: 40px 24px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; position: relative; border-top: 4px solid var(--gold); }
.modal-close { position: absolute; right: 15px; top: 10px; font-size: 2rem; cursor: pointer; background: none; border: none; color: #bbb; }
.modal-lotus { font-size: 2.2rem; margin-bottom: 5px; }
.modal-title { font-family: 'Cinzel', serif; font-size: 1.3rem; margin-bottom: 5px; }
.modal-sub { font-size: 0.85rem; color: var(--text-mid); margin-bottom: 20px; }
.field { margin-bottom: 12px; text-align: left; }
.field input, .field select { width: 100%; padding: 12px; border: 1px solid var(--blush-deep); border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 0.9rem; background-color: var(--ivory); outline: none; }

.hidden { display: none; }
.v-hotel { font-family: 'Montserrat', sans-serif; font-size: 1.1rem; color: var(--text-dark); font-weight: 500; margin-bottom: 10px; }