/* ==========================================================================
   Base: reset, tipografia, layout, botões, formulários, acessibilidade
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink);
  background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-600); text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; color: var(--navy-900); text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

/* Ícones (sprite inline) */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; stroke: none; }

/* Acessibilidade */
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .dark :focus-visible { outline-color: #ffb27a; }
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 10px;
  background: var(--navy-900); color: #fff; font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Layout */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section-surface { background: var(--surface); }
.section-dark { background: var(--navy-900); color: #dbe5f6; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .bar { margin-inline: auto; }

.eyebrow {
  display: inline-flex; flex-wrap: wrap; gap: .35em .7em; align-items: center;
  font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow .sep { color: var(--orange-500); }
.section-dark .eyebrow { color: #a9bbdc; }
.section-head .kicker, .diag-intro .kicker { display: block; margin-bottom: 10px; }
.kicker { color: var(--orange-700); font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.section-dark .kicker { color: #ffa561; }

.title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.85rem); text-transform: uppercase; letter-spacing: -0.008em; word-spacing: .05em; line-height: 1.08; }
.title .accent, .accent { color: var(--orange-500); }
.lead { font-size: clamp(1.02rem, .96rem + .3vw, 1.2rem); color: var(--ink-2); line-height: 1.65; }
.section-dark .lead { color: #c3d1ea; }
.bar { display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--orange-500); margin-block: 18px 20px; }
.script { font-family: var(--font-script); font-weight: 700; font-size: 1.6em; line-height: 1.1; color: var(--blue-600); }
.section-dark .script { color: #ffb27a; }
.muted { color: var(--ink-3); }

/* Botões */
.btn {
  --_bg: var(--navy-900); --_fg: #fff; --_bd: var(--navy-900);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 50px; padding: .8em 1.5em;
  border-radius: 12px; border: 2px solid var(--_bd); background: var(--_bg); color: var(--_fg);
  font-weight: 800; font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; line-height: 1.15; text-align: center;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--_fg); }
.btn:active { transform: translateY(0); }
.btn .i { width: 1.2em; height: 1.2em; }
.btn-primary { --_bg: var(--orange-500); --_fg: var(--navy-900); --_bd: var(--orange-500); }
.btn-primary:hover { --_bg: var(--orange-400); --_bd: var(--orange-400); }
.btn-secondary { --_bg: transparent; --_fg: var(--navy-900); --_bd: var(--navy-900); }
.btn-secondary:hover { --_bg: var(--navy-900); --_fg: #fff; }
.btn-light { --_bg: #fff; --_fg: var(--navy-900); --_bd: #fff; }
.btn-ghost-light { --_bg: transparent; --_fg: #fff; --_bd: rgb(255 255 255 / 55%); }
.btn-ghost-light:hover { --_bg: #fff; --_fg: var(--navy-900); --_bd: #fff; }
.btn-sm { min-height: 42px; padding: .55em 1.1em; font-size: .8rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; font-size: .9rem; text-decoration: none; color: var(--blue-600); }
.link-arrow .i { transition: transform .2s var(--ease); }
.link-arrow:hover .i, a:hover > .link-arrow .i, .card:hover .link-arrow .i { transform: translateX(4px); }
.section-dark .link-arrow { color: #ffb27a; }

/* Chips e etiquetas */
.chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .3em .8em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.3; background: var(--blue-100); color: var(--blue-700); border: 1px solid transparent;
}
.chip-orange { background: var(--orange-100); color: #8a2f05; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-crit { background: var(--crit-bg); color: var(--crit); }
.chip-line { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.badge { display: inline-block; padding: .18em .6em; border-radius: 6px; background: var(--orange-500); color: var(--navy-900); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }

/* Formulários */
.field { display: grid; gap: 6px; }
.field label, .legend { font-weight: 700; font-size: .875rem; color: var(--navy-900); }
.field .hint { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: .7em .95em; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 110px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #7684a3; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--blue-500); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(14 71 151 / 18%); }
.select { appearance: none; padding-right: 2.6em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2333456a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1em center; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--crit); }
.field .error { display: none; color: var(--crit); font-size: .82rem; font-weight: 600; }
.field.invalid .error { display: block; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--blue-600); flex: none; }
.form-note { font-size: .8rem; color: var(--ink-3); }
.form-status { padding: 14px 16px; border-radius: 12px; font-size: .92rem; font-weight: 600; background: var(--ok-bg); color: var(--ok); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Cartões */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.icon-tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--blue-100); color: var(--blue-600); transition: background-color .3s, color .3s, transform .3s var(--ease); }
.icon-tile .i { width: 26px; height: 26px; }

/* Animações de entrada */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Modo revisão (?demo=1): destaca marcadores por substituir */
.demo-mode [data-placeholder] { outline: 2px dashed var(--orange-500); outline-offset: 4px; border-radius: 6px; }
