/* Página-presente: temas de cor + três estilos (clássica, jardim, livro) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html.embutido { scrollbar-width: none; }
html.embutido::-webkit-scrollbar { display: none; }

.pres {
  --bg: #FBF4EC; --tinta: #2B1620; --pri: #8C1D40; --acc: #E9A15B; --card: #FFFFFF;
  --linha: rgba(43, 22, 32, .12); --suave: rgba(43, 22, 32, .64); --sobre-pri: #FFF6EC;
  --flor1: var(--pri); --ceu: #FBE6D4; --sol: #F6C98A; --morro: #C9D6A8; --morro2: #DDE5C2; --flor3: #F4C9D2; --miolo: #F2C14E;
  --serifa: 'Fraunces', Georgia, 'Times New Roman', serif;
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--tinta);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.pres[data-tema="noite"] {
  --bg: #12131F; --tinta: #F3EEE6; --pri: #F0B56A; --acc: #E8787A; --card: #1C1E2E;
  --linha: rgba(243, 238, 230, .15); --suave: rgba(243, 238, 230, .68); --sobre-pri: #1A1408;
  --ceu: #1B2040; --sol: #F3E6B8; --morro: #26314A; --morro2: #1F2840; --flor3: #B9C7F2; --miolo: #FFE9A8;
}
.pres[data-tema="rosa"] {
  --bg: #FFF3F1; --tinta: #3A1B22; --pri: #D9486E; --acc: #F09A7E; --card: #FFFFFF;
  --linha: rgba(58, 27, 34, .12); --suave: rgba(58, 27, 34, .64); --sobre-pri: #FFF5F2;
  --ceu: #FFE1DC; --sol: #FFC9A8; --morro: #F3C4CE; --morro2: #F8D8DE; --flor3: #FFFFFF; --miolo: #F6C453;
}
.pres[data-tema="oliva"] {
  --bg: #F5F3E7; --tinta: #24281A; --pri: #5B6B2F; --acc: #D98B4A; --card: #FFFFFF;
  --linha: rgba(36, 40, 26, .13); --suave: rgba(36, 40, 26, .66); --sobre-pri: #F7F6EA;
  --flor1: #C2523C; --ceu: #E6EDD3; --sol: #F3D38A; --morro: #A9B978; --morro2: #C6D29C; --flor3: #F2C0B4; --miolo: #F4C84F;
}
.pres[data-tema="ceu"] {
  --bg: #EEF4FA; --tinta: #152236; --pri: #2F5DA8; --acc: #E98FA3; --card: #FFFFFF;
  --linha: rgba(21, 34, 54, .12); --suave: rgba(21, 34, 54, .64); --sobre-pri: #F1F6FC;
  --ceu: #D5E6F7; --sol: #FBE3A6; --morro: #A9C8B8; --morro2: #C4DBCF; --flor3: #FFFFFF; --miolo: #F7C94F;
}
.pres[data-tema="areia"] {
  --bg: #F3EADB; --tinta: #2E2418; --pri: #A8481F; --acc: #3F6B63; --card: #FFFBF3;
  --linha: rgba(46, 36, 24, .14); --suave: rgba(46, 36, 24, .66); --sobre-pri: #FFF6E6;
  --ceu: #F3DFC2; --sol: #F0B46A; --morro: #C9B58A; --morro2: #DCCBA4; --flor3: #F6E3C8; --miolo: #F2C14E;
}

.pres h1, .pres h2 { font-family: var(--serifa); font-weight: 500; margin: 0; letter-spacing: -.01em; }
.pres p { margin: 0 0 1em; }
.pres img { display: block; max-width: 100%; }
.pres button { font: inherit; color: inherit; cursor: pointer; }

.p-col { max-width: 520px; margin: 0 auto; padding: 0 20px 28px; }

/* topo */
.p-topo { text-align: center; padding: 68px 0 30px; }
.p-sobre { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--pri); font-weight: 600; margin-bottom: 14px; }
.p-nomes { font-size: clamp(40px, 12vw, 56px); line-height: 1.02; overflow-wrap: anywhere; }
.p-nomes i { font-style: italic; font-weight: 400; color: var(--acc); }
.p-desde { margin: 16px 0 0; color: var(--suave); font-size: 15px; }

