:root {
    --white: #fffdf9;
    --cream: #f5efe7;
    --rose: #a77873;
    --gold: #b58a3b;
    --ink: #4e453e;
    --muted: #7b7067;
    --shadow: 0 25px 70px #462b1c24;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: Baskervville, Georgia, serif;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* ==========================================
   ESCENA 1: SOBRE Y TARJETA DE PASES
========================================== */

.cover {
    position: relative;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: var(--cream);
    transition: opacity .8s ease;
}

.cover > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.seal {
    position: absolute;
    left: 50%;
    top: 74%;
    translate: -50% -50%;
    width: 150px;
    height: 120px;
    z-index: 5;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pass-card {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -40%;
    width: min(86vw, 410px);
    min-height: 360px;
    padding: 28px 32px;
    background: rgba(255, 253, 249, .97);
    border: 1px solid #c99b50;
    border-radius: 4px;
    box-shadow: 0 18px 45px rgba(70, 43, 28, .18);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, translate .6s ease, visibility .6s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pass-card.show {
    opacity: 1;
    visibility: visible;
    translate: -50% -50%;
}

.adorno-linea {
    width: 68%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 4px auto 8px;
}

.adorno-linea span {
    height: 1px;
    flex: 1;
    background: #c99b50;
}

.adorno-linea i {
    color: #c99b50;
    font-size: .7rem;
    font-style: normal;
}

.adorno-linea--pequeno {
    width: 42%;
    margin: 4px auto;
}

#nombreInvitado {
    font-family: "Pinyon Script", cursive;
    font-size: clamp(2.4rem, 6vw, 2.8rem);
    font-weight: 400;
    line-height: 1;
    color: #805954;
    margin: 10px 0 14px;
}

.texto-reserva {
    margin: 4px 0 6px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.texto-reserva strong {
    display: block;
    margin: 2px 0;
    color: #a96f6b;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.65rem;
    font-weight: 600;
}

.carta-pases__mesa {
    margin: 2px 0 8px;
}

.carta-pases__mesa strong {
    color: #a96f6b;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.55rem;
    font-weight: 600;
}

.firma {
    margin: 4px 0 14px;
    line-height: 1.4;
    color: var(--muted);
}

.firma span {
    display: block;
    font-family: "Pinyon Script", cursive;
    font-size: 1.75rem;
    color: #8f625e;
}

.firma small {
    display: block;
    margin-top: 2px;
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .25em;
}

.pass-card #continuarInvitacion {
    margin-top: 4px;
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--gold);
    color: #9b6864;
    font-family: "Baskervville", serif;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.pass-card #continuarInvitacion:hover,
.pass-card #continuarInvitacion:active {
    background: var(--gold);
    color: white;
}

/* ==========================================
   PORTADA PRINCIPAL (HERO)
========================================== */

.hero {
    position: relative;
    height: 85svh;
    overflow: hidden;
    display: grid;
    place-items: end center;
}

.hero > img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 75%;
    transform: scale(1.15);
    transform-origin: center center;
}

.shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, #1f120eb5);
    z-index: 1;
}

.heroText {
    position: absolute;
    top: 43%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 0 12px;
    text-align: center;
    z-index: 3;
}

.logo-novios {
    display: block;
    width: 78%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    background: transparent;
}

.panels {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    pointer-events: none;
}

.panels i {
    background: #f7f1eb;
    animation: open 1.2s forwards;
}

.panels i:nth-child(2) {
    animation-delay: .1s;
}

.panels i:nth-child(3) {
    animation-delay: .2s;
}

.panels i:nth-child(4) {
    animation-delay: .3s;
}

@keyframes open {
    to {
        transform: translateY(-105%);
    }
}

/* ==========================================
   IMÁGENES INTERMEDIAS (FECHA Y SEPARADOR)
========================================== */

.imagen-fecha,
.imagen-separacion {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--white);
    line-height: 0;
    text-align: center;
}

