:root {
    --red-900: #540006;
    --red-800: #76000a;
    --red-700: #990612;
    --red-600: #c61625;
    --red-500: #e33445;
    --rose-100: #ffe8ec;
    --gold: #f6c65b;
    --gold-dark: #b77910;
    --white: #ffffff;
    --ink: #210408;
    --muted: #7e4a50;
    --glass: rgba(255, 255, 255, .90);
    --glass-border: rgba(255, 255, 255, .55);
    --shadow-red: 0 28px 80px rgba(77, 0, 8, .34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #7b0009, #e06a76 58%, #b73b49 100%);
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

.landing {
    position: fixed;
    inset: 0;
    z-index: 20;
    width: 100vw;
    height: 100vh;
    background: #790006;
    overflow: hidden;
    transition:
        transform .95s cubic-bezier(.78, 0, .18, 1),
        filter .8s ease,
        opacity .8s ease;
}

.landing.is-leaving {
    transform: translateY(-105%);
    filter: blur(5px);
    opacity: .92;
}

.landing-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 62%, rgba(255, 164, 174, .36), transparent 30%),
        linear-gradient(180deg, rgba(90, 0, 8, .02), rgba(88, 0, 8, .16)),
        url('../img/back1.jpg') center center / cover no-repeat;
    transform: scale(1.015);
    animation: heroZoom 8s ease-in-out infinite alternate;
}

.landing-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 48%, transparent 0 42%, rgba(80, 0, 8, .08) 68%, rgba(35, 0, 4, .33) 100%),
        linear-gradient(180deg, rgba(42,0,3,.12), transparent 38%, rgba(58,0,6,.16));
}

/* HOME ARMADO POR CAPAS */
.home-logo,
.home-prizes,
.home-title,
.landing-trigger,
.logo-65-home,
.logo-caja-home {
    position: absolute;
    z-index: 3;
    object-fit: contain;
}

.home-logo {
    top: clamp(26px, 4vh, 42px);
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 42vw);
    max-height: 26vh;
    filter: drop-shadow(0 18px 24px rgba(0,0,0,.58));
    animation: dropInCentered .75s ease both;
}

.home-prizes {
    left: 50%;
    top: clamp(245px, 37vh, 345px);
    transform: translateX(-50%);
    width: min(650px, 48vw);
    max-height: 43vh;
    filter: drop-shadow(0 28px 30px rgba(0,0,0,.44));
    animation: floatPrizeCentered 5s ease-in-out infinite;
}

.home-title {
    left: 50%;
    bottom: clamp(118px, 15vh, 150px);
    transform: translateX(-50%);
    width: min(760px, 54vw);
    filter: drop-shadow(0 12px 14px rgba(0,0,0,.62));
    animation: riseInCentered .7s ease .18s both;
}

.logo-65-home {
    right: 20%;
    bottom: 50px;
    transform: translateX(165px);
    width: min(222px, 12vw);
    filter: drop-shadow(0 10px 13px rgba(0,0,0,.55));
    z-index: 4;
}

.landing-trigger {
    left: 50%;
    bottom: clamp(38px, 6vh, 58px);
    transform: translateX(-50%);
    width: min(474px, 34vw);
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    filter: drop-shadow(0 16px 16px rgba(0,0,0,.34));
    transition: transform .22s ease, filter .22s ease;
    animation: riseInCentered .75s ease .28s both;
    z-index: 6;
}

.landing-trigger img {
    display: block;
    width: 100%;
    height: auto;
}

.landing-trigger::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0);
    box-shadow: 0 0 0 rgba(255,255,255,0);
    animation: pulseTap 1.55s ease-in-out infinite;
}

.landing-trigger:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.025);
    filter:
        drop-shadow(0 20px 22px rgba(0,0,0,.42))
        drop-shadow(0 0 24px rgba(255,255,255,.42));
}

.logo-caja-home {
    left: clamp(34px, 6vw, 95px);
    bottom: clamp(22px, 4vh, 42px);
    width: min(220px, 16vw);
    filter: drop-shadow(0 12px 18px rgba(0,0,0,.45));
    opacity: .97;
}

/* Se deja por compatibilidad si tu HTML todavía tiene este contenedor */
.landing-footer-logos {
    display: none;
}

/* PÁGINA FORMULARIO */
.consulta-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(38px);
    pointer-events: none;
    transition:
        opacity .8s ease .22s,
        transform .8s cubic-bezier(.22, 1, .36, 1) .22s;
}

.consulta-page.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.party-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(73,0,6,.36), rgba(255,90,104,.08)),
        url('../img/back1.jpg') center top / cover no-repeat,
        linear-gradient(180deg, #8b000c, #dc6975);
    pointer-events: none;
}

