:root {
  --ink: #24233a;
  --yellow: #ffd23a;
  --green: #22b04b;
  --green-dark: #198d3a;
  --red: #e8323c;
  --orange: #f39a3d;
  --cream: #fff6e8;
  --cream-soft: #ffedd2;
  --tile-line: rgba(36, 35, 58, 0.045);
  --border: 3px solid var(--ink);
  --shadow-sm: 0 4px 0 var(--ink);
  --shadow-md: 0 6px 0 var(--ink);
  --shadow-lg: 0 8px 0 var(--ink);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font-display: 'Fredoka', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 58, 0.42) 0%, rgba(255, 246, 232, 0) 48%),
    linear-gradient(to right, var(--tile-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--tile-line) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  line-height: 1.44;
  padding: 14px 16px 28px;
  overflow-x: clip;
}

.page {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* =========================================================================
   Abertura (acima da dobra)
   ========================================================================= */
.hero {
  text-align: center;
  padding: 2px 4px 0;
}

.avatar-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  padding: 4px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-md);
  margin-bottom: 8px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2.5px solid var(--ink);
  background: var(--yellow);
}

.handle {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.tagline {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.36;
  color: rgba(36, 35, 58, 0.92);
}

/* 3 bolinhas oficiais das redes sociais */
.social-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.social-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.social-orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.social-item:hover .social-orb {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 0 var(--ink);
}

.social-item:active .social-orb {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 1px 0 var(--ink);
}

.social-orb--ig {
  background: linear-gradient(135deg, #f09433 0%, #dc2743 52%, #bc1888 100%);
}

.social-orb--tt {
  background: #000000;
}

.social-orb--yt {
  background: #FF0000;
}

.social-svg {
  width: 27px;
  height: 27px;
  display: block;
}

.social-label {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* =========================================================================
   Blocos compactos com personagens nos cantos (margin: 0 no fluxo)
   ========================================================================= */
.story-stage {
  position: relative;
}

.stage-community {
  margin-top: 20px;
}

.stage-course {
  margin-top: 14px;
}

.stage-support {
  margin-top: 14px;
}

.peek-char {
  position: absolute;
  margin: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.peek-char svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Posições compactas (48px-68px) sem empurrar nem cobrir texto/botões */
.char-davi {
  width: 56px;
  top: -41px;
  left: 6px;
  --peek-rot: -3deg;
}

.char-je {
  width: 60px;
  top: -45px;
  right: 6px;
  --peek-rot: 3deg;
}

.char-neide {
  width: 60px;
  top: 8px;
  right: 12px;
  z-index: 3;
  --peek-rot: 3deg;
}

.char-neide svg {
  filter:
    drop-shadow(1.5px 0 0 #fff6e8)
    drop-shadow(-1.5px 0 0 #fff6e8)
    drop-shadow(0 1.5px 0 #fff6e8)
    drop-shadow(0 -1.5px 0 #fff6e8);
}

.char-kercia {
  width: 60px;
  top: 8px;
  right: 12px;
  z-index: 3;
  --peek-rot: -2deg;
}

/* Estados antes de entrar na tela */
[data-reveal="pop-left"] {
  transform: translate3d(0, 22px, 0) scale(0.82);
}

[data-reveal="pop-right"] {
  transform: translate3d(0, 24px, 0) scale(0.82);
}

[data-reveal="slide-right"] {
  transform: translate3d(24px, 10px, 0) rotate(8deg) scale(0.84);
}

[data-reveal="slide-left"] {
  transform: translate3d(24px, 10px, 0) rotate(-8deg) scale(0.84);
}

/* Estado revelado + balanço leve */
.peek-char.is-visible {
  opacity: 1;
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--peek-rot, 0deg)) scale(1);
}

.peek-char.is-visible .char-bob {
  animation: charBob 3.2s ease-in-out infinite;
  transform-origin: center bottom;
}

.peek-char.is-visible .char-wave {
  animation: charWave 2.8s ease-in-out infinite;
  transform-origin: center bottom;
}

.peek-char.is-visible .char-sneak {
  animation: charSneak 3.6s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes charBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes charWave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-2deg); }
}

@keyframes charSneak {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2px, -2px) rotate(-2deg); }
}

/* =========================================================================
   Os 3 Blocos principais
   ========================================================================= */
.block-card {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.block-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.block-tag--green {
  background: var(--yellow);
  color: var(--ink);
}

.block-tag--orange {
  background: var(--orange);
  color: var(--ink);
  border-color: #fff6e8;
}

.block-tag--white {
  background: #ffffff;
  color: var(--ink);
}

/* Bloco 1: Comunidade da Jé */
.block-community {
  background: var(--green);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.block-community:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.block-community:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

.block-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.block-copy {
  min-width: 0;
  flex: 1;
}

.block-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

.block-sub {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
  color: #ecfff1;
}

.block-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 0 var(--ink);
}

/* Bloco 2: Lista de Espera do Curso */
.block-course {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow-lg);
}

.block-course .block-head,
.block-course .block-title--light {
  padding-right: 68px;
}

.block-title--light {
  color: var(--yellow);
  margin-bottom: 12px;
  font-size: 1.12rem;
  line-height: 1.24;
}

/* Bloco 3: Apoie esse projeto */
.block-support {
  background: var(--cream-soft);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.block-support .block-head {
  justify-content: flex-start;
  gap: 6px;
  padding-right: 68px;
}

.support-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--ink);
}

.block-support .block-tag--white {
  padding: 2px 8px;
  font-size: 0.64rem;
}

.support-desc {
  margin: 0 0 12px;
  padding-right: 68px;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.4;
  color: rgba(36, 35, 58, 0.9);
}

.support-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-btn {
  appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.cta-btn--orange {
  border: 2.5px solid #fff6e8;
  background: var(--orange);
  color: var(--ink);
  box-shadow: 0 4px 0 #0f0e1a;
}

.cta-btn--orange:hover {
  background: var(--yellow);
  transform: translateY(-2px);
}

.cta-btn--orange:active {
  transform: translateY(2px);
}

.cta-btn--yellow {
  border: 2.5px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.cta-btn--yellow:hover {
  background: #f5c31e;
  transform: translateY(-1px);
}

.cta-btn--yellow:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.pix-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 13px;
  border: 2px solid var(--ink);
  background: #ffffff;
}

.pix-key {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  word-break: break-all;
}

.pix-copy-btn {
  appearance: none;
  padding: 7px 12px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--green);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  flex-shrink: 0;
}

.pix-copy-btn:hover {
  background: var(--green-dark);
}

.support-status {
  margin: 8px 0 0;
  font-size: 0.81rem;
  font-weight: 800;
  color: var(--green-dark);
  min-height: 1.1em;
}

.support-status:empty {
  display: none;
}

/* =========================================================================
   Rodapé minimalista
   ========================================================================= */
.footer {
  margin-top: 22px;
  text-align: center;
}

.copyright {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(36, 35, 58, 0.62);
}

/* =========================================================================
   Modal da Lista de Espera
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 35, 58, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--cream);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 0 var(--ink);
  padding: 20px 18px;
  position: relative;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--orange);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-close {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 0 var(--ink);
}

.modal-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.22;
}

.modal-desc {
  margin: 0 0 14px;
  font-size: 0.89rem;
  font-weight: 700;
  color: rgba(36, 35, 58, 0.88);
}

.field-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--ink);
}

.field-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  border: 2.5px solid var(--ink);
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
}

.field-input::placeholder {
  color: rgba(36, 35, 58, 0.45);
  font-weight: 700;
}

.field-error {
  margin: 6px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--red);
  min-height: 1.1em;
}

.submit-btn {
  appearance: none;
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
  background: var(--orange);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(36, 35, 58, 0.72);
}

.success-box {
  display: none;
  text-align: center;
  padding: 8px 4px 2px;
}

.success-box.is-visible {
  display: block;
}

.success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: 1.45rem;
  margin-bottom: 10px;
}

.success-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.18rem;
}

.success-text {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(36, 35, 58, 0.88);
}

.success-action {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

@media (min-width: 560px) {
  body {
    padding: 28px 24px 48px;
  }

  .char-davi {
    width: 64px;
    top: -46px;
    left: -8px;
  }

  .char-je {
    width: 68px;
    top: -50px;
    right: -8px;
  }

  .char-neide {
    width: 64px;
    top: 8px;
    right: 12px;
  }

  .char-kercia {
    width: 64px;
    top: 8px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .peek-char,
  .social-orb,
  .block-card,
  .cta-btn {
    transition: none;
  }

  .peek-char {
    opacity: 1;
    transform: none;
  }

  .peek-char.is-visible .char-bob,
  .peek-char.is-visible .char-wave,
  .peek-char.is-visible .char-sneak {
    animation: none;
  }
}
