/* ════════════════════════════════════════
   VARIABLES & RESET
════════════════════════════════════════ */
:root {
    --cream:      #FAF6EF;
    --cream-dark: #F0E6D8;
    --white:      #FFFFFF;
    --dark:       #1A1A1A;
    --forest:     #2D3A26;
    --sage:       #6B7C5E;
    --gold:       #C9A055;
    --gold-light: #E8D5A8;
    --blush:      #DEB9A0;
    --blush-soft: #F0D4C2;

    --font-script: 'Dancing Script', cursive;
    --font-serif:  'Cormorant Garamond', serif;
    --font-sans:   'Montserrat', sans-serif;

    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--dark);
    font-family: var(--font-serif);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a { text-decoration: none; color: inherit; }

.container {
    width: 90%;
    max-width: 920px;
    margin: 0 auto;
    padding: 55px 0;
}

/* ════════════════════════════════════════
   TYPOGRAPHY HELPERS
════════════════════════════════════════ */
.section-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 600;
    color: var(--forest);
    text-align: center;
    margin-bottom: 0.4rem;
}

.section-title--light { color: var(--white); }

.section-sub {
    font-family: var(--font-serif);
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sage);
    text-align: center;
    margin-bottom: 2rem;
}

.section-sub--light { color: rgba(255, 255, 255, 0.65); }

.tag-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    margin-bottom: 1.8rem;
}

/* ════════════════════════════════════════
   BOTANICAL DECORATIONS
════════════════════════════════════════ */
.hero-botanical {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    animation: botanical-float 7s ease-in-out infinite;
    will-change: transform;
}

.hero-botanical--tr {
    top: -10px;
    right: -10px;
    width: clamp(180px, 28vw, 290px);
    opacity: 0.82;
    animation-delay: 0s;
}

.hero-botanical--bl {
    bottom: 60px;
    left: -10px;
    width: clamp(130px, 20vw, 220px);
    opacity: 0.65;
    transform-origin: bottom left;
    transform: scaleX(-1) scaleY(-1);
    animation-delay: -3.5s;
}

@keyframes botanical-float {
    0%, 100% { transform: translateY(0px);   }
    50%       { transform: translateY(-10px); }
}

.hero-botanical--bl {
    animation-name: botanical-float-bl;
}

@keyframes botanical-float-bl {
    0%, 100% { transform: scaleX(-1) scaleY(-1) translateY(0px);   }
    50%       { transform: scaleX(-1) scaleY(-1) translateY(-10px); }
}

.botanical-divider {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 0;
    max-width: 500px;
    margin: 0 auto;
}

.botanical-divider svg {
    width: 100%;
    max-width: 360px;
    height: auto;
}

/* Update hero z-indices so content stays on top of botanicals */
.hero__content { position: relative; z-index: 3; }
.hero__scroll   { z-index: 3; }

/* ════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
════════════════════════════════════════ */
.gsap-ready .reveal,
.gsap-ready .tl-left,
.gsap-ready .tl-right { opacity: 0; }

/* ════════════════════════════════════════
   PÉTALOS FLOTANTES
════════════════════════════════════════ */
.petals-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
    /* Aísla los pétalos en su propia capa GPU para que su animación
       no fuerce repaints del contenido que se desplaza debajo (Safari/Chrome Mac) */
    transform: translateZ(0);
    contain: strict;
}

.petal {
    position: absolute;
    top: -20px;
    opacity: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: petal-fall linear infinite;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

@keyframes petal-fall {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0px);
        opacity: 0.7;
    }
    80% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(110vh) rotate(540deg) translateX(60px);
        opacity: 0;
    }
}

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
    position: relative;
    height: 100svh;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding-bottom: clamp(3rem, 8vh, 6rem);
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    /* Solo Ken Burns (scale) controlado por GSAP — sin parallax, sin saltos */
    will-change: transform;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.25) 40%,
        rgba(0, 0, 0, 0.65) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 0 1.5rem;
}

.hero__eyebrow {
    font-family: var(--font-serif);
    font-size: clamp(0.75rem, 2.2vw, 0.95rem);
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

.hero__names {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    margin-bottom: 0.8rem;
}

.hero__name {
    font-family: var(--font-script);
    font-size: clamp(4.5rem, 17vw, 9rem);
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
}

.hero__amp {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.2rem, 4.5vw, 2.2rem);
    color: var(--gold-light);
    margin: -0.8rem 0;
}