.party-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(75,0,8,.10) 0%, rgba(255,255,255,.08) 52%, rgba(119,0,12,.22) 100%);
}

.soft-glow {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(35px);
    opacity: .45;
    pointer-events: none;
    animation: floatGlow 8s ease-in-out infinite;
}

.glow-a {
    top: 12%;
    left: -90px;
    background: #ffccd4;
}

.glow-b {
    bottom: 10%;
    right: -110px;
    background: #ff354d;
    animation-delay: -3s;
}

.consulta-shell {
    width: min(1160px, calc(100% - 34px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 34px 0 42px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
    animation: dropIn .8s ease both;
}

.logo-sorteo {
    width: min(230px, 56vw);
    filter: drop-shadow(0 14px 22px rgba(0,0,0,.38));
}

.logo-caja {
    width: min(130px, 30vw);
    filter: drop-shadow(0 12px 20px rgba(0,0,0,.32));
}

.main-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 24px;
    align-items: stretch;
}

.glass-card {
    background: linear-gradient(145deg, rgba(255,249,250,.97), rgba(255,229,234,.91));
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--shadow-red);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, var(--gold), var(--red-500), var(--gold));
}

.form-card,
.result-card {
    padding: clamp(22px, 3vw, 34px);
    animation: riseIn .75s cubic-bezier(.22, 1, .36, 1) .25s both;
}

.result-card {
    animation-delay: .36s;
}

.form-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.mini-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--red-700), var(--red-500));
    box-shadow: 0 14px 34px rgba(185, 11, 28, .35);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin: 0 0 5px;
    font-size: clamp(1.85rem, 3.5vw, 3.15rem);
    letter-spacing: -.055em;
    line-height: .95;
    color: var(--red-900);
}

.form-title p,
.empty-state p,
.muted,
small {
    color: var(--muted);
}

.form-title p {
    display: none;
}

.form-card::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 210px;
    height: 210px;
    background: radial-gradient(circle, rgba(246,198,91,.34), transparent 68%);
    pointer-events: none;
}

label {
    display: block;
    font-weight: 900;
    color: var(--red-900);
    margin: 16px 0 8px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(133, 0, 14, .14);
    background: rgba(255,255,255,.88);
    border-radius: 20px;
    padding: 0 16px;
    transition: .2s ease;
    box-shadow: inset 0 2px 8px rgba(85,0,8,.04);
}

.input-wrap:focus-within {
    border-color: rgba(198, 22, 37, .72);
    box-shadow:
        0 0 0 5px rgba(198, 22, 37, .12),
        inset 0 2px 8px rgba(85,0,8,.04);
    transform: translateY(-1px);
}

input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 17px 0;
    color: var(--ink);
    font-weight: 800;
}

input::placeholder {
    color: rgba(126,74,80,.62);
}

small {
    display: block;
    margin-top: 8px;
    font-weight: 700;
}

#btnConsultar,
.modal-action {
    width: 100%;
    border: 0;
    margin-top: 22px;
    border-radius: 20px;
    padding: 17px 20px;
    color: #fff;
    font-weight: 950;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red-600), var(--red-900));
    box-shadow: 0 18px 36px rgba(140, 0, 15, .35);
    transition: .18s ease;
    position: relative;
    overflow: hidden;
}

#btnConsultar::before,
.modal-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.28), transparent);
    transform: translateX(-110%);
    transition: transform .6s ease;
}

#btnConsultar:hover::before,
.modal-action:hover::before {
    transform: translateX(110%);
}

#btnConsultar:hover,
.modal-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(140, 0, 15, .42);
}

#btnConsultar:disabled {
    cursor: wait;
    opacity: .78;
}

.loader {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    animation: spin .8s linear infinite;
    vertical-align: middle;
}

#btnConsultar.loading .loader {
    display: inline-block;
}

.empty-state {
    min-height: 338px;
    display: grid;
    place-items: center;
    text-align: center;
    align-content: center;
    gap: 10px;
}

.empty-logo {
    width: min(210px, 60%);
    filter: drop-shadow(0 14px 22px rgba(125,0,13,.25));
    animation: floatPrize 4s ease-in-out infinite;
}

.empty-state h2,
.result-content h2 {
    margin: 0;
    color: var(--red-900);
    letter-spacing: -.04em;
}

.hidden {
    display: none !important;
}

.result-content {
    animation: riseIn .55s ease both;
}

.success-ribbon {
    display: inline-flex;
    width: fit-content;
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #0f6d31);
    font-weight: 900;
    margin-bottom: 14px;
    box-shadow: 0 12px 26px rgba(22, 163, 74, .23);
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin: 22px 0;
}

.info-list div,
.points-card {
    border: 1px solid rgba(133,0,14,.10);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
    padding: 16px;
}

