/* =============================================================================
   BASE — tokens de design compartilhados (sales page, auth, legal, portal)
   Identidade derivada da Inbound Study: navy #2D4C66 + vermelho/bordô da marca + creme.
   ============================================================================= */
:root {
  /* Cores */
  --ink: #0F2231;          /* navy profundo (hero, textos fortes) */
  --ink-2: #16324A;
  --navy: #2D4C66;         /* navy Inbound */
  --navy-50: #EEF3F7;
  --navy-100: #DCE6EE;
  --accent: #B3322F;       /* vermelho Inbound (CTAs) */
  --accent-hover: #982B2E; /* bordô Inbound */
  --accent-50: #FBEFEE;
  --fern: #2E7A68;         /* verde "positivo" (NZ) */
  --fern-50: #E8F3EF;
  --amber: #A86A12;
  --amber-50: #FBF3E4;
  --cream: #FAF8F4;
  --sand: #F3EFE6;
  --white: #FFFFFF;
  --text: #1B2A33;
  --muted: #5A6A73;
  --subtle: #8595A0;
  --border: #E6E1D6;
  --border-cool: #E3E8EC;

  /* Tipografia */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: .78rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;

  /* Forma */
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --sh-sm: 0 1px 2px rgba(15,34,49,.06), 0 1px 3px rgba(15,34,49,.05);
  --sh: 0 4px 16px rgba(15,34,49,.07), 0 1px 3px rgba(15,34,49,.05);
  --sh-lg: 0 24px 60px -20px rgba(15,34,49,.28), 0 4px 16px rgba(15,34,49,.06);
  --ring: 0 0 0 3px rgba(45,76,102,.28);
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.6; color: var(--text);
  background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: var(--navy); text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; 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; left: 12px; top: -60px; z-index: 999; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.tnum { font-variant-numeric: tabular-nums; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; font-size: .95rem; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(179,50,47,.55); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { border-color: var(--border-cool); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost-light { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.04); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.btn-whatsapp { background: #1F8F55; color: #fff; }
.btn-whatsapp:hover { background: #197547; }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link-btn { background: none; border: 0; padding: 0; color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--border-cool); border-radius: var(--r-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s; font-size: 16px; /* 16px evita zoom no iOS */
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy); box-shadow: var(--ring); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--text); margin-bottom: 12px; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--navy); }

/* Alertas */
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: var(--fs-sm); border: 1px solid; margin-bottom: 16px; }
.alert-error { background: var(--accent-50); border-color: #F0C9C7; color: #7A2224; }
.alert-ok { background: var(--fern-50); border-color: #BFDDD3; color: #1D5A4B; }
.alert-info { background: var(--navy-50); border-color: var(--navy-100); color: var(--ink-2); }
.alert-warn { background: var(--amber-50); border-color: #EFD9AE; color: #6E4508; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--navy-50); color: var(--navy); line-height: 1.5; white-space: nowrap; }
.badge-fern { background: var(--fern-50); color: var(--fern); }
.badge-accent { background: var(--accent-50); color: var(--accent-hover); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-muted { background: #F1F3F5; color: var(--muted); }

/* Modal (<dialog>) */
dialog.modal { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--r-lg); padding: 0; box-shadow: var(--sh-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(15,34,49,.55); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border-cool); position: sticky; top: 0; background: #fff; }
.modal-head h2 { font-size: 1.2rem; margin: 0; }
.modal-body { padding: 20px 24px 24px; font-size: .95rem; }
.modal-body ul { padding-left: 1.2em; }
.modal-body li { margin-bottom: .4em; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 999px; border: 0; background: #F1F3F5; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--navy-100); }
.icon-btn svg { width: 18px; height: 18px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 1000; box-shadow: var(--sh-lg); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Wordmark do produto (texto — troque por logo quando houver) */
.wordmark { display: inline-flex; flex-direction: column; line-height: 1.05; text-decoration: none; color: var(--ink); }
.wordmark strong { font-size: 1.02rem; font-weight: 750; letter-spacing: -.01em; }
.wordmark span { font-size: .68rem; color: var(--muted); font-weight: 550; letter-spacing: .04em; }
.wordmark.light { color: #fff; }
.wordmark.light span { color: #9FB4C4; }

/* Demo banner */
.demo-banner { background: var(--amber-50); color: #6E4508; border-bottom: 1px solid #EFD9AE; font-size: .82rem; text-align: center; padding: 8px 16px; }
