/* =========================================================================
   Template Ads — home v2.1
   Herda TODO o sistema da v2 (tokens, botões, bloco-brasão, cases, FAQ...)
   e acrescenta só os componentes novos:
   órbita do hero, conversa "pergunta certa", mapa de 5 elos, comparativo,
   fechamento com 2 caminhos. Paleta/tipografia continuam as da Template Ads.
   ========================================================================= */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================== HERO com órbita =========================== */
@media (min-width: 861px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } }
.hero-actions { gap: 14px 16px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 18px; font-weight: 600; font-size: 15px; color: var(--text);
  border: 1.5px solid var(--ink-900); background: transparent;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.btn-ghost i { font-size: 19px; color: var(--action); }
.btn-ghost:hover { background: var(--ink-900); color: var(--paper-100); }
.btn-ghost:hover i { color: var(--accent-on-dark); }

.orbit { justify-self: center; display: flex; flex-direction: column; align-items: center; margin: 0; }
.orbit-stage {
  --size: 460px;
  position: relative; width: var(--size); height: var(--size); max-width: 100%;
}
.orbit .ring { position: absolute; border-radius: 50%; inset: 0; margin: auto; pointer-events: none; }
.orbit .ring-1 { width: 58%; height: 58%; border: 1px dashed var(--stone-300); }
.orbit .ring-2 {  /* anel principal: arco coral que gira devagar */
  width: 80%; height: 80%;
  background: conic-gradient(from 0deg, var(--brand) 0 22%, transparent 22% 50%, rgba(216,90,48,.35) 50% 64%, transparent 64%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
}
.orbit .ring-3 { width: 98%; height: 98%; border: 1px solid var(--stone-200); }
.orbit-core {
  position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; border-radius: 50%;
  background: var(--paper-100); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(216, 90, 48, 0.08), 0 24px 48px -20px rgba(44, 44, 42, 0.35);
}
.orbit-core img { width: 54%; height: auto; }

.orbit-labels { position: absolute; inset: 0; list-style: none; }
.orbit-labels li {
  position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  transform: rotate(var(--a)) translateX(calc(var(--size) * 0.40)) rotate(calc(-1 * var(--a)));
}
.orbit-labels span {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink-900); color: var(--paper-100);
  font-size: 13px; font-weight: 600; padding: 8px 12px; line-height: 1;
  box-shadow: 0 10px 24px -12px rgba(44, 44, 42, 0.5);
}
.orbit-labels span::before { content: ""; width: 7px; height: 7px; background: var(--coral-300); flex: none; }
.orbit figcaption { margin-top: 14px; text-align: center; }
.orbit figcaption b {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--action);
}
.orbit figcaption span { font-size: 14px; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
  .orbit .ring-2 { animation: spin 38s linear infinite; }
  .orbit-labels { animation: spin 60s linear infinite; }
  .orbit-labels span { animation: spin-back 60s linear infinite; }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes spin-back { to { rotate: -360deg; } }

/* =========================== PERGUNTA CERTA (conversa) =========================== */
#pergunta-certa { background: var(--bg-alt); }
#pergunta-certa .wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.chat { background: var(--bg); box-shadow: 0 30px 60px -36px rgba(44, 44, 42, 0.45); }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--ink-900); color: var(--paper-100); font-size: 14px; font-weight: 600;
}
.chat-head img { width: 26px; height: auto; }
.chat-head small { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--stone-300); letter-spacing: 0.06em; text-transform: uppercase; }
.chat-body { padding: 28px 24px 30px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 88%; font-size: 16px; line-height: 1.5; padding: 14px 18px; }
.msg-user { align-self: flex-end; background: var(--ink-900); color: var(--paper-100); }
.msg-agent { align-self: flex-start; background: var(--bg-alt); color: var(--text); }
.msg-who { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; opacity: 0.7; }
.q-list { list-style: none; display: grid; gap: 10px; margin-top: 12px; counter-reset: q; }
.q-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-weight: 500; }
.q-list li::before {
  counter-increment: q; content: counter(q);
  width: 30px; height: 36px; padding-bottom: 7px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--paper-100);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  -webkit-mask: var(--brasao-mask) center / 100% 100% no-repeat;
          mask: var(--brasao-mask) center / 100% 100% no-repeat;
}
.q-list li span { padding-top: 5px; }
.chat-foot { padding: 0 24px 26px; }

/* entrada da conversa, uma mensagem por vez (só quando JS marca a seção como visível) */
@media (prefers-reduced-motion: no-preference) {
  .chat.is-armed .msg { opacity: 0; transform: translateY(12px); }
  .chat.is-playing .msg { animation: rise 0.6s var(--ease) forwards; }
  .chat.is-playing .msg:nth-child(2) { animation-delay: 0.7s; }
  .chat.is-playing .msg:nth-child(3) { animation-delay: 1.5s; }
}

