/* ===================================
   WEDDING WEBSITE - ROMEO & JULIET
=================================== */
:root {
    --bg: #fdfbf7;
    --dark: #402319; /* Brownish dark */
    --darker: #2d1811;
    --leaf: #7c95a8; /* Dusty Light Blue */
    --cream: #f4eee6;
    --gold: #c9a97a;
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;

    /* Unified Theme Semantic Colors */
    --primary-color: #273a47;      /* Premium Dark Slate/Steel Blue */
    --primary-hover: #1d2c36;      /* Slightly darker for hover */
    --accent-color: var(--gold);   /* Gold accent */
    --accent-hover: #d5ba93;       /* Lighter gold for hover accent */
    
    /* Button States */
    --btn-bg: var(--primary-color);
    --btn-bg-hover: var(--primary-hover);
    --btn-text: #fdfbf7;
    --btn-text-hover: #ffffff;
    --btn-accent-bg: var(--accent-color);
    --btn-accent-bg-hover: var(--accent-hover);
    
    /* Input and Border States */
    --input-border: rgba(124, 149, 168, 0.25);
    --input-focus: var(--leaf);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, rgba(228, 235, 240, 0.95) 0%, rgba(247, 243, 237, 0.95) 50%, rgba(226, 234, 240, 0.95) 100%), url('assets/bg_watercolor_blue.png') center/cover no-repeat fixed;
    color: var(--dark);
    font-family: var(--font-sans);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* ====== COVER PAGE ====== */
#cover-page {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: #fdfbf7 url('assets/bg_watercolor_blue.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1), opacity 1s ease;
    overflow: hidden;
    cursor: pointer;
}

#cover-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1); /* Frosted tint overlay */
    backdrop-filter: blur(2px);
    z-index: 1;
}

#cover-page > * {
    position: relative;
    z-index: 10;
}

#cover-page.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.cal-title {
    text-align: center;
    margin-bottom: 20px;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#cover-page.is-open .cal-title {
    opacity: 0;
    transform: translateY(-40px);
    pointer-events: none;
}

.cover-envelope-wrapper {
    position: relative;
    width: 320px;
    height: 220px;
    margin: 40px 0;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
    animation: envelopeTwitch 2.8s ease-in-out infinite;
}

@keyframes envelopeTwitch {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.cover-envelope-wrapper.is-open {
    transform: translateY(100px) rotateX(10deg);
    animation: none;
}

.cover-env-back {
    position: absolute;
    inset: 0;
    background: #fdfbf7; /* Pristine cream */
    border: 1px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.cover-env-card {
    position: absolute;
    top: 5%;
    left: 8%;
    width: 84%;
    height: 90%;
    background: #fffdf5;
    border: 1px solid var(--gold);
    padding: 20px;
    text-align: center;
    z-index: 2;
    border-radius: 4px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    outline: 1px solid #ddd;
    outline-offset: -8px;
}

.cover-envelope-wrapper.is-open .cover-env-card {
    display: flex;
    animation: cardPopUp 1s 0.6s forwards ease-out;
}

@keyframes cardPopUp {
    0% { transform: translateY(0); opacity: 0; }
    100% { transform: translateY(-220px); opacity: 1; }
}

.c-sub {
    font-family: var(--font-script);
    font-size: 1.2rem;
    color: var(--gold);
}

.c-title {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--dark);
    line-height: 1.2;
    margin: 5px 0;
}

.cover-env-front {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: #fdfbf7;
    border-radius: 0 0 10px 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(201, 169, 122, 0.25);
}

.guest-name-on-env {
    position: absolute;
    top: 55%; /* Adjusted for flap positioning */
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 7;
    color: var(--dark);
    transition: opacity 0.3s;
}

.cover-envelope-wrapper.is-open .guest-name-on-env {
    opacity: 0;
}

.guest-name-on-env p {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guest-name-on-env h2 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--dark);
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.cover-env-flap {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 140px;
    background: #f9f7eb;
    /* U-shape flap from reference */
    border-radius: 0 0 50% 50%;
    z-index: 6;
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.25));
    border: 1px solid rgba(201, 169, 122, 0.25);
    overflow: visible; /* To allow shadow */
}

