/* ============================================================
   Quint — brand.css
   Tokens copiados de design.md do Hub (fonte da verdade visual).
   Site público: light-first; hero de marketing pode ser escuro
   via .q-band-dark (faixa, não tema).
   ============================================================ */

/* ---------- Fontes ---------- */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens primitivos (design.md §5.1) ---------- */
:root {
  --q-blue-900: #154F96;
  --q-blue-500: #2987F9;
  --q-blue-400: #4180CC;
  --q-blue-200: #7EACE5;
  --q-ink-950: #0C0D0F;
  --q-ink-900: #131619;
  --q-ink-800: #262C33;
  --q-ink-700: #3A424C;
  --q-mute-500: #63707F;
  --q-mute-400: #92A1B2;
  --q-line: #D8DEE5;
  --q-snow: #F9FAFD;
  --q-snow-2: #F6F8FB;
  --q-green: #20D964;
  --q-warm: #FFBC7D;
  --q-white: #FFFFFF;
  --q-radius: 14px;
  --q-radius-ctl: 12px;
  --q-font: 'Geist', 'Segoe UI', system-ui, sans-serif;

  /* Semânticos — LIGHT (site é light-first) */
  --q-bg: var(--q-snow);
  --q-bg-subtle: var(--q-snow-2);
  --q-surface: var(--q-white);
  --q-surface-hover: #EEF2F7;
  --q-border: var(--q-line);
  --q-border-strong: #C5CDD6;
  --q-text: var(--q-ink-900);
  --q-text-muted: var(--q-ink-700);
  --q-text-subtle: var(--q-mute-500);
  --q-accent: var(--q-blue-500);
  --q-accent-hover: var(--q-blue-900);
  --q-accent-soft: #2987F91A;
  --q-accent-fg: #FFFFFF;
  --q-success: #149A4A;
  --q-success-dot: var(--q-green);
  --q-success-soft: #20D9641A;
  --q-warning: #B86A1A;
  --q-warning-soft: #FFBC7D33;
  --q-danger: #C03636;
  --q-danger-soft: #C036361A;
  --q-shadow: 0 1px 2px rgba(12,13,15,.06), 0 8px 24px rgba(21,79,150,.08);
  --q-glow: 0 1px 2px rgba(21,79,150,.12), 0 8px 18px rgba(41,135,249,.18);
  --q-focus: 0 0 0 3px rgba(41,135,249,.28);
  --q-overlay: rgba(12,13,15,.4);

  --q-container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--q-font);
  background: var(--q-bg);
  color: var(--q-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--q-accent); text-decoration: none; }
a:hover { color: var(--q-accent-hover); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--q-focus); border-radius: 6px; }

.q-container { max-width: var(--q-container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .q-container { padding: 0 16px; } }

/* ---------- Faixa escura de marketing (ref.: #0C0D0F + glows azuis) ---------- */
.q-band-dark {
  background: var(--q-ink-950);
  color: var(--q-white);
  position: relative;
  overflow: hidden;
}
.q-band-dark::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(41,135,249,.14), transparent 60%);
  pointer-events: none;
}
.q-band-dark > * { position: relative; }

/* ---------- Seção clara com textura de pixels (ref.: Pixel-texture nas bordas) ---------- */
.q-band-light {
  background:
    url('/img/site/pixel-texture.png') repeat-x left top / auto 220px,
    radial-gradient(ellipse 60% 50% at 0% 30%, rgba(41,135,249,.07), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 70%, rgba(41,135,249,.06), transparent 60%),
    var(--q-snow);
}

