/* ============================================================
   Leve Infância — Formulário Single Page
   Kit Rounded Bold, fundo roxo, campos alinhados à esquerda
   ============================================================ */

@font-face {
  font-family: 'Kit Rounded';
  src: url('../../assets/fonts/kit-rounded-regular/kit-rounded-regular.woff2') format('woff2'),
       url('../../assets/fonts/kit-rounded-regular/kit-rounded-regular.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --c-purple:      #4750C4;
  --c-purple-light: #5964EF;
  --c-purple-top:  #5964F0;
  --c-white:       #FFFFFF;
  --c-pink:        #DF1F88;
  --c-yellow:      #FFE04A;
  --c-teal:        #3ACBC7;
  --c-error:       #FF6B6B;

  --font-body: 'Kit Rounded', 'Inter', system-ui, sans-serif;

  --dur-fast: 150ms;
  --dur-mid:  300ms;
  --dur-slow: 600ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-7:  2rem;
  --sp-8:  2.5rem;
  --sp-9:  3rem;
  --sp-10: 4rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--c-purple);
  color: var(--c-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---- Page wrapper ---- */
.form-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Intro (logo + título) ---- */
.form-intro {
  width: 100%;
  max-width: 600px;
  padding: var(--sp-7) clamp(1.25rem, 5vw, 2rem) var(--sp-5);
  text-align: left;
}

.form-intro__logo-link {
  display: inline-block;
  margin-bottom: var(--sp-5);
}

.form-intro__logo {
  width: clamp(80px, 15vw, 110px);
  height: auto;
}

.form-intro__title {
  font-family: var(--font-body);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--c-white);
  text-align: left;
}
.form-intro__sub {
  margin-top: var(--sp-3);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  text-align: left;
  max-width: 48ch;
}

/* ---- Form container ---- */
.form-container {
  flex: 1;
  width: 100%;
  max-width: 600px;
  padding: 0 clamp(1.25rem, 5vw, 2rem) var(--sp-9);
}

/* ---- Form ---- */
.form {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--sp-7), 4vw, var(--sp-9));
}

/* ---- Form group ---- */
.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ---- Labels ---- */
.form__label {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  text-align: left;
}

/* ---- Inputs ---- */
.form__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  padding: var(--sp-4) var(--sp-5);
  outline: none;
  transition: border-color var(--dur-fast) ease,
              background var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease;
  caret-color: var(--c-yellow);
}

.form__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.form__input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(89, 100, 239, 0.4);
}

.form__input.is-invalid {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.25);
}

.form__input.is-valid {
  border-color: var(--c-yellow);
}

/* ---- Select ---- */
.form__input--select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='white' stroke-width='2'><path d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form__input--select option {
  background: var(--c-purple);
  color: var(--c-white);
}

/* ---- Radio group ---- */
.form__radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.form__radio-option {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 700;
  line-height: 1.4;
}

.form__radio-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.form__radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease,
              background var(--dur-fast) ease;
  flex-shrink: 0;
}

.form__radio-option input[type="radio"]:checked {
  border-color: var(--c-yellow);
  background: var(--c-yellow);
  box-shadow: inset 0 0 0 3px var(--c-purple);
}

.form__radio-option:has(input:checked) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--c-yellow);
}

.form__radio-option input[type="radio"]:focus-visible {
  outline: 2px solid var(--c-white);
  outline-offset: 3px;
}

/* ---- Error messages ---- */
.form__error {
  display: none;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  font-weight: 700;
  color: var(--c-error);
  align-items: center;
  gap: var(--sp-2);
  padding-left: var(--sp-1);
  animation: shake 0.4s ease;
}

.form__error.is-visible {
  display: flex;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(3px); }
}

/* ---- Honeypot ---- */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---- Submit button ---- */
.form__submit-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: var(--c-purple);
  background: var(--c-yellow);
  border-radius: 999px;
  padding: clamp(1rem, 2.5vw, 1.2rem) clamp(2rem, 5vw, 3rem);
  transition: background var(--dur-fast) ease,
              transform var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