/* seções */
.p-sec { margin-top: 46px; position: relative; }
.p-sec > h2 { font-size: 27px; text-align: center; margin-bottom: 20px; }
.p-sec > h2::after { content: ''; display: block; width: 34px; height: 2px; background: var(--acc); margin: 12px auto 0; border-radius: 2px; }
.p-ex { display: table; margin: -10px auto 14px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); border: 1px dashed var(--linha); border-radius: 99px; padding: 2px 10px; }

/* contador */
.p-cont-sec { margin-top: 8px; }
.p-cont { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.p-cont-c { background: var(--card); border: 1px solid var(--linha); border-radius: 16px; padding: 16px 6px 12px; text-align: center; }
.p-cont-c b { display: block; font-family: var(--serifa); font-weight: 500; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--pri); }
.p-cont-c span { display: block; margin-top: 7px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); }
.p-cont-leg { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--suave); }
.p-pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: pulso 1.6s ease-in-out infinite; }
@keyframes pulso { 50% { transform: scale(.55); opacity: .5; } }

/* música */
.p-sp { border-radius: 14px; overflow: hidden; min-height: 152px; background: var(--card); }
.p-sp iframe { display: block; border: 0; }
.p-sp-vazio { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--linha); border-radius: 16px; padding: 16px 18px; }
.p-sp-vazio b { display: block; font-size: 16px; }
.p-sp-vazio small { color: var(--suave); font-size: 13px; }
.p-disco { flex: none; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, var(--card) 0 14%, var(--pri) 15% 34%, var(--tinta) 35% 100%); animation: gira 6s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* carta */
.p-carta { background: var(--card); border: 1px solid var(--linha); border-radius: 20px; padding: 28px 24px 24px; font-size: 17px; line-height: 1.7; }
.p-saud { font-family: var(--serifa); font-style: italic; font-size: 24px; color: var(--pri); margin-bottom: .6em; }
.p-ass { font-family: var(--serifa); font-style: italic; text-align: right; margin: 1.2em 0 0; color: var(--pri); font-size: 19px; }

/* fotos */
.p-trilho { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; border-radius: 20px; }
.p-trilho::-webkit-scrollbar { display: none; }
.p-trilho figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.p-trilho img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; background: var(--linha); }
.p-trilho figcaption { text-align: center; font-family: var(--serifa); font-style: italic; font-size: 18px; margin-top: 12px; }
.p-pontos { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.p-pontos i { width: 7px; height: 7px; border-radius: 50%; background: var(--linha); transition: all .25s; }
.p-pontos i.on { background: var(--pri); width: 20px; border-radius: 6px; }

/* linha do tempo */
.p-linha { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--linha); }
.p-linha li { position: relative; padding: 0 0 26px 4px; }
.p-linha li:last-child { padding-bottom: 0; }
.p-linha li::before { content: ''; position: absolute; left: -30px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--pri); }
.p-linha time { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--pri); font-weight: 600; }
.p-linha b { display: block; font-family: var(--serifa); font-weight: 500; font-size: 20px; margin: 2px 0 4px; }
.p-linha p { margin: 0; color: var(--suave); font-size: 15px; }

/* rodapé */
.p-rodape { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--linha); text-align: center; font-size: 13px; color: var(--suave); }
.p-rodape span { color: var(--pri); }
.p-rodape a { display: table; margin: 10px auto 0; color: var(--pri); font-weight: 600; text-decoration: none; border: 1px solid var(--linha); border-radius: 99px; padding: 7px 16px; }