/* ---------- Cabeçalho de seção centralizado (ref.: pill + título 50px/-1px) ---------- */
.q-section-head { text-align: center; margin-bottom: 48px; }
.q-section-head .q-eyebrow-pill { margin-bottom: 16px; }
.q-title-xl {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--q-text);
  line-height: 1.1;
}
.q-band-dark .q-title-xl { color: var(--q-line); }
.q-eyebrow-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--q-accent-soft);
  color: var(--q-accent);
  border-radius: 999px;
  padding: 6px 14px;
  font: 400 14px/1 var(--q-font);
}
.q-eyebrow-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* ---------- Botões (espec. quint.cc/novo: gradiente 90° #154F96→#2987F9, radius 8, glow) ---------- */
.q-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font: 500 15px/1 var(--q-font);
  min-height: 42px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  white-space: nowrap;
}
.q-btn-primary {
  background: linear-gradient(90deg, var(--q-blue-900) 0%, var(--q-blue-500) 100%);
  color: var(--q-accent-fg);
  box-shadow: 0 0 32px rgba(21,79,150,.55);
}
.q-btn-primary:hover {
  background: linear-gradient(90deg, var(--q-blue-900) 0%, var(--q-blue-400) 100%);
  color: var(--q-accent-fg);
  box-shadow: 0 0 46px rgba(41,135,249,.6);
}
/* Botão do hero: métrica maior da referência (19px, pad 24/32, glow forte) */
.q-btn-hero {
  font-size: 19px; font-weight: 400;
  padding: 20px 32px; min-height: 56px;
  box-shadow: 0 0 92px 1px var(--q-blue-900);
}
/* Secundário sobre faixa escura (ref.: painel navy discreto) */
.q-btn-dark {
  background: rgba(38,44,51,.6);
  border-color: rgba(255,255,255,.08);
  color: var(--q-white);
}
.q-btn-dark:hover { background: rgba(38,44,51,.9); border-color: rgba(41,135,249,.4); color: var(--q-white); }
.q-btn-ghost {
  background: transparent;
  border-color: var(--q-border);
  color: var(--q-text);
}
.q-btn-ghost:hover { border-color: var(--q-accent); background: var(--q-accent-soft); color: var(--q-text); }
.q-band-dark .q-btn-ghost { border-color: rgba(255,255,255,.25); color: var(--q-white); }
.q-band-dark .q-btn-ghost:hover { border-color: var(--q-accent); background: rgba(41,135,249,.15); color: var(--q-white); }
.q-btn-outline-accent {
  background: var(--q-surface);
  border-color: var(--q-accent);
  color: var(--q-accent);
}
.q-btn-outline-accent:hover { background: var(--q-accent-soft); }
.q-btn:disabled { opacity: .5; cursor: not-allowed; }
.q-btn-lg { padding: 0.9rem 1.5rem; min-height: 48px; font-size: 15px; }

/* ---------- Inputs ---------- */
.q-input, .q-textarea, .q-select {
  width: 100%;
  background: var(--q-bg-subtle);
  border: 1px solid var(--q-border);
  color: var(--q-text);
  border-radius: var(--q-radius-ctl);
  padding: 0.7rem 0.9rem;
  font: 400 14px/1.4 var(--q-font);
  transition: border-color 150ms, box-shadow 150ms;
}
.q-input::placeholder, .q-textarea::placeholder { color: var(--q-text-subtle); }
.q-input:focus, .q-textarea:focus, .q-select:focus {
  outline: none; border-color: var(--q-accent); box-shadow: var(--q-focus);
}
.q-input.is-invalid, .q-textarea.is-invalid { border-color: var(--q-danger); }
.q-label { display: block; font: 500 13px/20px var(--q-font); margin-bottom: 8px; color: var(--q-text); }
.q-field { margin-bottom: 16px; }
.q-error { color: var(--q-danger); font-size: 13px; margin-top: 4px; }
.q-textarea { min-height: 110px; resize: vertical; }

/* ---------- Cards / painéis ---------- */
.q-panel {
  background: var(--q-surface);
  border: 1px solid var(--q-border);
  border-radius: var(--q-radius);
}
.q-card {
  background: var(--q-surface);
  border: 1px solid var(--q-border);
  border-radius: var(--q-radius);
  padding: 24px;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}
.q-card:hover { border-color: var(--q-border-strong); box-shadow: var(--q-shadow); }

/* ---------- Chips / pills ---------- */
.q-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font: 500 13px/20px var(--q-font);
  border: 1px solid var(--q-border);
  background: var(--q-surface);
  color: var(--q-text-muted);
  cursor: pointer;
  transition: all 150ms;
}
.q-chip:hover { border-color: var(--q-accent); color: var(--q-accent); }
.q-chip.is-active {
  background: var(--q-accent);
  border-color: var(--q-accent);
  color: var(--q-accent-fg);
}
.q-chip-soft {
  background: var(--q-accent-soft);
  border-color: transparent;
  color: var(--q-blue-900);
  cursor: default;
}
.q-badge {
  display: inline-block;
  font: 700 10px/12px var(--q-font);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}
.q-badge-success { background: var(--q-success-soft); color: var(--q-success); }
.q-badge-accent { background: var(--q-accent-soft); color: var(--q-blue-900); }

/* Pill verde do hero (ref.: bg verde 10%, radius 44, ponto + texto verde) */
.q-pill-live {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(32,217,100,.1);
  color: var(--q-green);
  border-radius: 44px;
  padding: 8px 16px;
  font: 400 15px/1 var(--q-font);
}
.q-pill-live::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--q-green); box-shadow: 0 0 8px var(--q-green);
}

