/* Dawn — joias sob medida */

:root {
  --navy-900: #1A2B52;
  --navy-800: #22376A;
  --navy-700: #2B4380;
  --sparkle:  #93A9C4;
  --ivory:    #F4F6FA;
  --ivory-dim: #C3CDDE;
  --ivory-mute: #8FA0BC;

  --font-display: 'Playfair Display', Didot, 'Bodoni MT', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --step: clamp(1rem, 2vw, 1.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--navy-800);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- utilidades ---------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.screen { display: none; }
.screen.is-active { display: block; }
/* A capa usa grid para centralizar, mas só quando está ativa — senão esta
   regra venceria o display:none acima e a capa ficaria sempre na tela. */
.cover.is-active { display: grid; }

/* ---------- capa ---------- */

.cover {
  position: relative;
  min-height: 100svh;
  place-items: center;
  text-align: center;
  padding: calc(var(--step) * 2);
  isolation: isolate;
}

.cover__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, var(--navy-700) 0%, transparent 70%),
    var(--navy-900);
}

.cover__bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  opacity: .18;
  mix-blend-mode: luminosity;
}

.cover__inner {
  max-width: 620px;
  animation: rise .9s var(--ease) both;
}

.logo {
  color: var(--ivory);
  width: 92px;
  height: auto;
  margin-bottom: calc(var(--step) * 2);
}

.cover h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 calc(var(--step) * 1.5);
}

.cover p {
  color: var(--ivory-dim);
  margin: 0 0 var(--step);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.cover p:last-of-type { margin-bottom: calc(var(--step) * 2.2); }

/* ---------- botões ---------- */

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: .95rem 2.4rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}

.btn--primary {
  background: var(--ivory);
  color: var(--navy-900);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .28);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 0, 0, .38); }
.btn--primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--ghost {
  background: transparent;
  color: var(--ivory-mute);
  padding: .95rem 1.4rem;
  font-weight: 500;
}

.btn--ghost:hover { color: var(--ivory); }

:where(button, input, a):focus-visible {
  outline: 2px solid var(--sparkle);
  outline-offset: 3px;
}

/* ---------- formulário ---------- */

.form-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.progress {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: var(--step);
  padding: var(--step) calc(var(--step) * 1.5);
  background: linear-gradient(var(--navy-800) 70%, transparent);
}

.progress__track {
  flex: 1;
  height: 2px;
  background: rgba(244, 246, 250, .16);
  border-radius: 2px;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--sparkle);
  transition: width .45s var(--ease);
}

.progress__count {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ivory-mute);
  font-variant-numeric: tabular-nums;
}

.step-area {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--step) calc(var(--step) * 1.5) calc(var(--step) * 3);
}

.step {
  display: none;
  width: 100%;
  max-width: 580px;
}

.step.is-active {
  display: block;
  animation: rise .5s var(--ease) both;
}

.step__eyebrow {
  color: var(--sparkle);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 .6rem;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.25;
  margin: 0 0 .5rem;
}

.step__help {
  color: var(--ivory-mute);
  font-size: .95rem;
  margin: 0 0 calc(var(--step) * 1.6);
}

/* opções */

.options { display: grid; gap: .6rem; margin: 0 0 calc(var(--step) * 1.6); }

.option {
  display: flex; align-items: center; gap: .9rem;
  width: 100%;
  padding: .9rem 1.2rem;
  text-align: left;
  font: inherit;
  color: var(--ivory);
  background: rgba(244, 246, 250, .05);
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s var(--ease);
}

.option:hover { background: rgba(244, 246, 250, .1); transform: translateX(3px); }

.option[aria-pressed="true"] {
  border-color: var(--ivory);
  background: rgba(244, 246, 250, .12);
}

.option__key {
  flex: none;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(244, 246, 250, .35);
  font-size: .75rem;
  font-weight: 600;
  color: var(--ivory-dim);
}

.option[aria-pressed="true"] .option__key {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--navy-900);
}

/* campos */

.field { margin-bottom: calc(var(--step) * 1.4); }

.field label {
  display: block;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .4rem;
}

.field input {
  width: 100%;
  padding: .7rem 0;
  font: inherit;
  color: var(--ivory);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(244, 246, 250, .3);
  transition: border-color .2s;
}

.field input::placeholder { color: var(--ivory-mute); opacity: .7; }
.field input:focus { outline: 0; border-bottom-color: var(--sparkle); }

.field__error {
  display: none;
  color: #E8846B;
  font-size: .85rem;
  margin-top: .4rem;
}

.field.has-error .field__error { display: block; }
.field.has-error input { border-bottom-color: #E8846B; }

.privacy {
  display: flex; gap: .6rem;
  color: var(--ivory-mute);
  font-size: .82rem;
  line-height: 1.5;
  margin: calc(var(--step) * -0.4) 0 calc(var(--step) * 1.4);
}

/* resumo */

.summary {
  border-top: 1px solid rgba(244, 246, 250, .16);
  margin: 0 0 calc(var(--step) * 1.8);
}

.summary__row {
  display: flex; justify-content: space-between; gap: var(--step);
  padding: .85rem 0;
  border-bottom: 1px solid rgba(244, 246, 250, .16);
}

.summary__label { color: var(--ivory-mute); font-size: .9rem; }
.summary__value { font-weight: 600; text-align: right; }

/* ações */

.actions { display: flex; align-items: center; gap: .5rem; }
.actions .btn--primary { margin-left: auto; }

/* Nas etapas de escolha o avanço é automático, então a linha traz só o
   voltar — afastado das opções para não ser clicado sem querer. */
.actions--back { margin-top: calc(var(--step) * 1.6); }

.hint {
  color: var(--ivory-mute);
  font-size: .8rem;
  margin-top: calc(var(--step) * 1.2);
}

.hint kbd {
  font: inherit; font-size: .75rem;
  padding: .1rem .4rem;
  border: 1px solid rgba(244, 246, 250, .3);
  border-radius: 4px;
}

.btn.is-loading {
  opacity: .65;
  cursor: progress;
}

.btn:disabled { pointer-events: none; }

/* ---------- conclusão ---------- */

/* Instagram na capa — discreto, para não competir com o botão. */
.cover__social {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: calc(var(--step) * 2.4);
  color: var(--sparkle);
  font-size: .82rem;
  letter-spacing: .06em;
  text-decoration: none;
  opacity: .75;
  transition: opacity .2s, color .2s;
}

.cover__social svg {
  width: 1.05em;
  height: 1.05em;
}

.cover__social:hover,
.cover__social:focus-visible {
  opacity: 1;
  color: var(--ivory);
}

.social-link {
  color: var(--sparkle);
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 169, 196, .4);
  transition: color .2s, border-color .2s;
}

.social-link:hover { color: var(--ivory); border-color: var(--ivory); }


.done { text-align: center; }
.done .logo { width: 64px; margin-bottom: var(--step); }

.done__spark {
  color: var(--sparkle);
  font-size: 2rem;
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes twinkle {
  0%, 100% { opacity: .5; transform: scale(.9); }
  50%      { opacity: 1;  transform: scale(1.1); }
}

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

@media (max-width: 480px) {
  body { font-size: 16px; }
  .actions { flex-wrap: wrap; }
  .actions .btn--primary { width: 100%; margin-left: 0; order: -1; }
}
