@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@300;400;500&display=swap');

:root {
    --green: #9caf9a;
    --green-dark: #5f735f;
    --green-light: #dce6da;
    --cream: #f7f5ef;
    --white: #ffffff;
    --text: #384238;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background: var(--cream);
}


/* =========================
   HERO
========================= */

.hero {
    height: 100vh;
    min-height: 650px;

    position: relative;

    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
}
.hero-heart {
    position: absolute;
    top: 115px;
    left: auto;
    animation: fadeIn 1.9s ease;
}

.hero-content {
    /*position: relative;*/
    text-align: center;
    z-index: 1;

    animation: fadeIn 1.5s ease;
}

.hero-label {
    font-size: 15px;
    letter-spacing: 5px;
    margin-bottom: 25px;
}

.hero h1 {
    font-family: 'Garamond Italic';
    font-weight: 100;
    line-height: 0.8;
    font-style: italic;
}

.hero h1 span {
    display: block;
    font-size: 30px;
    margin: 35px 0;
}

.hero-date {
    margin-top: 45px;
    font-family: 'Great Vibes', cursive;
    font-size: 25px;
    letter-spacing: 6px;
}

.hero-location {
    margin-top: 10px;
    font-family: 'Great Vibes', cursive;
    font-size: 20px;
    letter-spacing: 3px;
}


/* =========================
   BUTTONS
========================= */

button {
    margin-top: 35px;

    padding: 14px 30px;

    border: 1px solid var(--green-dark);
    background: #f7f5ef;
    color: #576044;

    font-family: inherit;
    letter-spacing: 2px;

    cursor: pointer;

    transition: all 0.3s ease;
}

.button-secondary {
    background: #576044 !important;
    color: var(--white) !important;
    border-color: #f7f5ef !important;
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 110px 20px;

    margin: auto;

    text-align: center;

    opacity: 0;
    transform: translateY(60px);

    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.section.show {
    opacity: 1;
    transform: translateY(0);
}


/* Variaciones */

.section.from-left {
    transform: translateX(-80px);
}

.section.from-right {
    transform: translateX(80px);
}

.section.from-left.show,
.section.from-right.show {
    opacity: 1;
    transform: translateX(0);
}


/* =========================
   TEXT
========================= */

.section-label {
    font-size: 11px;
    letter-spacing: 4px;

    color: #576044;

    margin-bottom: 25px;
}

.section h2 {
    font-family: 'Cormorant Garamond', serif;

    font-size: 48px;
    font-weight: 400;

    color: var(--green-dark);

    margin-bottom: 25px;
}

.section p {
    max-width: 600px;
    margin: 0 auto;

    line-height: 1.8;
}


/* =========================
   STORY
========================= */

.story {
    background: var(--cream);
}


/* =========================
   DATE
========================= */

.date-section {
    max-width: none;
    color: var(--white);
    background: #576044;
}

.guess{
    max-width: none;
    color: var(--white);
    background: #576044;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 35px;
}

.parents{
    padding: 100px 20px !important;
    background: radial-gradient(circle at 20% 20%, rgba(150, 150, 130, 0.08), transparent 35%), radial-gradient(circle at 80% 70%, rgba(150, 150, 130, 0.08), transparent 35%), #eeece1;
}

.countdown-item {
    text-align: center;
}

.number {
    position: relative;

    width: 65px;
    height: 55px;

    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: 'Great Vibes', cursive;
    font-size: 42px;
    line-height: 1;

    color: #eae8dd;
}

/* =================================
   OVERLAY
================================= */

.envelope-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eeece1;

    animation:
    envelopeFadeIn 1.2s ease forwards,
    envelopeFadeOut 1.2s ease 4s forwards;
}


/* =================================
   CONTENEDOR
================================= */

.envelope-container {
    position: relative;

    width: 320px;
    height: 220px;

    perspective: 1200px;
}


/* =================================
   SOBRE
================================= */

.envelope {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    transform-style: preserve-3d;
}

