/* ==================================================================
   MINAS PERFURAÇÕES — base, componentes e formulários
   ================================================================== */
:root {
  --navy-950: #04101f;
  --navy-900: #061a33;
  --navy-850: #071e3d;
  --navy-800: #0a2448;
  --navy-700: #0f2f5e;
  --brand: #002b7f;
  --brand-soft: #123b8f;
  --red: #d8222b;
  --red-600: #b41820;
  --red-050: #fdecec;
  --amber: #f2b33d;
  --paper: #eef2f7;
  --panel: #ffffff;
  --ink: #0b1a2e;
  --ink-2: #26364d;
  --muted: #5b6b82;
  --line: #dbe3ee;
  --line-strong: #c4d0e0;
  --green: #0e7a4f;
  --green-600: #0a5f3e;
  --green-050: #e7f6ee;
  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  --radius: 18px;
  --shadow-card: 0 30px 70px -46px rgba(6, 26, 51, 0.45);
  --shadow-soft: 0 16px 40px -28px rgba(6, 26, 51, 0.4);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

.app { min-height: 100vh; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  background: var(--red);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 0 0 12px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.mono { font-family: var(--font-mono); letter-spacing: 0.01em; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.kicker--muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 34, 43, 0.22);
}

.opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------------- Botões ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.9rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid rgba(216, 34, 43, 0.55);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 14px 30px -18px rgba(6, 26, 51, 0.9);
}
.btn--primary:hover { background: var(--brand); }

.btn--green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 16px 34px -18px rgba(14, 122, 79, 0.85);
}
.btn--green:hover { background: var(--green-600); }

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 16px 34px -18px rgba(216, 34, 43, 0.8);
}
.btn--red:hover { background: var(--red-600); }

.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--navy-900); background: #f7f9fc; }

.btn--wpp { background: #1faa59; color: #fff; }
.btn--wpp:hover { background: #178a47; }

.btn--lg { min-height: 60px; padding: 1.05rem 1.6rem; font-size: 1.02rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------------- Cabeçalho dos fluxos ---------------- */
.flowbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 26, 51, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}
.flowbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
}
.flowbar__spacer { flex: 1; }

.backbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.45rem 0.85rem 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.backbtn svg { width: 18px; height: 18px; }
.backbtn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.34); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark b { font-weight: 800; letter-spacing: 0.12em; }
.wordmark__dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 34, 43, 0.22);
}
.wordmark--dark { color: var(--navy-900); }

.demobadge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.6rem;
  border: 1px dashed rgba(242, 179, 61, 0.6);
  border-radius: 999px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.demobadge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

/* ---------------- Estrutura dos fluxos ---------------- */
.flow {
  padding: clamp(1.2rem, 3vw, 2.6rem) clamp(1rem, 3vw, 2rem) 3.5rem;
}
.flow__inner { max-width: 820px; margin: 0 auto; }
.flow__inner--wide { max-width: 1120px; }

.steps {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.6rem 0.25rem 0.55rem;
  border-top: 2px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.steps__num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
}
.steps__num svg { width: 13px; height: 13px; }
.steps__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps li.is-current { color: var(--ink); border-top-color: var(--red); font-weight: 700; }
.steps li.is-current .steps__num { background: var(--red); border-color: var(--red); color: #fff; }
.steps li.is-done { color: var(--navy-800); border-top-color: var(--navy-800); }
.steps li.is-done .steps__num { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.35rem, 3vw, 2.6rem);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 90px, var(--navy-900) 90px 100%);
  opacity: 0.9;
}
.card--plain::before { display: none; }

.card__head { margin-bottom: 1.6rem; }
.card__title {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.card__lede { margin-top: 0.6rem; color: var(--muted); max-width: 58ch; }

.screen-in { animation: screenIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.flowfoot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem) 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}
.flowfoot a { color: var(--navy-800); font-weight: 600; }

/* ---------------- Formulários ---------------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem 1.1rem;
}
.form--compact { grid-template-columns: 1fr; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 0.42rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.78rem 0.95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fbfcfe;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: #93a1b5; font-weight: 400; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #a9b8cc; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 43, 127, 0.1);
}
.field input.is-soft-error,
.field select.is-soft-error { border-color: rgba(216, 34, 43, 0.6); background: #fffafa; }

.field__hint { margin-top: 0.38rem; font-size: 0.76rem; color: var(--muted); }
.field__status { margin-top: 0.38rem; font-size: 0.76rem; color: var(--muted); min-height: 1.1em; }
.field__status.is-loading { color: var(--brand); }
.field__status.is-ok { color: var(--green); }
.field__status.is-error { color: var(--red-600); }

.form__actions { grid-column: 1 / -1; margin-top: 0.35rem; }
.form__note {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 0.85rem;
}
.form__note strong { color: var(--ink-2); }

.checkline {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
}
.checkline svg { width: 17px; height: 17px; flex: none; color: var(--green); margin-top: 0.12rem; }

/* ---------------- Toasts ---------------- */
.toasts {
  position: fixed;
  z-index: 200;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.35;
  box-shadow: 0 20px 40px -20px rgba(4, 16, 31, 0.8);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast__icon { display: inline-flex; color: var(--amber); }
.toast__icon svg { width: 17px; height: 17px; }
.toast--ok .toast__icon { color: #7ee2ae; }
.toast--error { background: #7c1419; }
.toast--error .toast__icon { color: #ffd0d3; }

/* ---------------- Modal ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 16, 31, 0.74);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease both;
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: min(90vh, 780px);
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 100px -30px rgba(4, 16, 31, 0.8);
  animation: modalIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.modal__panel:focus { outline: none; }
.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  transition: background 0.2s ease;
}
.modal__close:hover { background: var(--paper); }
.modal__close svg { width: 18px; height: 18px; }
.modal__title {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.modal__lede { margin: 0.55rem 0 1.1rem; color: var(--muted); font-size: 0.92rem; }
.modal .btn--wpp { margin-bottom: 1rem; width: 100%; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-success { text-align: center; padding-top: 0.4rem; }
.modal-success__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--green-050);
  color: var(--green);
}
.modal-success__icon svg { width: 32px; height: 32px; }

/* ---------------- Páginas de conteúdo ---------------- */
.pagehead { margin: 0 0 1.6rem; }
.pagehead h1 {
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.pagehead p { margin-top: 0.6rem; color: var(--muted); max-width: 62ch; }

/* ---------------- Responsivo ---------------- */
@media (max-width: 720px) {
  .form { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 0.2rem; }
  .steps li { flex-direction: column; align-items: flex-start; gap: 0.3rem; font-size: 0.64rem; padding-right: 0.1rem; }
  .steps__label { white-space: normal; line-height: 1.2; }
  .flowbar__inner { gap: 0.6rem; }
  .wordmark { font-size: 0.68rem; letter-spacing: 0.12em; }
  .demobadge { display: none; }
  .flowfoot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .card { border-radius: 18px; }
  .backbtn span { display: none; }
  .backbtn { padding: 0.45rem 0.6rem; }
  .toasts { right: 0.6rem; bottom: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