/* jardim */
.p-jardim { margin-top: 4px; }
.j-svg { display: block; width: 100%; border-radius: 22px; border: 1px solid var(--linha); }
.j-caule { fill: none; stroke: #5F7A3A; stroke-width: 2.2; stroke-linecap: round; }
.pres[data-tema="noite"] .j-caule { stroke: #8FB08A; }
.j-flor { transform-box: fill-box; transform-origin: 50% 100%; animation: brota .9s cubic-bezier(.2, .8, .3, 1) both; animation-delay: var(--at); }
.j-pet { transform-box: fill-box; transform-origin: 50% 50%; animation: abre .7s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--at) + .45s); }
@keyframes brota { from { transform: scaleY(0); opacity: 0; } }
@keyframes abre { from { transform: scale(0) rotate(-40deg); } }
.j-leg { text-align: center; margin: 14px 0 0; font-size: 14px; color: var(--suave); }
.j-leg b { color: var(--pri); }

/* livro */
.pres-livro { overflow: hidden; }
.livro { height: 100vh; height: 100dvh; max-width: 520px; margin: 0 auto; padding: 16px 14px 8px; display: flex; flex-direction: column; }
.l-pgs { flex: 1; position: relative; perspective: 1700px; min-height: 0; }
.l-pg {
  position: absolute; inset: 0; background: var(--card); border-radius: 6px 20px 20px 6px;
  box-shadow: 0 1px 0 var(--linha), 0 18px 40px -18px rgba(0, 0, 0, .35); overflow: hidden;
  opacity: 0; pointer-events: none; transform-origin: left center; transform: rotateY(16deg) translateX(5%);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .4s;
}
.l-pg::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 22px; background: linear-gradient(90deg, rgba(0, 0, 0, .13), transparent); pointer-events: none; z-index: 2; }
.l-pg.ativa { opacity: 1; pointer-events: auto; transform: none; }
.l-pg.passou { transform: rotateY(-72deg) translateX(-8%); }
.l-pg-in { height: 100%; overflow-y: auto; padding: 34px 28px 46px 34px; display: flex; flex-direction: column; scrollbar-width: none; }
.l-pg-in::-webkit-scrollbar { display: none; }
.l-pg-in > :first-child { margin-top: auto; }
.l-pg-in > :last-child { margin-bottom: auto; }
.l-num { position: absolute; bottom: 14px; right: 22px; font-family: var(--serifa); font-style: italic; font-size: 14px; color: var(--suave); }
.l-cap { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--pri); font-weight: 600; text-align: center; margin-bottom: 8px; }
.l-pg h2 { font-size: 30px; text-align: center; margin-bottom: 22px; line-height: 1.1; }
.l-conto { font-family: var(--serifa); font-size: 21px; line-height: 1.5; text-align: center; }
.l-conto:first-letter { font-size: 1.5em; color: var(--pri); }

.l-capa { background: var(--pri); color: var(--sobre-pri); }
.l-capa::after { content: ''; position: absolute; inset: 14px 14px 14px 24px; border: 1.5px solid currentColor; opacity: .4; border-radius: 4px 12px 12px 4px; pointer-events: none; }
.l-capa .l-pg-in { align-items: center; text-align: center; }
.l-mini { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; opacity: .8; margin-bottom: 18px; }
.l-capa h1 { font-size: clamp(38px, 12vw, 54px); line-height: 1.05; overflow-wrap: anywhere; }
.l-capa h1 i { display: block; font-size: .62em; font-weight: 400; opacity: .8; margin: 4px 0; }
.l-desde { margin: 20px 0 30px; opacity: .85; font-size: 15px; }
.pres .l-abrir { background: var(--sobre-pri); color: var(--pri); border: 0; border-radius: 99px; padding: 13px 26px; font-weight: 600; position: relative; z-index: 3; }

.l-dias { text-align: center; margin-bottom: 20px; }
.l-dias b { display: block; font-family: var(--serifa); font-weight: 500; font-size: 68px; line-height: 1; color: var(--pri); font-variant-numeric: tabular-nums; }
.l-dias span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--suave); }
.l-cont .p-cont-c { background: transparent; }
.l-cont .p-cont-c b { font-size: 28px; }