.bank-details {
    padding: 22px 20px;
    background: rgb(247 245 239);
    border: 1px solid rgb(87 96 68);
    border-radius: 3px;
    margin-bottom: 30px;
    max-width: 610px;
    margin-right: auto;
    margin-left: auto;
    margin-top: 30px;
}

.bank-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.bank-row span {
    font-family: 'Montserrat', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a8c82;
}

.bank-row strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #4d5045;
}

.bank-divider {
    height: 1px;
    margin: 18px 0;
    background: rgba(103, 112, 93, 0.15);
}

/* Botón */

.copy-clabe {
    margin-top: 20px;
    padding: 9px 17px;

    border: 1px solid rgba(103, 112, 93, 0.3);
    border-radius: 30px;

    background: transparent;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    color: #626a59;

    cursor: pointer;
    transition: all .25s ease;
}

.copy-clabe i {
    margin-right: 6px;
}

.copy-clabe:hover {
    background: #727b68;
    color: white;
}

/* Parte trasera */

.envelope-back {
    position: absolute;

    inset: 0;

    background: #d5d0be;

    border-radius: 15px 15px 10px 10px;

    box-shadow:
        0 15px 40px rgba(0,0,0,.12);
}


/* Frente */

.envelope-front {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 90%;
    border-radius: 10px 5px 5px 10px;
    background: #eae8dd;

    clip-path: polygon(
        0 0,
        50% 55%,
        100% 0,
        100% 100%,
        0 100%
    );

    z-index: 3;
}


/* =================================
   SOLAPA
================================= */

.envelope-flap {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background: #d5d0be;

    clip-path: polygon(3% 0, 97% 0, 50% 40%);

    transform-origin: top center;

    z-index: 5;

    transform-style: preserve-3d;

    animation:
        openFlap 1.2s cubic-bezier(.65,0,.35,1) 1s forwards;
}


/* =================================
   CARTA
================================= */

.letter {
    position: absolute;

    left: 50%;
    bottom: 15px;

    width: 260px;
    height: 180px;

    transform: translateX(-50%);

    background: #f8f5eb;

    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 5px 20px rgba(0,0,0,.08);
    opacity: 0;
    animation:
        envelopeFadeIn 1.5s ease 1.5s forwards,
        letterOut 1.3s cubic-bezier(.22,1,.36,1) 1.8s forwards;
}

@keyframes envelopeFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.letter-content {
    text-align: center;

    color: #4d5045;
}


.letter-content span {
    display: block;

    font-family: 'Montserrat', sans-serif;

    font-size: 9px;

    letter-spacing: 4px;

    text-transform: uppercase;

    margin-bottom: 12px;
}


.letter-content strong {
    display: block;

    font-family: 'Great Vibes', cursive;

    font-size: 32px;

    font-weight: 400;
}


/* =================================
   ANIMACIONES
================================= */

@keyframes openFlap {

    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(180deg);
    }
}


@keyframes letterOut {

    0% {
        transform:
            translateX(-50%)
            translateY(0);

        opacity: 1;
    }

    100% {
        transform:
            translateX(-50%)
            translateY(-150px);

        opacity: 1;
    }
}


/* =================================
   OVERLAY
================================= */

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* La animación queda pausada al cargar */
.envelope-overlay {
    animation-play-state: paused;
}

.envelope-container {
    animation-play-state: paused;
}

.envelope-overlay {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eeece1;

    opacity: 1;

    animation:
        envelopeFadeOut 1.2s ease 4s forwards;
      animation-play-state: paused;
}

.envelope-overlay.fonts-loaded {
    animation-play-state: running;
}

/* Fade OUT */

@keyframes envelopeFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* Los números */
.number span {
    position: absolute;

    left: 0;
    right: 0;

    display: block;

    text-align: center;
}

/* Número viejo: cae hacia abajo */
.number .old-number {
    animation: numberOut 0.45s ease-in forwards;
}

/* Número nuevo: entra desde arriba */
.number .new-number {
    animation: numberIn 0.45s ease-out forwards;
}

