:root {
  --bg-yellow: #FFD400;
  --bg-yellow-soft: #FFE85C;
  --paper: #FFF8E1;
  --ink: #0A0A0A;
  --ink-soft: #2A1F00;

  --red: #E2231A;       /* Flamengo / MAD */
  --red-deep: #B0140C;
  --black-fla: #0A0A0A;
  --blue: #1B5FE8;
  --green: #36C46F;
  --pink: #FF4D8A;
  --purple: #9146FF;

  --shadow-chunky: 6px 6px 0 var(--ink);
  --shadow-chunky-sm: 4px 4px 0 var(--ink);
  --shadow-chunky-lg: 8px 8px 0 var(--ink);

  --radius-card: 18px;
  --radius-pill: 999px;

  --font-display: "Bangers", "Luckiest Guy", Impact, sans-serif;
  --font-body: "Patrick Hand", "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
}

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

html, body { min-height: 100%; }

/* visually hidden mas legível por crawlers e leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-yellow);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.4;
  position: relative;
}

/* ===== FUNDO MAD: halftone + listras radiais ===== */
.bg-burst {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 30%,
      var(--bg-yellow) 0deg 6deg,
      var(--bg-yellow-soft) 6deg 12deg
    );
  opacity: 0.6;
}

.bg-halftone {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(10,10,10,0.18) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  background-position: 0 0;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.bg-corners {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 0% 0%, rgba(226,35,26,0.12), transparent 60%),
    radial-gradient(40% 30% at 100% 100%, rgba(27,95,232,0.12), transparent 60%);
}

/* ===== HQ BG — wallpaper de página de HQ gerado via Gemini ===== */
.hq-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--hq-bg, none);
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  opacity: 0.95;
  animation: hq-pop 0.6s 0.05s both ease-out;
}

@media (max-width: 720px) {
  .hq-bg {
    background-size: cover;
    background-position: center -60px;
  }
}

@keyframes hq-pop {
  from { opacity: 0; }
  to { opacity: 0.95; }
}

.char {
  position: absolute;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  filter: drop-shadow(3px 3px 0 rgba(10,10,10,0.45));
  opacity: 0.55;
  width: 180px;
  height: auto;
  will-change: transform;
}

/* placeholder caixa tracejada ate o asset existir */
.char:not([src])::before,
.char[data-placeholder]:not([src])::before {
  content: attr(data-placeholder);
  display: block;
  padding: 10px 14px;
  background: var(--paper);
  border: 3px dashed var(--ink);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  text-align: center;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0.7;
}

/* 11 slots — bordoes do PirBraga espalhados como wallpaper HQ */
.pos-1 { top: 3%;   left: -4%;  width: 210px; transform: rotate(-8deg);  animation: float-a 11s ease-in-out infinite; }
.pos-2 { top: 4%;   right: -4%; width: 200px; transform: rotate(10deg);  animation: float-b 12s ease-in-out infinite; }
.pos-3 { top: 38%;  left: -5%;  width: 210px; transform: rotate(6deg);   animation: float-b 10s ease-in-out infinite; }
.pos-4 { top: 38%;  right: -4%; width: 200px; transform: rotate(-6deg);  animation: float-a 13s ease-in-out infinite; }
.pos-5 { bottom: 4%; left: -4%; width: 210px; transform: rotate(-5deg);  animation: float-a 11.5s ease-in-out infinite; }
.pos-8 { bottom: 4%; right: -4%; width: 200px; transform: rotate(7deg);  animation: float-b 10.5s ease-in-out infinite; }
.pos-9 { top: 70%;  left: 50%;  width: 200px; transform: translateX(-50%) rotate(-3deg); animation: float-a 12.5s ease-in-out infinite; }

/* mini stickers (escudo Paysandu e ganso) */
.char-mini { width: 110px; }
.pos-6 { top: 21%;  right: 26%; transform: rotate(-12deg); animation: float-b 9s ease-in-out infinite; }
.pos-7 { top: 21%;  left: 26%;  transform: rotate(10deg);  animation: float-a 9.5s ease-in-out infinite; }

/* onomatopeias (vo-ralar e atoa-comigo) — médias, alta opacidade pra ficarem pop */
.char-pop { width: 150px; opacity: 0.72; }
.pos-10 { top: 56%; left: 26%; transform: rotate(-10deg); animation: float-a 8.5s ease-in-out infinite; }
.pos-11 { top: 56%; right: 26%; transform: rotate(12deg); animation: float-b 9s ease-in-out infinite; }

@media (max-width: 899px) {
  .char { opacity: 0.40; }
  .pos-1 { top: 4%;   left: -10%; width: 150px; }
  .pos-2 { top: 4%;   right: -10%; width: 140px; }
  .pos-3 { top: 28%;  left: -12%; width: 150px; }
  .pos-4 { top: 28%;  right: -12%; width: 140px; }
  .pos-5 { top: 52%;  left: -12%; width: 150px; bottom: auto; transform: rotate(-5deg); }
  .pos-8 { top: 52%;  right: -12%; width: 140px; bottom: auto; transform: rotate(7deg); }
  .pos-9 { bottom: 5%; left: 50%; top: auto; width: 150px; }
  .pos-6 { top: 17%;  right: 4%; }
  .pos-7 { top: 17%;  left: 4%; }
  .pos-10 { top: 76%; left: 4%; width: 110px; }
  .pos-11 { top: 76%; right: 4%; width: 110px; }
}

@media (max-width: 420px) {
  .char { opacity: 0.30; }
  .pos-1, .pos-2, .pos-3, .pos-4, .pos-5, .pos-8, .pos-9 { width: 120px; }
  .char-mini { width: 80px; }
  .char-pop { width: 90px; }
}

