/* ==========================================================================
   Section: contato — glass form card (~900px) over orange-left / blue-right glows.
   States on .ct-card[data-state]: idle | loading | success | fallback | error
   Every rule is scoped under .section--contato (see _build/CONTRACT.md).
   ========================================================================== */
.section--contato {
  --ct-err: #ff6b57;
  isolation: isolate;
}
.section--contato > .container { position: relative; z-index: 1; }

/* ---- Glows ---------------------------------------------------------------- */
.section--contato .ct-glow { --glow-w: 640px; --glow-h: 560px; --glow-opacity: .42; top: 44%; }
.section--contato .ct-glow--orange { left: max(-10%, calc(50% - 900px)); }
.section--contato .ct-glow--blue { right: max(-10%, calc(50% - 900px)); top: 50%; --glow-opacity: .38; }

/* ---- Card ----------------------------------------------------------------- */
.section--contato .ct-card {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  padding: 40px;
  border-radius: var(--r-20);
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 60% at 0% 0%, rgba(218, 78, 36, .07) 0%, rgba(218, 78, 36, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(0, 152, 243, .07) 0%, rgba(0, 152, 243, 0) 60%),
    rgba(6, 6, 6, .78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05);
}
/* gradient ring: orange (top-left) → neutral → blue (bottom-right) */
.section--contato .ct-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 137, 24, .65) 0%, rgba(218, 78, 36, .25) 16%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 66%, rgba(0, 152, 243, .3) 84%, rgba(0, 152, 243, .7) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.section--contato .ct-card.is-morphing { overflow: hidden; }

/* ---- "What happens next" steps ----------------------------------------------- */
.section--contato .ct-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 30px;
  padding: 0 0 26px;
  list-style: none;
  border-bottom: 1px solid var(--border-soft);
}
.section--contato .ct-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--text-2);
  white-space: nowrap;
}
.section--contato .ct-step:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 1px;
  margin-left: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
}
.section--contato .ct-step__n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #151515, #070707);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 1.5px 0 2px -1px rgba(0, 152, 243, .9), inset -1.5px 0 2px -1px rgba(218, 78, 36, .95);
}

/* ---- Fields ----------------------------------------------------------------- */
.section--contato .ct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.section--contato .ct-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.section--contato .ct-field--full { grid-column: 1 / -1; }
.section--contato .field__label { color: var(--text-2); }
.section--contato .ct-req { color: var(--orange-bright); margin-left: 1px; }
.section--contato .ct-opt { color: var(--text-4); font-weight: 400; }

.section--contato .input {
  height: 50px;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background-color: #060606;
  font-size: 16px;
  color: var(--text);
}
.section--contato textarea.input { height: auto; min-height: 124px; line-height: 24px; resize: vertical; }
.section--contato .input:hover { border-color: var(--border-strong); }
.section--contato .input:focus,
.section--contato .input:focus-visible {
  outline: none;
  border-color: rgba(218, 78, 36, .8);
  background-color: #080808;
  box-shadow: 0 0 0 4px rgba(218, 78, 36, .16), 0 0 24px -8px rgba(218, 78, 36, .5);
}
.section--contato .input[aria-invalid="true"] { border-color: rgba(255, 107, 87, .75); }
.section--contato .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 107, 87, .16); }
.section--contato select.input { cursor: pointer; }
.section--contato select.input:has(option[value=""]:checked) { color: var(--text-4); }
.section--contato select.input option { color: #fff; background: #0b0b0b; }
.section--contato .input:-webkit-autofill,
.section--contato .input:-webkit-autofill:hover,
.section--contato .input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0b0b0b inset;
  caret-color: #fff;
  transition: background-color 9999s;
}

.section--contato .ct-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: var(--ct-err);
}
.section--contato .ct-error::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) 50% 3px / 1.6px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 9.5px / 1.6px 1.6px no-repeat;
  box-shadow: inset 0 0 0 1.3px currentColor;
}

