/* Nimbo — lista de espera. Uma família só (Nunito), céu pontilhado desenhado em canvas (script.js). */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #140f24;
  --indigo: #2a1d54;
  --lilac: #b48cff;
  --cream: #f6f0ff;
  --dim: #e4dcfa;
  --err: #ffc2cf;
  --px: 4px;                 /* tamanho de um "pixel" do mascote e do céu */
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: "Nunito", ui-rounded, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  image-rendering: pixelated;
}

h1, h2, h3, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }

h1, h2 {
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, min(8.2vw, 11.5vh), 6.5rem); }
h2 { font-size: clamp(2.125rem, 5.2vw, 4.25rem); }

a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nimbo {
  width: calc(48 * var(--px));
  height: calc(52 * var(--px));
  image-rendering: pixelated;
  display: block;
}

/* ---------- topo ---------- */

.hero {
  min-height: 100svh;
  padding: clamp(48px, 9vh, 112px) var(--gutter) clamp(24px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero h1 { max-width: 13ch; }
.lead {
  margin-top: clamp(20px, 3vh, 32px);
  max-width: 44ch;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  color: var(--dim);
  text-wrap: pretty;
}

.join { width: 100%; max-width: 520px; margin: clamp(28px, 4.5vh, 44px) 0 clamp(24px, 4vh, 48px); }
.field {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgb(246 240 255 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(246 240 255 / 0.28);
  backdrop-filter: blur(6px);
}
.field:focus-within { box-shadow: inset 0 0 0 2px var(--cream); }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--cream);
  font: inherit;
  padding: 0 0 0 20px;
  outline: none;
}
.field input::placeholder { color: rgb(246 240 255 / 0.55); }

button, .button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  font: inherit;
  font-weight: 700;
  padding: 13px 24px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover, .button:hover { background: #fff; }
button:active, .button:active { transform: translateY(1px); }
button[disabled] { opacity: 0.7; cursor: progress; }

.ts:not(:empty) { margin-top: 12px; display: flex; justify-content: center; }
.status { margin-top: 12px; min-height: 1.55em; font-size: 1rem; color: var(--err); }
.status:empty { display: none; }
.note { margin-top: 12px; font-size: 0.9375rem; color: var(--dim); }

.done { max-width: 480px; margin: clamp(28px, 4.5vh, 44px) 0 clamp(24px, 4vh, 48px); outline: none; }
.done h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; }
.done p { margin-top: 10px; color: var(--dim); }

.nimbo-hero {
  margin-top: auto;
  flex: none;
  animation: bob 3.2s steps(4, end) infinite alternate;
}
@keyframes bob {
  from { transform: translateY(0); }
  to { transform: translateY(calc(var(--px) * -3)); }
}

/* ---------- o que é / como funciona ---------- */

.what, .how {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(96px, 16vh, 176px) var(--gutter) 0;
}

.facts {
  margin-top: clamp(36px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vh, 56px) clamp(32px, 6vw, 96px);
}
.facts dt, .steps h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.facts dd, .steps p { margin-top: 8px; color: var(--dim); max-width: 42ch; }

.steps {
  margin-top: clamp(36px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 64px);
  counter-reset: passo;
}
.steps li { counter-increment: passo; }
.steps .nimbo { --px: 3px; margin-bottom: 20px; }
.steps h3::before { content: counter(passo) ". "; }

/* ---------- chamada final ---------- */

.cta {
  min-height: 100svh;
  padding: clamp(96px, 17vh, 176px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}
.cta h2 { max-width: 14ch; font-size: clamp(2.5rem, 6.4vw, 5.5rem); }

/* ---------- rodapé ---------- */

footer {
  background: var(--night);
  padding: 40px var(--gutter) 48px;
  font-size: 1rem;
  color: var(--dim);
}
.foot {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  align-items: baseline;
  justify-content: space-between;
}
.foot strong { color: var(--cream); font-weight: 800; font-size: 1.25rem; margin-right: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot [aria-current] { color: var(--cream); text-decoration: none; font-weight: 700; }

/* ---------- páginas de texto (privacidade, 404) ---------- */

.plain { background: var(--night); min-height: 100vh; display: flex; flex-direction: column; }
.doc { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) var(--gutter); }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-top: 32px; }
.doc .lead { max-width: 52ch; }
.doc h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin-top: 40px; }
.doc h2 + p { margin-top: 8px; color: var(--dim); max-width: 62ch; }
.doc .button { margin-top: 32px; }

@media (max-width: 760px) {
  .facts, .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center; }
  .steps .nimbo { --px: 2px; grid-row: span 2; margin: 0; }
  .steps h3 { align-self: end; }
  .steps p { align-self: start; }
}
@media (max-width: 520px) {
  .field { flex-direction: column; border-radius: 28px; padding: 8px; }
  .field input { padding: 12px 16px; text-align: center; }
  .nimbo-hero { --px: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nimbo-hero { animation: none; }
}
