/* Identidade @seuladoanimal (DESIGN.md): papel branco, tinta #1a130b, amarelo legenda #f2c230, céu #e4f3ff, pasto #2e7d32.
   "Adesivo" (borda espessa + sombra dura) exclusivamente no que se toca ou se clica. */

:root {
  --papel: #ffffff;
  --papel-suave: #faf7f0;
  --tinta: #1a130b;
  --tinta-2: #5b4f3f;
  --linha: #e9e2d4;
  --amarelo: #f2c230;
  --amarelo-claro: #fff4cc;
  --ceu: #e4f3ff;
  --pasto: #2e7d32;
  --pasto-claro: #e7f6e8;
  --violeta: #6d28d9;
  --erro: #c62828;

  --borda: 2.5px solid var(--tinta);
  --sombra-adesivo: 5px 5px 0 var(--tinta);
  --sombra-adesivo-sm: 3px 3px 0 var(--tinta);
  --raio: 20px;

  --ease-pop: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-entra: cubic-bezier(0.05, 0.7, 0.1, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--papel);
  background-image: radial-gradient(rgba(26, 19, 11, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--tinta);
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  caret-color: var(--tinta);
}

::selection { background: var(--amarelo); color: var(--tinta); }
html { scrollbar-color: #cfc6b6 var(--papel); }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfc6b6; border-radius: 8px; }

img, svg { display: block; max-width: 100%; }
a { color: var(--tinta); }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1.15rem 3.25rem;
  display: grid;
  gap: 1.5rem;
}

/* Cabeçalho do perfil */
.perfil {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.avatar-wrap {
  position: relative;
  width: 104px;
  height: 104px;
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--tinta);
  box-shadow: 0 10px 24px rgba(26, 19, 11, 0.14);
  background: var(--amarelo-claro);
}

.arroba-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--amarelo-claro);
  border: 2px solid var(--tinta);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.perfil h1 {
  font-size: clamp(1.95rem, 7vw, 2.55rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.chave {
  font-style: normal;
  color: var(--amarelo);
  -webkit-text-stroke: 0.065em var(--tinta);
  paint-order: stroke fill;
  letter-spacing: 0.005em;
}

.perfil .bio {
  max-width: 38ch;
  color: var(--tinta-2);
  font-size: 0.96rem;
}

.perfil .grade {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pasto);
  background: var(--pasto-claro);
  border: 1.5px solid rgba(46, 125, 50, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

/* Redes oficiais coloridas */
.sociais {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--papel);
  border: var(--borda);
  box-shadow: var(--sombra-adesivo-sm);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-pop), box-shadow 160ms var(--ease-pop), background-color 160ms ease;
}

.social-pill:hover {
  transform: translate(-1px, -2px);
  background: var(--amarelo-claro);
}

.social-pill:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--tinta);
}

.social-pill svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Pilha de blocos */
.blocos {
  display: grid;
  gap: 1.55rem;
  margin-top: 0.4rem;
}

.bloco-wrap {
  position: relative;
}

/* Personagens espiando sobre o bloco principal */
.espiando {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.55rem;
  margin-bottom: -10px;
  padding-inline: 0.75rem;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.peeker {
  width: 64px;
  height: 54px;
  transform-origin: bottom center;
  animation: peek-bob 3.6s ease-in-out infinite;
}

.peeker:nth-child(2) { animation-delay: 0.45s; width: 72px; height: 60px; }
.peeker:nth-child(3) { animation-delay: 0.95s; width: 68px; height: 58px; }
.peeker:nth-child(4) { animation-delay: 1.4s; width: 62px; height: 52px; }

@keyframes peek-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Cartões de ação ("adesivo" só no que é clicável) */
.card-portal {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: var(--raio);
  border: var(--borda);
  box-shadow: var(--sombra-adesivo);
  background: var(--papel);
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: transform 160ms var(--ease-pop), box-shadow 160ms var(--ease-pop), background-color 180ms ease;
}

.card-portal:hover {
  transform: translate(-1px, -2px);
  box-shadow: 6px 7px 0 var(--tinta);
}

.card-portal:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--tinta);
}

.card-portal--ceu { background: var(--ceu); }
.card-portal--amarelo { background: var(--amarelo-claro); }

