:root {
  --navy: #03173d;
  --navy-deep: #020d24;
  --navy-soft: #0d2a5c;
  --paper: #eef1f6;
  --paper-warm: #e4e9f2;
  --ink: #142136;
  --ink-muted: #57647c;
  --gold: #c89b3c;
  --gold-deep: #a97f2a;
  --green: #1f7a5c;
  --red: #b3423a;
  --line: #c9d3e0;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper-warm);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.5rem; }

a { color: var(--navy-soft); }

/* ---------- Header ---------- */

.site-header {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 28px;
  width: auto;
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .brand-logo { height: 20px; }
}

.brand-tag {
  color: var(--ink-muted);
  font-size: 0.85rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #eef1f6;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 380px; max-width: 640px; }

.hero-text h1 {
  color: #fff;
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-sub {
  color: #cbd6ea;
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 46ch;
  margin: 1rem 0 1.75rem;
}

.btn-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  color: var(--navy-deep);
}

/* Hero seal — one deliberate "stamp" reveal on load */

.hero-seal {
  position: relative;
  width: clamp(160px, 22vw, 220px);
  height: clamp(160px, 22vw, 220px);
  flex: 0 0 auto;
  margin-inline: auto;
  animation: stamp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.15s;
}

.seal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--gold) 0deg 3deg, transparent 3deg 10deg);
  -webkit-mask-image: radial-gradient(circle, transparent 62%, black 63%, black 100%);
  mask-image: radial-gradient(circle, transparent 62%, black 63%, black 100%);
}

.seal-core {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--navy-soft), var(--navy-deep));
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.35);
}

@keyframes stamp {
  0% { opacity: 0; transform: scale(1.35) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-seal { animation: none; }
}

/* ---------- Wizard / document panel ---------- */

.wizard-section {
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
  margin-top: clamp(-3.5rem, -6vw, -4.5rem);
}

.document-panel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 24px 48px rgba(2, 13, 36, 0.18);
}

.document-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 30px 30px 0;
  border-color: transparent var(--gold) transparent transparent;
  border-top-right-radius: 16px;
  filter: drop-shadow(-2px 2px 3px rgba(2, 13, 36, 0.2));
}

.stepper { margin-bottom: 2rem; }

.stepper-track {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-warm);
  overflow: hidden;
}

.stepper-fill {
  height: 100%;
  width: 25%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.stepper-label {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.step h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
}

.step-sub {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--navy);
}

.form-control {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}

.form-control:focus {
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 0.2rem rgba(13, 42, 92, 0.15);
}

/* ---------- Step 0: type cards ---------- */

.tipo-cards { margin-top: 0.25rem; }

.tipo-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tipo-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(2, 13, 36, 0.12); }

.tipo-card.selecionado {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.25);
}

.tipo-card i { font-size: 1.6rem; color: var(--navy-soft); }

.tipo-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
}

.tipo-card-desc { color: var(--ink-muted); font-size: 0.92rem; }

/* ---------- Step 2: validation toggle ---------- */

.validacao-fieldset {
  border: none;
  padding: 0;
  margin: 1.5rem 0;
}

.validacao-toggle {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-check:checked + .btn-toggle {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.btn-check:focus-visible + .btn-toggle {
  outline: 2px solid var(--navy-soft);
  outline-offset: 2px;
}

/* ---------- Actions ---------- */

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-primary, .btn-ghost {
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  margin-left: auto;
}

.btn-primary:hover { background: var(--navy-soft); }

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--line);
}

.btn-ghost:hover { border-color: var(--navy-soft); color: var(--navy); }

/* ---------- Review ---------- */

.revisao-lista {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.25rem;
  margin: 0 0 1rem;
}

.revisao-lista dt { color: var(--ink-muted); font-size: 0.9rem; }

.revisao-lista dd {
  margin: 0;
  font-weight: 500;
}

.revisao-lista dd.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ---------- Feedback ---------- */

.feedback { text-align: center; padding: 1rem 0 0.5rem; }

.feedback-seal {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  animation: stamp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.feedback-seal-erro { background: var(--red); font-size: 1.4rem; }

.feedback p { color: var(--ink-muted); max-width: 46ch; margin: 0 auto; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.site-footer .container { max-width: 720px; }

/* ---------- Utility ---------- */

.d-none { display: none !important; }

.is-invalid { border-color: var(--red) !important; }

.invalid-feedback { color: var(--red); font-size: 0.85rem; }

@media (max-width: 575.98px) {
  .step-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-ghost { width: 100%; }
}
