/* Mentoria Soninho PRO · "noite tranquila"
   Tokens da identidade Soninho App (Nunito, roxo-soninho, roxo-profundo, amarelo-lua, Gradiente Noite). */
:root {
  --roxo: #7D14B3;
  --prof: #3D146B;
  --noite: #2A0B52;
  --ama: #FFE59D;
  --cinza: #545454;
  --lav: #C5CAFB;
  --suave: #F4F0FA;
  --fio: #E6E1F3;
  --secao: #F7F3FD;
  --erro: #C0262D;
  --grad: linear-gradient(135deg, #830DE8 0%, #FE00E0 100%);
  --sombra: 0 24px 48px -32px rgba(61, 20, 107, .45);
  --raio-md: 16px;
  --raio-lg: 40px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--secao);
  color: var(--prof);
  font: 400 16px/1.5 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
b { font-weight: 800; }

/* ---------- Céu ---------- */
.ceu {
  position: relative; overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 20px 120px;
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(254, 0, 224, .28) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(131, 13, 232, .55) 0%, transparent 60%),
    linear-gradient(170deg, var(--noite) 0%, var(--prof) 55%, #5A1491 100%);
  color: #fff;
}
.ceu-conteudo { position: relative; max-width: 600px; margin: 0 auto; }
.logo { display: block; width: 160px; height: auto; margin-bottom: 40px; }
.selo {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ama);
}
.ceu h1 {
  margin: 18px 0 14px; font-weight: 400; font-size: clamp(32px, 8.4vw, 46px);
  line-height: 1.1; letter-spacing: -.5px;
}
.ceu h1 b { color: var(--ama); font-style: italic; }
.ceu-sub { margin: 0; max-width: 460px; font-size: 16px; line-height: 1.55; color: var(--lav); }

.lua {
  position: absolute; right: -14px; top: 12px; width: 92px; height: 92px;
  fill: var(--ama); opacity: .95; filter: drop-shadow(0 0 28px rgba(255, 229, 157, .45));
  animation: flutuar 9s ease-in-out infinite;
}
@media (min-width: 640px) { .lua { right: calc(50% - 360px); top: 60px; width: 180px; height: 180px; } }
@media (min-width: 420px) and (max-width: 639px) { .lua { width: 120px; height: 120px; } }
.estrelas i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--ama);
  animation: piscar 4s ease-in-out infinite;
}
.estrelas i:nth-child(1)  { top: 14%; left: 8%;  width: 6px; height: 6px; }
.estrelas i:nth-child(2)  { top: 30%; left: 54%; animation-delay: .6s; }
.estrelas i:nth-child(3)  { top: 9%;  left: 72%; width: 5px; height: 5px; animation-delay: 1.2s; }
.estrelas i:nth-child(4)  { top: 62%; left: 88%; animation-delay: 1.8s; }
.estrelas i:nth-child(5)  { top: 78%; left: 12%; width: 3px; height: 3px; animation-delay: 2.4s; }
.estrelas i:nth-child(6)  { top: 46%; left: 36%; width: 3px; height: 3px; animation-delay: 3s; }
.estrelas i:nth-child(7)  { top: 20%; left: 92%; animation-delay: .3s; }
.estrelas i:nth-child(8)  { top: 86%; left: 64%; width: 5px; height: 5px; animation-delay: 1.5s; }
.estrelas i:nth-child(9)  { top: 54%; left: 4%;  animation-delay: 2.1s; }
.estrelas i:nth-child(10) { top: 6%;  left: 62%; width: 3px; height: 3px; animation-delay: 2.7s; }
.estrelas i:nth-child(11) { top: 70%; left: 46%; width: 3px; height: 3px; animation-delay: .9s; }
.estrelas i:nth-child(12) { top: 38%; left: 74%; width: 3px; height: 3px; animation-delay: 3.3s; }

@keyframes flutuar { 50% { transform: translateY(-10px) rotate(-4deg); } }
@keyframes piscar { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } }
.ceu-conteudo > * { animation: subir .7s cubic-bezier(.2, .7, .2, 1) both; }
.ceu-conteudo > :nth-child(2) { animation-delay: .08s; }
.ceu-conteudo > :nth-child(3) { animation-delay: .16s; }
.ceu-conteudo > :nth-child(4) { animation-delay: .24s; }
.revelar { animation: subir .7s .32s cubic-bezier(.2, .7, .2, 1) both; }

