/* =========================================================
   VELQIA — Design System
   ========================================================= */
:root {
  /* Cores */
  --c-primary:       #0F3F4C;   /* azul petróleo */
  --c-primary-hover: #155264;
  --c-primary-soft:  #E8EFF1;
  --c-accent:        #6B7A4F;   /* verde musgo */
  --c-accent-hover:  #556340;
  --c-accent-soft:   #EEF1E6;
  --c-bg:            #F8F6F1;   /* off-white */
  --c-surface:       #FFFFFF;
  --c-border:        #E5E1D8;
  --c-text:          #1A1F23;
  --c-muted:         #5E6870;

  /* Tipografia */
  --f-heading: 'Manrope', system-ui, -apple-system, sans-serif;
  --f-body:    'Inter',   system-ui, -apple-system, sans-serif;

  /* Espaço */
  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem;
  --s-4: 1rem;     --s-5: 1.5rem;  --s-6: 2rem;
  --s-7: 3rem;     --s-8: 4rem;    --s-9: 6rem;

  /* Forma */
  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 63, 76, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 63, 76, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 63, 76, 0.12);

  --max-w: 1180px;
}

/* Reset enxuto */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--f-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-primary);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--s-4); }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-hover); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.section { padding: var(--s-8) 0; }
.section-sm { padding: var(--s-7) 0; }
.section-lg { padding: var(--s-9) 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--f-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--c-primary);
  letter-spacing: 0.02em;
}
.brand span { color: var(--c-accent); }
.nav-links {
  display: flex; align-items: center; gap: var(--s-5);
  list-style: none; margin: 0; padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--c-text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:not(.btn):hover { color: var(--c-primary); }

/* Garante contraste do CTA dentro do nav */
.nav-links .btn-primary,
.nav-links .btn-primary:hover { color: #fff; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-hover); color: #fff; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-hover); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--c-primary);
  border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-primary-soft); }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  padding: var(--s-9) 0 var(--s-8);
  border-bottom: 1px solid var(--c-border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--s-8);
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-4);
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--c-muted);
  max-width: 46ch;
}
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }

.hero-art {
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-lg);
}
.hero-art h3 { color: #fff; margin-bottom: var(--s-3); }
.hero-art p { color: rgba(255,255,255,0.8); margin-bottom: 0; font-size: 0.95rem; }
.hero-art .stat {
  display: flex; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--s-4); margin-top: var(--s-5);
  font-size: 0.9rem;
}

/* ---------- Cards de produto ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column;
  transition: all .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .tag {
  font-size: 0.75rem; font-weight: 600;
  color: var(--c-accent);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: var(--s-3);
}
.card h3 { margin-bottom: var(--s-2); }
.card .desc { color: var(--c-muted); font-size: 0.95rem; flex: 1; }
.card .price {
  font-family: var(--f-heading);
  font-size: 1.4rem; font-weight: 700;
  color: var(--c-primary);
  margin: var(--s-4) 0;
}
.card .price small {
  display: block; font-size: 0.75rem; font-weight: 400;
  color: var(--c-muted); letter-spacing: 0;
}

/* ---------- Seções de destaque ---------- */
.feature-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--s-4);
}
.feature-list li {
  display: flex; gap: var(--s-4);
  padding: var(--s-4);
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.feature-list .icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.feature-list h4 { margin: 0 0 var(--s-1); font-size: 1rem; }
.feature-list p { margin: 0; font-size: 0.9rem; color: var(--c-muted); }

/* ---------- Página de produto ---------- */
.product-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-7);
  align-items: start;
}
.product-sidebar {
  position: sticky; top: 90px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}
.product-sidebar .price {
  font-family: var(--f-heading);
  font-size: 2rem; font-weight: 800;
  color: var(--c-primary); margin: var(--s-2) 0 var(--s-5);
}
.check-list { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.check-list li {
  padding: var(--s-2) 0 var(--s-2) var(--s-5);
  position: relative; font-size: 0.95rem;
  border-bottom: 1px solid var(--c-border);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--c-accent); font-weight: 700;
}

/* ---------- Forms ---------- */
.form-card {
  max-width: 460px;
  margin: var(--s-7) auto;
  background: var(--c-surface);
  padding: var(--s-7);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.form-field { margin-bottom: var(--s-4); }
.form-field label {
  display: block; font-size: 0.85rem;
  font-weight: 600; margin-bottom: var(--s-2);
  color: var(--c-text);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--f-body); font-size: 0.95rem;
  background: var(--c-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.form-help { font-size: 0.8rem; color: var(--c-muted); margin-top: var(--s-2); }

/* ---------- Conteúdo legal ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal h2 { margin-top: var(--s-7); }
.legal p, .legal li { color: var(--c-muted); }

/* ---------- Footer ---------- */
.footer {
  margin-top: var(--s-9);
  padding: var(--s-7) 0 var(--s-5);
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}
.footer h4 {
  font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--c-text);
  margin-bottom: var(--s-3);
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: var(--s-2); }
.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: var(--s-4);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-3);
}