.hero__date {
    font-family: var(--font-serif);
    font-size: clamp(0.9rem, 2.8vw, 1.3rem);
    letter-spacing: 0.55em;
    font-weight: 300;
    margin-bottom: 0.4rem;
}

.hero__sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(0.82rem, 2.2vw, 0.98rem);
    font-weight: 300;
    opacity: 0.8;
    margin-bottom: 2.5rem;
}

/* Hero — GSAP controla la secuencia de entrada con mask reveals.
   Ocultamos el contenido sólo cuando GSAP confirma estar activo. */
.gsap-ready .hero__content { opacity: 0; }

/* Wrapper de máscara para reveals tipo cortina (overflow recorta el texto
   que aún no ha subido). GPU puro: sólo translate dentro del recorte. */
.mask-line {
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
}

.hero__cta {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 0.85rem 2.6rem;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--white);
    /* backdrop-filter eliminado — costoso en Safari durante el parallax del hero.
       Un fondo semi-translúcido logra un efecto similar sin repaints */
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hero__cta:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--white);
}

.hero__scroll {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero__scroll span {
    display: block;
    width: 1px;
    height: 55px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.55));
    animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ════════════════════════════════════════
   CUENTA REGRESIVA
════════════════════════════════════════ */
.countdown-wrap {
    background: var(--forest);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.countdown-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(201, 160, 85, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

.countdown-wrap .container {
    padding: 50px 20px;
    position: relative;
    z-index: 1;
}

.countdown {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(0.5rem, 3vw, 2.8rem);
    flex-wrap: nowrap;   /* nunca salta de línea */
}

.countdown__unit {
    text-align: center;
    min-width: 0;        /* permite que se encojan para caber */
    flex: 0 1 auto;
}

.countdown__num {
    display: block;
    font-family: var(--font-serif);
    /* escala con el ancho — los 4 bloques + 3 separadores caben en una línea */
    font-size: clamp(1.8rem, 10.5vw, 6rem);
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
    letter-spacing: -0.02em;
}

.countdown__lbl {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.6rem;
}

.countdown__sep {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 5.5vw, 4.5rem);
    color: var(--gold);
    opacity: 0.35;
    line-height: 1;
    margin-top: 0.1em;
}

/* ════════════════════════════════════════
   TARJETA DE INVITACIÓN
════════════════════════════════════════ */
.invite-section {
    background: var(--cream);
    position: relative;
    overflow: hidden;   /* contiene las flores, evita scroll horizontal */
}

.invite-section .container {
    padding: 55px 20px;
    position: relative;
    z-index: 3;   /* tarjeta por encima de las flores */
}

.invite-card {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    padding: clamp(2.5rem, 8vw, 5rem) clamp(1.8rem, 7vw, 5rem);
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.06);
}

/* Tarjeta verde musgo */
.invite-card--green {
    background: #8B9A6B;
    border-color: #6E7C50;
}
.invite-card--green::after {
    border-color: rgba(255, 255, 255, 0.28);
}
/* Texto claro sobre el musgo para buena legibilidad */
.invite-card--green .invite-card__text { color: #FAF7EE; }
.invite-card--green .invite-card__names { color: #FFFFFF; }
.invite-card--green .invite-card__date  { color: #EDE6D2; }
.invite-card--green .invite-card__ornament { color: var(--gold-light); }
.invite-card--green .invite-card__line { background: var(--gold-light); }
.invite-card--green .invite-card__names em { color: var(--gold-light); }

/* Flores decorativas grandes en las esquinas de la sección */
.invite-flower {
    position: absolute;
    width: clamp(150px, 32vw, 320px);
    height: auto;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.22));
}
.invite-flower--tl {
    top: -10px;
    left: -10px;
    transform: rotate(180deg);
}
.invite-flower--br {
    bottom: -10px;
    right: -10px;
    transform: rotate(0deg);
}
/* Cuando GSAP está activo, parten ocultas (las anima al entrar) */
.gsap-ready .invite-flower { opacity: 0; }

@media (max-width: 560px) {
    .invite-flower { width: clamp(120px, 36vw, 170px); opacity: 0.9; }
}

.invite-card::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(201, 160, 85, 0.22);
    pointer-events: none;
}