.info-list span,
.points-card span,
.points-card small {
    display: block;
    color: var(--muted);
    font-weight: 800;
    font-size: .86rem;
}

.info-list strong {
    display: block;
    margin-top: 5px;
    color: var(--red-900);
    font-size: 1.08rem;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.points-card {
    min-height: 152px;
    position: relative;
    overflow: hidden;
}

.points-card strong {
    display: block;
    margin: 10px 0 4px;
    color: var(--red-900);
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: .95;
    letter-spacing: -.06em;
}

.points-card.highlight {
    background: linear-gradient(135deg, var(--red-700), var(--red-500));
    color: #fff;
}

.points-card.highlight span,
.points-card.highlight small,
.points-card.highlight strong {
    color: #fff;
}

.premios-img {
    position: absolute;
    right: -200px;
    bottom: -4px;
    width: min(250px, 38vw);
    opacity: .92;
    filter: drop-shadow(0 20px 36px rgba(0,0,0,.35));
    pointer-events: none;
    animation: floatPrize 5s ease-in-out infinite;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45,0,7,.62);
    backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    width: min(420px, calc(100% - 34px));
    border-radius: 28px;
    background: linear-gradient(145deg, #fff, #ffe8ec);
    padding: 30px;
    text-align: center;
    box-shadow: 0 28px 80px rgba(0,0,0,.38);
    animation: popIn .28s ease both;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(118,0,10,.09);
    color: var(--red-900);
    font-size: 1.4rem;
}

.modal-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: rgba(198, 22, 37, .12);
}

.modal-card h3 {
    color: var(--red-900);
    margin-bottom: 8px;
}

.modal-card p {
    color: var(--muted);
    line-height: 1.55;
}

/* ANIMACIONES */
@keyframes heroZoom {
    from {
        transform: scale(1.01);
    }
    to {
        transform: scale(1.035);
    }
}

@keyframes pulseTap {
    0%,
    100% {
        opacity: .2;
        box-shadow: 0 0 0 0 rgba(255,255,255,.20);
    }
    50% {
        opacity: .85;
        box-shadow: 0 0 0 12px rgba(255,255,255,0);
    }
}

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

@keyframes dropInCentered {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-22px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(26px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes riseInCentered {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(26px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatGlow {
    0%,
    100% {
        transform: translate3d(0,0,0);
    }
    50% {
        transform: translate3d(20px,-18px,0);
    }
}

@keyframes floatPrize {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes floatPrizeCentered {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

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

/* RESPONSIVE */
@media (max-width: 1200px) {
    .home-logo {
        width: min(500px, 52vw);
    }

    .home-prizes {
        top: 35vh;
        width: min(610px, 58vw);
    }

    .home-title {
        width: min(720px, 65vw);
    }

    .landing-trigger {
        width: min(450px, 44vw);
    }

    .logo-caja-home {
        width: min(190px, 20vw);
    }

    .logo-65-home {
        transform: translateX(145px);
        width: min(110px, 10vw);
    }
}

@media (max-width: 900px) {
    .home-logo {
        top: 24px;
        width: min(460px, 76vw);
    }

    .home-prizes {
        top: 30vh;
        width: min(640px, 92vw);
    }

    .home-title {
        bottom: 132px;
        width: min(760px, 92vw);
    }

    .landing-trigger {
        bottom: 48px;
        width: min(430px, 78vw);
    }

    .logo-65-home {
        bottom: 136px;
        transform: translateX(130px);
        width: 96px;
    }

    .logo-caja-home {
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        width: 160px;
        opacity: .75;
    }

    .consulta-shell {
        justify-content: flex-start;
        padding-top: 22px;
    }

    .brand-strip {
        justify-content: center;
        flex-wrap: wrap;
    }

    .logo-caja {
        display: none;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .premios-img {
        opacity: .16;
        width: 80vw;
        right: -24vw;
    }
}

@media (max-width: 560px) {
    .home-logo {
        top: 18px;
        width: 88vw;
    }

    .home-prizes {
        top: 30vh;
        width: 106vw;
    }

    .home-title {
        bottom: 122px;
        width: 96vw;
    }

    .landing-trigger {
        bottom: 42px;
        width: 84vw;
    }

    .logo-65-home {
        display: none;
    }

    .logo-caja-home {
        display: none;
    }

    .consulta-shell {
        width: min(100% - 24px, 1160px);
    }

    .form-card,
    .result-card {
        border-radius: 24px;
        padding: 20px;
    }

    .form-title {
        align-items: flex-start;
    }

    .mini-icon {
        width: 48px;
        height: 48px;
        border-radius: 17px;
    }

    .info-list,
    .points-grid {
        grid-template-columns: 1fr;
    }

    .logo-sorteo {
        width: 88vw;
    }
}