/* consent checkbox */
.section--contato .ct-consent { margin-top: 2px; }
.section--contato .ct-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-2);
}
.section--contato .ct-check__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.section--contato .ct-check__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #060606;
  color: #fff;
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.section--contato .ct-check__box svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(.4) rotate(-12deg);
  transition: opacity .2s var(--ease-out), transform .45s var(--ease-spring);
}
.section--contato .ct-check:hover .ct-check__box { border-color: rgba(255, 255, 255, .3); }
.section--contato .ct-check__input:checked + .ct-check__box {
  border-color: rgba(255, 137, 24, .9);
  background: linear-gradient(160deg, #FF8918 0%, #DA4E24 55%, #A22904 100%);
  box-shadow: 0 0 16px -4px rgba(218, 78, 36, .8);
}
.section--contato .ct-check__input:checked + .ct-check__box svg { opacity: 1; transform: none; }
.section--contato .ct-check__input:focus-visible + .ct-check__box { outline: 2px solid var(--orange); outline-offset: 3px; }
.section--contato .ct-check__input[aria-invalid="true"] + .ct-check__box { border-color: rgba(255, 107, 87, .8); }
.section--contato .ct-check a,
.section--contato .ct-privacy a {
  color: var(--orange-bright);
  text-decoration: underline;
  text-decoration-color: rgba(255, 137, 24, .4);
  text-underline-offset: 3px;
  transition: text-decoration-color .25s var(--ease-out), color .25s var(--ease-out);
}
.section--contato .ct-check a:hover,
.section--contato .ct-privacy a:hover { color: #FFA54D; text-decoration-color: currentColor; }

/* honeypot */
.section--contato .ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* submit */
.section--contato .ct-actions { gap: 16px; margin-top: 6px; }
.section--contato .ct-submit { --btn-h: 54px; font-size: 16px; }
.section--contato .ct-spinner {
  position: relative;
  z-index: 2;
  display: none;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22);
  border-top-color: #fff;
  border-right-color: var(--orange-bright);
  animation: contato-spin .75s linear infinite;
}
.section--contato .ct-submit.is-loading { pointer-events: none; }
.section--contato .ct-submit.is-loading .ct-spinner { display: inline-block; }
.section--contato .ct-submit.is-loading .ct-submit__arrow { display: none; }
@keyframes contato-spin { to { transform: rotate(360deg); } }

.section--contato .ct-micro {
  margin: -6px 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-2);
  text-align: center;
}
.section--contato .ct-privacy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-3);
  text-align: center;
}
.section--contato .ct-privacy svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--text-3); }

/* ---- Result ------------------------------------------------------------------ */
.section--contato .ct-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 28px 0 12px;
  text-align: center;
  outline: none;
}
.section--contato .ct-result__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 26px;
}
.section--contato .ct-result__halo {
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background:
    radial-gradient(45% 45% at 30% 55%, rgba(0, 152, 243, .55), rgba(0, 152, 243, 0) 70%),
    radial-gradient(45% 45% at 70% 55%, rgba(218, 78, 36, .6), rgba(218, 78, 36, 0) 70%);
  filter: blur(16px);
  opacity: .8;
}
.section--contato .ct-ico {
  position: relative;
  width: 88px;
  height: 88px;
  overflow: visible;
  filter: drop-shadow(-4px 0 10px rgba(0, 152, 243, .35)) drop-shadow(4px 0 10px rgba(218, 78, 36, .35));
}
.section--contato .ct-ico__check,
.section--contato .ct-ico__alert,
.section--contato .ct-ico__wa { display: none; }
.section--contato .ct-ico__wa {
  position: absolute;
  left: 50%;
  top: 50%;
  --size: 34px;
  margin: -17px 0 0 -17px;
  color: #fff;
}
.section--contato .ct-card[data-state="success"] .ct-ico__check { display: inline; }
.section--contato .ct-card[data-state="error"] .ct-ico__alert { display: inline; }
.section--contato .ct-card[data-state="fallback"] .ct-ico__wa { display: inline-block; }

.section--contato .ct-result__title { max-width: 560px; margin: 0; }
.section--contato .ct-result__text {
  max-width: 520px;
  margin-top: 12px;
  font-size: 17px;
  line-height: 27px;
  color: var(--text-2);
}
.section--contato .ct-result__actions { margin-top: 30px; }
.section--contato .ct-result__wa .icon { --size: 18px; }

/* ---- Responsive -------------------------------------------------------------- */
@media (max-width: 1199px) {
  .section--contato .ct-card { padding: 34px; }
}
@media (max-width: 809px) {
  .section--contato .ct-glow { --glow-w: 420px; --glow-h: 520px; top: 38%; }
  .section--contato .ct-glow--orange { left: -40%; }
  .section--contato .ct-glow--blue { right: -40%; }
  .section--contato .ct-card { padding: 24px 20px; border-radius: var(--r-16); }
  .section--contato .ct-steps { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; padding-bottom: 22px; }
  .section--contato .ct-step:not(:last-child)::after { display: none; }
  .section--contato .ct-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .section--contato .ct-result { padding: 16px 0 6px; }
  .section--contato .ct-result__actions { flex-direction: column; align-self: stretch; }
  .section--contato .ct-result__actions .btn { width: 100%; }
  .section--contato .ct-privacy { text-align: left; justify-content: flex-start; }
  .section--contato .ct-micro { text-align: left; }
}
@media (min-width: 810px) and (max-width: 1023px) {
  .section--contato .ct-steps { gap: 16px; }
  .section--contato .ct-step { flex: 0 1 auto; font-size: 13px; white-space: normal; }
  .section--contato .ct-step:not(:last-child)::after { display: none; }
}