/* Adding a subtle border line to the flap edge for better definition */
.cover-env-flap::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 100% 0, 100% 20%, 50% 100%, 0 20%);
    border: 1px solid rgba(0,0,0,0.05);
    pointer-events: none;
}


.cover-envelope-wrapper.is-open .cover-env-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.cover-wax {
    position: absolute;
    top: 155px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    transition: opacity 0.3s;
}

.cover-envelope-wrapper.is-open .cover-wax {
    opacity: 0;
}

.cover-wax::after {
    content: 'RJ';
    font-family: var(--font-script);
    font-size: 1.2rem;
    color: var(--darker);
}

.cover-footer {
    text-align: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#cover-page.is-open .cover-footer {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
}

.valid-text {
    font-size: 0.8rem;
    color: var(--dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.click-hint {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--primary-color); /* Deep high-contrast blue */
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.95), 0 0 2px rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- MAIN CONTENT LAYOUT --- */
.main-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

section {
    padding: 60px 20px;
    position: relative;
}

.section-title {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--dark);
    text-align: center;
    margin-bottom: 40px;
    font-weight: normal;
}

/* ====== SAVE THE DATE ====== */
.save-the-date-sec {
    background: url('assets/Save Our Date.jpg') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.std-content {
    background: rgba(0, 0, 0, 0.4);
    padding: 50px 30px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.std-sub {
    font-family: var(--font-inter);
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.std-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    letter-spacing: 0.4em;
    margin-bottom: 15px;
}

.std-names {
    font-family: var(--font-script);
    font-size: 4rem;
    margin-bottom: 15px;
    font-weight: normal;
}

.std-date {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 35px;
}

.std-location {
    margin-bottom: 35px;
    font-family: var(--font-inter);
    font-size: 1rem;
    letter-spacing: 0.05em;
    line-height: 1.6;
}

.btn-detail {
    padding: 14px 40px;
    border-radius: 50px;
    border: 1px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    font-family: var(--font-serif);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background: white;
    color: var(--dark);
}

/* ====== GALLERY ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* ====== RSVP & WISHES ====== */
.rsvp-section {
    color: var(--dark);
    padding: 100px 20px;
    text-align: center;
}

.rsvp-container {
    max-width: 450px;
    margin: 0 auto;
}

.rsvp-form {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    padding: 40px 30px;
    border-radius: 30px;
    border: 1px solid rgba(178, 151, 132, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.rsvp-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.rsvp-form input[type="text"],
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--input-border);
    padding: 15px 20px;
    border-radius: 15px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--dark);
    outline: none;
    transition: all 0.3s ease;
}
.rsvp-form input[type="text"]:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 8px rgba(124, 149, 168, 0.2);
}

.rsvp-form input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
}

.radio-group {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}

.radio-group label {
    flex: 1;
    background: white;
    color: var(--dark);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.radio-group input[type="radio"] {
    accent-color: var(--primary-color);
}

.radio-group label:hover {
    background: var(--cream);
    border-color: var(--accent-color);
}

.btn-rsvp {
    width: 100%;
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 16px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-rsvp:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(39, 58, 71, 0.25);
    background: var(--btn-bg-hover);
    color: var(--btn-text-hover);
}

/* E-Ticket Styles */
.ticket-card {
    background: white;
    color: var(--dark);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--gold);
}

.ticket-card h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.qr-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 20px;
    margin: 25px 0;
    border: 1px dashed #ddd;
}

.qr-box img {
    width: 180px;
    height: 180px;
}

.qr-code-text {
    margin-top: 10px;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 2px;
    color: #888;
}

.ticket-details {
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.detail-row .val {
    font-weight: 600;
}

.ucapan-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.ucapan-item {
    background: #fdfbf7;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.u-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.u-name {
    font-family: var(--font-serif);
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 5px;
}

.u-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ====== COUNTDOWN ====== */
.countdown-sec {
    padding: 80px 20px;
    text-align: center;
    background: var(--bg);
}

.timer-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.timer-item {
    background: white;
    width: 70px;
    padding: 15px 5px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.t-val {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--dark);
    font-family: var(--font-serif);
}

.t-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
}