.invite-card__ornament {
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 0.8em;
    margin: 0.5rem 0;
    opacity: 0.7;
}

.invite-card__text {
    font-size: clamp(1rem, 2.6vw, 1.18rem);
    line-height: 1.9;
    color: #3a3a3a;
    margin: 1.5rem 0;
    font-weight: 400;
    max-width: 30em;
    margin-left: auto;
    margin-right: auto;
}

.invite-card__line {
    width: 70px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
    margin: 1.5rem auto;
}

.invite-card__names {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 6vw, 2.9rem);
    color: var(--forest);
    font-weight: 600;
    line-height: 1.1;
}

.invite-card__names em {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--gold);
    font-weight: 300;
}

.invite-card__date {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--sage);
    margin-top: 1.2rem;
}

/* ════════════════════════════════════════
   GALERÍA
════════════════════════════════════════ */
.gallery-section {
    background: var(--cream-dark);
    padding: 50px 0 0;
}

.gallery-header {
    text-align: center;
    padding: 0 20px;
    margin-bottom: 2rem;
}

/* ════════════════════════════════════════
   GALERÍA — GRID DESKTOP (diseño original)
   "g1 g2 g3"
   "g1 g4 g4"   ← gallery4 panorámica (span 2)
   "g5 tr tr"   ← g5 + trío en la misma fila
════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 240px);
    grid-template-areas:
        "g1 g2 g3"
        "g1 g4 g4"
        "g5 tr tr";
}

.gi-1   { grid-area: g1; }
.gi-2   { grid-area: g2; }
.gi-3   { grid-area: g3; }
.gi-4   { grid-area: g4; }
.gi-5   { grid-area: g5; }
.gi-trio{ grid-area: tr; }

.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-reveal {
    width: 100%;
    height: 100%;
    will-change: transform;
}

.gallery-reveal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.gallery-trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    overflow: hidden;
}

.gallery-trio .gallery-item {
    overflow: hidden;
    height: 100%;
    position: relative;
}

/* ════════════════════════════════════════
   GALERÍA — GRID MÓVIL (independiente del desktop)
   "g1 g2"
   "g3 g5"
   "g4 g4"   ← gallery4 panorámica, banda baja
   "tr tr"   ← trío ancho completo
════════════════════════════════════════ */
@media (max-width: 580px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 180px 180px 130px 150px;
        grid-template-areas:
            "g1 g2"
            "g3 g5"
            "g4 g4"
            "tr tr";
    }
}

/* ════════════════════════════════════════
   PROGRAMA DEL DÍA
════════════════════════════════════════ */
.program-section {
    position: relative;
    overflow: hidden;
}

.program-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.program-bg img {
    width: 100%;
    height: 120%;
    top: -10%;
    position: relative;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.45);
}

.program-bg__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 22, 10, 0.7) 0%,
        rgba(15, 22, 10, 0.55) 50%,
        rgba(15, 22, 10, 0.75) 100%
    );
}

.program-container {
    position: relative;
    z-index: 1;
    padding: 55px 20px;
}

/* TIMELINE */
.timeline {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(201, 160, 85, 0.35);
    transform: translateX(-50%);
}

.timeline__item {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3.2rem;
    position: relative;
}

/* Odd items: time on LEFT, content on RIGHT */
.timeline__item.tl-left .tl__time   { text-align: right; grid-column: 1; grid-row: 1; }
.timeline__item.tl-left .tl__dot    { grid-column: 2; grid-row: 1; }
.timeline__item.tl-left .tl__body   { text-align: left; grid-column: 3; grid-row: 1; }

/* Even items: content on LEFT, time on RIGHT */
.timeline__item.tl-right .tl__body  { text-align: right; grid-column: 1; grid-row: 1; }
.timeline__item.tl-right .tl__dot   { grid-column: 2; grid-row: 1; }
.timeline__item.tl-right .tl__time  { text-align: left; grid-column: 3; grid-row: 1; }

.tl__time {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 4.5vw, 2.1rem);
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
}

.tl__time small {
    font-size: 0.55em;
    opacity: 0.65;
}

.tl__dot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--cream);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 5px rgba(201, 160, 85, 0.18), 0 4px 14px rgba(0,0,0,0.25);
    border: 1px solid var(--gold-light);
}
.tl__dot img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}
/* Iconos con mucho margen interno — se agrandan para igualar */
.tl__dot--big img {
    width: 52px;
    height: 52px;
}

