/*  Reset  */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f7f4f1;
}

p {
    margin: 0;
}

a {
    text-decoration: none;
}

/*  Fuentes  */

@font-face {
    font-family: 'Amalfi';
    src: url('../fonts/Amalfi Coast.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/*  Variables  */

:root {
    --font-principal:  'Cormorant', serif;
    --font-secundaria: 'Bodoni Moda', serif;
    --font-terciaria:  'Amalfi', cursive;

    --color-texto:      rgb(255, 249, 243);
    --color-overlay:    rgba(0, 0, 0, 0.4);
    --color-secundario: #8d8680;
    --color-fondo:      #f7f4f1;

    --tracking-titulos: 3px;
}

/* 
   HERO — tres paneles
 */

.contenedor_fondo {
    display: flex;
    height: 100vh;
    width: 100%;
}

.fondo {
    flex: 1;
    overflow: clip;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 2rem 1rem;
}

.bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: center;
    will-change: transform;
}

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

.fondo > *:not(.bg) {
    position: relative;
    z-index: 1;
}

.imagen1 {
    width: 100%;
    height: 100vh;
    aspect-ratio: 75 / 89;
}

.imagen1::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
    z-index: 1;
}

.imagen1 img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.imagen2 {
    background-image:
        linear-gradient(var(--color-overlay), var(--color-overlay)),
        url('../img/h2mobile.avif');
}

.imagen3 {
    background-image:
        linear-gradient(var(--color-overlay), var(--color-overlay)),
        url('../img/h3mobile.avif');
    background-position: top;
}

/*  Tipografía hero  */

h1 {
    position: relative;
    z-index: 1;
    color: var(--color-texto);
    font-family: var(--font-principal);
    font-weight: 300;
    font-size: 6.2rem;
    letter-spacing: var(--tracking-titulos);
    text-align: center;
    margin: 0;
}

.nuestra {
    color: var(--color-texto);
    font-family: var(--font-terciaria);
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: var(--tracking-titulos);
    text-align: center;
    width: 20rem;
    padding: 10px;
    display: none;
}

.texto_encima {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.and {
    position: absolute;
    z-index: 0;
}

.ipsilon {
    height: 22rem;
    width: 16rem;
    display: block;
}

.fecha {
    color: var(--color-texto);
    font-family: var(--font-principal);
    font-weight: 300;
    font-size: 2.2rem;
    letter-spacing: var(--tracking-titulos);
    text-align: center;
}

/*  Countdown  */

#countdown,
#countdown-mobile {
    display: flex;
    gap: 30px;
    color: var(--color-texto);
    font-family: "Quicksand", sans-serif;
    font-weight: 300;
    text-align: center;
    border: 0.1rem solid var(--color-texto);
    border-radius: 0.6rem;
    padding: 0.5rem 1rem;
    align-items: center;
    justify-content: center;
}

#countdown div,
#countdown-mobile div {
    position: relative;
}

#countdown div:not(:last-child) span::after,
#countdown-mobile div:not(:last-child) span::after {
    content: ":";
    position: absolute;
    right: -22px;
    top: 20%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

#countdown span,
#countdown-mobile span {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.267);
}

#countdown p,
#countdown-mobile p {
    padding-top: 0.3rem;
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
}

#countdown span.animate,
#countdown-mobile span.animate {
    animation: pulseFade 0.5s ease;
}

