:root {
    --bg: #0a0912;
    --bg-soft: #12101f;
    --gold: #ffd54a;
    --gold-deep: #f9a825;
    --amber: #ffb300;
    --rose: #ff7a9c;
    --text: #f7f3e8;
    --muted: rgba(247, 243, 232, 0.62);
    --glass: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 213, 74, 0.22);
    --shadow-glow: 0 30px 90px -30px rgba(255, 179, 0, 0.55);
    --font-display: "Playfair Display", Georgia, serif;
    --font-body: "Poppins", system-ui, sans-serif;
}

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

html,
body {
    min-height: 100%;
}

body {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 6vmin;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #1a1630 0%, var(--bg) 55%, #050409 100%);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------ *
 * Fondo animado (aurora cálida)
 * ------------------------------------------------------------------ */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(70px);
    opacity: 0.85;
    pointer-events: none;
}

.aurora__blob {
    position: absolute;
    display: block;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform;
}

.aurora__blob--1 {
    width: 46vmax;
    height: 46vmax;
    top: -12vmax;
    left: -8vmax;
    background: radial-gradient(circle, rgba(255, 213, 74, 0.55), transparent 65%);
    animation: drift-1 22s ease-in-out infinite;
}

.aurora__blob--2 {
    width: 40vmax;
    height: 40vmax;
    bottom: -14vmax;
    right: -6vmax;
    background: radial-gradient(circle, rgba(255, 122, 156, 0.4), transparent 65%);
    animation: drift-2 26s ease-in-out infinite;
}

.aurora__blob--3 {
    width: 34vmax;
    height: 34vmax;
    top: 30%;
    left: 45%;
    background: radial-gradient(circle, rgba(255, 179, 0, 0.35), transparent 65%);
    animation: drift-3 30s ease-in-out infinite;
}

@keyframes drift-1 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(12vmax, 8vmax, 0) scale(1.18); }
}

@keyframes drift-2 {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1.1); }
    50% { transform: translate3d(-14vmax, -6vmax, 0) scale(0.92); }
}

@keyframes drift-3 {
    0%, 100% { transform: translate3d(-50%, -50%, 0) scale(0.9); }
    50% { transform: translate3d(-40%, -60%, 0) scale(1.15); }
}

/* Textura sutil tipo grano */
.grain {
    position: fixed;
    inset: -50%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
    background-image: radial-gradient(rgba(255, 255, 255, 0.9) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    animation: grain 6s steps(6) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-2%, 1%); }
    40% { transform: translate(1%, -2%); }
    60% { transform: translate(-1%, 2%); }
    80% { transform: translate(2%, 1%); }
}

/* ------------------------------------------------------------------ *
 * Partículas flotantes
 * ------------------------------------------------------------------ */
.particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -10vh;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 213, 74, 0.75);
    animation-name: float-up;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}

@keyframes float-up {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    88% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--drift, 20px), -115vh, 0) rotate(220deg) scale(1.1);
        opacity: 0;
    }
}

/* ------------------------------------------------------------------ *
 * Escena + tarjeta de vidrio
 * ------------------------------------------------------------------ */
.scene {
    position: relative;
    z-index: 3;
    width: min(760px, 100%);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 5vw, 3.4rem);
    border-radius: 32px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    animation: card-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 213, 74, 0.7), transparent 80%);
    background-size: 220% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: border-sweep 6s linear infinite;
    pointer-events: none;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.96);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes border-sweep {
    to { background-position: -220% 0; }
}

.card__eyebrow {
    font-size: clamp(0.68rem, 2.4vw, 0.82rem);
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: clamp(1rem, 3vw, 1.6rem);
    opacity: 0;
    animation: rise 0.9s ease-out 0.25s both;
}

/* ------------------------------------------------------------------ *
 * Título animado
 * ------------------------------------------------------------------ */
.greetings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.18em clamp(0.35rem, 1.6vw, 0.7rem);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8.5vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
}

.greetings .word {
    background: linear-gradient(100deg, #fff8dc 0%, var(--gold) 30%, var(--amber) 55%, #fff8dc 85%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 26px rgba(255, 179, 0, 0.35));
    opacity: 0;
    transform: translateY(40px) rotate(6deg);
    animation:
        word-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(0.35s + var(--i) * 0.14s) both,
        shimmer 4.5s linear calc(1.6s + var(--i) * 0.2s) infinite;
}

@keyframes word-in {
    to {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

@keyframes shimmer {
    to { background-position: -220% center; }
}

.greetings .heart {
    font-size: clamp(1.4rem, 5vw, 2.6rem);
    color: var(--rose);
    text-shadow: 0 0 18px rgba(255, 122, 156, 0.8), 0 0 42px rgba(255, 122, 156, 0.4);
    opacity: 0;
    animation:
        heart-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.5s + var(--i) * 0.14s) both,
        beat 1.6s ease-in-out calc(1.8s + var(--i) * 0.2s) infinite;
}

@keyframes heart-in {
    from { opacity: 0; transform: scale(0) rotate(-40deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    18% { transform: scale(1.22); }
    36% { transform: scale(0.96); }
    54% { transform: scale(1.12); }
}

/* ------------------------------------------------------------------ *
 * Descripción
 * ------------------------------------------------------------------ */
.description {
    margin-top: clamp(1.1rem, 3.5vw, 1.8rem);
    font-size: clamp(0.98rem, 3.4vw, 1.28rem);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--muted);
    opacity: 0;
    animation: rise 0.9s ease-out calc(0.55s + var(--i) * 0.14s) both;
}

.description__emoji {
    display: inline-block;
    color: var(--gold);
    animation: tilt 3s ease-in-out infinite;
}

@keyframes tilt {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(14deg); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ *
 * Botón
 * ------------------------------------------------------------------ */
.button {
    margin-top: clamp(1.6rem, 4.5vw, 2.6rem);
    opacity: 0;
    animation: rise 0.9s ease-out calc(0.65s + var(--i) * 0.14s) both;
}

.cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 2.6rem;
    border-radius: 999px;
    overflow: hidden;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: clamp(0.92rem, 3vw, 1.05rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #241a00;
    background: linear-gradient(135deg, #fff2b0, var(--gold) 45%, var(--amber));
    box-shadow:
        0 18px 40px -14px rgba(255, 179, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.cta:hover,
.cta:focus-visible {
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        0 26px 60px -16px rgba(255, 179, 0, 0.95),
        0 0 0 6px rgba(255, 213, 74, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    outline: none;
}

.cta:active {
    transform: translateY(-1px) scale(0.99);
}

.cta__label {
    position: relative;
    z-index: 2;
}

.cta__shine {
    position: absolute;
    top: 0;
    left: -140%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    transform: skewX(-20deg);
    animation: shine 3.6s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -140%; }
    55%, 100% { left: 160%; }
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 600px) {
    body {
        padding: 4vmin;
    }

    .card {
        border-radius: 26px;
    }

    .cta {
        padding: 0.9rem 2rem;
    }
}

/* ------------------------------------------------------------------ *
 * Accesibilidad: menos movimiento
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .particles,
    .grain {
        display: none;
    }
}