.tl__body h3 {
    font-family: var(--font-serif);
    font-size: clamp(0.92rem, 2.4vw, 1.08rem);
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.tl__body p {
    font-family: var(--font-serif);
    font-size: clamp(0.78rem, 1.9vw, 0.88rem);
    font-style: italic;
    color: rgba(255, 255, 255, 0.48);
}

/* Mobile timeline: icono sobre la línea a la izquierda, contenido a la derecha */
@media (max-width: 560px) {
    .timeline::before {
        left: 30px;
        transform: none;
    }

    .timeline__item {
        grid-template-columns: 60px 1fr;
        column-gap: 1.1rem;
        row-gap: 0;
        align-items: center;
        margin-bottom: 2.2rem;
    }

    .timeline__item .tl__dot {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: center;
        width: 56px;
        height: 56px;
    }
    .tl__dot img { width: 36px; height: 36px; }
    .tl__dot--big img { width: 48px; height: 48px; }

    .timeline__item.tl-left .tl__time,
    .timeline__item.tl-right .tl__time {
        grid-column: 2; grid-row: 1;
        text-align: left; font-size: 1.15rem;
        margin-bottom: 0.1rem;
    }
    .timeline__item.tl-left .tl__body,
    .timeline__item.tl-right .tl__body {
        grid-column: 2; grid-row: 2;
        text-align: left;
    }

    .tl__time small { font-size: 0.5em; }
}

/* ════════════════════════════════════════
   VENUES
════════════════════════════════════════ */
.venues-section {
    background: var(--cream);
}

.venues-section .container {
    padding: 55px 20px;
}

.venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.venue-card {
    background: var(--white);
    border: 1px solid #EAE0D5;
    padding: clamp(2.5rem, 6vw, 3.5rem) 2.5rem;
    text-align: center;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.venue-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
}

.venue-card__icon {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 1.2rem;
}

.venue-card__tag {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.venue-card__name {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 4vw, 1.75rem);
    font-weight: 400;
    color: var(--forest);
    line-height: 1.35;
    margin-bottom: 0.9rem;
}

.venue-card__time {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--sage);
    margin-bottom: 2rem;
}

.venue-card__btn {
    display: inline-block;
    background: var(--forest);
    color: var(--white);
    padding: 0.8rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: background 0.3s ease, transform 0.2s ease;
}

.venue-card__btn:hover {
    background: var(--sage);
    transform: translateY(-1px);
}

/* ════════════════════════════════════════
   DETALLES
════════════════════════════════════════ */
.details-section {
    background: var(--cream);
}

.details-section .container {
    padding: 55px 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.detail-card {
    background: var(--white);
    border: 1px solid #EAE0D5;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s var(--ease-out);
}

.detail-card:hover {
    transform: translateY(-4px);
}

.detail-card__icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 1.1rem;
}

.detail-card__title {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    font-weight: 500;
}

.detail-card__text {
    font-family: var(--font-serif);
    font-size: clamp(0.92rem, 2.3vw, 1.05rem);
    line-height: 1.8;
    color: #555;
    font-weight: 300;
}

.detail-card__text em {
    font-style: italic;
    color: var(--sage);
    font-size: 0.9em;
}

/* ════════════════════════════════════════
   RSVP
════════════════════════════════════════ */
.rsvp-section {
    position: relative;
    overflow: hidden;
}

.rsvp-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rsvp-bg img {
    width: 100%;
    height: 120%;
    top: -10%;
    position: relative;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.28);
}

.rsvp-bg__veil {
    position: absolute;
    inset: 0;
    background: rgba(15, 22, 10, 0.72);
}

.rsvp-container {
    position: relative;
    z-index: 1;
    padding: 55px 20px;
}

.rsvp-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-field input,
.form-field select {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--white);
    padding: 1rem 1.3rem;
    font-family: var(--font-serif);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.form-field input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.form-field select option {
    background: #1a2a15;
    color: var(--white);
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
}

.rsvp-submit {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 1.05rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 0.3rem;
}

.rsvp-submit:hover {
    background: #b8902a;
    transform: translateY(-1px);
}

.rsvp-submit:active {
    transform: translateY(0);
}