/* ====== FOOTER ====== */
footer {
    background: #B29784; /* Beaver */
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.f-names {
    font-family: var(--font-script);
    font-size: 3rem;
    margin-bottom: 10px;
}

.f-date {
    font-family: var(--font-serif);
    letter-spacing: 0.3em;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ====== MODAL DETAILS ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg);
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    padding: 40px 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.modal-h {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
    display: inline-block;
}

.modal-p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #444;
}

.btn-maps {
    display: inline-block;
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-maps:hover {
    background: var(--btn-bg-hover);
    color: var(--btn-text-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 58, 71, 0.2);
}

/* Floating Music */
.floating-music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 8px 25px rgba(201, 169, 122, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease;
}

.floating-music-btn:hover {
    transform: scale(1.1);
    background: var(--leaf);
    box-shadow: 0 10px 30px rgba(124, 149, 168, 0.5);
}

.floating-music-btn.visible {
    display: flex;
}

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

.floating-music-btn.playing .music-icon-wrapper {
    animation: spin 4s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

/* ====== GIFT SECTION ====== */
.gift-section {
    padding: 80px 20px;
    text-align: center;
    background: #fdfbf7;
}

.gift-card {
    background: white;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.bank-name {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.acc-number {
    font-size: 1.6rem;
    font-family: var(--font-serif);
    color: var(--gold);
    margin-bottom: 5px;
    font-weight: 600;
}

.acc-owner {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 25px;
}

.btn-copy {
    background: none;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: var(--btn-text-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 58, 71, 0.2);
}

/* ====== GALLERY ZOOM MODAL ====== */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-modal.active {
    display: flex;
    opacity: 1;
}

.gallery-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-modal.active img {
    transform: scale(1);
}

.close-gallery {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 20001;
}

/* Scroll Bounce Keyframes */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ====== SCROLL REVEAL ANIMATIONS ====== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-zoom.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Stagger delays for beautiful sequencing */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }
.delay-5 { transition-delay: 0.75s; }

/* ====== HERO CINEMATIC EFFECTS ====== */
.hero-card {
    z-index: 2;
    border: 1.5px solid rgba(178, 151, 132, 0.4);
    padding: 30px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    max-width: 350px;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    overflow: visible; /* Allows ornaments to overflow beautifully */
    isolation: isolate; /* Isolates the blend mix context and removes gray box perfectly */
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Ornaments Cinematic Entrance */
.hero-ornament {
    opacity: 0;
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ornament-tl {
    transform: translate(-30px, -30px) rotate(225deg);
    transition-delay: 0.6s;
}

.ornament-br {
    transform: translate(30px, 30px) rotate(225deg) scaleX(-1);
    transition-delay: 0.9s;
}

.hero-card.active .ornament-tl {
    opacity: 1;
    transform: translate(0, 0) rotate(270deg);
}

.hero-card.active .ornament-br {
    opacity: 1;
    transform: translate(0, 0) rotate(180deg) scaleX(-1);
}

/* Elements Cinematic Entrance inside Card */
.hero-item {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card.active .hero-item-1 { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.hero-card.active .hero-item-2 { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }
.hero-card.active .hero-item-3 { opacity: 1; transform: translateY(0); transition-delay: 1.0s; }
.hero-card.active .hero-item-4 { opacity: 1; transform: translateY(0); transition-delay: 1.3s; }
.hero-card.active .hero-item-5 { opacity: 1; transform: translateY(0); transition-delay: 1.6s; }

/* ====== CELEBRATORY FALLING PETALS & FLAKES ====== */
.falling-flake {
    position: absolute;
    top: -20px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    animation: fall linear forwards;
    will-change: transform, opacity;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.85;
    }
    90% {
        opacity: 0.85;
    }
    100% {
        transform: translateY(105vh) rotate(360deg) translateX(var(--drift));
        opacity: 0;
    }
}