.imagen-fecha img,
.imagen-separacion img {
    display: block;
    width: 100%;
    max-width: 650px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

/* ==========================================
   SECCIONES GENERALES
========================================== */

.section {
    padding: 84px 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kicker {
    color: var(--gold);
    letter-spacing: .24em;
    font-size: .8rem;
    text-transform: uppercase;
}

.section h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 400;
    color: #805954;
    margin: .2em 0;
}

.cream {
    background: radial-gradient(circle at top, #fff, #f5efe7);
}

.section > p {
    max-width: 720px;
    margin: 1em auto;
    line-height: 1.8;
}

/* ==========================================
   CALENDARIO Y CUENTA REGRESIVA
========================================== */

#fecha {
    background: var(--white);
    padding-top: 24px;
}

.calendar {
    width: min(100%, 520px);
    margin: 28px auto;
    padding: 22px 16px;
    background: white;
    border: 1px solid #b58a3b55;
    box-shadow: var(--shadow);
}

.calendar header {
    display: flex;
    justify-content: space-between;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .18em;
}

.week,
.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 18px;
}

.days span {
    position: relative;
    padding: 8px 4px;
    display: grid;
    place-items: center;
}

.day20 {
    border: 1px solid var(--rose);
    border-radius: 50%;
    color: #805954;
    font-weight: 600;
}

.day20 i {
    position: absolute;
    color: var(--rose);
    right: -3px;
    bottom: -6px;
    font-style: normal;
    font-size: .85rem;
}

.countdown {
    background: white;
}

.clock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 760px;
    margin: 35px auto;
    border-block: 1px solid #b58a3b55;
}

.clock div {
    padding: 24px 8px;
}

.clock div + div {
    border-left: 1px solid #b58a3b33;
}

.clock b {
    display: block;
    color: var(--gold);
    font: 400 clamp(2.2rem, 7vw, 4.4rem) "Cormorant Garamond", serif;
}

.clock span {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .15em;
}

.snitch {
    color: var(--gold);
    font-size: 2rem;
    letter-spacing: .25em;
}

/* ==========================================
   HISTORIA Y GALERÍA
========================================== */

.story {
    position: relative;
    height: 82svh;
}

.story img {
    height: 100%;
    object-fit: cover;
}

.story::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 35%, #1f120ec4);
}

.story div {
    position: absolute;
    z-index: 2;
    bottom: 8%;
    left: 50%;
    translate: -50%;
    width: min(88%, 760px);
    color: white;
    text-align: center;
    font: clamp(1.5rem, 4vw, 2.7rem) "Cormorant Garamond", serif;
}

.story p {
    margin: .1em;
}

.gallery {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    gap: 12px;
    align-items: center;
    max-width: 1000px;
    margin: 38px auto;
}

.viewport {
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #b58a3b44;
}

.track {
    display: flex;
    transition: transform .6s ease;
}

.track figure {
    min-width: 100%;
    margin: 0;
    position: relative;
}

.track img {
    height: min(70svh, 650px);
    object-fit: cover;
}

.track figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 20px 20px;
    background: linear-gradient(transparent, #0009);
    color: white;
    font: 1.7rem "Cormorant Garamond", serif;
}

.gallery > button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: white;
    color: var(--gold);
    font-size: 1.8rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.dots .active {
    background: var(--gold);
}

/* ==========================================
   ITINERARIO, VESTIMENTA Y REGALOS
========================================== */

.timeline {
    max-width: 760px;
    margin: 35px auto;
    text-align: left;
}

.timeline article {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid #b58a3b44;
}

.timeline article > i {
    width: 58px;
    height: 58px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-style: normal;
}

.timeline h3 {
    font: 2rem "Cormorant Garamond", serif;
    color: #805954;
    margin: .2em 0;
}

.dress {
    font-size: 2.5rem;
    color: var(--gold);
}

.pigs {
    width: min(320px, 75%);
    margin: auto;
}

/* ==========================================
   FORMULARIO DE CONFIRMACIÓN (OPTIMIZADO MÓVIL)
========================================== */

form {
    width: min(100%, 600px);
    margin: 30px auto;
    padding: 28px 24px;
    background: white;
    border: 1px solid #b58a3b44;
    box-shadow: var(--shadow);
    text-align: left;
    border-radius: 4px;
}

