@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
    --linho:     #f9f6f3;
    --algodao:   #f0e8e8;
    --manteiga:  #f5f0e8;
    --menta:     #e8ece8;
    --framboesa: #6b1a2a;
    --ameixa:    #1a1018;
    --creme:     #ffffff;
    --vinho:     #6b1a2a;
    --cinza:     #888080;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', sans-serif;
    /* raspadinhas (lidas pelo script.js) */
    --rasp-c1: #e8d4d8;
    --rasp-c2: #ede8dc;
    --rasp-c3: #dde4dd;
    --rasp-fill: #6b1a2a;
    --rasp-font: 300 16px 'DM Sans';
    --rasp-simbolo: '♥';
}

body {
    font-family: var(--font-body);
    color: var(--ameixa);
    min-height: 100vh;
    background-color: var(--linho);
    position: relative;
    overflow-x: hidden;
}

.icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; }

.ambiente { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.ambiente .icon { position: absolute; bottom: -10%; color: rgba(107, 26, 42, 0.08); animation: subir linear infinite; }
.ambiente .icon:nth-child(1) { left: 8%;  width: 12px; animation-duration: 20s; }
.ambiente .icon:nth-child(2) { left: 28%; width: 8px;  animation-duration: 16s; animation-delay: 4s; }
.ambiente .icon:nth-child(3) { left: 50%; width: 14px; animation-duration: 22s; animation-delay: 8s; }
.ambiente .icon:nth-child(4) { left: 72%; width: 7px;  animation-duration: 18s; animation-delay: 2s; }
.ambiente .icon:nth-child(5) { left: 90%; width: 10px; animation-duration: 20s; animation-delay: 6s; }
.ambiente .icon:nth-child(6) { left: 18%; width: 9px;  animation-duration: 17s; animation-delay: 11s; }
.ambiente .icon:nth-child(7) { left: 62%; width: 11px; animation-duration: 21s; animation-delay: 3s; }

@keyframes subir {
    0%   { transform: translateY(0);         opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-115vh);    opacity: 0; }
}

/* Fitas */
.fitas { position: fixed; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 3px; z-index: 100; }
.fita {
    display: block; padding: 8px 14px 8px 10px;
    background: var(--cor, var(--algodao));
    color: var(--ameixa); text-decoration: none;
    font-size: 0.68em; font-weight: 500; letter-spacing: 0.06em;
    writing-mode: vertical-rl; border-radius: 4px 0 0 4px;
    opacity: 0.6; transition: opacity 0.2s, transform 0.2s;
    border-left: 2px solid rgba(107,26,42,0.15);
}
.fita:hover { opacity: 1; transform: translateX(-4px); }

/* Capa */
.capa-toque {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: #f9f6f3;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 24px;
    cursor: pointer; border: none; z-index: 9999;
    transition: opacity 0.6s ease;
}
.capa-toque::before {
    content: '';
    position: absolute;
    top: 32px; left: 32px; right: 32px; bottom: 32px;
    border: 1px solid rgba(107,26,42,0.15);
    pointer-events: none;
}
.capa-toque .icon { width: 40px; height: 40px; color: var(--framboesa); animation: pulsar 3s ease-in-out infinite; }
@keyframes pulsar { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.1); opacity: 1; } }
.capa-toque-titulo {
    font-family: var(--font-display); font-size: 2.6em; font-weight: 400;
    color: var(--ameixa); letter-spacing: 0.02em;
}
.capa-toque-dica { font-size: 0.72em; color: var(--cinza); letter-spacing: 0.25em; text-transform: uppercase; }
.capa-toque.escondida { opacity: 0; pointer-events: none; }

/* Layout */
.album { position: relative; z-index: 2; }
.pagina { min-height: 100vh; padding: 80px 40px; max-width: 960px; margin: 0 auto; }
.capa { display: flex; align-items: center; justify-content: center; text-align: center; }
.hero { max-width: 640px; }

.hero-eyebrow {
    font-size: 0.72em; letter-spacing: 0.35em; text-transform: uppercase;
    color: var(--cinza); margin-bottom: 18px; font-weight: 300;
}
.hero-title {
    font-family: var(--font-display); font-size: 4.5em; font-weight: 400;
    line-height: 1.1; color: var(--ameixa); margin-bottom: 14px;
}
.hero-title em { font-style: italic; color: var(--framboesa); }
.hero-subtitle { font-size: 1em; font-weight: 300; color: var(--cinza); margin-bottom: 32px; }
.hero-text { font-size: 0.98em; line-height: 1.85; color: var(--cinza); max-width: 500px; margin: 0 auto 30px; font-weight: 300; }
.floating-elements { display: none; }
.rolar-dica { font-size: 0.7em; letter-spacing: 0.25em; text-transform: uppercase; color: var(--cinza); opacity: 0.5; margin-top: 56px; }

/* Seções */
.titulo-pagina { text-align: center; margin-bottom: 60px; }
.titulo-pagina h2 {
    font-family: var(--font-display); font-size: 2.4em; font-weight: 400;
    color: var(--ameixa); margin-bottom: 12px;
}
.titulo-pagina h2::after {
    content: ''; display: block; width: 32px; height: 1px;
    background: var(--framboesa); margin: 14px auto 0; opacity: 0.4;
}
.titulo-pagina p { font-size: 0.88em; color: var(--cinza); font-weight: 300; }

