/* Comtools — Venda sem travas
   Identidade visual v2.0. CSS compartilhado, sem frameworks e sem fontes externas. */

:root {
  --navy: #0b1e3c;
  --navy-deep: #06152a;
  --blue: #0e7bff;
  --blue-dark: #0759b8;
  --blue-soft: #e8f2ff;
  --orange: #ff7a00;
  --orange-dark: #e36a00;
  --orange-soft: #fff1e3;
  --green: #00d46a;
  --green-dark: #00763c;
  --green-soft: #e6f7ee;
  --ink: #0b1e3c;
  --muted: #4a5b72;
  --bg: #f3f6fa;
  --bg-soft: #eaf0f7;
  --surface: #ffffff;
  --border: #d8e1ec;
  --border-strong: #b7c6d8;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --danger-border: #f1c4c0;
  --success: #00763c;
  --success-bg: #e6f7ee;
  --success-border: #a9dfc1;
  --warning-bg: #fff7e8;
  --warning-border: #f0dcb4;
  --warning-ink: #5a4318;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(11, 30, 60, 0.08);
  --shadow-lg: 0 18px 42px rgba(11, 30, 60, 0.14);
  --focus: #0e7bff;
  --font-display: "Montserrat", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.18;
}

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
}

/* ---------- Publicidade ---------- */

.ad {
  margin: 1.5rem 0;
  color: var(--muted);
}

.ad__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  line-height: 0;
  text-decoration: none;
}

.ad__link img,
.ad__link picture {
  display: block;
  width: 100%;
  height: auto;
}

.ad--leaderboard .ad__link {
  width: min(100%, 728px);
  margin-inline: auto;
}

.ad__slot {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.ad__slot:empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.ad__slot:empty::before {
  content: "Espaço reservado";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: var(--muted);
  font: 700 0.68rem/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.ad__slot--desktop {
  display: block;
  width: min(100%, 728px);
  height: 90px;
  margin-inline: auto;
}

.ad__slot--mobile {
  display: none;
  width: min(100%, 300px);
  height: 100px;
  margin-inline: auto;
}

.ad--sidebar {
  display: none;
}

@media (max-width: 600px) {
  .ad--leaderboard .ad__link {
    width: min(100%, 320px);
  }

  .ad__slot--desktop {
    display: none;
  }

  .ad__slot--mobile {
    display: block;
  }
}

@media (min-width: 1100px) {
  main {
    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(0, 1120px);
    column-gap: 1rem;
    justify-content: center;
    align-items: start;
  }

  main.main--ads {
    grid-template-columns: 160px minmax(0, 1120px) 160px;
  }

  main > :not(.ad--sidebar) {
    grid-column: 2;
  }

  main > .container {
    width: 100%;
  }

  .ad--sidebar {
    position: absolute;
    top: 1.5rem;
    display: block;
    width: 160px;
    margin: 0;
  }

  .ad--sidebar--left {
    left: 0;
  }

  .ad--sidebar--right {
    right: 0;
  }

  .ad--sidebar .ad__link {
    width: 160px;
  }

  .ad--sidebar--right .ad__slot {
    width: 160px;
    height: 600px;
  }
}

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 45%, var(--orange) 100%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 150px;
  height: auto;
  transition: opacity 0.18s ease;
}

.brand:hover .brand__logo {
  opacity: 0.82;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--orange);
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-back:hover {
  background: var(--blue-soft);
}

.header-back svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.header-back__short {
  display: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--blue-dark);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 880px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -1rem;
    right: -1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.7rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
  }

  .brand__logo {
    width: 136px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand__logo {
    width: 112px;
  }

  .header-back {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
  }

  .header-back__long {
    display: none;
  }

  .header-back__short {
    display: inline;
  }
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.05rem;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn img {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 122, 0, 0.28);
}

.btn-secondary {
  background: #fff;
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.btn-secondary:hover {
  background: var(--blue-soft);
}

.btn-quiet {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--ink);
}

.btn-quiet:hover {
  background: #dfe9f5;
}

.btn-danger-outline {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger-bg);
}

.btn-mini {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-row .btn {
  flex: 0 1 auto;
}

/* ---------- Abas acessíveis ---------- */

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tabs__tab {
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
}

.tabs__tab:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.tabs__tab[aria-selected="true"] {
  border-color: var(--border);
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.tabs__panel {
  min-width: 0;
}

.tabs__panel:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.context-link {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: var(--orange-soft);
  font-size: 0.88rem;
}

.target-status {
  min-width: 0;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--success-border);
  border-radius: 12px;
  background: var(--success-bg);
  color: #075c38;
}

.target-status--miss {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-ink);
}

.target-status strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.target-status p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* ---------- Cartões e formulários ---------- */

.card {
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 3px 16px rgba(11, 30, 60, 0.05);
}

.card + .card {
  margin-top: 1rem;
}

.card:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.card > h2,
.card > h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.card h2:not(:first-child) {
  margin-top: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

.field label,
.field .field-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.field label .required {
  color: var(--danger);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #8fb6e6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 123, 255, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fff9f8;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.field-meta span {
  overflow-wrap: anywhere;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.check-field input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--blue-dark);
}

