/* Höehr Automation · Diagnóstico (formulário) e Obrigado */

.dg, .ok { position: relative; overflow: hidden; }
.dg__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 10% 10%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 70% at 10% 10%, #000 0%, transparent 70%);
}

/* ---------- diagnóstico ---------- */
.dg { padding: calc(var(--bar-h) + clamp(40px, 8vh, 96px)) 0 clamp(72px, 12vh, 140px); }
.dg__wrap { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.dg__intro { position: sticky; top: calc(var(--bar-h) + 32px); }
.dg__crumb a { color: inherit; text-decoration: none; }
.dg__crumb a:hover { color: var(--sc-accent); }
.dg__title { margin: 18px 0 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(2.3rem, 4vw, 4.4rem); line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.dg__sub { margin: 22px 0 0; max-width: 32em; font-size: clamp(1.06rem, 1.25vw, 1.3rem); line-height: 1.55; color: var(--sc-ink-soft); text-wrap: pretty; }
.dg__steps { list-style: none; margin: clamp(32px, 5vh, 48px) 0 0; padding: 0; }
.dg__steps li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 20px; }
.dg__steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 1px; background: var(--sc-hairline-strong); }
.dg__steps li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--tint-ink); font-family: var(--sc-font-mono); font-size: .85rem; font-weight: 500; }
.dg__steps b { display: block; font-weight: 600; padding-top: 5px; }
.dg__steps p { margin: 2px 0 0; color: var(--sc-ink-soft); font-size: .96rem; }
.dg__alt { margin: 12px 0 0; color: var(--sc-ink-soft); }
.dg__alt a { color: var(--sc-accent); font-weight: 500; }

.dg__card {
  padding: clamp(24px, 3vw, 44px);
  background: var(--sc-surface); border: 1px solid var(--sc-hairline); border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 40px 80px -44px hsl(var(--sc-shadow-color) / .45);
}
.dg__formtitle { margin: 0 0 22px; font-size: clamp(1.25rem, 1.5vw, 1.55rem); font-weight: 600; letter-spacing: -0.02em; }
.dg__alert { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, #D64545 12%, transparent); color: #B83232; font-weight: 500; }
[data-theme="dark"] .dg__alert { color: #FF8C8C; }
.dg__alert a { color: inherit; }

/* ---------- formulário ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fld { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fld__label { font-size: .95rem; font-weight: 500; }
.fld__label i, .form__note i { font-style: normal; color: var(--sc-accent); }
.fld__label em { font-style: normal; font-weight: 400; font-size: .85rem; color: var(--sc-ink-soft); margin-left: 4px; }
.fld input, .fld select, .fld textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--sc-ink);
  padding: 13px 14px; border-radius: 10px;
  background: var(--sc-canvas); border: 1px solid var(--sc-hairline-strong);
  transition: border-color 150ms var(--sc-ease-out), box-shadow 150ms var(--sc-ease-out), background-color 150ms var(--sc-ease-out);
}
.fld textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.fld select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555264' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--sc-ink-soft); opacity: .7; }
.fld input:hover, .fld select:hover, .fld textarea:hover { border-color: var(--sc-ink-soft); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--sc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-accent) 22%, transparent); background: var(--sc-surface); }
.fld.is-err input, .fld.is-err select { border-color: #D64545; }
.fld__err { color: #C23B3B; font-size: .86rem; }
[data-theme="dark"] .fld__err { color: #FF8C8C; }

.fld--chips legend { margin-bottom: 7px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--sc-hairline-strong); cursor: pointer; font-size: .93rem; transition: background-color 150ms var(--sc-ease-out), color 150ms var(--sc-ease-out), border-color 150ms var(--sc-ease-out); }
.chip-opt span:hover { border-color: var(--sc-ink-soft); }
.chip-opt input:checked + span { background: var(--sc-accent); border-color: transparent; color: var(--sc-accent-ink); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--sc-accent); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .93rem; color: var(--sc-ink-soft); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sc-accent); cursor: pointer; }
.consent a { color: var(--sc-accent); }
.consent.is-err { color: #C23B3B; }
[data-theme="dark"] .consent.is-err { color: #FF8C8C; }
.form__submit { width: 100%; height: 56px; font-size: 1.05rem; margin-top: 4px; cursor: pointer; border: 0; font-family: inherit; }
.form__note { margin: 0; font-size: .85rem; color: var(--sc-ink-soft); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- obrigado ---------- */
.ok { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--bar-h) + 40px) 0 60px; }
.ok__wrap { position: relative; max-width: 46rem; }
.ok__mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); animation: pop 520ms var(--sc-ease-out) both; }
.ok__mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 420ms 260ms var(--sc-ease-out) forwards; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ok__title { margin: 26px 0 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.04; letter-spacing: -0.045em; text-wrap: balance; }
.ok__sub { margin: 20px 0 0; font-size: clamp(1.06rem, 1.25vw, 1.3rem); line-height: 1.55; color: var(--sc-ink-soft); max-width: 36em; }
.ok__steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ok__steps li { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--sc-surface); border: 1px solid var(--sc-hairline); font-size: .95rem; }
.ok__steps span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sc-canvas); color: var(--sc-ink-soft); font-family: var(--sc-font-mono); font-size: .8rem; }
.ok__steps .is-done span { background: var(--ok-bg); color: var(--ok); }
.ok__steps b { font-weight: 600; line-height: 1.3; }
.ok__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ok__more { margin: 28px 0 0; color: var(--sc-ink-soft); }
.ok__more a { color: var(--sc-accent); }

@media (max-width: 960px) {
  .dg__wrap { grid-template-columns: 1fr; }
  .dg__intro { position: static; }
}
@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
  .ok__steps { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ok__mark, .ok__mark svg { animation: none; stroke-dashoffset: 0; }
}