.card-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.card-icone {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--papel);
  border: 2px solid var(--tinta);
  display: grid;
  place-items: center;
  flex: none;
}

.card-icone--amarelo { background: var(--amarelo); }
.card-icone--pasto { background: var(--pasto); color: #ffffff; }
.card-icone svg { width: 22px; height: 22px; }

.card-titulo {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.card-desc {
  color: var(--tinta-2);
  font-size: 0.94rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(26, 19, 11, 0.25);
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
}

.cta-fake {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.05rem;
  border-radius: 13px;
  background: var(--amarelo);
  border: 2px solid var(--tinta);
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

.cta-fake--claro { background: var(--papel); }

/* Bloco misto: botão principal + ação secundária abaixo (sem card aninhado pesado) */
.bloco-caixa {
  display: grid;
  gap: 0.8rem;
  padding: 1.25rem;
  border-radius: var(--raio);
  border: 2px solid var(--tinta);
  background: var(--papel);
}

.bloco-caixa--amarelo { background: var(--amarelo-claro); }
.bloco-caixa--suave { background: var(--papel-suave); }

.btn-adesivo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 1.15rem;
  border-radius: 14px;
  border: var(--borda);
  box-shadow: var(--sombra-adesivo);
  background: var(--amarelo);
  color: var(--tinta);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-pop), box-shadow 160ms var(--ease-pop), background-color 160ms ease;
}

.btn-adesivo:hover {
  transform: translate(-1px, -2px);
  box-shadow: 6px 7px 0 var(--tinta);
}

.btn-adesivo:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--tinta);
}

.btn-adesivo--branco { background: var(--papel); }

.btn-secundario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 2px solid rgba(26, 19, 11, 0.28);
  background: var(--papel);
  color: var(--tinta);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.btn-secundario:hover {
  border-color: var(--tinta);
  background: var(--papel-suave);
}

/* Modais */
dialog.modal {
  width: min(30rem, calc(100vw - 1.5rem));
  padding: 1.35rem;
  border-radius: 22px;
  border: 3px solid var(--tinta);
  box-shadow: 0 22px 60px rgba(26, 19, 11, 0.28);
  background: var(--papel);
  color: var(--tinta);
}

dialog.modal::backdrop {
  background: rgba(26, 19, 11, 0.55);
  backdrop-filter: blur(3px);
}

.modal-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.modal-topo h2 {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.15;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid var(--tinta);
  background: var(--papel);
  color: var(--tinta);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  box-shadow: 2px 2px 0 var(--tinta);
}

.modal-close:active { transform: translate(2px, 2px); box-shadow: none; }

.form-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.9rem;
}

.campo {
  display: grid;
  gap: 0.3rem;
}

.campo label {
  font-size: 0.84rem;
  font-weight: 800;
}

.campo input, .campo textarea, .campo select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 2px solid rgba(26, 19, 11, 0.3);
  background: var(--papel);
  color: var(--tinta);
  font-family: inherit;
  font-size: 0.95rem;
}

.campo input:focus, .campo textarea:focus, .campo select:focus {
  outline: none;
  border-color: var(--tinta);
  box-shadow: 0 0 0 3px var(--amarelo-claro);
}

.check-lgpd {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--tinta-2);
  cursor: pointer;
}

.check-lgpd input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--tinta);
  flex: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.msg-status {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  display: none;
}

.msg-status.visivel { display: block; }
.msg-status.ok { background: var(--pasto-claro); color: var(--pasto); border: 1.5px solid var(--pasto); }
.msg-status.err { background: #fdecec; color: var(--erro); border: 1.5px solid var(--erro); }

/* Rodapé */
.rodape {
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--linha);
  color: var(--tinta-2);
  font-size: 0.82rem;
  display: grid;
  gap: 0.35rem;
}

.rodape a {
  color: var(--tinta);
  font-weight: 700;
  text-decoration-color: var(--amarelo);
  text-decoration-thickness: 2.5px;
  text-underline-offset: 0.18em;
}

@media (min-width: 680px) {
  .wrap { padding-top: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .peeker { animation: none; }
  .card-portal, .btn-adesivo, .social-pill { transition: none; }
}