/* ---------- Utilidades ---------- */
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.tag-pill {
  display: inline-block;
  background: var(--c-accent-soft); color: var(--c-accent-hover);
  padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}

/* ===== Nav: refinamento ===== */
.nav-inner { gap: var(--s-4); }

.nav-links { gap: var(--s-5); }
.nav-links li { display: flex; align-items: center; }

/* Botão no nav: menor, alinhado, sem "estourar" */
.nav-cta {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: var(--radius);
  line-height: 1;
}

/* Hamburger (escondido no desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
}

/* ===== Página de produto: blocos extras ===== */
.sobre-trilha {
  margin: var(--s-5) 0;
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--c-primary);
  font-size: 0.98rem;
}

.check-list-accent li::before {
  content: "→";
  color: var(--c-primary);
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.tag-list li {
  background: var(--c-primary-soft);
  color: var(--c-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: mod;
}
.module-list li {
  counter-increment: mod;
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-7);
  position: relative;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 0.95rem;
}
.module-list li:last-child { border-bottom: 0; }
.module-list li::before {
  content: counter(mod);
  position: absolute;
  left: 0;
  top: var(--s-3);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Opções de formulário (radio/checkbox) */
.opt-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: var(--s-2);
  cursor: pointer;
  font-weight: 400;
  transition: all .15s ease;
}
.opt-row:hover { border-color: var(--c-primary); }
.opt-row input { accent-color: var(--c-primary); }
.opt-row:has(input:checked) {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
}

/* ===== Erros de campo (validação server-side) ===== */
.form-field.has-error .opt-row,
.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #B23A3A;
  background: #FDF3F3;
}
.form-field.has-error > label {
  color: #B23A3A;
}
.field-error {
  margin-top: var(--s-2);
  font-size: 0.85rem;
  color: #B23A3A;
  font-weight: 500;
}

/* FAQ (details/summary) */
.faq { margin-top: var(--s-4); }
.faq details {
  border-bottom: 1px solid var(--c-border);
  padding: var(--s-4) 0;
}
.faq details:first-child { border-top: 1px solid var(--c-border); }
.faq summary {
  cursor: pointer;
  font-family: var(--f-heading);
  font-weight: 600;
  color: var(--c-primary);
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--c-accent);
  transition: transform .2s ease;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: var(--s-3);
  color: var(--c-muted);
  font-size: 0.95rem;
}

/* Listas dentro de .legal (Termos / Privacidade) */
.legal ul {
  padding-left: var(--s-5);
  margin: var(--s-3) 0 var(--s-4);
}
.legal ul li {
  margin-bottom: var(--s-2);
  color: var(--c-muted);
}
.legal h3 {
  margin-top: var(--s-5);
  font-size: 1.05rem;
}

/* Alertas */
.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: var(--s-4);
}
.alert-error {
  background: #FDF3F3;
  border: 1px solid #B23A3A;
  color: #B23A3A;
}
.alert-info {
  background: var(--c-primary-soft);
  border: 1px solid var(--c-primary);
  color: var(--c-primary);
}

/* ----------- Chat --------------- */
/* Adicione no final do velqia.css */
.chat-container {
  padding: 0; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  height: 600px;
}
.chat-header {
  background: var(--c-primary); 
  color: white; 
  padding: 15px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
}
.chat-messages {
  flex: 1; 
  overflow-y: auto; 
  padding: 20px; 
  background: var(--c-bg); 
  display: flex; 
  flex-direction: column; 
  gap: 12px;
}
.chat-bubble-wrapper {
  max-width: 80%;
}
.chat-bubble-wrapper.me { align-self: flex-end; }
.chat-bubble-wrapper.other { align-self: flex-start; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.chat-bubble.bubble-me {
  background: var(--c-primary);
  color: white;
  border: none;
}
.chat-bubble.bubble-other {
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.chat-time {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 4px;
}

/* Quiz interativo */
.quiz-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: var(--s-2);
  cursor: pointer;
  transition: all .15s ease;
}
.quiz-option:hover { border-color: var(--c-primary); }
.quiz-option.correct {
  background: #E8F5E9; border-color: #2E7D32; color: #2E7D32; font-weight: 600;
}
.quiz-option.wrong {
  background: #FDF3F3; border-color: #B23A3A; color: #B23A3A;
}
.quiz-option.disabled {
  pointer-events: none; opacity: 0.7;
}
.quiz-feedback {
  margin-top: var(--s-3);
  font-size: 0.9rem;
  font-weight: bold;
}

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-4) var(--s-5) var(--s-5);
    gap: var(--s-3);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { color: var(--c-text); padding: 0.5rem 0; }
  .nav-cta { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-layout { grid-template-columns: 1fr; }
  .product-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.mobile { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: var(--s-7) 0; }
}