/* --- VARIÁVEIS --- */
:root {
    --bg-pistachio: #a4b494;
    --folder-olive: #556b2f;
    --paper-cream: #fbf9f5;
    --gold-accent: #c5a028;
    --seal-blush: #eec1c2;
    --seal-dark: #b88a8b;
}

/* --- GERAL --- */
body {
    background-color: var(--bg-pistachio);
    background-image: 
        linear-gradient(rgba(164, 180, 148, 0.85), rgba(164, 180, 148, 0.85)),
        url('../img/background.avif');
    background-size: 400px auto; 
    background-repeat: repeat;
    background-attachment: fixed;
    height: 100vh;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Mantém o convite sem barra de rolagem */
}

/* --- AJUSTE PARA A PÁGINA MANUAL --- */
/* Permite rolagem na página do manual */
body.manual-page {
    height: auto;
    overflow-y: auto;
    display: block;
}

.manual-content {
    background-color: var(--paper-cream);
    padding: 20px;
    border: 2px solid var(--gold-accent);
    border-radius: 4px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.manual-images img {
    width: 100%;
    height: auto;
    border: 1px solid #e0d8c8;
}

/* --- CONVITE PRINCIPAL --- */
.main-container {
    perspective: 1500px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.arrival-text {
    position: absolute;
    top: 5%;
    width: 100%;
    text-align: center;
    font-family: 'Cinzel Decorative', cursive;
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: opacity 0.5s;
    z-index: 5;
    pointer-events: none;
}
.fade-out { opacity: 0; }

.folder-wrapper {
    position: relative;
    width: 420px;
    height: 600px; 
    z-index: 10;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

/* CARTÃO INTERNO */
.invitation-card {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--paper-cream);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 1; 
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #e0d8c8;
    overflow: hidden; 
}

/* ABAS */
.flap {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 10;
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
    background-image: linear-gradient(rgba(85, 107, 47, 0.75), rgba(85, 107, 47, 0.75)), url('../img/texture.jpg');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.3);
    border: 1px solid #3e4d2a;
    overflow: hidden;
}
.left-flap { left: 0; transform-origin: left; border-radius: 4px 0 0 4px; border-right: 1px solid rgba(0,0,0,0.2); }
.right-flap { right: 0; transform-origin: right; border-radius: 0 4px 4px 0; border-left: 1px solid rgba(255,255,255,0.15); }

/* ADORNOS */
.foliage-on-flap { position: absolute; z-index: 5; pointer-events: none; filter: brightness(1.2) contrast(0.9); opacity: 0.8; }
.foliage-tl { top: 0; left: 0; width: 140px; }
.foliage-tr { top: 0; right: 0; width: 140px; }
.foliage-split-left { bottom: 0; right: 0; width: 280px; transform: translateX(50%); max-width: none; }
.foliage-split-right { bottom: 0; left: 0; width: 280px; transform: translateX(-50%); max-width: none; }

/* CONTEÚDO */
.card-content { position: relative; z-index: 5; padding: 30px 20px; width: 100%; }
.wax-seal-container {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 20; cursor: pointer; transition: all 0.5s ease;
    width: 120px; height: 120px; display: flex; justify-content: center; align-items: center;
}
.wax-seal-img { width: 100%; height: auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5)); transition: transform 0.4s ease; }
.wax-seal-container:hover .wax-seal-img { transform: scale(1.1); }

/* ANIMAÇÃO */
.folder-wrapper.open .left-flap { transform: rotateY(-140deg); }
.folder-wrapper.open .right-flap { transform: rotateY(140deg); }
.folder-wrapper.open .wax-seal-container { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.5); }
.folder-wrapper.open .invitation-card { box-shadow: 0 0 60px rgba(0,0,0,0.4); transition: box-shadow 1s ease 0.5s; }

/* TIPOGRAFIA */
.font-cinzel { font-family: 'Cinzel Decorative', cursive; letter-spacing: 1px; }
.text-gold { color: var(--gold-accent); }
.couple-names { font-family: 'Pinyon Script', cursive; font-size: 3.2rem; color: #333; margin: 10px 0; line-height: 1.1; }
.verse { font-style: italic; font-size: 0.8rem; color: #666; margin-bottom: 0; }
.verse-ref { color: var(--gold-accent); font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; }
.gold-divider { height: 1px; background: linear-gradient(to right, transparent, var(--gold-accent), transparent); width: 60%; margin: 15px auto; opacity: 0.6; }
.sub-date { font-family: 'Cinzel Decorative'; font-size: 1.2rem; color: var(--gold-accent); font-weight: 700; letter-spacing: 2px; }

/* BOTÕES */
.btn-gold-primary { background: var(--seal-blush); border: 1px solid var(--seal-dark); color: #fff; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; padding: 10px; text-decoration: none; display: inline-block; }
.btn-gold-primary:hover { background: var(--seal-dark); color: #fff; }
.btn-gold-outline { background: transparent; border: 1px solid var(--gold-accent); color: #444; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; padding: 10px; text-decoration: none; display: inline-block; }
.btn-gold-outline:hover { background: rgba(197, 160, 40, 0.1); color: #444; }

/* RESPONSIVIDADE */
@media (max-width: 600px) {
    .folder-wrapper { transform: scale(0.7); }
    .arrival-text { font-size: 1.5rem; top: 2%; }
    
    .folder-wrapper.open .left-flap { transform: rotateY(-170deg); }
    .folder-wrapper.open .right-flap { transform: rotateY(170deg); }
    
    .foliage-tl, .foliage-tr { width: 120px; }
    .foliage-split-left, .foliage-split-right { width: 240px; }
    .foliage-cb { max-height: 100px; }
    .card-content { padding-bottom: 40px; }
}