@keyframes float-a {
  0%, 100% { transform: rotate(var(--rot, -8deg)) translateY(0) translateX(0); }
  50% { transform: rotate(calc(var(--rot, -8deg) + 4deg)) translateY(-12px) translateX(4px); }
}

@keyframes float-b {
  0%, 100% { transform: rotate(var(--rot, 10deg)) translateY(0) translateX(0); }
  50% { transform: rotate(calc(var(--rot, 10deg) - 4deg)) translateY(10px) translateX(-4px); }
}

/* ===== LAYOUT ===== */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 22px 80px;
  position: relative;
  z-index: 2;
}

@media (max-width: 480px) {
  main { padding: 32px 18px 64px; }
}

/* ===== PROFILE ===== */
.profile {
  text-align: center;
  margin-bottom: 28px;
  animation: pop-in 0.7s 0.05s both cubic-bezier(.34,1.56,.64,1);
}

.avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 14px;
}

.avatar-frame {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--red);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-chunky);
  transform: rotate(-4deg);
}

.avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid var(--ink);
  background: var(--paper);
  transform: rotate(2deg);
}

.sticker {
  position: absolute;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: wiggle 2.6s ease-in-out infinite;
}

.sticker svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  filter: drop-shadow(2px 2px 0 var(--ink));
}

.sticker em {
  position: relative;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.05em;
  color: #fff;
  font-style: normal;
  text-shadow:
    -2px 0 var(--ink), 2px 0 var(--ink),
    0 -2px var(--ink), 0 2px var(--ink),
    -2px -2px var(--ink), 2px 2px var(--ink),
    -2px 2px var(--ink), 2px -2px var(--ink);
  transform: rotate(-12deg);
}

.sticker-mask {
  bottom: -10px;
  right: -22px;
  width: 72px;
  height: 72px;
  transform: rotate(15deg);
}

@keyframes wiggle {
  0%, 100% { transform: rotate(15deg) scale(1); }
  50% { transform: rotate(18deg) scale(1.06); }
}

.name {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--red);
  text-transform: uppercase;
  display: inline-block;
  transform: rotate(-2deg);
  text-shadow:
    -2px 0 var(--ink), 2px 0 var(--ink),
    0 -2px var(--ink), 0 2px var(--ink),
    -2px -2px var(--ink), 2px 2px var(--ink),
    -2px 2px var(--ink), 2px -2px var(--ink),
    5px 5px 0 var(--ink);
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .name { font-size: 42px; }
}

.tagline {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  display: inline-block;
  padding: 5px 14px;
  border: 3px solid var(--ink);
  border-radius: 9px;
  box-shadow: var(--shadow-chunky-sm);
  transform: rotate(1.5deg);
  margin-bottom: 12px;
}

.bio {
  font-size: 18px;
  color: var(--ink);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.45;
  font-weight: 600;
}

/* ===== SECTIONS ===== */
.section {
  margin-top: 32px;
  animation: pop-in 0.6s both cubic-bezier(.34,1.56,.64,1);
}

.section:nth-of-type(1) { animation-delay: 0.10s; }
.section:nth-of-type(2) { animation-delay: 0.18s; }
.section:nth-of-type(3) { animation-delay: 0.26s; }
.section:nth-of-type(4) { animation-delay: 0.34s; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  padding: 6px 14px 6px 10px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-chunky-sm);
  margin: 0 0 14px 4px;
  transform: rotate(-1.5deg);
}

.section-burst {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.section-burst svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== BOTOES ===== */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--paper);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-card);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: var(--shadow-chunky-sm);
  transform: rotate(var(--tilt, 0deg));
}

.btn:hover, .btn:focus-visible {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: var(--shadow-chunky-lg);
  outline: none;
  background: #fff;
}

.btn:active {
  transform: rotate(0deg) translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: transparent;
}

.btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn-text {
  flex: 1;
  min-width: 0;
}

.btn-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 2px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.btn-sub {
  font-size: 14.5px;
  color: var(--ink-soft);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  opacity: 0.85;
}

.btn-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--bg-yellow);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}

.btn-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

.btn:hover .btn-arrow {
  transform: rotate(45deg) scale(1.1);
  background: var(--red);
}

.btn:hover .btn-arrow svg {
  stroke: #fff;
}

/* ===== HIGHLIGHTS (Hubbuy) ===== */
.btn--highlight {
  background: var(--red);
  color: #fff;
}

.btn--highlight .btn-title { color: #fff; }
.btn--highlight .btn-sub { color: rgba(255,255,255,0.9); }
.btn--highlight .btn-arrow { background: var(--paper); }

.btn--highlight.accent-yellow {
  background: var(--bg-yellow);
}

.btn--highlight.accent-yellow .btn-title { color: var(--ink); }
.btn--highlight.accent-yellow .btn-sub { color: var(--ink-soft); }
.btn--highlight.accent-yellow .btn-arrow { background: var(--red); border-color: var(--ink); }
.btn--highlight.accent-yellow .btn-arrow svg { stroke: #fff; }

/* ===== FOOTER ===== */
footer {
  margin-top: 56px;
  text-align: center;
  font-family: var(--font-body);
  animation: pop-in 0.7s 0.5s both cubic-bezier(.34,1.56,.64,1);
}

.footer-line1 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--red);
  letter-spacing: 0.04em;
  text-shadow:
    -2px 0 var(--ink), 2px 0 var(--ink),
    0 -2px var(--ink), 0 2px var(--ink),
    3px 3px 0 var(--ink);
  transform: rotate(-1deg);
  display: inline-block;
  margin-bottom: 6px;
}

.footer-line2 {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
@keyframes pop-in {
  0% { opacity: 0; transform: translateY(14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: var(--ink);
  color: var(--bg-yellow);
}
