/* ================= DESIGN SYSTEM & VARIÁVEIS (TEAL & GOLD PREMIUM) ================= */
:root {
    --bg-cream: #faf7f2;
    --bg-card: #ffffff;
    
    /* Tom solicitado pelo casal: Verde Petróleo / Teal de Luxo */
    --teal: #163B43; 
    --teal-light: #e8eff1; /* Fundo suave com matiz azulada */
    --teal-dark: #0d252a;
    --teal-opacity: rgba(22, 59, 67, 0.08);
    
    /* Ouro Imperial */
    --gold: #cfac62;
    --gold-light: #f5ebd5;
    --gold-dark: #b89146;
    --border-gold: rgba(207, 172, 98, 0.3);
    
    --text-color: #233133; /* Texto escuro com base teal */
    --text-light: #596b6e;
    --border-color: rgba(22, 59, 67, 0.15);
    
    --font-serif-title: 'Great Vibes', cursive;
    --font-serif-body: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    
    --shadow-soft: 0 10px 30px rgba(22, 59, 67, 0.03);
    --shadow-medium: 0 15px 45px rgba(22, 59, 67, 0.08);
    --shadow-wax: 0 5px 15px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

/* ================= RESET & ESTILOS GERAIS ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-color);
    font-family: var(--font-serif-body);
    font-size: 1.15rem;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle, rgba(253,251,248,1) 0%, rgba(242,238,227,1) 100%);
}

/* Canvas para Partículas de Folhas de Ouro */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

/* ================= PLAYER DE MÚSICA FLUTUANTE ================= */
.music-control {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-disc {
    width: 50px;
    height: 50px;
    background-color: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    box-shadow: 0 4px 15px rgba(22, 59, 67, 0.12);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-disc i {
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Animação de rotação quando tocando */
.music-control.playing .music-disc {
    animation: rotateDisc 4s linear infinite;
    background-color: var(--teal);
    color: var(--gold-light);
    border-color: var(--gold);
}

.music-tooltip {
    position: absolute;
    right: 65px;
    background-color: var(--teal);
    color: var(--gold-light);
    border: 1px solid var(--gold);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px);
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.music-control:hover .music-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================= ENVELOPE INTERATIVO (TEAL LUXO) ================= */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(250, 247, 242, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), visibility 1.2s;
}

.envelope-wrapper {
    perspective: 1000px;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.envelope {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px; /* Aumentado de 350px para 400px para dar bastante respiro para o texto */
    background: #0b1f22; /* Fundo Deep Teal exato da imagem */
    border: 1.5px solid #d5b368; /* Borda dourada exata */
    border-radius: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 15px; /* Reduzido de 35px para colar o bloco de texto mais no fundo do envelope e afastar do selo! */
}

.envelope:hover {
    transform: translateY(-5px);
}

/* Aba Superior do Envelope */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 52%; /* Aba ligeiramente menor para abrir espaço embaixo */
    transform-origin: top;
    z-index: 3;
    transition: transform 0.8s ease-in-out;
}

/* Laterais e Base do Envelope */
.envelope-pocket {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Selo de Cera Dourado Metálico 3D */
.wax-seal {
    position: absolute;
    top: 52%; /* Acompanha a ponta da aba */
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 86px; 
    height: 86px;
    background: radial-gradient(circle at 30% 30%, #f9e29a 0%, #d5b368 30%, #b38e41 70%, #59441a 100%);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.7), inset 0 -3px 8px rgba(0, 0, 0, 0.7);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.wax-seal-inner {
    width: 68px; 
    height: 68px;
    background: radial-gradient(circle at 70% 70%, #d5b368 0%, #b38e41 50%, #f9e29a 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.5), 0 1px 2px rgba(255,255,255,0.5);
}

.seal-ornament {
    font-size: 0.6rem;
    color: #4a3812;
    opacity: 0.85;
}

.wax-seal .monogram {
    font-family: var(--font-serif-body); /* Fonte Serif igual a imagem! */
    font-size: 1.65rem; 
    font-weight: 500;
    color: #fcf1d2; /* Dourado muito claro para contraste no metálico */
    text-shadow: 0 1px 2px rgba(0,0,0,0.4), inset 0 -1px 1px rgba(0,0,0,0.3);
    letter-spacing: 1px; 
    line-height: 1.1;
    margin: 2px 0;
}

.wax-seal:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
}

/* Animação do Pulso */
.pulse {
    animation: sealPulse 1.8s infinite ease-in-out;
}

@keyframes sealPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Textos no Envelope */
.envelope-text {
    z-index: 10;
    text-align: center;
    color: #d5b368;
    pointer-events: none;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px; /* Respiro equilibrado sem empurrar o texto para cima */
    width: 90%; 
}

.invite-recipient {
    font-family: var(--font-serif-body);
    font-size: 0.8rem; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px; 
    color: #d5b368;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    margin-bottom: 0;
    line-height: 1.4;
}

.envelope-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d5b368;
    opacity: 0.8;
}

.env-line {
    width: 80px;
    height: 1px;
    background-color: #d5b368;
}

.env-icon {
    font-size: 0.7rem;
}

.click-to-open {
    font-family: var(--font-serif-body);
    font-size: 1.25rem;
    font-style: italic;
    color: #d5b368;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* ================= RESPONSIVIDADE DO ENVELOPE ================= */
@media (max-width: 500px) {
    .envelope {
        height: 340px; 
        padding-bottom: 12px; /* Força o bloco de texto e botão para a borda inferior, fugindo do selo */
    }
    .envelope-flap {
        height: 50%; 
    }
    .wax-seal {
        top: 50%;
        width: 72px; 
        height: 72px;
    }
    .wax-seal-inner {
        width: 56px;
        height: 56px;
    }
    .wax-seal .monogram {
        font-size: 1.35rem;
    }
    .invite-recipient {
        font-size: 0.65rem; 
        letter-spacing: 2px; 
    }
    .envelope-text {
        gap: 10px; /* Reduz ligeiramente o espaço interno para não subir em direção ao selo */
    }
    .click-to-open {
        font-size: 1.1rem;
    }
}

.click-to-open i {
    margin-right: 6px;
    color: #d5b368;
}

/* Estado de Envelope Aberto (Transições) */
.envelope-overlay.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope.open-anim .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1; /* Passa para trás do card */
}

.envelope.open-anim .wax-seal {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.envelope.open-anim .envelope-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}


/* ================= CARD DO CONVITE PRINCIPAL ================= */
.invitation-container {
    width: 100%;
    max-width: 680px;
    margin: 40px 20px;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-medium);
    border-radius: 12px;
    position: relative;
    z-index: 10;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.container-hidden {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
}

/* Molduras e Bordas Luxuosas */
.invitation-border-outer {
    padding: 12px;
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    margin: 12px;
}

.invitation-border-inner {
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: 50px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: radial-gradient(#ffffff 60%, #fefcf9 100%);
}

@media (max-width: 600px) {
    .invitation-border-inner {
        padding: 35px 15px;
    }
    .invitation-border-outer {
        margin: 6px;
        padding: 6px;
    }
    .invitation-container {
        margin: 15px 10px;
    }
}

/* Molduras Florais em Aquarela nos Cantos */
.floral-corner {
    position: absolute;
    width: 90px;
    height: 90px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.85;
    pointer-events: none;
}

/* Usamos SVGs embebidos leves para desenhar ramos e folhas douradas nos cantos */
.floral-corner.top-left {
    top: 5px;
    left: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23cfac62'%3E%3Cpath d='M10,10 C25,25 35,5 50,15 C60,23 55,40 45,55 C35,70 15,80 10,85 C9,80 15,60 25,48 C35,36 30,22 10,10 Z' opacity='0.3'/%3E%3Cpath d='M5,5 C20,15 25,35 15,50 C8,60 2,75 5,80 C15,65 30,55 35,40 C40,25 25,12 5,5 Z' opacity='0.4'/%3E%3C/svg%3E");
}

.floral-corner.top-right {
    top: 5px;
    right: 5px;
    transform: scaleX(-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23cfac62'%3E%3Cpath d='M10,10 C25,25 35,5 50,15 C60,23 55,40 45,55 C35,70 15,80 10,85 C9,80 15,60 25,48 C35,36 30,22 10,10 Z' opacity='0.3'/%3E%3Cpath d='M5,5 C20,15 25,35 15,50 C8,60 2,75 5,80 C15,65 30,55 35,40 C40,25 25,12 5,5 Z' opacity='0.4'/%3E%3C/svg%3E");
}

.floral-corner.bottom-left {
    bottom: 5px;
    left: 5px;
    transform: scaleY(-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23cfac62'%3E%3Cpath d='M10,10 C25,25 35,5 50,15 C60,23 55,40 45,55 C35,70 15,80 10,85 C9,80 15,60 25,48 C35,36 30,22 10,10 Z' opacity='0.3'/%3E%3Cpath d='M5,5 C20,15 25,35 15,50 C8,60 2,75 5,80 C15,65 30,55 35,40 C40,25 25,12 5,5 Z' opacity='0.4'/%3E%3C/svg%3E");
}

.floral-corner.bottom-right {
    bottom: 5px;
    right: 5px;
    transform: scale(-1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23cfac62'%3E%3Cpath d='M10,10 C25,25 35,5 50,15 C60,23 55,40 45,55 C35,70 15,80 10,85 C9,80 15,60 25,48 C35,36 30,22 10,10 Z' opacity='0.3'/%3E%3Cpath d='M5,5 C20,15 25,35 15,50 C8,60 2,75 5,80 C15,65 30,55 35,40 C40,25 25,12 5,5 Z' opacity='0.4'/%3E%3C/svg%3E");
}

/* Cabeçalho do Convite */
.invite-header {
    text-align: center;
    margin-bottom: 25px;
}

.monogram-frame {
    display: inline-block;
    border: 1px solid var(--gold);
    border-radius: 50%;
    padding: 12px 20px;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--gold-dark);
    position: relative;
    margin-bottom: 12px;
}

.monogram-frame::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 0.5px solid var(--border-gold);
    border-radius: 50%;
}

.sub-header-date {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-light);
}

/* Corpo do Convite */
.invite-body {
    text-align: center;
    width: 100%;
}

.invite-intro {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.couple-names {
    font-family: var(--font-serif-title);
    font-size: 4.8rem;
    font-weight: normal;
    color: var(--teal); /* Nome do Casal em Teal Luxo */
    margin: 28px 0 28px 0; /* Aumentado o espaço superior de 5px para 28px para evitar sobreposição */
    text-shadow: 1px 1px 1px rgba(255,255,255,0.9);
    line-height: 1.1;
}

@media (max-width: 600px) {
    .couple-names {
        font-size: 3.4rem;
        margin: 20px 0 20px 0; /* Ajustado espaço no mobile também */
    }
}

.invite-phrase {
    max-width: 480px;
    margin: 0 auto 30px auto;
    font-size: 1.22rem;
    color: var(--text-color);
    font-style: italic;
    font-weight: 300;
}

/* Divisor Decorativo de Folhas */
.divider-leaves {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0 35px 0;
    color: var(--gold);
}

.divider-leaves .line {
    width: 50px;
    height: 1px;
    background-color: var(--border-gold);
    margin: 0 15px;
}

.divider-leaves i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ================= TIMER REGRESSIVO ================= */
.countdown-section {
    background-color: var(--teal-light); /* Fundo com base teal suave */
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid rgba(22, 59, 67, 0.12);
}

.countdown-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--teal);
    margin-bottom: 15px;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.time-num {
    font-family: var(--font-serif-body);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--teal-dark);
    line-height: 1.1;
}

.time-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-top: 4px;
}

@media (max-width: 480px) {
    #countdown-timer {
        gap: 15px;
    }
    .time-box {
        min-width: 45px;
    }
    .time-num {
        font-size: 1.8rem;
    }
}

/* ================= CARTÕES DE DETALHES ================= */
.details-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 45px;
    width: 100%;
}

@media (max-width: 600px) {
    .details-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.detail-card {
    background-color: var(--teal-light); /* Soft Teal cards */
    border: 1px solid rgba(22, 59, 67, 0.1);
    border-radius: 8px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(22, 59, 67, 0.08);
}

.detail-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    border: 1.5px solid var(--gold);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.detail-card h4 {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--teal);
    margin-bottom: 12px;
}

.detail-time {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--teal-dark);
    margin-bottom: 8px;
}