/* ---------- Header / nav (ref.: transparente sobre hero escuro; branco ao rolar) ---------- */
.q-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--q-border);
  transition: background 200ms, border-color 200ms;
}
.q-header.is-over-dark {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.q-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.q-logo { display: inline-flex; align-items: center; text-decoration: none; }
.q-logo img { height: 30px; width: auto; display: block; }
.q-nav { display: flex; align-items: center; gap: 4px; }
.q-nav a {
  font: 400 14px/20px var(--q-font);
  color: var(--q-text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
}
.q-header.is-over-dark .q-nav a { color: var(--q-mute-400); }
.q-nav a:hover { color: var(--q-accent); }
.q-nav a.is-active { color: var(--q-accent); font-weight: 500; }
.q-nav a.is-active::before {
  content: ''; display: inline-block; width: 14px; height: 10px;
  background: url('/img/site/double-arrow.svg') no-repeat center / contain;
}
.q-header-cta { display: flex; align-items: center; gap: 12px; }
.q-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--q-text); }
.q-header.is-over-dark .q-burger { color: var(--q-white); }
@media (max-width: 860px) {
  .q-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--q-surface);
    border-bottom: 1px solid var(--q-border);
    flex-direction: column; align-items: stretch;
    padding: 12px 16px; gap: 4px;
    box-shadow: var(--q-shadow);
  }
  .q-nav.is-open { display: flex; }
  .q-nav a.is-active::after { display: none; }
  .q-burger { display: block; }
  .q-header-cta .q-btn { padding: 0.55rem 0.9rem; }
}

/* ---------- Footer (ref.: azul sólido #154F96, links à esquerda, contato à direita, QUINT® em caixa) ---------- */
.q-footer {
  background: var(--q-blue-900);
  color: rgba(255,255,255,.9);
  position: relative;
}
.q-footer a { color: rgba(255,255,255,.9); }
.q-footer a:hover { color: var(--q-white); }
.q-footer-top-tab {
  position: absolute; top: -1px; right: 24px;
  background: var(--q-ink-950); color: var(--q-white);
  font: 400 12px/1 var(--q-font);
  padding: 8px 18px 10px;
  border-radius: 0 0 12px 12px;
  cursor: pointer; border: none;
}
.q-footer-top-tab:hover { color: var(--q-blue-200); }
.q-footer-grid {
  display: flex; justify-content: space-between; gap: 32px;
  padding: 56px 0 40px; flex-wrap: wrap;
}
.q-footer-grid ul { list-style: none; padding: 0; margin: 0; }
.q-footer-grid li { margin-bottom: 12px; font-size: 15px; }
.q-footer-right { text-align: right; }
.q-footer-right li { color: rgba(255,255,255,.9); }
@media (max-width: 720px) {
  .q-footer-grid { flex-direction: column; }
  .q-footer-right { text-align: left; }
}
.q-footer-logo-box {
  display: inline-block;
  background: var(--q-white);
  padding: 6px 10px;
  border-radius: 4px;
  font: 700 16px/1 var(--q-font);
  letter-spacing: .06em;
  color: var(--q-blue-900);
}
.q-footer-logo-box sup { font-size: 8px; }
.q-footer-bottom {
  padding: 0 0 32px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px;
}

/* ---------- FAB IA ---------- */
.q-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--q-accent); color: var(--q-accent-fg);
  border: none; border-radius: 999px;
  padding: 14px 20px;
  font: 600 14px/1 var(--q-font);
  cursor: pointer;
  box-shadow: var(--q-glow);
  transition: background 150ms, transform 150ms;
}
.q-fab:hover { background: var(--q-accent-hover); transform: translateY(-2px); }

/* ---------- Sheets (base compartilhada) ---------- */
.q-sheet-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--q-overlay);
}
.q-sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(480px, 100vw);
  background: var(--q-surface);
  box-shadow: var(--q-shadow);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--q-border);
}
.q-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--q-border);
}
.q-sheet-header h3 { margin: 0; font-size: 20px; }
.q-sheet-body { flex: 1; overflow-y: auto; padding: 24px; }
.q-sheet-footer { padding: 16px 24px; border-top: 1px solid var(--q-border); }
.q-sheet-close {
  background: none; border: none; cursor: pointer;
  color: var(--q-text-subtle); font-size: 22px; line-height: 1; padding: 6px;
  border-radius: 8px;
}
.q-sheet-close:hover { background: var(--q-surface-hover); color: var(--q-text); }

/* ---------- Seções utilitárias ---------- */
.q-section { padding: 72px 0; }
.q-section-sm { padding: 48px 0; }
.q-section-title { font-size: 32px; margin-bottom: 8px; }
.q-section-sub { color: var(--q-text-subtle); font-size: 16px; margin-bottom: 40px; }
@media (max-width: 640px) {
  .q-section { padding: 48px 0; }
  .q-section-title { font-size: 26px; }
}
.q-eyebrow {
  font: 700 12px/16px var(--q-font);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--q-accent); margin-bottom: 12px; display: block;
}