/* Bloque CTA con botón que redirige al Google Form */
.rsvp-cta {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}
.rsvp-cta__text {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.6vw, 1.15rem);
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 2.2rem;
}
.rsvp-submit--link {
    display: inline-block;
    text-decoration: none;
    padding: 1.1rem 3rem;
}

.rsvp-thanks {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold-light);
    font-size: 1rem;
    min-height: 1.5rem;
}

/* ════════════════════════════════════════
   MÚSICA
════════════════════════════════════════ */
.music-section {
    background: var(--cream-dark);
}

.music-container {
    padding: 55px 20px;
}

.music-player {
    max-width: 680px;
    margin: 0 auto;
}

.music-player__wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.music-player__wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ════════════════════════════════════════
   CIERRE
════════════════════════════════════════ */
.closing-section {
    position: relative;
    height: 100svh;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.closing-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.closing-bg img {
    width: 100%;
    height: 120%;
    top: -10%;
    position: relative;
    object-fit: cover;
    object-position: center;
}

.closing-bg__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.65) 100%
    );
}

.closing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 2rem 2rem 3.5rem;
}

.closing-pre {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 300;
    opacity: 0.82;
    margin-bottom: 1rem;
}

.closing-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-family: var(--font-script);
    font-size: clamp(2.6rem, 9vw, 5rem);
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
    perspective: 600px;
}

.closing-names em {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: var(--gold-light);
    margin: -0.6rem 0;
}

.closing-date {
    font-family: var(--font-serif);
    font-size: clamp(0.85rem, 2.3vw, 1.1rem);
    letter-spacing: 0.55em;
    font-weight: 300;
    opacity: 0.75;
    margin-top: 1.2rem;
}

.closing-heart {
    font-size: 2.2rem;
    color: var(--blush-soft);
    margin-top: 1.8rem;
    display: block;
    animation: heartbeat 2.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.18); opacity: 1; }
}

/* ════════════════════════════════════════
   RESPONSIVE TWEAKS
════════════════════════════════════════ */
@media (max-width: 480px) {
    .invite-card {
        padding: 2.5rem 1.5rem;
    }
    .invite-card::after {
        inset: 6px;
    }
    .venue-card {
        padding: 2.5rem 1.8rem;
    }
    .countdown {
        gap: clamp(0.3rem, 1.8vw, 1.2rem);
    }
    .countdown__lbl {
        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }
}

/* ════════════════════════════════════════
   DRESS CODE — BOTÓN EN CARD
════════════════════════════════════════ */
.dc-btn {
    display: inline-block;
    margin-top: 1.2rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.6rem 1.4rem;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}
.dc-btn:hover {
    background: var(--gold);
    color: var(--white);
}
.dc-btn--close {
    border-color: var(--forest);
    color: var(--forest);
    margin-top: 0;
}
.dc-btn--close:hover {
    background: var(--forest);
    color: var(--white);
}

/* ════════════════════════════════════════
   DRESS CODE — MODAL
════════════════════════════════════════ */
.dc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dc-modal.open {
    pointer-events: all;
    opacity: 1;
}

.dc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 5, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dc-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    max-height: 92svh;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    transform: translateY(40px);
    transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
    border-radius: 12px 12px 0 0;
}
.dc-modal.open .dc-modal__panel {
    transform: translateY(0);
}

.dc-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--cream-dark);
    background: var(--white);
    color: var(--dark);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}
.dc-modal__close:hover { background: var(--cream-dark); }

.dc-modal__scroll {
    overflow-y: auto;
    padding: 2.5rem 2rem 2rem;
    -webkit-overflow-scrolling: touch;
}
/* Handle delgado y elegante en el scroll */
.dc-modal__scroll::-webkit-scrollbar { width: 4px; }
.dc-modal__scroll::-webkit-scrollbar-track { background: transparent; }
.dc-modal__scroll::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

.dc-modal__header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--cream-dark);
}
.dc-modal__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.dc-modal__title {
    font-family: var(--font-script);
    font-size: clamp(2rem, 6vw, 2.8rem);
    color: var(--forest);
    line-height: 1;
    margin-bottom: 0.4rem;
}
.dc-modal__sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--sage);
}

/* Secciones internas */
.dc-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--cream-dark);
}
.dc-section:last-of-type { border-bottom: none; }