.l-carta { text-align: center; }
.pres .l-lacre { width: 84px; height: 84px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, var(--acc), var(--pri) 70%); color: var(--sobre-pri); font-size: 32px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5), inset 0 0 0 5px rgba(255, 255, 255, .14); animation: respira 2.2s ease-in-out infinite; }
@keyframes respira { 50% { transform: scale(1.07); } }
.l-toque { font-size: 13px; color: var(--suave); text-align: center; margin: 14px 0 0; }
.l-carta-txt { display: none; text-align: left; font-size: 16px; line-height: 1.65; }
.l-carta.aberta .l-lacre, .l-carta.aberta .l-toque { display: none; }
.l-carta.aberta .l-carta-txt { display: block; animation: surge .7s ease both; }
@keyframes surge { from { opacity: 0; transform: translateY(14px); } }

.l-foto { margin: 0; background: #fff; padding: 12px 12px 6px; border-radius: 4px; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .45); transform: rotate(-1.6deg); }
.l-foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #eee; max-height: 52vh; }
.l-foto figcaption { font-family: var(--serifa); font-style: italic; text-align: center; padding: 12px 4px 8px; font-size: 17px; color: #2b2320; min-height: 1em; }
.l-pg:nth-child(even) .l-foto { transform: rotate(1.4deg); }

.pres .l-motivo { display: block; width: 100%; min-height: 150px; background: var(--bg); border: 1.5px dashed var(--pri); border-radius: 18px; padding: 22px 18px; text-align: center; }
.l-motivo small { display: block; font-size: 12px; letter-spacing: .08em; color: var(--suave); margin-bottom: 12px; }
.l-motivo span { display: block; font-family: var(--serifa); font-size: 23px; line-height: 1.3; color: var(--pri); }
.l-motivo.troca span { animation: surge .45s ease both; }

.l-rasp { position: relative; height: 124px; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--linha); display: grid; place-items: center; padding: 14px; }
.l-rasp p { margin: 0; text-align: center; font-family: var(--serifa); font-size: 21px; line-height: 1.3; color: var(--pri); }
.l-rasp canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .6s; }
.l-rasp canvas.ok { opacity: 0; pointer-events: none; }

.l-pg .p-sec { margin-top: 0; }
.l-pg .p-linha b { font-size: 18px; }
.l-pg .p-rodape { margin-top: 30px; }
.l-nav { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 6px 4px; }
.pres .l-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--linha); background: var(--card); font-size: 24px; line-height: 1; padding-bottom: 3px; }
.pres .l-nav button:disabled { opacity: .3; cursor: default; }
.l-nav span { font-size: 13px; color: var(--suave); font-variant-numeric: tabular-nums; }

/* abertura */
.p-abre { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; padding: 24px; transition: opacity .6s, transform .7s; }
.p-abre.saindo { opacity: 0; transform: scale(1.06); pointer-events: none; }
.p-abre-in { text-align: center; max-width: 340px; }
.p-env { width: 128px; margin: 0 auto 26px; animation: flutua 3s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-8px); } }
.p-abre-n { font-family: var(--serifa); font-style: italic; font-size: 32px; color: var(--pri); margin: 0 0 4px; overflow-wrap: anywhere; }
.p-abre-t { color: var(--suave); margin-bottom: 26px; }
.pres .p-btn { background: var(--pri); color: var(--sobre-pri); border: 0; border-radius: 99px; padding: 15px 44px; font-weight: 600; font-size: 17px; box-shadow: 0 12px 26px -12px var(--pri); }

.p-chuva { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.p-chuva span { position: absolute; bottom: -40px; color: var(--pri); animation: sobe 2.8s ease-in both; }
.p-chuva span:nth-child(odd) { color: var(--acc); }
@keyframes sobe { to { transform: translateY(-110vh) rotate(24deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .pres *, .pres *::before { animation: none !important; transition: none !important; }
}