.btn-submit:hover {
  background: #f5d320;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form__disclaimer {
  font-size: clamp(0.78rem, 1.3vw, 0.85rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  max-width: 48ch;
}

/* ============================================================
   THANK YOU SCREEN
   ============================================================ */
.thank-you {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--c-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 5vw, 2rem);
  animation: fadeInUp 0.7s var(--ease-out) both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thank-you__inner {
  max-width: 600px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

/* ---- Animated check ---- */
.thank-you__check {
  width: 80px;
  height: 80px;
  margin-bottom: var(--sp-4);
}

.thank-you__check-svg {
  width: 80px;
  height: 80px;
}

.thank-you__circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle 0.7s 0.3s var(--ease-out) forwards;
}

.thank-you__tick {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawTick 0.5s 0.8s var(--ease-out) forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawTick {
  to { stroke-dashoffset: 0; }
}

.thank-you__title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-white);
  animation: fadeInUp 0.6s 0.5s var(--ease-out) both;
}

.thank-you__text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  animation: fadeInUp 0.6s 0.7s var(--ease-out) both;
}

.thank-you__quote {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  font-style: normal;
  color: var(--c-yellow);
  border-left: 3px solid var(--c-yellow);
  padding-left: var(--sp-4);
  text-align: left;
  max-width: 46ch;
  line-height: 1.5;
  animation: fadeInUp 0.6s 0.9s var(--ease-out) both;
}

.thank-you__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  animation: fadeInUp 0.6s 1.1s var(--ease-out) both;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  color: var(--c-purple);
  background: var(--c-yellow);
  border-radius: 999px;
  padding: clamp(1rem, 2.5vw, 1.2rem) clamp(2rem, 5vw, 3rem);
  transition: background var(--dur-fast) ease,
              transform var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease;
  white-space: nowrap;
}

.btn-whatsapp:hover {
  background: #f5d320;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp:active { transform: translateY(0); }

.thank-you__micro {
  font-size: clamp(0.8rem, 1.4vw, 0.9rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   CONFETTI (canvas behind thank-you)
   ============================================================ */
#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* ============================================================
   PAGE ENTER ANIMATION
   ============================================================ */
@keyframes form-enter {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-intro__logo-link {
  animation: form-enter 0.55s var(--ease-out) 0.05s both;
}
.form-intro__title {
  animation: form-enter 0.65s var(--ease-out) 0.18s both;
}
.form-intro__sub {
  animation: form-enter 0.65s var(--ease-out) 0.3s both;
}
.form__group:nth-child(1) { animation: form-enter 0.55s var(--ease-out) 0.42s both; }
.form__group:nth-child(2) { animation: form-enter 0.55s var(--ease-out) 0.5s  both; }
.form__group:nth-child(3) { animation: form-enter 0.55s var(--ease-out) 0.58s both; }
.form__group:nth-child(4) { animation: form-enter 0.55s var(--ease-out) 0.66s both; }
.form__group:nth-child(5) { animation: form-enter 0.55s var(--ease-out) 0.74s both; }
.form__group:nth-child(6) { animation: form-enter 0.55s var(--ease-out) 0.82s both; }
.form__submit-wrap        { animation: form-enter 0.55s var(--ease-out) 0.9s  both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Desktop — sem ajustes extras, já centralizado */

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  .form-intro__logo-link,
  .form-intro__title,
  .form-intro__sub,
  .form__group,
  .form__submit-wrap {
    animation: none !important;
  }
  .thank-you,
  .thank-you__title,
  .thank-you__text,
  .thank-you__quote,
  .thank-you__actions {
    animation: none !important;
  }
  .thank-you__circle,
  .thank-you__tick {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
  .form__error {
    animation: none !important;
  }
}