.dc-section__title {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.9rem;
}
.dc-section__text {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    font-weight: 300;
}
.dc-section__text strong {
    font-weight: 500;
    color: var(--forest);
}

/* Paleta de colores */
.dc-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.dc-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: #666;
    text-align: center;
}
.dc-color__swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* Estampados redondos (Damas) */
.dc-patterns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.9rem;
    margin-top: 1.2rem;
}
.dc-pattern {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border: 2px solid var(--white);
}
.dc-pattern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Evitar / No permitido — círculos iguales a los estampados (68px) */
.dc-avoid-label {
    margin-top: 1.6rem;
    margin-bottom: 0;
    font-weight: 500;
    color: #C0392B;
}
.dc-avoid-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.4rem;
    margin-top: 1rem;
}
.dc-avoid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 110px;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: #666;
    text-align: center;
}
.dc-avoid-item small {
    font-size: 0.92em;
    opacity: 0.8;
    line-height: 1.3;
    display: inline-block;
    margin-top: 0.15rem;
}
.dc-avoid-item .dc-color__swatch {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}
.dc-swatch-icon {
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Imágenes de ejemplo vestidos */
.dc-dress-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.2rem;
}
.dc-dress-img {
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 6px;
    background: var(--cream-dark);
}
.dc-dress-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer del modal */
.dc-modal__footer {
    text-align: center;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.dc-modal__footer p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--sage);
}

/* ════════════════════════════════════════
   AGRADECIMIENTO (post-boda)
════════════════════════════════════════ */
.thankyou-section {
    position: relative;
    min-height: 100svh;
    display: none;            /* oculta por defecto — solo aparece en modo post-boda */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}
/* El JS añade .mode-postwedding al <html> desde el 6 de Septiembre */
.mode-postwedding .thankyou-section {
    display: flex;
}
.thankyou-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.thankyou-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}
.thankyou-bg__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.7) 100%);
}
.thankyou-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    padding: 3rem 1.8rem;
    max-width: 620px;
}
.thankyou-pre {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(0.95rem, 2.6vw, 1.2rem);
    opacity: 0.85;
    margin-bottom: 1.2rem;
}
.thankyou-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-family: var(--font-script);
    font-size: clamp(3.2rem, 11vw, 6rem);
    text-shadow: 0 4px 40px rgba(0,0,0,0.35);
    margin-bottom: 1.8rem;
}
.thankyou-names em {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--gold-light);
    margin: -0.4rem 0;
}
.thankyou-text {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.6vw, 1.18rem);
    font-weight: 300;
    line-height: 2;
    opacity: 0.92;
}
.thankyou-heart {
    font-size: 2rem;
    color: var(--blush-soft);
    margin-top: 1.8rem;
    animation: heartbeat 2.5s ease-in-out infinite;
}

/* ════════════════════════════════════════
   BOTÓN MÚSICA FLOTANTE
════════════════════════════════════════ */
.music-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(15, 10, 5, 0.78);
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s var(--ease-out),
                background 0.3s ease,
                opacity 0.5s ease;
    animation: fab-pulse 3s ease-in-out infinite;
}

.music-fab:hover {
    background: rgba(201, 160, 85, 0.18);
    transform: scale(1.08);
}

.music-fab.playing {
    border-color: var(--gold);
    animation: fab-spin-stop 0.4s ease forwards, fab-playing 3s ease-in-out 0.4s infinite;
}

.music-fab.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
}

.music-fab__note {
    font-size: 1.2rem;
    line-height: 1;
    display: block;
    margin-left: 3px; /* ▶ tiene offset visual a la izquierda */
}

.music-fab__label {
    font-family: var(--font-sans);
    font-size: 0.42rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: block;
    color: rgba(201, 160, 85, 0.8);
}

@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(201,160,85,0.5); }
    50%       { box-shadow: 0 0 0 10px rgba(201,160,85,0);   }
}

@keyframes fab-playing {
    0%, 100% { box-shadow: 0 0 0 0   rgba(201,160,85,0.3); }
    50%       { box-shadow: 0 0 0 6px rgba(201,160,85,0);   }
}

@media (prefers-reduced-motion: reduce) {
    .petal,
    .hero__scroll span,
    .closing-heart {
        animation: none;
    }
    .reveal,
    .tl-left,
    .tl-right {
        transition: none;
    }
    .gallery-item img {
        transition: none;
    }
}
