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

:root {
    --cream: #fdf6ec;
    --cream-2: #f7ecd9;
    --gold: #c9a961;
    --gold-dark: #a8893f;
    --rose: #d89aa3;
    --rose-soft: #f4c2c2;
    --green-leaf: #a8c09a;
    --brown: #6b4423;
    --ink: #4a3520;
}

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

body {
    font-family: 'Cormorant Garamond', serif;
    background:
        radial-gradient(ellipse at top left, #fff 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, #fff 0%, transparent 50%),
        linear-gradient(135deg, var(--cream) 0%, var(--cream-2) 100%);
    background-attachment: fixed;
    color: var(--ink);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(216, 154, 163, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(168, 192, 154, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ============== FALLING PETALS ============== */
.petals {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petals span {
    position: absolute;
    top: -20px;
    width: 14px;
    height: 14px;
    background: var(--rose-soft);
    border-radius: 0 100% 0 100%;
    opacity: 0.7;
    animation: fall linear infinite;
}

.petals span:nth-child(1)  { left: 5%;   width: 12px; height: 12px; background: #f4c2c2; animation-duration: 12s; animation-delay: 0s; }
.petals span:nth-child(2)  { left: 15%;  width: 10px; height: 10px; background: #e8b4b8; animation-duration: 16s; animation-delay: 2s; }
.petals span:nth-child(3)  { left: 25%;  width: 14px; height: 14px; background: #f4c2c2; animation-duration: 14s; animation-delay: 4s; }
.petals span:nth-child(4)  { left: 35%;  width: 9px;  height: 9px;  background: #e8b4b8; animation-duration: 18s; animation-delay: 1s; }
.petals span:nth-child(5)  { left: 45%;  width: 12px; height: 12px; background: #f4c2c2; animation-duration: 13s; animation-delay: 3s; }
.petals span:nth-child(6)  { left: 55%;  width: 10px; height: 10px; background: #e8b4b8; animation-duration: 15s; animation-delay: 5s; }
.petals span:nth-child(7)  { left: 65%;  width: 14px; height: 14px; background: #f4c2c2; animation-duration: 17s; animation-delay: 0s; }
.petals span:nth-child(8)  { left: 75%;  width: 11px; height: 11px; background: #e8b4b8; animation-duration: 12s; animation-delay: 6s; }
.petals span:nth-child(9)  { left: 85%;  width: 13px; height: 13px; background: #f4c2c2; animation-duration: 14s; animation-delay: 2s; }
.petals span:nth-child(10) { left: 95%;  width: 10px; height: 10px; background: #e8b4b8; animation-duration: 16s; animation-delay: 4s; }
.petals span:nth-child(11) { left: 10%;  width: 8px;  height: 8px;  background: #f4c2c2; animation-duration: 19s; animation-delay: 7s; }
.petals span:nth-child(12) { left: 30%;  width: 11px; height: 11px; background: #e8b4b8; animation-duration: 13s; animation-delay: 8s; }
.petals span:nth-child(13) { left: 50%;  width: 9px;  height: 9px;  background: #f4c2c2; animation-duration: 17s; animation-delay: 9s; }
.petals span:nth-child(14) { left: 70%;  width: 12px; height: 12px; background: #e8b4b8; animation-duration: 15s; animation-delay: 10s; }
.petals span:nth-child(15) { left: 90%;  width: 10px; height: 10px; background: #f4c2c2; animation-duration: 14s; animation-delay: 11s; }

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% {
        transform: translateY(105vh) rotate(720deg) translateX(40px);
        opacity: 0;
    }
}

/* ============== ENVELOPE SCREEN ============== */
.envelope-screen {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), filter 0.9s ease;
    will-change: opacity, transform;
}

.envelope-screen.hidden {
    opacity: 0;
    transform: scale(0.92) translateY(-20px);
    filter: blur(4px);
    pointer-events: none;
    position: absolute;
    inset: 0;
}

.corner-flowers {
    position: fixed;
    width: 200px;
    height: 200px;
    z-index: 0;
    opacity: 0.85;
    pointer-events: none;
}

.corner-flowers.top-left { top: 0; left: 0; }
.corner-flowers.bottom-right { bottom: 0; right: 0; }

.envelope-wrapper {
    text-align: center;
    max-width: 500px;
    width: 100%;
    z-index: 2;
}

.pre-title {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.couple-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 9vw, 5.5rem);
    color: var(--brown);
    line-height: 1;
    margin-bottom: 0.4rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(107, 68, 35, 0.1);
}

.couple-title .amp {
    color: var(--rose);
    font-size: 0.85em;
    margin: 0 0.15em;
    display: inline-block;
}

.date-pre {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    letter-spacing: 8px;
    color: var(--gold-dark);
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* ============== ENVELOPE ============== */
.envelope {
    position: relative;
    width: clamp(260px, 70vw, 380px);
    height: clamp(180px, 48vw, 260px);
    margin: 0 auto;
    cursor: pointer;
    perspective: 1500px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.envelope:hover {
    transform: translateY(-6px) scale(1.02);
}

.envelope-back,
.envelope-front,
.envelope-flap,
.envelope-letter {
    position: absolute;
    inset: 0;
    border-radius: 4px;
}

.envelope-back {
    background: linear-gradient(135deg, #e8d4b8 0%, #d4b896 100%);
    box-shadow:
        0 10px 30px rgba(107, 68, 35, 0.25),
        inset 0 0 0 1px rgba(168, 137, 63, 0.3);
    z-index: 1;
}

.envelope-letter {
    background: var(--cream);
    z-index: 2;
    transform: translateY(0);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 97, 0.3);
}

.letter-preview {
    width: 80%;
    height: 80%;
    border: 1.5px solid rgba(201, 169, 97, 0.5);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-heart {
    font-size: 3rem;
    color: var(--rose);
    opacity: 0.6;
}

.envelope-front {
    background: linear-gradient(135deg, #e8d4b8 0%, #d4b896 50%, #c9a76f 100%);
    z-index: 4;
    border-radius: 4px 4px 4px 4px;
    box-shadow: inset 0 0 0 1px rgba(168, 137, 63, 0.4);
    clip-path: polygon(0 50%, 50% 100%, 100% 50%, 100% 100%, 0 100%);
}

.envelope-flap {
    background: linear-gradient(135deg, #d4b896 0%, #c9a76f 100%);
    transform-origin: top center;
    transform: rotateX(0deg);
    transition: transform 0.7s ease, z-index 0.7s ease 0.2s;
    z-index: 5;
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    box-shadow: inset 0 -2px 4px rgba(107, 68, 35, 0.2);
}

.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 35% 35%, #d04a4a, #8b1a1a);
    border-radius: 50%;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fdf6ec;
    font-family: 'Great Vibes', cursive;
    font-size: 1.4rem;
    box-shadow:
        0 4px 12px rgba(139, 26, 26, 0.5),
        inset -3px -3px 8px rgba(0, 0, 0, 0.3),
        inset 3px 3px 8px rgba(255, 255, 255, 0.15);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.wax-seal::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(253, 246, 236, 0.5);
    border-radius: 50%;
}

/* Envelope OPENING state */
.envelope.open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope.open .wax-seal {
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
    opacity: 0;
}

.envelope.open .envelope-letter {
    transform: translateY(-110%);
    z-index: 6;
    transition-delay: 0.4s;
}

.open-hint {
    margin-top: 2rem;
    font-style: italic;
    color: var(--gold-dark);
    font-size: 1rem;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

/* ============== INVITATION SCREEN ============== */
.invitation-screen {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(0.98);
    transition:
        opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 0s linear 0.9s;
    will-change: opacity, transform;
}

.invitation-screen.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 0s linear 0s;
}

.invitation-card {
    background: linear-gradient(180deg, #fffaf2 0%, #fdf6ec 100%);
    width: 100%;
    max-width: 640px;
    padding: 0 0 2rem 0;
    border-radius: 8px;
    box-shadow:
        0 30px 80px rgba(107, 68, 35, 0.18),
        0 8px 24px rgba(107, 68, 35, 0.08),
        inset 0 0 0 1px rgba(201, 169, 97, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 97, 0.4);
}

.invitation-card::before,
.invitation-card::after {
    content: '';
    position: absolute;
    left: 25px;
    right: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.6), transparent);
}

.invitation-card::before { top: 18px; }
.invitation-card::after { bottom: 18px; }

.floral-border {
    width: 100%;
    height: 70px;
    display: block;
}

.floral-border svg {
    width: 100%;
    height: 100%;
}

.floral-border.bottom { transform: rotate(180deg); }

.card-header {
    text-align: center;
    padding: 0.5rem 2rem 1rem;
}

.invite-pre {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--gold-dark);
    margin-bottom: 0.6rem;
}

.card-title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2.6rem, 8vw, 4.5rem);
    color: var(--brown);
    line-height: 1.05;
    font-weight: 400;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.card-title .name {
    display: inline-block;
}

.card-title .and {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.3rem;
}

.card-title .and svg {
    width: clamp(28px, 5vw, 42px);
    height: auto;
}

.invite-sub {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    color: var(--ink);
    letter-spacing: 1px;
}

.card-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.2rem auto 1.5rem;
    padding: 0 2rem;
}

.card-divider .line {
    flex: 0 1 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card-divider .dot {
    width: 5px;
    height: 5px;
    background: var(--gold);
    border-radius: 50%;
}

.card-divider .diamond {
    color: var(--gold-dark);
    font-size: 1.3rem;
}

.card-body {
    padding: 0 2.2rem;
    text-align: center;
}

.card-message {
    font-size: clamp(1.05rem, 2.4vw, 1.2rem);
    line-height: 1.7;
    color: var(--ink);
    font-style: italic;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.event-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.detail-block {
    flex: 1;
    min-width: 100px;
    padding: 1rem 0.5rem;
    border-top: 1px solid rgba(201, 169, 97, 0.5);
    border-bottom: 1px solid rgba(201, 169, 97, 0.5);
}

.detail-block.big {
    border: 1px solid var(--gold);
    background: rgba(201, 169, 97, 0.08);
    border-radius: 4px;
    padding: 1.2rem 0.8rem;
    margin: 0 0.4rem;
}

.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.detail-value {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--brown);
    line-height: 1;
}

.detail-value-big {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 4.5rem);
    color: var(--brown);
    font-weight: 600;
    line-height: 1;
    margin: 0.2rem 0;
}

.detail-month {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: var(--rose);
    line-height: 1;
}

.detail-year {
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--gold-dark);
    margin-top: 0.3rem;
    font-weight: 500;
}

.quote {
    margin: 2rem auto;
    padding: 1.2rem;
    max-width: 480px;
    border-left: 2px solid var(--rose);
    border-right: 2px solid var(--rose);
}

.quote p {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--gold-dark);
    line-height: 1.4;
}

/* ============== VENUE / LOCATION ============== */
.venue {
    margin: 2rem auto 1rem;
    max-width: 480px;
    text-align: center;
}

.venue-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold-dark);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.venue-name {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    color: var(--brown);
    line-height: 1.1;
}

.venue-place {
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: var(--rose);
    margin-top: 0.2rem;
}

.venue-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.6rem 1.4rem;
    border: 1.5px solid var(--gold);
    border-radius: 30px;
    color: var(--brown);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 1px;
    background: var(--cream);
    transition: all 0.25s ease;
}

.venue-map-btn:hover {
    background: var(--gold);
    color: #fff;
    transform: translateY(-2px);
}

.venue-map-btn .pin {
    font-size: 1.1rem;
}

/* ============== COUNTDOWN ============== */
.countdown {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
}

.cd-block {
    background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
    border: 1px solid var(--gold);
    border-radius: 6px;
    min-width: 70px;
    padding: 0.8rem 0.5rem;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cd-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    color: var(--brown);
    line-height: 1;
}

.cd-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dark);
    margin-top: 0.4rem;
}

.signature {
    margin-top: 2rem;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1.6;
}

.signature span {
    font-family: 'Great Vibes', cursive;
    font-style: normal;
    font-size: 2rem;
    color: var(--brown);
    display: inline-block;
    margin-top: 0.3rem;
}

/* ============== CLOSE BUTTON ============== */
.close-btn {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gold);
    color: var(--brown);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 100;
}

.close-btn:hover {
    transform: scale(1.05);
    background: #fff;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 600px) {
    .corner-flowers { width: 120px; height: 120px; opacity: 0.6; }
    .card-body { padding: 0 1.2rem; }
    .card-header { padding: 0.5rem 1rem 1rem; }
    .event-details { gap: 0.5rem; }
    .detail-block { min-width: 80px; padding: 0.8rem 0.3rem; }
    .cd-block { min-width: 60px; padding: 0.6rem 0.3rem; }
    .cd-block { gap: 0.4rem; }
}

@media (max-width: 400px) {
    .countdown { gap: 0.4rem; }
    .cd-block { min-width: 55px; }
}

/* ============== ENTRANCE ANIMATIONS ============== */

/* Sparkle veil that flashes once on first load */
.sparkle-veil {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 215, 150, 0.6) 0%, transparent 6%),
        radial-gradient(circle at 75% 20%, rgba(255, 200, 200, 0.6) 0%, transparent 5%),
        radial-gradient(circle at 50% 60%, rgba(255, 230, 200, 0.6) 0%, transparent 6%),
        radial-gradient(circle at 85% 75%, rgba(255, 215, 150, 0.6) 0%, transparent 5%),
        radial-gradient(circle at 15% 80%, rgba(255, 200, 200, 0.6) 0%, transparent 6%);
    opacity: 0;
    animation: sparkle-flash 2.6s ease-out forwards;
}

@keyframes sparkle-flash {
    0%   { opacity: 0; transform: scale(0.8); }
    25%  { opacity: 1; transform: scale(1); }
    60%  { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 0; transform: scale(1.15); }
}

/* Floating hearts drifting upward */
.hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hearts span {
    position: absolute;
    bottom: -30px;
    color: var(--rose);
    font-size: 18px;
    opacity: 0;
    animation: float-heart linear infinite;
    text-shadow: 0 0 6px rgba(216, 154, 163, 0.4);
}

.hearts span:nth-child(1) { left: 8%;  font-size: 16px; animation-duration: 11s; animation-delay: 0s; }
.hearts span:nth-child(2) { left: 22%; font-size: 22px; animation-duration: 14s; animation-delay: 2s; }
.hearts span:nth-child(3) { left: 38%; font-size: 14px; animation-duration: 12s; animation-delay: 4s; }
.hearts span:nth-child(4) { left: 52%; font-size: 20px; animation-duration: 16s; animation-delay: 1s; }
.hearts span:nth-child(5) { left: 66%; font-size: 16px; animation-duration: 13s; animation-delay: 3s; }
.hearts span:nth-child(6) { left: 78%; font-size: 24px; animation-duration: 15s; animation-delay: 5s; }
.hearts span:nth-child(7) { left: 90%; font-size: 18px; animation-duration: 12s; animation-delay: 0s; }
.hearts span:nth-child(8) { left: 45%; font-size: 12px; animation-duration: 18s; animation-delay: 6s; }

@keyframes float-heart {
    0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.7; }
    50%  { transform: translateY(-50vh) translateX(20px) rotate(15deg); opacity: 0.9; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-110vh) translateX(-20px) rotate(-10deg); opacity: 0; }
}

/* Stagger entrance for the envelope screen elements */
.envelope-wrapper > .pre-title { animation: fade-down 1s ease-out 0.2s both; }
.envelope-wrapper > .couple-title { animation: title-reveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }
.envelope-wrapper > .couple-title .amp { display: inline-block; animation: heart-beat 1.6s ease-in-out 1.2s infinite; }
.envelope-wrapper > .date-pre { animation: fade-down 1s ease-out 0.9s both; }
.envelope-wrapper > .envelope { animation: float-up 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 1.2s both, gentle-pulse 2.4s ease-in-out 2.4s infinite; }
.envelope-wrapper > .open-hint { animation: fade-down 1s ease-out 1.7s both; }

/* Corner florals fade in softly */
.corner-flowers { animation: soft-fade 1.4s ease-out 0.1s both; }

@keyframes fade-down {
    0%   { opacity: 0; transform: translateY(-14px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes title-reveal {
    0%   { opacity: 0; transform: scale(0.6) translateY(20px); letter-spacing: -0.05em; filter: blur(6px); }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); letter-spacing: 0; filter: blur(0); }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.18); }
    50%      { transform: scale(0.95); }
    75%      { transform: scale(1.12); }
}

@keyframes float-up {
    0%   { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gentle-pulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(107, 68, 35, 0.25); }
    50%      { box-shadow: 0 14px 40px rgba(216, 154, 163, 0.45); }
}

@keyframes soft-fade {
    0%   { opacity: 0; }
    100% { opacity: 0.85; }
}

/* Invitation-screen content entrance after envelope opens */
.invitation-screen.show .invitation-card { animation: card-enter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.invitation-screen.show .card-header   { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both; }
.invitation-screen.show .card-divider  { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both; }
.invitation-screen.show .card-message  { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; }
.invitation-screen.show .event-details { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s both; }
.invitation-screen.show .quote         { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s both; }
.invitation-screen.show .countdown     { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.8s both; }
.invitation-screen.show .signature     { animation: fade-down 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both; }

@keyframes card-enter {
    0%   { opacity: 0; transform: translateY(30px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .sparkle-veil,
    .hearts span,
    .envelope-wrapper > *,
    .corner-flowers,
    .invitation-screen.show * {
        animation: none !important;
    }
}
