/* ===== FUENTE SCRIPT ===== */
@font-face {
    font-family: 'Eternal Blossom';
    src: url('fonts/eternalblossomalt.woff2') format('woff2'),
         url('fonts/eternalblossomalt.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}

/* ===== VARIABLES AMALFI ===== */
:root {
    --dark-blue: #21325E;
    --med-blue:  #3E497A;
    --yellow:    #F1D00A;
    --bg-light:  #fdfcf7; /* Un tono marfil muy sutil para el fondo */
    --text-main: #21325E;
    --text-soft: #5a668c;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ===== BODY ===== */
body {
    /* Cambiado a Cormorant Garamond */
    font-family: 'Cormorant Garamond', serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

body::before {
    content: "";
    position: fixed; inset: 0; z-index: 0;
    /* Puedes poner un fondo de textura de papel acuarela o rayas azules muy tenues */
    background-image: url('assets/BG_amalfi.png'); 
    background-size: cover; background-position: center;
    opacity: 0.15; pointer-events: none;
}

/* ===== DECORACIONES (Ajustadas para limones y azulejos) ===== */
.deco {
    position: fixed;
    pointer-events: none;
    z-index: 1;
}

.deco-limon-top {
    right: -2vw; top: -2vh;
    width: clamp(150px, 25vw, 350px);
    opacity: 0.95;
    animation: drift 10s ease-in-out infinite;
}
.deco-azulejo-left {
    left: -5vw; top: 15vh;
    width: clamp(100px, 15vw, 250px);
    opacity: 0.85;
    animation: drift 12s ease-in-out infinite 1s;
}
.deco-azulejo-right {
    right: -5vw; bottom: 10vh;
    width: clamp(120px, 18vw, 280px);
    opacity: 0.85;
    animation: drift 11s ease-in-out infinite 2s;
}
.deco-aperol {
    left: 2vw; bottom: -2vh;
    width: clamp(50px, 15vw, 120px);
    opacity: 0.90;
    animation: drift 14s ease-in-out infinite;
    transform-origin: bottom;
}
.deco-ramita-olivo {
    left: 20vw; top: -3vh;
    width: clamp(80px, 12vw, 180px);
    opacity: 0.80;
    animation: starFloat 9s ease-in-out infinite;
}
.deco-limoncello {
    right: 15vw; top: 70vh;
    rotate: -10deg;
    width: clamp(60px, 10vw, 70px);
    opacity: 0.88;
    animation: drift 13s ease-in-out infinite 0.5s;
    
}

@keyframes drift {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-7px); }
}
@keyframes starFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(3deg); }
}

/* ===== CONTENEDOR ===== */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

/* ===== ETERNAL BLOSSOM ===== */
.main-title,
.sub-title,
.script-heading {
    font-family: 'Eternal Blossom', cursive;
    font-weight: lighter;
    color: var(--dark-blue);
}

/* ===== HERO ===== */
.hero { margin-bottom: 2.8rem; }

.pre-title {
    font-family: 'Eternal Blossom', cursive;
    font-size: 2rem;
    margin-bottom: -0.5rem;
    color: var(--yellow);
}

.main-title {
    font-size: 4rem;
    line-height: 1.0;
    white-space: nowrap;
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.sub-title {
    font-size: 2.8rem;
    line-height: 1.0;
    white-space: nowrap;
    color: var(--med-blue);
}

/* ===== COUNTDOWN ===== */
.countdown-section { margin: 0 0 2.8rem; }

.countdown-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-soft);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    font-family: 'Cormorant Garamond', sans-serif; /* Mantenemos sans-serif para lectura clara en números chicos */
}

.countdown-container { display: flex; justify-content: center; }

.countdown-item {
    display: flex; flex-direction: column; align-items: center;
    min-width: 55px; position: relative;
    font-family: 'Eternal Blossom', cursive;
}

.countdown-item small{
    font-family: 'Cormorant Garamond', serif;
}

.countdown-item:not(:last-child)::after {
    content: ":";
    position: absolute; right: -4px; top: 0px;
    font-size: 1.5rem; color: var(--dark-blue); opacity: 0.4;
    line-height: 1;
}

.countdown-item span {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--dark-blue);
    font-weight: 400;
}

.countdown-item small {
    font-size: 0.5rem; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-soft); margin-top: 5px;
}

/* ===== SEPARADOR ===== */
.soft-divider {
    font-size: 1.2rem;
    color: var(--yellow);
    opacity: 0.7;
    margin: 0 auto 2.5rem;
    user-select: none;
}

/* ===== INFO EVENTO ===== */
.event-info, .dress-code-section, .gifts-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 2.5rem;
}

.info-line {
    font-size: clamp(1.4rem, 4.5vw, 1.8rem);
    line-height: 1.4;
    font-family: 'Eternal Blossom', cursive;
}

.dc {
    font-family: 'Cormorant Garamond', serif;
}

.info-date { margin-bottom: 0.5rem; font-weight: 600;}
.info-time { font-size: clamp(1.3rem, 4vw, 1.6rem); margin-bottom: 1rem; opacity: 0.9;}
.info-place { line-height: 1.2; font-weight: 600;}