/* =========================== MAPA DE 5 ELOS =========================== */
#mapa { background: var(--bg-inverse); color: var(--text-inverse); }
#mapa .eyebrow { color: var(--accent-on-dark); }
#mapa .section-sub { color: var(--text-inverse-muted); }
.chain { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 56px; list-style: none; border-top: 1px solid rgba(246, 244, 238, 0.14); }
.link { position: relative; padding: 30px 24px 8px 0; display: flex; flex-direction: column; gap: 12px; }
.link + .link { padding-left: 24px; border-left: 1px solid rgba(246, 244, 238, 0.14); }
.link + .link::before { /* seta entre os elos */
  content: "\2192"; position: absolute; left: -14px; top: 30px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--paper-100); font-size: 15px; font-weight: 700;
}
.link b { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--paper-100); }
.link p { font-size: 15px; color: var(--text-inverse-muted); }
.link .who {
  margin-top: auto; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-on-dark); border: 1px solid rgba(240, 138, 98, 0.45); padding: 6px 9px;
}

/* =========================== COMPARATIVO =========================== */
.compare { width: 100%; margin-top: 48px; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--ink-900); }
.compare thead th.us { color: var(--paper-100); background: var(--ink-900); }
.compare tbody th { font-family: var(--font-display); font-size: 18px; font-weight: 700; width: 20%; }
.compare td.old { color: var(--text-muted); width: 36%; }
.compare td.old i { color: var(--stone-300); margin-right: 8px; }
.compare td.us { background: #FFFFFF; font-weight: 500; }
.compare td.us i { color: var(--action); margin-right: 8px; }

/* =========================== DOIS CAMINHOS =========================== */
#comece { background: var(--bg-alt); }
.paths2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.path-card { padding: 44px 40px; display: flex; flex-direction: column; gap: 14px; }
.path-card h3 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.01em; }
.path-card p { font-size: 16px; }
.path-card .btn, .path-card .btn-ghost { margin-top: auto; align-self: flex-start; }
.path-card .meta { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.path-online { background: var(--action); color: var(--paper-100); }
.path-online .meta { color: #FFE6DC; }
.path-live { background: var(--bg-inverse); color: var(--paper-100); }
.path-live .meta { color: var(--accent-on-dark); }
.path-live p { color: var(--text-inverse-muted); }
.path-live .btn-ghost { color: var(--paper-100); border-color: var(--paper-100); }
.path-live .btn-ghost:hover { background: var(--paper-100); color: var(--ink-900); }
.path-card .todo { align-self: flex-start; }

/* =========================== RESPONSIVO v2.1 =========================== */
@media (max-width: 1024px) {
  .chain { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .link:nth-child(4) { padding-left: 0; border-left: 0; }
  .link:nth-child(4)::before { display: none; }
}
@media (max-width: 860px) {
  .orbit-stage { --size: 320px; }
  .orbit-labels li { transform: rotate(var(--a)) translateX(calc(var(--size) * 0.36)) rotate(calc(-1 * var(--a))); }
  .orbit-labels span { font-size: 12px; padding: 7px 9px; }
  /* no celular a órbita fica parada (mais leve) e as etiquetas se espalham mais na vertical */
  .orbit-labels li:nth-child(1) { --a: -100deg !important; }
  .orbit-labels li:nth-child(2) { --a: -20deg !important; }
  .orbit-labels li:nth-child(3) { --a: 160deg !important; }
  .orbit-labels li:nth-child(4) { --a: 80deg !important; }
  #pergunta-certa .wrap, .paths2 { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; border-top: 0; }
  .link, .link + .link { padding: 22px 0 22px 44px; border-left: 2px solid rgba(246, 244, 238, 0.18); }
  .link + .link::before { left: -15px; top: -14px; }
  .link:nth-child(4) { padding-left: 44px; border-left: 2px solid rgba(246, 244, 238, 0.18); }
  .link:nth-child(4)::before { display: flex; }
  .link + .link::before { content: "\2193"; }
}
@media (max-width: 768px) {
  .hero-actions .btn, .hero-actions .btn-ghost { width: 100%; }
  .hero-actions .btn .btn-label { flex: 1; }
  .btn-ghost { justify-content: center; }
  .path-card { padding: 32px 24px; }
  .path-card .btn, .path-card .btn-ghost { align-self: stretch; }
  .path-card .btn .btn-label { flex: 1; white-space: normal; }
  /* comparativo vira cartões */
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto !important; }
  .compare tr { margin-bottom: 18px; border: 1px solid var(--line); background: var(--bg); }
  .compare tbody th { padding: 16px 18px 6px; border: 0; }
  .compare td { padding: 12px 18px; border: 0; }
  .compare td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; color: var(--text-muted); }
  .compare td.us { border-top: 1px solid var(--line); }
  .compare td.us::before { color: var(--action); }
}
@media (max-width: 400px) {
  .orbit-stage { --size: 300px; }
  .orbit-labels span { font-size: 11px; }
}