.help {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.error {
  min-height: 1.1em;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 650;
}

.error:empty {
  display: none;
}

.form-block {
  margin-top: 1rem;
}

.actions-block {
  margin-top: 1.1rem;
}

.result__actions {
  margin-top: 0.85rem;
}

.notice {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  background: var(--warning-bg);
  color: var(--warning-ink);
  font-size: 0.88rem;
}

.notice img {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.1rem;
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Resultados ---------- */

.result {
  min-width: 0;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.result[hidden] {
  display: none;
}

.result--success {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.result--error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.result__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.result__head img {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 0.1rem;
}

.result__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.03rem;
}

.result__head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result--success .result__head p,
.result--error .result__head p {
  color: inherit;
}

.feedback {
  min-height: 1.3em;
  margin: 0.75rem 0 0;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.output {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.9rem;
}

.output input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.output .btn {
  flex: none;
}

@media (max-width: 520px) {
  .output {
    flex-direction: column;
    align-items: stretch;
  }
}

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: #fff;
}

.qr-wrap canvas,
.qr-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.qr-placeholder {
  max-width: 30ch;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.metric {
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  overflow-wrap: anywhere;
}

.metric--highlight {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.metric--highlight strong {
  color: var(--green-dark);
}

.metric__note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 680px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

/* ---------- Páginas de ferramenta ---------- */

.page-head {
  position: relative;
  margin: 1.2rem 0 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 22px;
  background: var(--navy) url("assets/brand/comtools-textura-hexagonal.png") center / 720px auto repeat;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 21, 42, 0.96) 0%, rgba(11, 30, 60, 0.84) 58%, rgba(14, 123, 255, 0.2) 100%);
  pointer-events: none;
}

.page-head > * {
  position: relative;
  z-index: 1;
}

.page-head__top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.page-head__icon {
  width: 58px;
  height: 58px;
  flex: none;
}

.page-head .badge {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffd9a8;
}

.page-head h1 {
  max-width: 24ch;
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.page-head p {
  max-width: 72ch;
  margin: 0;
  color: #d6e3f2;
  font-size: 1.02rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge--neutral {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
}

.tool-layout > * {
  min-width: 0;
}

@media (max-width: 920px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.faq {
  max-width: 860px;
  margin: 2rem auto 0;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.faq details + details {
  margin-top: 0.6rem;
}

.faq summary {
  padding: 0.95rem 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style-position: outside;
}

.faq details[open] summary {
  color: var(--blue-dark);
  border-bottom: 1px solid var(--border);
}

.faq details p {
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-block {
  padding: 2.5rem 0;
}

.section-heading {
  max-width: 62ch;
  margin: 0 0 1.5rem;
}

.section-heading::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--blue));
}

.section-heading h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Páginas institucionais ---------- */

.legal-doc {
  max-width: 80ch;
  margin: 0 auto 2rem;
}

.legal-doc h2 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.3rem;
}

.legal-doc h3 {
  margin: 1.3rem 0 0.35rem;
  font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--muted);
}

.legal-doc ul {
  padding-left: 1.2rem;
}

.legal-doc li + li {
  margin-top: 0.35rem;
}

.legal-doc__updated {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

/* ---------- Landing ---------- */

.hero {
  position: relative;
  margin-top: 1rem;
  padding: clamp(2rem, 5vw, 3.8rem);
  border-radius: 24px;
  background: var(--navy) url("assets/brand/comtools-textura-hexagonal.png") center / 760px auto repeat;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(6, 21, 42, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(6, 21, 42, 0.97) 0%, rgba(11, 30, 60, 0.87) 55%, rgba(14, 123, 255, 0.2) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: url("assets/brand/comtools-simbolo-colorido.svg") center / contain no-repeat;
  opacity: 0.11;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: center;
}

.hero__content {
  padding-right: clamp(1rem, 2.5vw, 1.75rem);
}

.eyebrow {
  display: inline-block;
  color: #ffb35c;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 100%;
  margin: 0.5rem 0 0.6rem;
  color: #fff;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 900;
  line-height: 1.12;
}

.hero__lead {
  max-width: 48ch;
  margin: 0;
  color: #d6e3f2;
  font-size: clamp(0.95rem, 1.6vw, 1.02rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero__content > * {
  animation: rise 0.45s ease both;
}

.hero__content > :nth-child(2) {
  animation-delay: 0.05s;
}

.hero__content > :nth-child(3) {
  animation-delay: 0.1s;
}

.hero__content > :nth-child(4) {
  animation-delay: 0.15s;
}

.hero__art {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1774 / 887;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--navy) url("assets/brand/hero-arte-v2.png") center / cover no-repeat;
  box-shadow: 0 22px 50px rgba(4, 16, 34, 0.38);
  animation: rise 0.55s ease 0.1s both;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Dissuasão: imagens locais não podem ser arrastadas nem selecionadas. */
img[src^="assets/"] {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 760px) {
  .hero {
    padding: clamp(1.35rem, 5vw, 2rem);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .hero__content {
    padding-right: 0;
  }

  .hero__art {
    max-width: 460px;
  }

  .hero::after {
    width: 260px;
    height: 260px;
    top: -60px;
    right: -70px;
  }
}

@media (max-width: 420px) {
  .hero__art {
    border-radius: 12px;
  }
}

.tools {
  padding: 2.4rem 0 1rem;
}

.tools .section-heading {
  margin-bottom: 1.1rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 3px 14px rgba(11, 30, 60, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: rise 0.45s ease both;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(14, 123, 255, 0.12));
}

.tool-card:nth-child(2) {
  animation-delay: 0.05s;
}

.tool-card:nth-child(3) {
  animation-delay: 0.1s;
}

.tool-card:nth-child(4) {
  animation-delay: 0.15s;
}

.tool-card:nth-child(5) {
  animation-delay: 0.2s;
}

.tool-card:nth-child(6) {
  animation-delay: 0.25s;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.tool-card__num {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tool-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 0.25rem;
  border-radius: 16px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.tool-card__icon img {
  width: 60px;
  height: 60px;
}

.tool-card h3 {
  margin: 0;
  padding-right: 2rem;
  font-size: 1.03rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.tool-card__cta img {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.tool-card:hover .tool-card__cta img {
  transform: translateX(3px);
}

@media (max-width: 1000px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

.benefit-grid,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.benefit,
.step {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.benefit__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  background: var(--blue-soft);
}

.benefit__icon img {
  width: 24px;
  height: 24px;
}

.benefit h3,
.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.benefit p,
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step__number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  background: var(--blue-dark);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .benefit-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Orçamento ---------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 132px 122px 42px;
  gap: 0.6rem;
  align-items: end;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.item-row .field-label,
.item-total-field > span {
  font-size: 0.82rem;
  font-weight: 700;
}

.item-total {
  display: block;
  min-height: 43px;
  padding: 0.72rem 0.35rem;
  color: var(--blue-dark);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 43px;
  padding: 0;
  border: 1px solid var(--danger-border);
  border-radius: 11px;
  background: #fff;
  color: var(--danger);
  font-size: 1.5rem;
  line-height: 1;
}

.btn-icon:hover {
  background: var(--danger-bg);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: min(100%, 280px);
  color: var(--muted);
  font-size: 0.92rem;
}

.totals strong {
  color: var(--ink);
}

.totals .grand {
  align-items: baseline;
  color: var(--blue-dark);
  font-size: 1.25rem;
  font-weight: 850;
}

.totals .grand strong {
  color: inherit;
  font-size: 1.35rem;
}

@media (min-width: 921px) {
  .preview-panel {
    position: sticky;
    top: 90px;
  }
}

.preview-doc {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.preview-doc__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 3px solid var(--orange);
}

.preview-doc__top > div {
  min-width: 0;
}

.preview-doc__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 850;
}

.preview-doc__tag {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-doc__title {
  margin: 0;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
}

.preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 1rem 0;
}

.preview-meta div {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--bg-soft);
}

.preview-meta small,
.preview-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-meta strong,
.preview-row strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.preview-section-title {
  margin: 1.2rem 0 0.5rem;
  color: var(--blue-dark);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 104px 104px;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.preview-row--head {
  border-bottom: 2px solid var(--border);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-row--head small {
  color: inherit;
}

.preview-row > div {
  min-width: 0;
}

.preview-total {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  background: var(--success-bg);
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 850;
}

.preview-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-note {
  margin: 1.1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-row .field--desc {
    grid-column: 1 / -1;
  }

  .btn-icon {
    justify-self: end;
  }
}

@media (max-width: 540px) {
  .item-row {
    grid-template-columns: 1fr;
  }

  .item-row > * {
    grid-column: 1 / -1;
  }

  .item-total {
    text-align: left;
  }

  .btn-icon {
    justify-self: stretch;
    width: 100%;
  }

  .preview-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-meta {
    grid-template-columns: 1fr;
  }

  .preview-doc__top {
    flex-direction: column;
  }

  .preview-doc__title {
    text-align: left;
  }
}

/* ---------- Rodapé ---------- */

.site-footer {
  position: relative;
  margin-top: 2rem;
  background: var(--navy) url("assets/brand/comtools-textura-hexagonal.png") center / 640px auto repeat;
  color: #d6e3f2;
  font-size: 0.9rem;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  padding: 2.2rem 0 1.2rem;
}

.footer-grid--compact {
  grid-template-columns: 1.5fr 1fr;
}

.footer-grid h2 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-grid p {
  max-width: 48ch;
  margin: 1rem 0 0;
  color: #c7d7ea;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 0.45rem;
}

.footer-grid a {
  color: #bfe3ff;
  font-weight: 650;
}

.footer-grid a:hover {
  color: #fff;
}

.brand--footer .brand__logo {
  width: 170px;
}

.privacy-note {
  position: relative;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #c7d7ea;
  font-size: 0.86rem;
}

.privacy-note h2 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
}

.privacy-note p {
  max-width: 90ch;
  margin: 0;
}

.footer-bottom {
  position: relative;
  padding: 0 0 1.5rem;
  color: #9fb4cc;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1.8rem;
  }
}

/* ---------- Animações ---------- */

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