/* ===== DRESS CODE PALETTE ===== */
.section-title {
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.color-palette {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

.color-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(33, 50, 94, 0.15);
}

/* ===== MESA DE REGALOS ===== */
.buttons-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== BOTONES ===== */
.btn-ghost {
    display: inline-block;
    margin-top: 1rem;
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(33, 50, 94, 0.4);
    padding: 9px 20px;
    border-radius: 30px;
    transition: all 0.3s;
    font-family: 'Cormorant Garamond', sans-serif;
}
.btn-ghost:hover { opacity: 1; background: rgba(33, 50, 94, 0.05); }

/* ===== RSVP CONTENEDOR PREMIUM ===== */
.rsvp-simple {
    display: flex; 
    flex-direction: column;
    align-items: center; 
    width: 100%;
    padding: 1rem 0;
}

.rsvp-box {
    
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rsvp-box .script-heading {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.rsvp-box .instruction-text {
    font-size: 1.1rem;
    color: var(--text-soft);
    margin-bottom: 1rem;
}

.success-text {
    color: var(--yellow);
}

.custom-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* INPUT COMPLETO ESTILO LUXURY */
.input-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1.5px solid rgba(62, 73, 122, 0.25);
    background: transparent;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--dark-blue);
    outline: none;
    transition: border-color 0.3s;
    text-align: center;
}

.form-input::placeholder {
    color: rgba(62, 73, 122, 0.45);
    font-style: italic;
}

.form-input:focus {
    border-bottom-color: var(--dark-blue);
}

/* RADIO BUTTONS CUSTOMIZADOS (Elegantes) */
.radio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 0 auto;
    width: fit-content;
}

.radio-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    color: var(--dark-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    padding-left: 30px; /* Espacio para nuestro radio custom */
}

/* Ocultamos el radio nativo horrible */
.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* El círculo exterior */
.custom-radio {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1.5px solid var(--med-blue);
    border-radius: 50%;
    transition: all 0.25s ease;
}

/* Efecto hover sobre la opción */
.radio-label:hover input ~ .custom-radio {
    border-color: var(--yellow);
}

/* El punto del centro cuando se selecciona */
.custom-radio::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow); /* Amarillo Amalfi resalta hermoso sobre el azul */
}

/* Mostrar el punto interior al activarse */
.radio-label input:checked ~ .custom-radio::after {
    display: block;
}

/* Cambiar el borde del círculo exterior al activarse */
.radio-label input:checked ~ .custom-radio {
    border-color: var(--dark-blue);
}

/* BOTÓN DE RSVP */
.btn-rsvp {
    display: inline-block;
    background: var(--dark-blue);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 15px rgba(33, 50, 94, 0.15);
    font-family: 'Montserrat', sans-serif;
    margin-top: 5px;
    width: 100%;
}

.btn-rsvp:hover {
    background: var(--yellow);
    color: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 50, 94, 0.25);
}

.instruction-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-soft);
    margin: 0 auto 10px;
    margin-top: 2rem;
}

.custom-form {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(62, 73, 122, 0.3);
    border-radius: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--dark-blue);
    background: rgba(255, 255, 255, 0.6);
    outline: none;
    transition: border-color 0.3s;
}
.form-input:focus { border-color: var(--dark-blue); background: #fff;}

.radio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-left: 5px;
}

.radio-label {
    font-size: 1.2rem;
    color: var(--dark-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-label input[type="radio"] {
    accent-color: var(--yellow);
    transform: scale(1.2);
}

/* ===== FOOTER ===== */
footer { margin-top: 3rem; padding-bottom: 1rem; }
footer a {
    font-size: 0.55rem; letter-spacing: 3px;
    color: var(--text-soft); text-decoration: none;
    opacity: 0.6; transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}
footer a:hover { opacity: 1; color: var(--dark-blue); }

/* ===== ENTRADA ===== */
.fade-in > * {
    opacity: 0;
    animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-in > *:nth-child(1) { animation-delay: 0.08s; }
.fade-in > *:nth-child(2) { animation-delay: 0.20s; }
.fade-in > *:nth-child(3) { animation-delay: 0.32s; }
.fade-in > *:nth-child(4) { animation-delay: 0.44s; }
.fade-in > *:nth-child(5) { animation-delay: 0.56s; }
.fade-in > *:nth-child(6) { animation-delay: 0.68s; }
.fade-in > *:nth-child(7) { animation-delay: 0.80s; }
.fade-in > *:nth-child(8) { animation-delay: 0.92s; }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== MÓVIL ===== */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        padding: 3rem 2.5rem 2.5rem;
    }

    .main-title { font-size: 3.5rem; padding-top: 0.5rem;}
    .sub-title { font-size: 2.3rem;}

    .deco-limon-top     { width: 35vw; right: -5vw; }
    .deco-azulejo-left  { width: 25vw; left: -5vw; top: 23vh; }
    .deco-azulejo-right { width: 30vw; right: -5vw; bottom: 8vh; }
    .deco-aperol        { width: 25vw; left: -2vw; bottom: -2vh; }
    .deco-ramita-olivo  { width: 20vw; left: -3vw; top: 0vh; }
    .deco-limoncello    { width: 13vw; right: 0vw; top: 40vh; rotate: -10deg;}    
}