/* ============================================================
   Diagnóstico de IA · 6º Aulão CADA
   Design system: Jet Black · Soft White · Bold Blue · Light Blue
   Eclipse com brilho, grão, pílulas e etiquetas em [ mono ]
   ============================================================ */

:root {
  --black: #0d0d0d;          /* Jet Black */
  --white: #fafafa;          /* Soft White */
  --blue: #1d25b5;           /* Bold Blue (como aparece nas peças) */
  --blue-2: #3a48e8;
  --sky: #67baf4;            /* Light Blue */
  --cream: #dccbb0;          /* borda quente do eclipse */

  --surface: #141415;
  --surface-2: #1a1a1c;
  --w-90: rgba(250, 250, 250, .9);
  --w-72: rgba(250, 250, 250, .72);
  --w-55: rgba(250, 250, 250, .55);
  --w-40: rgba(250, 250, 250, .4);
  --w-12: rgba(250, 250, 250, .12);
  --w-08: rgba(250, 250, 250, .08);
  --w-05: rgba(250, 250, 250, .05);
  --err: #ff8577;
  --warn: #f3c97a;

  --f-display: "Sora", system-ui, sans-serif;
  --f-body: "Geist", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--black);
  color: var(--white);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: var(--white); }

/* ---------- Grão ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .085;
  mix-blend-mode: overlay;
}

/* ---------- Layout ---------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  min-height: 100dvh;
}

/* ---------- Pôster / Eclipse ---------- */
.poster {
  position: sticky; top: 20px;
  height: calc(100dvh - 40px);
  margin: 20px 0 20px 20px;
  border-radius: 28px;
  border: 1px solid var(--w-08);
  background: #0a0a0b;
  overflow: hidden;
  container-type: size;
  isolation: isolate;
}
.poster__bar {
  position: absolute; z-index: 3; left: 28px; right: 28px; top: 24px;
  display: flex; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--w-08);
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--w-72);
}
.eclipse { position: absolute; inset: 0; z-index: 1; --w: 150cqw; --top: 36cqh; }
.eclipse > div { position: absolute; left: 50%; width: var(--w); aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); }
.eclipse__halo { top: calc(var(--top) - 11cqw); background: var(--cream); opacity: .6; filter: blur(52px); animation: breathe 9s ease-in-out infinite; }
.eclipse__rim  { top: calc(var(--top) - 5cqw); background: var(--blue); filter: blur(30px); }
.eclipse__body { top: var(--top); background: var(--black); filter: blur(16px); }
@keyframes breathe { 50% { opacity: .42; transform: translateX(-50%) translateY(6px); } }

.poster__foot { position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 26px; }
.poster__title {
  margin: 0 0 26px;
  font-family: var(--f-body); font-weight: 300;
  font-size: clamp(30px, 3.3vw, 52px); line-height: .98; letter-spacing: -.025em;
  text-transform: uppercase;
  color: var(--white);
}
.poster__title span { color: var(--sky); white-space: nowrap; }
.poster__meta {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--w-08);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--w-55);
}

/* ---------- Coluna do formulário ---------- */
.main {
  width: 100%; max-width: 560px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 88px) clamp(20px, 4vw, 48px) 28px;
  display: flex; flex-direction: column;
}
.tag {
  margin: 0 0 18px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sky);
}
.intro__title {
  margin: 0 0 16px;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(30px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.04em;
  text-wrap: balance;
}
.intro__title em { font-style: normal; color: var(--sky); }
.intro__lead { margin: 0 0 36px; font-size: 16.5px; color: var(--w-55); text-wrap: pretty; max-width: 31em; }

/* Progresso */
.progress { margin-bottom: 28px; }
.progress__steps { list-style: none; display: flex; justify-content: space-between; margin: 0 0 12px; padding: 0; }
.progress__steps li {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--w-40); transition: color .3s;
}
.progress__steps li span { margin-right: 4px; }
.progress__steps li.is-current { color: var(--white); }
.progress__steps li.is-done { color: var(--w-72); }
.progress__track { position: relative; height: 2px; border-radius: 2px; background: var(--w-08); overflow: hidden; }
.progress__fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  box-shadow: 0 0 12px rgba(103, 186, 244, .7);
  border-radius: 2px;
  transition: width .6s var(--ease);
}