/* Bilhetes */
.mural-bilhetes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.bilhete {
    background: var(--cor, var(--algodao));
    border: 1px solid rgba(107,26,42,0.1);
    border-radius: 8px; padding: 28px 24px 32px;
    transform: rotate(var(--tilt, 0deg));
    box-shadow: 0 2px 16px rgba(26,16,24,0.06);
    position: relative;
}
.bilhete::before {
    content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 16px; background: var(--framboesa); border-radius: 50%; opacity: 0.6;
}
.bilhete p { font-size: 0.95em; line-height: 1.75; color: var(--ameixa); font-weight: 300; }
.bilhete-rabisco {
    display: block; margin-top: 16px;
    font-family: var(--font-display); font-style: italic; font-size: 1.05em;
    color: var(--framboesa);
}

/* Fotos */
.mural-fotos { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 215px; gap: 10px; }
.foto { position: relative; cursor: pointer; }
.foto--grande { grid-column: span 2; grid-row: span 2; }
.foto--larga  { grid-column: span 2; grid-row: span 1; }
.foto--alta   { grid-column: span 1; grid-row: span 2; }
.foto::before {
    content: '♥'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
    color: var(--framboesa); font-size: 0.75em; z-index: 2; opacity: 0.7;
}
.foto-moldura {
    width: 100%; height: 100%; border-radius: 8px; background: var(--creme);
    border: 1px solid rgba(107,26,42,0.08);
    box-shadow: 0 2px 12px rgba(26,16,24,0.08);
    display: flex; flex-direction: column; overflow: visible;
}
.foto-recorte { flex: 1; overflow: hidden; border-radius: 8px; display: flex; min-height: 0; }
.foto-recorte img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.foto:hover .foto-recorte img { transform: scale(1.03); }
.foto p { font-size: 0.7em; text-align: center; padding: 6px 4px; color: var(--cinza); font-weight: 300; }
.foto-placeholder {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; color: rgba(107,26,42,0.2); border: 1px dashed rgba(107,26,42,0.15);
    border-radius: 8px; font-size: 0.78em; text-align: center; padding: 12px; font-weight: 300;
}
.foto-placeholder .icon { width: 28px; height: 28px; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(249,246,243,0.97); z-index: 5000; align-items: center; justify-content: center; flex-direction: column; gap: 16px; }
.lightbox.active { display: flex; }
.lightbox-close {
    position: absolute; top: 20px; right: 20px; width: 52px; height: 52px;
    background: transparent; border: 1px solid rgba(107,26,42,0.2);
    color: var(--framboesa); font-size: 1.5em; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 40px rgba(26,16,24,0.12); }
.lightbox-caption { font-size: 0.82em; color: var(--cinza); font-weight: 300; }

/* Varal */
.varal { position: relative; }
.varal-corda { height: 1px; background: linear-gradient(90deg, transparent, rgba(107,26,42,0.15) 20%, rgba(107,26,42,0.15) 80%, transparent); margin-bottom: 28px; }
#varal-coracoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.varal-coracao {
    background: var(--cor, var(--creme));
    border: 1px solid rgba(107,26,42,0.08);
    border-radius: 10px; padding: 24px 20px; text-align: center;
    box-shadow: 0 2px 12px rgba(26,16,24,0.06);
}
.varal-coracao .icon { width: 24px; height: 24px; color: var(--framboesa); margin-bottom: 10px; opacity: 0.6; }
.varal-coracao h3 { font-family: var(--font-display); font-size: 1.05em; font-style: italic; margin-bottom: 8px; color: var(--framboesa); }
.varal-coracao p { font-size: 0.87em; line-height: 1.7; color: var(--cinza); font-weight: 300; }

/* Raspadinhas */
.raspadinhas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px; justify-items: center; }
.raspadinha { position: relative; width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 4px 12px rgba(26,16,24,0.1)); }
.raspadinha-texto {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 16px;
    font-family: var(--font-display); font-size: 1em; font-style: italic;
    color: var(--framboesa); background: var(--creme);
    clip-path: path("M85,149.6 C85,149.6 17,85 17,49.3 C17,25.5 42.5,8.5 68,17 C81.6,22.1 85,34 85,34 C85,34 88.4,22.1 102,17 C127.5,8.5 153,25.5 153,49.3 C153,85 85,149.6 85,149.6 Z");
    border: 1px solid rgba(107,26,42,0.15);
}
.raspadinha canvas { position: absolute; inset: 0; clip-path: path("M85,149.6 C85,149.6 17,85 17,49.3 C17,25.5 42.5,8.5 68,17 C81.6,22.1 85,34 85,34 C85,34 88.4,22.1 102,17 C127.5,8.5 153,25.5 153,49.3 C153,85 85,149.6 85,149.6 Z"); cursor: crosshair; touch-action: none; }
.raspadinha-dica { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 0.68em; letter-spacing: 0.15em; text-transform: uppercase; color: var(--cinza); opacity: 0.5; white-space: nowrap; }

/* Música */
.music-toggle {
    position: fixed; bottom: 24px; left: 20px; width: 46px; height: 46px;
    border-radius: 50%; border: 1px solid rgba(107,26,42,0.2);
    background: var(--creme); color: var(--framboesa);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 200; box-shadow: 0 2px 8px rgba(26,16,24,0.08);
}
.music-toggle .icon { width: 20px; height: 20px; }
.music-toggle.playing { border-color: var(--framboesa); }
.music-toggle.playing .icon { animation: girar 4s linear infinite; }
.music-toggle.sem-musica { display: none; }
@keyframes girar { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    .pagina { padding: 60px 20px; }
    .hero-title { font-size: 3em; }
    .mural-fotos { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .foto--grande { grid-column: span 2; grid-row: span 2; }
    .fitas { display: none; }
    .music-toggle { left: 14px; right: auto; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    .ambiente .icon { animation: none !important; opacity: 0.06 !important; bottom: 40% !important; }
}