form label,
fieldset {
    display: block;
    margin: 0 0 20px;
    font-size: .95rem;
    color: var(--ink);
}

fieldset {
    border: 0;
    padding: 0;
}

fieldset legend {
    margin-bottom: 10px;
    font-size: .95rem;
}

/* Importante: font-size >= 16px evita el auto-zoom en iPhone/Safari */
input[type="text"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    margin-top: 8px;
    border: 1px solid #d9c9bb;
    border-radius: 4px;
    background: var(--white);
    font-size: 16px;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(181, 138, 59, 0.14);
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 13px 12px;
    border: 1px solid #d9c9bb;
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
    text-align: center;
    font-size: .95rem;
    transition: border-color .2s, background .2s, color .2s;
}

.radio-card input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #805954;
}

.radio-card:has(input:checked) {
    border-color: var(--gold);
    background: #fcf6ec;
    color: #805954;
    font-weight: 600;
}

#guestCountWrapper {
    transition: opacity .25s ease;
}

form button[type="submit"] {
    width: 100%;
    padding: 15px 22px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: #805954;
    color: white;
    font-size: .88rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s, opacity .25s;
}

form button[type="submit"]:hover {
    background: #6b4945;
}

form button[type="submit"]:disabled {
    opacity: .65;
    cursor: wait;
}

.rsvp-feedback {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: .95rem;
    line-height: 1.5;
    text-align: center;
}

.rsvp-feedback.success {
    background: #f3f8f3;
    border: 1px solid #8ab58a;
    color: #2f5930;
}

.rsvp-feedback.error {
    background: #fdf3f2;
    border: 1px solid #d88b84;
    color: #8a2c24;
}

.rsvp-whatsapp-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 18px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    background: white;
    color: #805954;
    text-decoration: none;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ==========================================
   CIERRE Y BOTÓN DE MÚSICA
========================================== */

.closing strong {
    display: block;
    font: clamp(3.5rem, 9vw, 6rem) "Great Vibes", cursive;
    color: var(--rose);
}

.closing span {
    display: block;
    color: var(--gold);
    letter-spacing: .3em;
}

.music {
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 18px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: #fffdf9e8;
    color: var(--gold);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(70, 43, 28, .15);
}

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ==========================================
   ADAPTACIÓN MÓVIL (CELULARES)
========================================== */

@media (max-width: 640px) {
    .cover > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .seal {
        top: 64%;
        width: 110px;
        height: 110px;
        z-index: 10;
    }

    .pass-card {
        padding: 24px 22px;
    }

    .hero {
        width: 100%;
        height: 75svh;
        margin-bottom: -1px;
    }

    .hero > img {
        left: 0;
        top: -38%;
        width: 100%;
        height: 140%;
        object-fit: cover;
        object-position: 78% center;
        transform: none;
    }

    .shade {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.05) 40%,
            rgba(20, 12, 10, 0.32) 68%,
            rgba(20, 12, 10, 0.46) 86%,
            rgba(20, 12, 10, 0.22) 100%
        );
    }

    .heroText {
        top: auto;
        bottom: 15%;
        transform: translateX(-50%);
    }

    .logo-novios {
        width: 84%;
        max-width: 300px;
    }

    .imagen-fecha img,
    .imagen-separacion img {
        max-width: 100%;
    }

    .section {
        padding: 64px 18px;
    }

    #fecha {
        padding-top: 12px;
    }

    .clock {
        grid-template-columns: repeat(2, 1fr);
    }

    .clock div:nth-child(2) {
        border-right: 0;
    }

    .clock div:nth-child(3),
    .clock div:nth-child(4) {
        border-top: 1px solid #b58a3b33;
    }

    .gallery {
        grid-template-columns: 1fr;
        position: relative;
    }

    .gallery > button {
        position: absolute;
        z-index: 3;
        width: 42px;
        height: 42px;
        background: rgba(255, 253, 249, 0.9);
    }

    .gallery #prev {
        left: 14px;
    }

    .gallery #next {
        right: 14px;
    }

    .track img {
        height: 62svh;
    }

    .timeline article {
        grid-template-columns: 55px 1fr;
    }

    form {
        padding: 22px 16px;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }
}