/* Etapas */
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { display: none; }
.step.is-active { display: block; animation: stepIn .5s var(--ease) both; }
.step.is-active.from-left { animation-name: stepInLeft; }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes stepInLeft { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* Campos */
.field { margin-bottom: 20px; }
.field > label, .field > legend {
  display: block; margin-bottom: 8px; padding: 0;
  font-size: 13.5px; font-weight: 500; color: var(--w-72);
}
.opt { margin-left: 6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--w-40); }

.control { position: relative; display: flex; align-items: center; }
.control input, .control select {
  width: 100%;
  height: 56px;
  padding: 0 46px 0 18px;
  border-radius: 16px;
  border: 1px solid var(--w-08);
  background: var(--surface);
  font-size: 16.5px; font-weight: 400;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.control input::placeholder { color: rgba(250, 250, 250, .28); }
.control input:hover, .control select:hover { background: var(--surface-2); border-color: var(--w-12); }
.control input:focus, .control select:focus {
  border-color: rgba(103, 186, 244, .75);
  background: #121318;
  box-shadow: 0 0 0 4px rgba(103, 186, 244, .1), 0 0 28px -6px rgba(29, 37, 181, .8);
}
.control input:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  -webkit-box-shadow: 0 0 0 100px var(--surface) inset;
  caret-color: var(--white);
}

.control--prefix input { padding-left: 64px; }
.control__prefix {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  padding-right: 12px; border-right: 1px solid var(--w-12);
  font-family: var(--f-mono); font-size: 14px; color: var(--w-55);
  pointer-events: none;
}
.control--at input { padding-left: 38px; }
.control--at .control__prefix { border: 0; padding: 0; font-size: 16px; color: var(--sky); }

/* Rótulo flutuante: fica dentro do campo e sobe quando a pessoa digita */
.control.control--float input, .control.control--float select { padding-top: 18px; padding-bottom: 0; }
.control--float > label {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  margin: 0; max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis;
  font-size: 15.5px; font-weight: 400; color: rgba(250, 250, 250, .42); white-space: nowrap;
  pointer-events: none;
  transition: top .22s var(--ease), font-size .22s var(--ease), color .2s;
}
.control--float input::placeholder { color: transparent; transition: color .2s; }
.control--float input:focus::placeholder { color: rgba(250, 250, 250, .26); }
.control--float input:focus + label,
.control--float input:not(:placeholder-shown) + label,
.control--float input:-webkit-autofill + label,
.control--float select + label { top: 16px; font-size: 11.5px; color: var(--w-55); }
.control--float input:focus + label { color: var(--sky); }
.control--float .control__prefix { top: calc(50% + 8px); }
.control--float.control--prefix:has(input:placeholder-shown:not(:focus)) .control__prefix { opacity: 0; }
.control__prefix { transition: opacity .2s; }
.lead-short { display: none; }