.detail-place {
    font-size: 1.15rem;
    color: var(--gold-dark);
    font-style: italic;
    margin-bottom: 5px;
}

.detail-address {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-light);
    line-height: 1.5;
    max-width: 220px;
}

/* Link do GPS do Casal */
.maps-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--teal);
    text-decoration: none;
    margin-top: 15px;
    padding: 6px 14px;
    border: 1px solid var(--teal);
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: #fff;
    cursor: pointer;
}

.maps-link:hover {
    background-color: var(--teal);
    color: #fff;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(22, 59, 67, 0.2);
}

/* ================= BOTÕES DE AÇÃO INTERATIVOS ================= */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.btn-invite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1.5px solid transparent;
}

/* Botão Teal (RSVP) */
.btn-primary-chumbo {
    background-color: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.btn-primary-chumbo:hover {
    background-color: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 59, 67, 0.25);
}

/* Botão Dourado (Lista de Presentes) */
.btn-gold {
    background-color: var(--gold);
    color: #fff;
    animation: goldPulse 2.5s infinite;
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(207, 172, 98, 0.25);
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(207, 172, 98, 0.2); }
    50% { box-shadow: 0 4px 22px rgba(207, 172, 98, 0.45); }
}

/* Botão Contorno Teal (Mural de Recados) */
.btn-secondary-rose {
    background-color: transparent;
    color: var(--teal);
    border-color: var(--teal);
}

.btn-secondary-rose:hover {
    background-color: var(--teal);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 59, 67, 0.15);
}

/* Rodapé do Convite */
.invite-footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid var(--border-gold);
    padding-top: 25px;
    width: 100%;
}

.hashtag {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold-dark);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.footer-note {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}
