:root {
    --fondo: #111418;
    --fondo-secundario: #20252b;
    --texto: #fff8f8;
    --texto-suave: #ffd8df;
    --rosa: #f14f7b;
    --rosa-fuerte: #e61d52;
    --menta: #7fd8be;
    --borde: rgba(255, 255, 255, 0.22);
    --sombra-rosa: rgba(230, 29, 82, 0.45);
    --sombra-oscura: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--fondo);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background:
        radial-gradient(circle at 18% 16%, rgba(241, 79, 123, 0.32), transparent 25rem),
        radial-gradient(circle at 86% 78%, rgba(127, 216, 190, 0.18), transparent 22rem),
        linear-gradient(135deg, var(--fondo) 0%, var(--fondo-secundario) 54%, #17191f 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.pagina {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding:
        max(1.2rem, env(safe-area-inset-top))
        max(1.1rem, env(safe-area-inset-right))
        max(1.2rem, env(safe-area-inset-bottom))
        max(1.1rem, env(safe-area-inset-left));
    text-align: center;
    isolation: isolate;
}

.contenido {
    position: relative;
    z-index: 2;
    width: min(92vw, 720px);
}

.dedicatoria {
    margin: 0 0 1rem;
    color: var(--menta);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2.35rem, 8.5vw, 5.45rem);
    line-height: 1.02;
}

.subtitulo {
    width: min(100%, 35rem);
    margin: 1.2rem auto 0;
    color: var(--texto-suave);
    font-size: clamp(1rem, 2.7vw, 1.12rem);
    line-height: 1.55;
}

.acciones {
    position: relative;
    width: min(100%, 32rem);
    min-height: 10rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    margin: 2.15rem auto 0;
}

.boton {
    min-width: 8rem;
    min-height: 3.6rem;
    border: 0;
    border-radius: 8px;
    padding: 0.9rem 1.3rem;
    cursor: pointer;
    font-size: 1.18rem;
    font-weight: 700;
    touch-action: manipulation;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.boton:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.78);
    outline-offset: 4px;
}

.boton-si {
    color: #15191d;
    background: var(--menta);
    box-shadow: 0 14px 34px rgba(127, 216, 190, 0.24);
}

.boton-si:hover,
.boton-si:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(127, 216, 190, 0.34);
}

.boton-no {
    position: absolute;
    top: 0;
    left: calc(50% + 0.5rem);
    color: var(--texto);
    background: var(--rosa-fuerte);
    box-shadow: 0 14px 34px rgba(230, 29, 82, 0.28);
}

.boton-no:hover,
.boton-no:focus-visible {
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(230, 29, 82, 0.38);
}

.decoracion {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.corazon {
    position: absolute;
    display: block;
    width: var(--tamano-corazon);
    height: var(--tamano-corazon);
    background: var(--rosa-fuerte);
    transform: rotate(45deg);
    animation: palpitar 900ms ease-in-out infinite alternate;
    filter: drop-shadow(0 0 34px var(--sombra-rosa));
}

.corazon::before,
.corazon::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
}

.corazon::before {
    left: -50%;
    top: 0;
}

.corazon::after {
    left: 0;
    top: -50%;
}

.corazon-grande {
    --tamano-corazon: clamp(6.8rem, 17vw, 12rem);
}

.corazon-pequeno {
    --tamano-corazon: clamp(2.4rem, 6vw, 4.3rem);
    opacity: 0.72;
    animation-duration: 1150ms;
}

.corazon-izquierdo {
    left: clamp(-3.2rem, 7vw, 6.5rem);
    bottom: clamp(3.2rem, 12vh, 8rem);
}

.corazon-derecho {
    right: clamp(-3.4rem, 7vw, 6.5rem);
    top: clamp(4rem, 12vh, 8rem);
    animation-delay: 260ms;
}

.corazon-superior {
    left: clamp(1.5rem, 18vw, 16rem);
    top: clamp(2rem, 9vh, 5.5rem);
    animation-delay: 520ms;
}

.corazon-inferior {
    right: clamp(1.5rem, 18vw, 16rem);
    bottom: clamp(2rem, 9vh, 5.5rem);
    animation-delay: 120ms;
}

.mensaje {
    width: min(92vw, 34rem);
    max-height: min(86vh, 42rem);
    max-height: min(86dvh, 42rem);
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 2rem;
    color: var(--texto);
    background: rgba(32, 37, 43, 0.97);
    box-shadow: 0 24px 80px var(--sombra-oscura);
    overflow: auto;
}

.mensaje::backdrop {
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.mensaje[open] {
    animation: aparecer 220ms ease-out;
}

.mensaje h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.7rem, 5vw, 2rem);
}

.mensaje p {
    margin: 0 0 1rem;
    color: #ffe7ec;
    font-size: 1rem;
    line-height: 1.65;
}

.mensaje .etiqueta {
    color: var(--menta);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mensaje .pregunta-final {
    margin-bottom: 0;
    color: var(--texto);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.cerrar {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--borde);
    border-radius: 8px;
    color: var(--texto);
    background: transparent;
    cursor: pointer;
}

.cerrar:hover,
.cerrar:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

@keyframes palpitar {
    from {
        transform: rotate(45deg) scale(0.92);
    }

    to {
        transform: rotate(45deg) scale(1.08);
    }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(1rem) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 820px) {
    .acciones {
        min-height: 11rem;
    }

    .corazon-izquierdo {
        left: -3.8rem;
        bottom: 3.4rem;
    }

    .corazon-derecho {
        right: -4rem;
        top: 3rem;
    }
}

@media (max-width: 640px) {
    .contenido {
        width: min(94vw, 26rem);
    }

    .acciones {
        width: min(100%, 22rem);
        min-height: 12rem;
        margin-top: 1.8rem;
    }

    .boton {
        min-width: 7.2rem;
        min-height: 3.45rem;
        font-size: 1.05rem;
    }

    .boton-no {
        left: calc(50% + 0.25rem);
    }

    .corazon-grande {
        --tamano-corazon: clamp(5.6rem, 24vw, 7.8rem);
    }

    .corazon-izquierdo {
        left: -3.6rem;
        bottom: 3rem;
    }

    .corazon-derecho {
        right: -3.9rem;
        top: 2.4rem;
    }

    .corazon-superior {
        left: 1.1rem;
        top: 6.4rem;
    }

    .corazon-inferior {
        right: 1rem;
        bottom: 4.4rem;
    }

    .mensaje {
        padding: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