.control--select select {
  padding: 0 32px 0 18px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-opacity='.6' stroke-width='2' stroke-linecap='round'><path d='M7 10l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.control--select select option { background: #161617; color: var(--white); }
.control--inline { margin-top: 10px; }
.control--inline input { height: 50px; }

/* estados */
.control__ok, .control__spin { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease); }
.control__ok { border-radius: 50%; background: var(--sky); box-shadow: 0 0 14px rgba(103, 186, 244, .65); }
.control__ok::after { content: ""; position: absolute; left: 6.2px; top: 3.4px; width: 4.5px; height: 8px; border: solid var(--black); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.control__spin { border-radius: 50%; border: 2px solid var(--w-12); border-top-color: var(--sky); }
.field.is-valid .control__ok { opacity: 1; transform: none; }
.field.is-checking .control__spin { opacity: 1; transform: none; animation: spin .7s linear infinite; }
.field.is-checking .control__ok { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.field.is-invalid .control input, .field.is-invalid .control select { border-color: rgba(255, 133, 119, .7); background: rgba(255, 133, 119, .06); }
.field.is-invalid .control input:focus { box-shadow: 0 0 0 4px rgba(255, 133, 119, .12); }

.msg { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--w-55); }
.msg:empty { display: none; }
.msg.is-err { color: var(--err); }
.msg.is-warn { color: var(--warn); }
.msg--row { margin: -12px 2px 20px; }
.msg button.suggest {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--sky); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

.row { display: flex; gap: 10px; }
.field--uf { width: 98px; flex: none; }
.field--grow { flex: 1; min-width: 0; }

/* Pílulas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--even { display: grid; grid-template-columns: repeat(5, 1fr); }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--w-12);
  background: transparent;
  font-size: 14.5px; font-weight: 500; color: var(--w-72);
  text-align: center; line-height: 1.2;
  transition: background .22s var(--ease), border-color .22s, color .22s, box-shadow .3s var(--ease);
}
.pill:hover span { border-color: rgba(250, 250, 250, .26); color: var(--white); background: var(--w-05); }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(103, 186, 244, .22); }
.pill input:checked + span {
  color: var(--white);
  border-color: var(--blue-2);
  background: radial-gradient(120% 140% at 50% 0%, var(--blue-2), var(--blue) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 28px -10px rgba(58, 72, 232, .95);
}
.chips--even .pill span { padding: 10px 4px; }
.field.is-invalid .pill span { border-color: rgba(255, 133, 119, .5); }

/* Alerta */
.alert { margin: 4px 0 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 133, 119, .35); background: rgba(255, 133, 119, .07); color: #ffc6bf; font-size: 14px; }

/* Botões */
.actions { display: flex; gap: 10px; margin-top: 30px; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 26px;
  border-radius: 999px; border: 0;
  font-family: var(--f-body); font-size: 16.5px; font-weight: 600; letter-spacing: -.005em;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary {
  flex: 1;
  color: var(--black);
  background: linear-gradient(180deg, #ffffff, #e4e4e6);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), 0 0 0 1px rgba(250, 250, 250, .1), 0 0 44px -6px rgba(250, 250, 250, .28);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), 0 0 0 1px rgba(250, 250, 250, .14), 0 0 56px -4px rgba(250, 250, 250, .36); }
.btn--primary:active { transform: translateY(1px) scale(.99); }
.btn--primary .btn__arrow { transition: transform .3s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(3px); }
.btn--ghost { width: 58px; padding: 0; flex: none; color: var(--w-72); background: transparent; border: 1px solid var(--w-12); }
.btn--ghost:hover { color: var(--white); border-color: rgba(250, 250, 250, .3); background: var(--w-05); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(103, 186, 244, .3); }
.btn__spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(13, 13, 13, .2); border-top-color: var(--black); animation: spin .7s linear infinite; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__arrow { display: none; }
.btn.is-loading .btn__spin { display: inline-block; }
.btn--wide { width: 100%; flex: none; }
.btn__ig .dot { fill: currentColor; stroke: none; }

.legal { margin: 16px auto 0; max-width: 30em; text-align: center; font-size: 12.5px; line-height: 1.55; color: var(--w-40); }
.legal b { font-weight: 500; color: var(--w-72); }

/* Sucesso */
.done { text-align: center; padding: 18px 0 6px; outline: none; animation: stepIn .6s var(--ease) both; }
.done__orb {
  position: relative;
  width: 104px; height: 104px; margin: 8px auto 30px;
  border-radius: 50%;
  background: var(--black);
  box-shadow:
    0 -6px 18px 2px rgba(58, 72, 232, .95),
    0 -14px 46px 8px rgba(29, 37, 181, .75),
    0 -26px 80px 14px rgba(220, 203, 176, .22);
  animation: rise 1.1s var(--ease) both;
}
.done__orb svg { position: absolute; inset: 28px; width: 48px; height: 48px; }
.done__check { fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .7s var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done .tag { margin-bottom: 10px; }
.done__title { margin: 0 0 12px; font-family: var(--f-display); font-weight: 600; font-size: clamp(28px, 3vw, 36px); letter-spacing: -.04em; line-height: 1.08; text-wrap: balance; }
.done__text { margin: 0 auto 30px; max-width: 26em; color: var(--w-55); }
.done__text strong { color: var(--white); font-weight: 500; white-space: nowrap; }
.link { display: inline-block; margin-top: 18px; padding: 6px; border: 0; background: none; color: var(--w-40); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.link:hover { color: var(--white); }

/* Rodapé */
.foot {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 56px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--w-40);
}
.foot span:last-child { color: var(--w-72); }

/* Entrada */
.reveal { opacity: 0; transform: translateY(12px); animation: reveal .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 120ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- Celular / tablet ---------- */
@media (max-width: 960px) {
  .page { display: block; }
  /* cabeçalho compacto: a etapa 1 inteira cabe na tela sem rolar */
  .poster {
    position: relative; top: auto;
    height: 204px; margin: 0;
    border: 0; border-radius: 0;
    background: var(--black);
  }
  .poster__bar { left: 18px; right: 18px; top: calc(14px + env(safe-area-inset-top)); padding: 0; border-bottom: 0; font-size: 10.5px; }
  .poster__foot { display: none; }
  .eclipse { --w: 190cqw; --top: calc(76px + env(safe-area-inset-top)); }
  .eclipse__halo { top: calc(var(--top) - 13cqw); opacity: .55; filter: blur(28px); }
  .eclipse__rim { top: calc(var(--top) - 6cqw); filter: blur(18px); }
  .eclipse__body { filter: blur(12px); }
  .main { margin-top: -82px; position: relative; z-index: 2; padding-top: 0; }
  .intro { text-align: center; }
  .intro .tag { display: none; }
  .intro__title { font-size: 27px; margin-bottom: 8px; letter-spacing: -.035em; }
  .intro__lead { margin: 0 auto 18px; max-width: 23em; font-size: 14.5px; line-height: 1.45; }
  .lead-long { display: none; }
  .lead-short { display: inline; }

  .progress { margin-bottom: 14px; }
  .progress__steps { margin-bottom: 8px; }
  .progress__steps li { font-size: 10.5px; }
  .field { margin-bottom: 10px; }
  .field > legend { margin-bottom: 7px; font-size: 13px; }
  .control input, .control select { height: 54px; }
  .msg { margin-top: 5px; font-size: 12.5px; }
  .msg--row { margin: -5px 2px 10px; }
  .chips { gap: 6px; }
  .pill span { min-height: 38px; padding: 8px 13px; font-size: 13.5px; }
  .row { gap: 8px; }
  .actions { margin-top: 16px; }
  .btn { height: 54px; }
  .btn--ghost { width: 54px; }
  .legal { margin-top: 12px; font-size: 12px; }
}
@media (max-width: 520px) {
  .main { padding-left: 18px; padding-right: 18px; }
  .chips--even .pill span { font-size: 13px; padding: 8px 2px; }
  .foot { flex-direction: column; align-items: center; gap: 4px; padding-top: 40px; padding-bottom: env(safe-area-inset-bottom); }
}
/* celulares baixos (ex.: iPhone SE): tira o texto de apoio e encolhe o topo */
@media (max-width: 960px) and (max-height: 640px) {
  .poster { height: 150px; }
  .eclipse { --top: calc(52px + env(safe-area-inset-top)); }
  .main { margin-top: -72px; }
  .intro__title { font-size: 24px; margin-bottom: 14px; }
  .intro__lead { display: none; }
}

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