@keyframes pulseFade {
    0%   { opacity: 0; transform: translateY(6px) scale(0.95); }
    50%  { transform: translateY(-2px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.evento-hoy {
    font-family: var(--font-secundaria);
    font-size: 3rem;
    letter-spacing: 6px;
    text-align: center;
    color: var(--color-texto);
    animation: fadeIn 1.5s ease;
}

/* 
   SAVE THE DATE
 */

#save {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--color-fondo);
    overflow-x: hidden;
}

.titulo {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    color: var(--color-secundario);
    font-family: var(--font-principal);
    font-size: 1.5rem;
    margin: 0;
}

.cancion {
    width: 20rem;
    text-align: center;
    padding-bottom: 1rem;
}

.barra {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.notas {
    width: 1.8rem;
}

#btn-audio {
    background: none;
    border: none;
    padding: 0;
    color: #ddc6ad;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#btn-audio:hover {
    opacity: 1;
}

.progress-container {
    width: 60%;
    height: 6px;
    margin-top: 13px;
    background: #ddd;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    width: 0%;
    background: #ddc6ad;
    border-radius: 10px;
}

.texto {
    display: flex;
    text-align: center;
    justify-content: center;
    color: var(--color-secundario);
    font-family: var(--font-principal);
    font-size: 2rem;
    width: 80%;
    margin: 0;
}

.texto2 {
    margin: 0;
    display: flex;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    color: var(--color-secundario);
    font-family: var(--font-principal);
    font-size: 4rem;
    width: 80%;
    letter-spacing: var(--tracking-titulos);
    padding-top: 2.5rem;
}

.texto2 p {
    margin: 0 -5px;
    padding-bottom: 3rem;
}

.the {
    padding-left: 1.2rem;
    padding-right: 0.2rem;
    font-family: var(--font-terciaria);
    line-height: 1;
}

.date {
    margin: 0;
    padding-bottom: 1rem;
    font-size: 2.5rem;
}

.add_event {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #8d8680;
    border: none;
    color: var(--color-texto);
    padding: 10px 30px;
    font-family: var(--font-principal);
    font-size: 1.3rem;
    cursor: pointer;
}

.add_event:hover {
    background-color: #395138a1;
}

.boton_add {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

.padres {
    padding-left: 1.2rem;
    padding-right: 0.2rem;
    font-family: var(--font-terciaria);
    line-height: 2.5;
}

/*  Padres  */

.contenedor_padres {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 2rem;
}

.ipsilon2 {
    font-size: 2rem;
    color: var(--color-secundario);
    font-family: var(--font-secundaria);
}

.nombres_padres {
    padding-top: 3rem;
    font-size: 1.8rem;
    color: var(--color-secundario);
    font-family: var(--font-principal);
}

/* 
   FONDO 2 — parallax panels
 */

#fondo2 {
    min-height: 100vh;;
}

.scene {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    height: 100vh;
    background-color: var(--color-fondo);
}

.bg2 {
    position: absolute;
    inset: 0;
    background-image: url('../img/h13mobile.avif');
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.overlays {
    min-height: 100vh;
    position: absolute;
    inset: 0;
    display: flex;
    inset: 0;
}

.overlay-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    transform-origin: center center;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.overlay-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.panel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 
   ITINERARIO
 */

.wt-section {
    padding-top: 3rem;
    width: 100%;
    overflow: hidden;
    background-color: var(--color-fondo);
}

.it {
    font-family: var(--font-terciaria);
    font-size: 2rem;
    color: var(--color-secundario);
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

.wt-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    min-height: 700px;
    padding-bottom: 100px;
}

.wt-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-secundario);
    transform: translateY(-50%);
}

.wt-wrapper::after {
    content: "";
    position: absolute;
    left: 32%;
    top: calc(50% - 90px);
    width: 2px;
    height: 180px;
    background: var(--color-secundario);
}

.wt-line-right {
    position: absolute;
    left: 68%;
    top: calc(50% - 90px);
    width: 2px;
    height: 180px;
    background: var(--color-secundario);
}

.wt-item {
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
}

.wt-item-top {
    left: 32%;
    bottom: calc(50% + 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.wt-item-bottom {
    left: 68%;
    top: calc(50% + 100px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.wt-icon {
    width: 150px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.wt-icon img {
    width: 100%;
    height: 100%;
}

.wt-title,
.wt-time {
    margin: 0;
}

.wt-title {
    font-family: var(--font-principal);
    color: var(--color-secundario);
    font-weight: 300;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    letter-spacing: 4px;
    line-height: 1.2;
    text-align: center;
}

.wt-time {
    font-family: var(--font-principal);
    color: var(--color-secundario);
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    letter-spacing: 1px;
    font-weight: 300;
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
}

/*  Ubicaciones  */

.ubicaciones {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-bottom: 4rem;
}

.ubi {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 0.2rem;
    width: 20rem;
    height: 15rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(223, 189, 159, 0.435);
    gap: 1rem;
}

.ubi::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.ubi > * {
    position: relative;
    z-index: 1;
}

.ubi p {
    font-family: var(--font-principal);
    color: var(--color-texto);
    font-size: 2rem;
}

.iglesia,
.jardin {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.iglesia {
    background-image: url('../img/IMG_3225.webp');
}

.jardin {
    background-image: url('../img/sanjose.avif');
}

.ver_ubi {
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    background-color: #a1a1a1;
    color: white;
    padding: 10px 30px;
    font-family: var(--font-principal);
    font-size: 1.3rem;
}

.ver_ubi:hover {
    background-color: #395138a1;
}

/* DRESS CODE */

#code {
    background-color: #fff8f3b2;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 3rem;
    flex-direction: column;
    min-height: 700px;
    gap: 3rem;
    overflow: hidden;
}

.hym {
    display: flex;
    text-align: center;
    align-items: center;
    gap: 5px;
}

.hym p {
    font-family: var(--font-principal);
    font-size: 1.3rem;
    color: var(--color-secundario);
}

.hym img {
    width: 10rem;
}

.no {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 1.3rem;
}

.noniños {
    margin-top: -30px;
    width: 10rem;
}

/* 
   FONDO 3
 */

#fondo3 {
    overflow-x: hidden;
    background-image: url('../img/h8mobile.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 80vh;
}

/*  HISTORIA DE AMOR */

#historia {
    overflow: hidden;
    background-color: var(--color-fondo);
    padding-top: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 1.6rem;
}

.titulo2 {
    font-family: var(--font-principal);
    font-size: 3rem;
    letter-spacing: 4px;
    color: #7a7671;
    text-align: center;
    position: relative;
}

.amor {
    display: block;
    font-family: var(--font-terciaria);
    font-size: 2.5rem;
    letter-spacing: 1px;
    margin-top: -50px;
    padding-left: 400px;
}

.texto3 {
    font-family: var(--font-principal);
    color: var(--color-secundario);
    font-size: 1.5rem;
    width: 60%;
}

.final {
    padding-bottom: 2rem;
}

/*  Galería  */

.galeria {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 300px 300px 300px;
    gap: 8px;
    padding-bottom: 5rem;
}

.galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.foto-1 { grid-column: 1; grid-row: 1; }
.foto-2 { grid-column: 2; grid-row: 1 / span 2;}
.foto-3 { grid-column: 1; grid-row: 2; }
.foto-4 { grid-column: 1; grid-row: 3; }
.foto-5 { grid-column: 2; grid-row: 3; }

/* LLUVIA DE SOBRES */

#sobres {
    overflow: hidden;
    background-color: #eee3d5;
    width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 1.6rem;
    margin: auto;
    padding-top: 2rem;
    margin-bottom: 5rem;
}

#sobres img {
    margin-top: -1rem;
    margin-bottom: -3rem;
    width: 16rem;
}

/* 
   FONDO 4
 */

#fondo4 {
    overflow-x: hidden;
    min-height: 80vh;
}

#fondo4 div {
    min-height: 80vh;
    background-image: url('../img/h12mobile.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 
   HOSPEDAJE
 */

#hospedaje {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 1.6rem;
    margin: auto;
    padding-top: 3rem;
    font-family: var(--font-principal);
    padding-bottom: 3rem;
}

.hoteles {
    margin: 0 auto;
    width: 90%;
}

.fila {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 3rem;
    justify-items: center;
}

.fila-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fila-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 660px;
    margin: 0 auto;
}

.card {
    text-align: center;
    width: 100%;
}

.card h2 {
    font-weight: 300;
    font-size: 20px;
    color: var(--color-secundario);
    margin-bottom: 14px;
}

.card .img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card a {
    display: inline-block;
    background: #e0d2bf;
    color: #fff;
    font-family: sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 10px 24px;
    border-radius: 999px;
}

.card a:hover {
    background: #2d3e29;
}

/* 
   FONDO 5
 */

#fondo5 {
    overflow: hidden;
    width: 100%;
    height: 90vh;
    background-image: url('../img/h11mobile.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 
   CONFIRMACIÓN
 */

#confirmacion {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding-bottom: 3rem;
    padding-top: 3rem;
    gap: 3rem;
}

.btn-confirmar {
    display: inline-block;
    background: #e0d2bf;
    color: #fff;
    font-family: sans-serif;
    font-size: 18px;
    letter-spacing: 0.1em;
    padding: 20px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.estrella {
    width: 23rem;
    margin: 0;
    margin-top: -10rem;
    margin-bottom: -8rem;
}

.texto-estrella {
    font-style: italic;
    margin-bottom: -2rem;
}

#fondo6 {
    overflow: hidden;
    width: 100%;
    height: 90vh;
    background-image: url('../img/h20mobile.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 
   ANIMACIONES
 */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.fade {
    opacity: 0;
    transition: opacity 2s ease;
}

.fade.show {
    opacity: 1;
}

.fade-slide {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-slide.show {
    opacity: 1;
    transform: translateY(0);
}

/* 
   MOBILE
 */

@media (max-width: 480px) {

    .contenedor_fondo {
        flex-direction: column;
        height: auto;
        overflow-x: clip;
        min-height: 100vh;
    }

    .nuestra {
        font-size: 1.6rem;
        margin: 0;
        display: block;
    }

    .texto_encima {
        padding-top: 18rem;
    }

    .fondo {
        width: 100%;
        min-height: 70vh;
        gap: 0.8rem;
        padding: 3rem 1rem 2rem;
    }

    h1 {
        font-size: 4rem;
    }

    .ipsilon {
        height: 22rem;
        width: 17rem;
    }

    .fecha {
        font-size: 1.6rem;
        text-align: center;
        padding-top: 15rem;
    }

    .desktop-fecha,
    .desktop-countdown {
        display: none;
    }

    .mobile-fecha {
        display: block;
    }

    #countdown-mobile {
        padding: 0.5rem;
        width: 80%;
    }

    #countdown-mobile span {
        font-size: 1.5rem;
    }

    #countdown-mobile div:not(:last-child) span::after {
        font-size: 1.5rem;
    }

    .texto {
        font-size: 1.7rem;
    }

    .texto2 {
        font-size: 2.3rem;
    }

    .date {
        font-size: 1.4rem;
    }

    .titulo {
        font-size: 1.2rem;
    }

    .cancion {
        width: 15rem;
    }

    .notas {
        width: 1.5rem;
    }

    .contenedor_padres {
        flex-direction: column;
        gap: 0.5rem;
        padding-bottom: 2rem;
    }

    .ipsilon2 {
        font-size: 2.2rem;
        margin: 0;
    }

    .nombres_padres {
        padding-top: 1.2rem;
        font-size: 1.3rem;
    }

    .overlays {
        flex-direction: column;
    }

    #fondo2 {
        height: 200vh;
        min-height: 200vh;
    }

    .overlay-panel {
        flex: 1;
        min-height: 66vh;
        width: 100%;
    }

    .scene {
        height: 200vh;
        min-height: 200vh;
    }

    .it {
        margin-bottom: 1rem;
    }

    .wt-wrapper {
        min-height: 600px;
    }

    .wt-icon {
        width: 120px;
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wt-wrapper::before {
        left: 20px;
        width: calc(100% - 40px);
    }

    .wt-wrapper::after { left: 28%; }
    .wt-line-right     { left: 72%; }
    .wt-item-top       { left: 28%; bottom: calc(50% + 80px); }
    .wt-item-bottom    { left: 72%; top: calc(50% + 80px); }

    .ubicaciones {
        flex-direction: column;
        gap: 2rem;
    }

    .titulo2 {
        font-size: 1.7rem;
    }

    .amor {
        font-size: 1.7rem;
        padding-top: 10px;
        padding-left: 200px;
    }

    .texto3 {
        width: 75%;
    }

    .galeria {
        width: 95%;
    }

    .fila-3,
    .fila-2 {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    #fondo4{
        background-position: 70% center;
    }
}

@media (min-width: 768px) {

    #fondo2 {
        min-height: 180vh;
    }

    .scene {
        height: 100vh;
        min-height: 100vh;
    }

    .imagen2 {
        background-image:
            linear-gradient(var(--color-overlay), var(--color-overlay)),
            url('../img/h2.avif');
    }

    .imagen3 {
        background-image:
            linear-gradient(var(--color-overlay), var(--color-overlay)),
            url('../img/h3.avif');
    }

    .bg2 {
        background-image: url('../img/h13.avif');
    }

    #fondo3 {
        background-image: url('../img/h8.avif');
    }

    #fondo4{
        background-image: url('../img/h12.avif');
    }

    #fondo5{
        background-image: url('../img/h11.avif');
        background-position: center 20%;
    }

    #fondo6{
        background-image: url('../img/h20.avif');
    }
}