/* Sale hacia abajo */
@keyframes numberOut {

    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Entra desde arriba */
@keyframes numberIn {

    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.label {
    margin-top: 8px;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 400;

    letter-spacing: 2px;
    text-transform: uppercase;

    color: #eae8dd;
}
.btn-inside{
    
}

/* =========================
   EVENT
========================= */

.event {
    background: var(--cream);
}


/* =========================
   RECEPTION
========================= */

.reception {
    max-width: none;
    padding: 60px 20px !important;
    background: #f7f5ef;
}


/* =========================
   DRESS CODE
========================= */

.dress-code {
    background: #576044;
    color: var(--white) !important;
}


/* =========================
   GALLERY
========================= */

.gallery {
    max-width: none;

    background: var(--green-light);
}

.gallery-grid {
    margin-top: 50px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;
}

.gallery-grid img {
    width: 100%;
    height: 350px;

    object-fit: cover;

    opacity: 0;
    transform: scale(0.92);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.section.show .gallery-grid img {
    opacity: 1;
    transform: scale(1);
}

.section.show .gallery-grid img:nth-child(1) {
    transition-delay: 0.1s;
}

.section.show .gallery-grid img:nth-child(2) {
    transition-delay: 0.2s;
}

.section.show .gallery-grid img:nth-child(3) {
    transition-delay: 0.3s;
}

.section.show .gallery-grid img:nth-child(4) {
    transition-delay: 0.4s;
}


/* =========================
   RSVP
========================= */

.rsvp {
    background: var(--cream);
}


/* =========================
   GIFTS
========================= */

.gifts {
    max-width: none;

    background: #e8e6db;
}


/* =========================
   FOOTER
========================= */

.footer {
    padding: 100px 20px;

    text-align: center;

    background-image: url(../img/backgroundverde.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #eae8dd;
}

.footer h2 {
    font-family:  'Great Vibes', cursive;

    font-size: 35px;
    font-weight: 400;

    margin-bottom: 20px;
}


/* =========================
   INTERNAL ANIMATIONS
========================= */

.section h2,
.section p,
.section-label,
.countdown,
.gallery-grid,
.section button {
    opacity: 0;
    transform: translateY(25px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.section.show .section-label {
    opacity: 1;
    transform: translateY(0);

    transition-delay: 0.05s;
}

.section.show h2 {
    opacity: 1;
    transform: translateY(0);

    transition-delay: 0.15s;
}

.section.show p {
    opacity: 1;
    transform: translateY(0);

    transition-delay: 0.30s;
}

.section.show .countdown,
.section.show button {
    opacity: 1;
    transform: translateY(0);

    transition-delay: 0.40s;
}


/* =========================
   HERO ANIMATION
========================= */

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .hero {
        min-height: 100vh;
    }

    .hero h1 {
        font-size: 75px;
    }

    .section {
        padding: 80px 20px;
    }

    .section h2 {
        font-size: 40px;
    }

    .countdown {
        gap: 15px;
    }

    .countdown span {
        font-size: 38px;
    }

    .gallery-grid img {
        height: 220px;
    }

}



@media (min-width: 600px) {
    .countdown-item{
        display: contents;
    }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

    .section,
    .section h2,
    .section p,
    .section-label,
    .countdown,
    .gallery-grid,
    .section button,
    .gallery-grid img {

        transition: none;

        transform: none;

        opacity: 1;
    }

}

.photo-collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;

    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.photo {
    overflow: hidden;
    border-radius: 8px;
}

.photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Imagen grande */
.photo-main {
    grid-column: 1 / 3;
}

.hero {
    background-image: url('../img/backgroundverde.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.date-text {
    font-size: 20px;
    font-weight: normal;
    color: var(--white);
    margin-top: 40px;
    font-family: 'Great Vibes', cursive;
}

.countdown-item {
    border-left: 0.3px solid white;
    padding: 10px;
    width: 25%;
}

.countdown-first-item {
    padding: 10px;
    width: 25%;
}

.scroll-indicator {
    position: absolute;
    bottom: -215px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    color: white;

    cursor: pointer;

    animation: scrollFade 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 9px;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.scroll-arrow {
    font-size: 25px;

    animation: arrowMove 1.5s ease-in-out infinite;
}


@keyframes arrowMove {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }

}


@keyframes scrollFade {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

}

/* =========================
   ITINERARIO
========================= */

.itinerario {
    position: relative;
    min-height: 100vh;
    padding: 70px 25px;
    
    /* Fondo tipo papel */
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(150, 150, 130, 0.08),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(150, 150, 130, 0.08),
            transparent 35%
        ),
        #eeece1;
        
    color: #4d5045;
}

.itinerario-container {
    max-width: 500px;
    margin: 0 auto;
}

/* "CÓMO SERÁ EL DÍA" */

.itinerario-subtitle {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 5px;
    color: #77786f;
    margin-bottom: 32px;
}

/* Itinerario */

.itinerario-title {
    margin: 0 0 70px;
    text-align: center;

    font-family: 'Great Vibes', cursive;
    font-size: 32px;
    font-weight: 400;
    color: #35372f;
}

/* Timeline */

.timeline {
    position: relative;
}

/* Línea vertical */

.timeline::before {
    content: "";
    position: absolute;

    left: 25px;
    top: 0;
    bottom: 0;

    width: 1px;
    background: #c8c8ba;
}

/* Cada evento */

.timeline-item {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 110px;
}

/* Círculo */

.timeline-icon {
    position: relative;
    z-index: 2;

    width: 52px;
    height: 52px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eeece1;

    border: 1px solid #c9c9bb;

    box-shadow:
        0 0 0 7px #eeece1,
        0 0 0 8px #d4d3c7;

    font-size: 20px;

    flex-shrink: 0;
}

/* Texto */

.timeline-content {
    margin-left: 25px;
    padding: 10px 0;
}

/* Hora */

.timeline-time {
    font-family: 'Great Vibes', cursive;
    font-size: 20px;
    line-height: 1;

    color: #66705d;

    margin-bottom: 12px;
}

/* Evento */

.timeline-event {
    font-family: 'Great Vibes', cursive;
    font-size: 24px;
    line-height: 1;

    color: #383a34;
}


.rsvp-section {
    position: relative;
    padding: 90px 25px;
    background: #ffffff;
    color: #4d5045;
}

.rsvp-container {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.rsvp-label {
    display: block;
    margin-bottom: 18px;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 4px;

    color: #576044;
}

.rsvp-container h2 {
    margin: 0 auto 18px;

    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.1;

    color: #576044;
}

.rsvp-intro {
      max-width: 390px;
    margin: 0 auto 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.9;
    color: #576044;
}


/* PASSES */

.passes-card {
    position: relative;

    margin: 0 auto 38px;
    padding: 25px 20px;

    max-width: 280px;

    background: rgba(248, 246, 237, .65);

    border-top: 1px solid rgba(103,112,93,.25);
    border-bottom: 1px solid rgba(103,112,93,.25);
}

.passes-card i {
    display: block;
    margin-bottom: 12px;

    font-size: 18px;
    color: #727b68;
}

.passes-card span {
    display: block;

    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: #8a8c82;
}

.passes-card strong {
    display: block;
    margin: 5px 0;

    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 500;

    color: #4d5045;
}

.passes-card small {
    font-family: 'Montserrat', sans-serif;
    font-size:11px;
    font-weight: 300;

    color: #8a8c82;
}


/* FORM */

.rsvp-form label{
    text-align: left;
}

.form-group {
    margin-bottom: 23px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: #6f7467;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 13px 14px;

    border: 1px solid rgba(103,112,93,.25);
    border-radius: 2px;

    background: rgba(248,246,237,.65);

    outline: none;

    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 300;

    color: #4d5045;

    transition: border-color .25s ease,
                box-shadow .25s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa99f;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #7c856f;
    box-shadow: 0 0 0 3px rgba(124,133,111,.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}


/* BUTTON */

.rsvp-button {
    width: 100%;
    margin-top: 8px;
    padding: 14px 20px;

    border: none;
    border-radius: 2px;

    background: #727b68;
    color: #fff;

    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;

    cursor: pointer;

    transition: all .25s ease;
}

.rsvp-button:hover {
    background: #5f6858;
    transform: translateY(-1px);
}