/* ============================================================
   GoSac — Base CSS (reset + utilitários + componentes de formulário)
   Estilos específicos de cada página ficam em <slug>/style.css
   ============================================================ */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--gs-font-body);
  font-size: var(--gs-fs-md);
  line-height: var(--gs-lh-body);
  color: var(--gs-text);
  background: var(--gs-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gs-link); text-decoration: none; }
a:not(.btn):hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--gs-font-heading); line-height: var(--gs-lh-tight); margin: 0 0 var(--gs-space-4); }
h1 { font-size: clamp(var(--gs-fs-2xl), 4vw, var(--gs-fs-4xl)); }
h2 { font-size: clamp(var(--gs-fs-xl), 3vw, var(--gs-fs-3xl)); }
h3 { font-size: var(--gs-fs-xl); }
p { margin: 0 0 var(--gs-space-4); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-neon); outline-offset: 2px; }
.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; }

/* Layout */
.container { width: min(100% - 2 * var(--gs-space-6), var(--gs-container)); margin-inline: auto; }
.container--narrow { max-width: var(--gs-container-narrow); }
.section { padding-block: clamp(var(--gs-space-12), 8vw, var(--gs-space-24)); }
.section--surface { background: var(--gs-surface); }
.section--dark { background: var(--gs-primary-deep); color: var(--gs-white); }
.grid { display: grid; gap: var(--gs-space-8); }
@media (min-width: 900px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Ícones (sprite SVG inline: <svg class="icon"><use href="#i-nome"/></svg>) */
.icon { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Botões — padrão do DS: 40px, raio 10px, bold, hover clareia um passo, sem bounce */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-md); border: 1px solid transparent;
  font-family: var(--font-ui); font-size: var(--text-base); font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-swift), filter var(--dur-fast) var(--ease-swift), border-color var(--dur-fast) var(--ease-swift);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--action-primary); color: var(--text-on-brand); }
.btn--primary:hover { background: var(--action-primary-hover); }
.btn--primary:active { background: var(--action-primary-active); }
.btn--neon { background: var(--grad-brand); color: var(--white); box-shadow: var(--brand-glow); }
.btn--neon:hover { filter: brightness(1.1); }
.btn--neon:active { filter: brightness(.92); }
.btn--secondary { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--ink-800); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--ink-800); }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--text-sm); gap: 6px; }
.btn--lg { height: 48px; padding: 0 24px; font-size: var(--text-md); }
.btn--block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.btn--sm .icon { width: 14px; height: 14px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }

/* Formulário de lead — campos no padrão Input/Select do DS (tema escuro) */
.lead-form { display: grid; gap: 16px; font-family: var(--font-ui); }
.lead-form[hidden] { display: none; }
.lead-form .field { display: flex; flex-direction: column; gap: 6px; }
.lead-form label, .lead-form .field__label { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.lead-form .control { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--ink-900); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); transition: border-color var(--dur-fast) var(--ease-swift), box-shadow var(--dur-fast) var(--ease-swift); }
.lead-form .control .icon { width: 16px; height: 16px; color: var(--text-muted); }
.lead-form .control:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(224,36,200,.18); }
.lead-form input, .lead-form select { flex: 1; min-width: 0; width: 100%; height: 100%; background: transparent; border: 0; outline: 0; color: var(--text-primary); font-size: var(--text-base); font-family: inherit; }
.lead-form input::placeholder { color: var(--text-muted); }
.lead-form select { appearance: none; -webkit-appearance: none; padding-right: 24px; cursor: pointer; }
.lead-form select:invalid, .lead-form select.is-empty { color: var(--text-muted); }
.lead-form select option { color: var(--lt-text); background: var(--white); }
.lead-form .control .icon--chevron { position: absolute; right: 12px; pointer-events: none; }
.lead-form .field--error .control { border-color: var(--error-500); box-shadow: none; }
.lead-form .field__error { color: var(--error-400); font-size: var(--text-xs); }
.lead-form .field__error:empty { display: none; }
.lead-form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-xs); line-height: 1.5; color: var(--text-secondary); font-weight: 400; }
.lead-form .consent input { width: 16px; height: 16px; flex: none; margin-top: 1px; accent-color: var(--brand-neon); }
.lead-form .consent a { color: var(--lime-400); }
.lead-form__status { margin: 0; font-size: var(--text-sm); min-height: 1.5em; color: var(--text-secondary); text-align: center; }
.lead-form__status[data-state="error"] { color: var(--error-400); }
.lead-form__status[data-state="success"] { color: var(--lime-400); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Rodapé mínimo */
.footer { padding-block: var(--gs-space-8); font-size: var(--gs-fs-sm); color: var(--gs-text-muted); text-align: center; }
.footer a { color: inherit; }

/* Modal de páginas legais (política de privacidade / termos) */
.gs-noscroll { overflow: hidden; }
.gs-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.gs-modal[hidden] { display: none; }
.gs-modal__backdrop { position: absolute; inset: 0; background: rgba(12,2,12,.72); backdrop-filter: blur(2px); }
.gs-modal__box { position: relative; display: flex; flex-direction: column; width: min(720px, 100%); max-height: min(80vh, 720px); background: var(--lt-surface); color: var(--lt-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-deep); overflow: hidden; }
.gs-modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--ink-100); }
.gs-modal__title { margin: 0; font-size: var(--text-lg); line-height: 1.3; color: var(--lt-text); }
.gs-modal__close { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; color: var(--ink-500); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.gs-modal__close:hover { background: var(--ink-50); color: var(--lt-text); }
.gs-modal__body { overflow-y: auto; padding: var(--space-6); font-size: var(--text-base); line-height: 1.65; color: var(--lt-text-secondary); overscroll-behavior: contain; }
.gs-modal__body h1, .gs-modal__body h2, .gs-modal__body h3 { margin: var(--space-6) 0 var(--space-3); font-size: var(--text-md); line-height: 1.35; color: var(--lt-text); }
.gs-modal__body h1:first-child, .gs-modal__body h2:first-child, .gs-modal__body h3:first-child { margin-top: 0; }
.gs-modal__body p, .gs-modal__body ul, .gs-modal__body ol { margin: 0 0 var(--space-4); }
.gs-modal__body ul, .gs-modal__body ol { padding-left: var(--space-6); }
.gs-modal__body li { margin-bottom: var(--space-2); }
.gs-modal__body a { color: var(--lt-brand); }
.gs-modal__loading { color: var(--ink-400); }
.gs-modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--ink-100); }
@media (max-width: 640px) {
  .gs-modal { padding: var(--space-3); }
  .gs-modal__box { max-height: 88vh; }
  .gs-modal__head, .gs-modal__body, .gs-modal__foot { padding-inline: var(--space-5); }
  .gs-modal__foot { align-items: stretch; }
  .gs-modal__foot .btn { width: 100%; }
}

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
