* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--secondary-color, #ffffff);
    color: var(--text-color, #584e8a);
    font-family: var(--font-primary), serif;
    font-style: italic;
    line-height: 1.5;
    overflow-x: hidden;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes floatReverse {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(15px) rotate(-1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Decoraciones Esquinas Fijas */
.corner {
    position: fixed;
    z-index: 5;
    pointer-events: none;
    max-width: 35vw;
    /* responsiveness on mobile */
    opacity: 0.9;
}

.corner-tl {
    top: 0;
    left: 0;
}

.corner-tr {
    top: 0;
    right: 0;
    width: 45vw;
    animation: floatReverse 7s ease-in-out infinite;
}

/* La rosa principal es grande */
.corner-bl {
    bottom: 0;
    left: 0;
    width: 40vw;
}

.corner-br {
    bottom: 0;
    right: 0;
    width: 40vw;
}

@media (min-width: 768px) {
    .corner {
        max-width: 200px;
    }

    .corner-tr {
        width: 300px;
    }

    .corner-bl {
        width: 250px;
    }

    .corner-br {
        width: 250px;
    }
}

.invitation-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    /* Por encima de las flores */
    padding: 3rem 1.5rem;
    text-align: center;
    background: transparent;
}

/* Typography elements */
.date-day {
    font-size: 6.5rem;
    font-weight: 500;
    font-style: normal;
    color: #6a5ba1;
    line-height: 1;
    margin-top: 2rem;
    /* Soft glowing effect */
    text-shadow: 0 0 10px rgba(88, 78, 138, 0.2);
}

.date-month-year {
    font-size: 1.1rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 5px;
    color: #6a5ba1;
    margin-bottom: 3.5rem;
    text-transform: uppercase;
}

.parents-message {
    font-size: 1.5rem;
    font-weight: normal;
    /* Removido el bold */
    font-style: italic;
    /* Añadido itálica según imagen */
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.main-name-text {
    font-family: var(--font-secondary), cursive;
    font-style: normal;
    font-size: 7.5rem;
    /* Aumentado porque Grand Hotel es más chica naturalmente */
    font-weight: 400;
    /* Regular weight for elegance */
    color: #b0881c;
    /* Tono dorado mostaza */
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.main-name-text.small-name {
    font-size: 4.5rem;
    margin: 0 auto;
    display: block;
}

.ceremony-message {
    font-size: 1.4rem;
    font-weight: normal;
    /* Removido el bold */
    font-style: italic;
    /* Añadido itálica según imagen */
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    margin-top: 1rem;
    line-height: 1.6;
}

.ceremony-message span,
.reception-message span {
    font-style: italic;
    /* Match italicizing in Parroquia name */
}

.reception-title {
    font-family: var(--font-secondary), cursive;
    font-style: normal;
    font-size: 3.5rem;
    color: #402c5c;
    /* Un morado más oscuro as per reference */
    margin: 1.5rem 0;
}

.reception-message {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.confirm-title {
    font-size: 1.3rem;
    font-style: normal;
    font-weight: bold;
    color: #555883;
    /* Tonalidad del botón azulada */
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.btn-aqui {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 85px;
    height: 85px;
    color: #555883;
    font-weight: bold;
    font-style: normal;
    font-size: 1.2rem;
    text-decoration: none;
    border: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><polygon points='50 2 95 25 95 75 50 98 5 75 5 25' fill='none' stroke='%23b0881c' stroke-width='1'/><polygon points='50 10 85 30 85 70 50 90 15 70 15 30' fill='none' stroke='%23b0881c' stroke-width='1.5'/></svg>");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    transition: all 0.3s ease;
    animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn-aqui:hover {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 0 20px #b0881c);
    /* Glow dorado extra fuerte y sólido */
    animation-play-state: paused;
}

.mt-space {
    margin-top: 5rem;
}

.dress-title {
    font-size: 1.6rem;
    margin-top: -1rem;
}

.dress-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.icons-clothes {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3.5rem 0;
}

.clothes-img {
    max-width: 50%;
    height: auto;
}

.gift-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.gift-text {
    font-size: 1.5rem;
    line-height: 1.6;
}

.farewell-text {
    font-size: 1.6rem;
    margin-bottom: 10rem;
    /* espacio para botones fijados etc */
    line-height: 1.6;
}

/* Animations Core */
.fade-in {
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Applying progressive staggers via JS or specific classes */
.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

.is-visible.fade-in {
    opacity: 1;
}

.is-visible.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   PREMIUM PRELOADER (WOW EFFECT)
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-color);
    background-image: radial-gradient(circle at center, #8272b5 0%, var(--primary-color) 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 1.5s cubic-bezier(0.86, 0, 0.07, 1), transform 1.5s cubic-bezier(0.86, 0, 0.07, 1);
}

#preloader.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.preloader-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.preloader-name {
    position: absolute;
    color: #ffffff !important;
    /* Blanco garantizado */
    font-size: 6rem;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    opacity: 0;
    transform: scale(0.9);
}

.preloader-date {
    position: absolute;
    text-align: center;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.9);
}

.preloader-date .p-day {
    font-size: 4.5rem;
    font-weight: 500;
    line-height: 1;
    margin: 0;
}

.preloader-date .p-month {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 5px;
    margin-top: 5px;
    text-transform: uppercase;
}

/* Animations Triggered via JS */
.preloader-content.fonts-ready {
    opacity: 1;
}

.preloader-content.fonts-ready .preloader-name {
    animation: seqName 2.5s ease forwards;
}

.preloader-content.fonts-ready .preloader-date {
    animation: seqDate 2.5s ease forwards 2.3s;
    /* Entra justo después del fadeout de Michi */
}

@keyframes seqName {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    15% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    }

    /* Entra rápido */
    50% {
        opacity: 1;
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }

    /* Crece y brilla (wow) */
    80% {
        opacity: 1;
        transform: scale(1);
    }

    /* Vuelve a tamaño normal */
    100% {
        opacity: 0;
        transform: scale(0.95);
    }

    /* Se desvanece por completo */
}

@keyframes seqDate {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    20% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    /* Entra fecha */
    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    /* Late brillante en pantalla completa */
    100% {
        opacity: 1;
        transform: scale(1);
    }

    /* Toda la pantalla preloader desaparece enseguida */
}