:root {
    --bg1: #fff9db;
    /* amarillo pastel */
    --bg2: #ffe27a;
    /* girasol suave */
    --ink: #2b2b2b;
    --accent: #f4c430;
    /* amarillo cálido */
    --accent-2: #ffd24a;
    /* brillo */
    --petal: #ffd000;
    --petal-2: #ffea77;
    --leaf: #3dbb72;
    --stem: #2d8b57;
    --heart: #ff4d6d;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
        Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--ink);
    background: radial-gradient(1200px 800px at 70% -10%,
            var(--bg2),
            transparent 60%),
        radial-gradient(1000px 600px at -10% 120%, var(--bg2), transparent 60%),
        linear-gradient(180deg, var(--bg1), #ffffff);
    overflow-x: hidden;
}

.wrap {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    width: min(960px, 94vw);
    background: #ffffffcc;
    backdrop-filter: blur(6px);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.hero {
    position: relative;
    padding: clamp(28px, 6vw, 48px);
}

.title {
    font-size: clamp(28px, 4.2vw, 48px);
    line-height: 1.1;
    margin: 0 0 10px 0;
    letter-spacing: 0.2px;
}

.subtitle {
    margin: 4px 0 22px 0;
    font-size: clamp(16px, 2.2vw, 20px);
    color: #434343;
}

.type {
    display: inline-block;
    border-radius: 999px;
    background: #fff5c2;
    padding: 8px 14px;
    font-size: 14px;
    border: 1px solid #f7e197;
    margin-bottom: 14px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #3a2a00;
    box-shadow: 0 10px 24px rgba(244, 196, 48, 0.35);
    transition: 0.2s transform, 0.2s box-shadow, 0.2s filter;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(244, 196, 48, 0.45);
    filter: saturate(1.05);
}

.btn:active {
    transform: translateY(0);
}

.ghost {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    color: #333;
    box-shadow: none;
}

.signature {
    margin-top: 20px;
    font-style: italic;
    opacity: 0.8;
}

/* Bouquet Stage */
.stage {
    position: relative;
    height: min(540px, 75vh);
    margin-top: 10px;
    border-radius: 24px;
    background: linear-gradient(180deg, #fffdf1 0%, #fff3b6 100%);
    overflow: hidden;
    border: 1px solid rgba(244, 196, 48, 0.35);
}

.bouquet {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: end center;
    pointer-events: none;
}

.bouquet svg {
    width: min(660px, 86vw);
    height: auto;
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.15));
    transition: opacity 0.8s ease 0.1s, transform 0.8s ease 0.1s;
}

.bouquet.show svg {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Floating petals */
.petals {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.petal {
    position: absolute;
    width: 18px;
    height: 12px;
    background: var(--petal);
    border-radius: 60% 60% 60% 60% / 100% 100% 30% 30%;
    transform: rotate(20deg);
    opacity: 0;
    animation: floatDown linear forwards;
    box-shadow: inset -3px -2px 0 rgba(0, 0, 0, 0.08);
}

.petal.alt {
    background: var(--petal-2);
}

@keyframes floatDown {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.95;
    }

    100% {
        transform: translateY(110vh) translateX(var(--drift, 40px)) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* Heart pulse */
.heart {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ffccd6;
    box-shadow: 0 8px 18px rgba(255, 77, 109, 0.18);
}

.heart:before {
    content: "";
    width: 18px;
    height: 18px;
    background: var(--heart);
    display: block;
    transform: rotate(45deg);
    position: relative;
    animation: pulse 1.6s ease-in-out infinite;
    border-radius: 4px;
}

.heart:after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--heart);
    transform: rotate(45deg);
    border-radius: 4px;
    filter: blur(12px);
    opacity: 0.45;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: rotate(45deg) scale(1);
    }

    50% {
        transform: rotate(45deg) scale(1.18);
    }
}

/* Typewriter */
.typewriter {
    display: inline-block;
    border-right: 3px solid #333;
    white-space: nowrap;
    overflow: hidden;
    animation: caret 0.8s step-end infinite;
}

@keyframes caret {
    50% {
        border-color: transparent;
    }
}

footer {
    text-align: center;
    font-size: 12px;
    color: #6b6b6b;
    padding: 18px;
}

.note {
    opacity: 0.9;
}

/* Small */
@media (max-width: 560px) {
    .stage {
        height: 64vh;
    }
}