/* ---------- Folhas ---------- */
.palco { position: relative; max-width: 600px; margin: -84px auto 0; padding: 0 16px; }
.folha {
  position: relative; background: #fff; border-radius: 28px; border: 1px solid #ECE5F8;
  padding: 32px 22px; margin-bottom: 20px; box-shadow: var(--sombra);
}
@media (min-width: 480px) { .folha { padding: 40px 36px; } }
.folha h2 { margin: 0 0 6px; font-size: 26px; font-weight: 400; line-height: 1.2; letter-spacing: -.3px; }
.folha h2 b { color: var(--roxo); }
.nota { margin: 0 0 24px; color: var(--cinza); font-size: 15px; }

.folha-icone {
  display: inline-flex; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 18px;
  align-items: center; justify-content: center; background: var(--suave);
}
.folha-icone svg, .botao svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.folha-icone svg { color: var(--roxo); }

/* Código em 6 caixas */
.digitos { border: 0; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 64px)); justify-content: center; gap: 8px; }
.digito {
  width: 100%; aspect-ratio: 4 / 5; min-width: 0; text-align: center;
  border: 2px solid var(--fio); border-radius: var(--raio-md); background: var(--suave);
  font: 800 26px 'Nunito', system-ui, sans-serif; color: var(--prof); text-transform: uppercase;
  caret-color: var(--roxo); transition: border-color .15s, background .15s, transform .15s;
}
.digito:focus { outline: none; border-color: var(--roxo); background: #fff; transform: translateY(-2px); }
.digito.cheio { border-color: #CDB6E6; background: #fff; }
.digitos.errado .digito { border-color: var(--erro); animation: tremer .35s; }
@keyframes tremer { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Botões */
.botao {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 17px 28px; cursor: pointer;
  background: var(--roxo); color: #fff; text-decoration: none;
  font: 800 16px 'Nunito', system-ui, sans-serif; letter-spacing: .2px;
  box-shadow: 0 14px 28px -14px rgba(125, 20, 179, .8);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.botao:hover { background: #6A0F99; transform: translateY(-1px); }
.botao:active { transform: translateY(1px); }
.botao:disabled { opacity: .6; cursor: progress; transform: none; }
.botao:focus-visible, .digito:focus-visible, .campo:focus-visible, a:focus-visible { outline: 3px solid var(--ama); outline-offset: 2px; }

.erro { margin: -4px 0 16px; color: var(--erro); font-size: 14px; font-weight: 700; }

/* Formulário */
.progresso {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px;
  margin: -32px -22px 28px; padding: 16px 22px; border-radius: 28px 28px 0 0;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fio);
}
@media (min-width: 480px) { .progresso { margin: -40px -36px 32px; padding: 18px 36px; } }
.progresso-trilho { flex: 1; height: 8px; border-radius: 999px; background: var(--suave); overflow: hidden; }
.progresso-barra { width: 0; height: 100%; border-radius: inherit; background: var(--grad); transition: width .35s ease; }
.progresso-texto { font-size: 13px; font-weight: 800; color: var(--roxo); white-space: nowrap; }

.capitulo { border: 0; margin: 0 0 12px; padding: 0; }
.capitulo + .capitulo { padding-top: 24px; border-top: 1px dashed var(--fio); }
.capitulo legend { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 18px; }
.capitulo-num { font-size: 13px; font-weight: 800; color: var(--roxo); letter-spacing: .08em; }
.capitulo-nome { font-size: 22px; font-weight: 400; color: var(--prof); }

.pergunta { margin-bottom: 20px; }
.rotulo { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--prof); margin-bottom: 8px; }
.dica { display: block; font-size: 13px; font-weight: 600; color: var(--cinza); margin-top: 2px; }
.campo {
  width: 100%; display: block; padding: 14px 16px;
  border: 2px solid var(--fio); border-radius: var(--raio-md); background: var(--suave);
  font: 400 16px/1.45 'Nunito', system-ui, sans-serif; color: var(--prof);
  transition: border-color .15s, background .15s;
}
textarea.campo { min-height: 104px; resize: vertical; }
.campo:focus { outline: none; border-color: var(--roxo); background: #fff; }
.campo[aria-invalid="true"] { border-color: var(--erro); background: #fff; }
.campo::placeholder { color: #9B8DB3; }

.lgpd { margin: 8px 0 18px; font-size: 13px; color: var(--cinza); }
.lgpd a { color: var(--roxo); font-weight: 700; }

/* Enviado */
.folha-ok { text-align: center; padding-top: 44px; }
.folha-ok:focus { outline: none; }
.ok-lua { width: 72px; height: 72px; fill: var(--ama); margin-bottom: 14px; filter: drop-shadow(0 6px 16px rgba(125, 20, 179, .25)); animation: flutuar 6s ease-in-out infinite; }
.folha-ok h2 { font-size: 30px; margin-bottom: 10px; }
.folha-ok .nota { max-width: 360px; margin: 0 auto 26px; }
.data {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 22px 20px; border-radius: 28px; color: #fff;
  background: linear-gradient(160deg, var(--prof), var(--roxo));
}
.data-rotulo { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ama); }
.data-dia { font-size: 28px; font-weight: 800; line-height: 1.2; }
.data-hora { font-size: 18px; color: var(--lav); font-weight: 600; }

/* Conheça o Soninho App */
.conheca {
  position: relative; overflow: hidden; margin: 8px 0 20px; padding: 36px 22px 32px;
  border-radius: var(--raio-lg); color: #fff;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(254, 0, 224, .45), transparent 70%),
    linear-gradient(160deg, var(--noite) 0%, var(--prof) 45%, #830DE8 100%);
  animation: subir .8s .15s cubic-bezier(.2, .7, .2, 1) both;
}
@media (min-width: 480px) { .conheca { padding: 44px 40px 36px; } }
.selo-escuro { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .24); }
.conheca h2 { margin: 16px 0 6px; font-size: 32px; font-weight: 400; line-height: 1.15; letter-spacing: -.3px; }
.conheca h2 b { color: var(--ama); }
.conheca-texto p { margin: 0; color: var(--lav); font-size: 16px; }

.vitrine { position: relative; height: 340px; margin: 26px auto 18px; max-width: 360px; }
.cel { position: absolute; height: auto; filter: drop-shadow(0 24px 30px rgba(20, 0, 40, .5)); }
.cel-tras { width: 46%; left: 4%; top: 46px; transform: rotate(-8deg); opacity: .92; }
.cel-frente { width: 54%; right: 6%; top: 0; }
.aviso { position: absolute; width: 62%; height: auto; border-radius: 14px; filter: drop-shadow(0 10px 18px rgba(20, 0, 40, .45)); }
.aviso-1 { left: -2%; top: 18px; animation: flutuar 7s ease-in-out infinite; }
.aviso-2 { right: -4%; bottom: 26px; animation: flutuar 8s 1s ease-in-out infinite; }

.recursos { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.recursos li {
  position: relative; padding: 12px 14px 12px 42px; border-radius: var(--raio-md);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px; color: rgba(255, 255, 255, .86); line-height: 1.4;
}
.recursos li::before {
  content: ''; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px;
  background: var(--ama);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.9 6.2 5.8 11.1 12 12-6.2.9-11.1 5.8-12 12-.9-6.2-5.8-11.1-12-12C6.2 11.1 11.1 6.2 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.9 6.2 5.8 11.1 12 12-6.2.9-11.1 5.8-12 12-.9-6.2-5.8-11.1-12-12C6.2 11.1 11.1 6.2 12 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.recursos b { display: block; color: #fff; font-size: 15px; }
@media (min-width: 520px) { .recursos { grid-template-columns: 1fr 1fr; } .recursos li:last-child { grid-column: 1 / -1; } }

.lojas-titulo { margin: 0 0 12px; text-align: center; font-size: 18px; font-weight: 800; color: var(--ama); }
.lojas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 18px; }
.lojas a { display: block; border-radius: 10px; transition: transform .15s; }
.lojas a:hover { transform: translateY(-2px); }
.lojas img { display: block; width: 168px; height: 50px; object-fit: contain; border-radius: 10px; background: #000; }
.conheca-site { display: block; text-align: center; color: var(--lav); font-size: 14px; font-weight: 700; }

/* Rodapé */
.rodape {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px max(28px, env(safe-area-inset-bottom)); font-size: 13px; font-weight: 600; color: #8A7BA6;
}
.rodape svg { width: 14px; height: 14px; fill: var(--roxo); }

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