:root {
  --fundo: #edf1eb; --papel: #fdfaf1; --segundo: #e6ece1;
  --texto: #17382e; --suave: #4b6258; --acao: #154d41; --sobre-acao: #fdfaf1;
  --ouro: #b8963e; --azul: #dcecee;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fundo: #152a23; --papel: #1d3830; --segundo: #21423a;
    --texto: #eef3ea; --suave: #b7c9be; --acao: #d9e8c8; --sobre-acao: #152a23;
    --ouro: #d9bd6a; --azul: #26474a; color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
    --fundo: #152a23; --papel: #1d3830; --segundo: #21423a;
    --texto: #eef3ea; --suave: #b7c9be; --acao: #d9e8c8; --sobre-acao: #152a23;
    --ouro: #d9bd6a; --azul: #26474a; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--fundo); color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pagina {
  max-width: 480px; margin: 0 auto; padding: 40px 16px 32px;
  display: flex; flex-direction: column; gap: 28px;
}
.marca { text-align: center; }
.selo {
  width: 144px; height: 144px; border-radius: 50%; display: block; margin: 0 auto 16px;
  box-shadow: 0 0 0 3px var(--ouro), 0 8px 24px rgba(21, 42, 35, .18);
}
h1 { margin: 0; font: 600 1.75rem/1.2 Georgia, "Times New Roman", serif; letter-spacing: .01em; }
.arroba { margin: 4px 0 12px; color: var(--suave); }
.frase { margin: 0 auto; max-width: 32ch; color: var(--suave); }
.links { display: flex; flex-direction: column; gap: 12px; }
.botao {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 20px; border-radius: 16px; text-decoration: none;
  background: var(--papel); color: var(--texto); border: 1px solid var(--segundo);
  font-weight: 600; transition: transform .15s ease, box-shadow .15s ease;
}
.botao small { font-weight: 400; color: var(--suave); }
.botao.principal { background: var(--acao); color: var(--sobre-acao); border-color: var(--acao); }
.botao.principal small { color: inherit; opacity: .85; }
.botao:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(21, 42, 35, .15); }
.botao:focus-visible { outline: 3px solid var(--ouro); outline-offset: 3px; }
.silvia {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--papel); border-radius: 16px; border: 1px solid var(--segundo);
}
.silvia img { width: 72px; height: 72px; border-radius: 50%; flex: none; object-fit: cover; background: var(--azul); }
.silvia p { margin: 0; font-size: .95rem; }
footer { text-align: center; font-size: .85rem; color: var(--suave); }
footer p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .botao { transition: none; } .botao:hover { transform: none; } }

/* Entrada: o selo chega primeiro, depois a Silvia acena (só transform/opacity) */
:root { --chegar: cubic-bezier(.22, 1, .36, 1); --mola: cubic-bezier(.34, 1.56, .64, 1); }
.selo { animation: selo-entra .9s var(--mola) both; }
.marca h1, .marca .arroba, .marca .frase { animation: sobe .6s var(--chegar) both; }
.marca h1 { animation-delay: .35s; } .marca .arroba { animation-delay: .45s; } .marca .frase { animation-delay: .55s; }
.links { animation: sobe .6s var(--chegar) .65s both; }
.silvia { animation: sobe .6s var(--chegar) .8s both; }
.avatar { position: relative; flex: none; }
.aceno {
  position: absolute; right: -6px; bottom: -4px; font-size: 1.5rem; line-height: 1;
  transform-origin: 70% 80%; animation: acena 1.6s ease-in-out 1.4s 2 both;
}
.ola {
  position: absolute; left: 50%; top: -14px; padding: 2px 8px; border-radius: 10px;
  background: var(--acao); color: var(--sobre-acao); font-size: .75rem; font-weight: 700;
  transform: translate(-50%, 0); opacity: 0; animation: balao 3.4s var(--chegar) 1.3s both;
}
@keyframes selo-entra {
  from { opacity: 0; transform: scale(.82) rotate(-8deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes sobe { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes acena {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(18deg); }
  20%, 40% { transform: rotate(-10deg); }
}
@keyframes balao {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  12%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -4px) scale(.95); }
}
@media (prefers-reduced-motion: reduce) {
  .selo, .marca h1, .marca .arroba, .marca .frase, .links, .silvia, .aceno { animation: none; }
  .ola { display: none; }
}

/* Seletor de tema: recolhido mostra só o modo atual; tocar expande os 3. Sem JavaScript, fica escondido e segue o sistema */
.tema { display: none; }
:root[data-js] .tema {
  display: flex; position: fixed; top: 12px; right: 12px; z-index: 2; padding: 3px;
  background: var(--papel); border: 1px solid var(--segundo); border-radius: 999px;
  box-shadow: 0 2px 10px rgba(21, 42, 35, .12);
}
.tema button {
  display: grid; place-items: center; flex: none; width: 36px; max-width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: transparent; color: var(--suave); cursor: pointer;
  transition: max-width .32s var(--chegar), opacity .24s ease, transform .32s var(--mola), background-color .2s ease, color .2s ease;
}
.tema[data-aberto] button:nth-child(2) { transition-delay: .04s; }
.tema[data-aberto] button:nth-child(3) { transition-delay: .08s; }
.tema:not([data-aberto]) button { transition-duration: .2s, .14s, .2s, .2s, .2s; }
.tema:not([data-aberto]) button:not([aria-pressed="true"]) { max-width: 0; opacity: 0; transform: scale(.4); pointer-events: none; }
.tema button[aria-pressed="true"] { background: var(--acao); color: var(--sobre-acao); }
.tema:not([data-aberto]) button[aria-pressed="true"]:hover { transform: scale(1.06); }
.tema button:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; }
.tema svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .tema button { transition: none; } }
