/* =====================================================================
   Datamatix: páginas de Consultoria em Inteligência Artificial por cidade
   Complementa style.css + cidade.css. Prefixo "ia-" (sem colisão com o site).
   ===================================================================== */

@property --v { syntax: '<number>'; inherits: false; initial-value: 0; }

/* ---------- hero: assistente de IA conversando com os dados ---------- */
.ia-chat { position: relative; width: 100%; max-width: 520px; padding: 0 0 64px 0; }
.ia-win { background: #fff; border-radius: 26px; box-shadow: 0 50px 90px -40px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.04); overflow: hidden; }
.ia-win-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #efeff3; }
.ia-win-bar .ct-ai-dot { flex: none; }
.ia-win-bar b { font-size: 13px; font-weight: 700; }
.ia-win-bar small { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #65656e; }
.ia-win-bar small i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.ia-tabs { display: flex; gap: 6px; padding: 12px 18px 0; overflow: hidden; }
.ia-tabs li { flex: none; font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: #f4f4f7; color: #65656e; transition: background .4s, color .4s; white-space: nowrap; }
.ia-tabs li.on { background: #000; color: var(--bgcolor); }
.ia-msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; min-height: 268px; }
.ia-q, .ia-a { max-width: 88%; font-size: 13.5px; line-height: 21px; padding: 10px 14px; border-radius: 18px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--ease-back); }
.ia-q { align-self: flex-end; background: #000; color: #fff; border-bottom-right-radius: 6px; }
.ia-a { align-self: flex-start; background: #f4f4f7; color: #111; border-bottom-left-radius: 6px; }
.ia-a b { font-weight: 700; }
.ia-q.in, .ia-a.in { opacity: 1; transform: none; }
.ia-typing { align-self: flex-start; display: none; gap: 4px; padding: 12px 14px; border-radius: 18px; background: #f4f4f7; }
.ia-typing.in { display: inline-flex; }
.ia-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a9aa3; animation: iaDot 1s ease-in-out infinite; }
.ia-typing i:nth-child(2) { animation-delay: .15s; } .ia-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes iaDot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ia-chips span { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: #fff; border: 1px solid #e3e3ea; }
.ia-chips span:first-child { background: var(--bgcolor); border-color: var(--bgcolor); }
.ia-input { display: flex; align-items: center; gap: 10px; margin: 0 18px 18px; padding: 10px 10px 10px 14px; border-radius: 99px; border: 1px solid #e3e3ea; font-size: 12.5px; color: #9a9aa3; }
.ia-input span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-input i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--main-color); color: #fff; display: grid; place-items: center; font-size: 14px; }
.ia-badge { position: absolute; right: -14px; bottom: 0; width: 196px; padding: 16px 16px 14px; background: #000; color: #fff; border-radius: 22px; border: 4px solid #1b1b1f; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); animation: float 7s ease-in-out infinite; }
.ia-badge small { display: block; font-size: 11px; color: #a9a9b3; }
.ia-badge b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--bgcolor); }
.ia-badge em { display: block; font-style: normal; font-size: 11px; color: #a9a9b3; }
.ia-badge-bar { height: 6px; margin-top: 10px; border-radius: 99px; background: #26262c; overflow: hidden; }
.ia-badge-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--bgcolor), #855ff1); transition: width 1.4s cubic-bezier(.6,0,.2,1); }

/* ---------- resumo: definição citável (AEO) ---------- */
.ia-def { max-width: 860px; margin: 0 auto 40px; padding: 26px 30px; border-radius: 24px; background: var(--soft); border-left: 4px solid var(--main-color); }
.ia-def dt { font-size: 12.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--main-color); margin-bottom: 8px; }
.ia-def dd { margin: 0; font-size: 17px; line-height: 29px; color: #111; }

/* ---------- onde aplicar: cards com exemplo prático ---------- */
.ia-uses .seg { display: flex; flex-direction: column; }
.ia-uses .seg p:not(.ia-ex) { flex: 1; }
.ia-uses .seg p.ia-ex { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13.5px; line-height: 21px; color: #222; }
.ia-uses .seg p.ia-ex::before { content: "Exemplo"; display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--main-color); }
.ia-group { margin: 56px 0 22px; display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #65656e; }
.ia-group:first-of-type { margin-top: 0; }
.ia-group::after { content: ""; flex: 1; height: 1px; background: #dedee6; }

/* ---------- teste de prontidão (interativo e compartilhável) ---------- */
.ia-quiz { background: #000; position: relative; overflow: hidden; }
.ia-quiz::before { content: ""; position: absolute; left: -260px; bottom: -220px; width: 820px; height: 820px; background: radial-gradient(closest-side, rgba(84,250,128,.14), transparent); pointer-events: none; }
.ia-quiz .container { position: relative; }
.ia-quiz-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 60px; align-items: start; }
.ia-quiz .heading { margin-bottom: 0; position: sticky; top: 120px; }
.ia-quiz .heading h2 { color: #fff; font-size: 48px; }
.ia-quiz .heading p { color: #a9a9b3; width: 100%; }
.ia-quiz .heading > span { background: transparent; border: 1px solid var(--bgcolor); color: var(--bgcolor); }
.ia-form { background: #0d0d10; border: 1px solid #222228; border-radius: 30px; padding: 26px; color: #fff; }
.ia-progress { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #75757f; margin-bottom: 18px; }
.ia-progress i { position: relative; flex: 1; height: 4px; border-radius: 99px; background: #1f1f23; overflow: hidden; }
.ia-progress i::after { content: ""; position: absolute; inset: 0; width: var(--p, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--bgcolor), #855ff1); transition: width .5s; }
.ia-form fieldset { border: 0; padding: 18px 0; border-top: 1px solid #1f1f23; }
.ia-form fieldset:first-of-type { border-top: 0; padding-top: 0; }
.ia-form legend { font-size: 16px; font-weight: 600; line-height: 24px; margin-bottom: 12px; padding: 0; }
.ia-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ia-opts label { position: relative; display: block; cursor: pointer; }
.ia-opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ia-opts span { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 48px; padding: 9px 10px; border-radius: 14px; background: #111114; border: 1px solid #26262c; font-size: 13px; font-weight: 600; line-height: 18px; color: #c4c4cc; transition: background .25s, border-color .25s, color .25s; }
.ia-opts label:hover span { border-color: #3a3a42; color: #fff; }
.ia-opts input:checked + span { background: var(--bgcolor); border-color: var(--bgcolor); color: #000; }
.ia-opts input:focus-visible + span { outline: 2px solid #855ff1; outline-offset: 2px; }
.ia-result { margin-top: 8px; padding: 22px; border-radius: 22px; background: #111114; border: 1px solid #26262c; }
.ia-result[hidden] { display: none; }
.ia-score { display: flex; align-items: center; gap: 18px; }
.ia-ring { --v: 0; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--bgcolor) calc(var(--v) * 1%), #26262c 0); transition: --v 1s; }
.ia-ring b { width: 74px; height: 74px; border-radius: 50%; background: #111114; display: grid; place-items: center; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.ia-score h3 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.ia-score p { font-size: 14.5px; line-height: 23px; color: #a9a9b3; margin-top: 4px; }
.ia-result-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
.ia-share { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: #fff; background: none; border: 0; cursor: pointer; padding: 6px 0; font-family: inherit; }
.ia-share .ico { font-size: 18px; color: var(--bgcolor); }
.ia-share:hover { text-decoration: underline; }
.ia-hint { margin-top: 14px; font-size: 13px; color: #75757f; }
.ia-hint[hidden] { display: none; }

/* ---------- mito ou verdade ---------- */
.ia-myths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ia-myth { border-radius: 26px; padding: 28px 26px; background: var(--soft); }
.ia-myth h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; padding: 14px 0 12px; }
.ia-myth p { font-size: 15px; line-height: 25px; color: #444; }
.ia-myth p strong { color: #000; }
.ia-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 11px; border-radius: 99px; background: #000; color: #fff; }
.ia-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff7a7a; }

/* ---------- governança e segurança ---------- */
.ia-gov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ia-gov li { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: 22px; border: 1px solid #e6e6ec; background: #fff; }
.ia-gov i { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #000; color: var(--bgcolor); display: grid; place-items: center; font-size: 18px; }
.ia-gov h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; padding-bottom: 4px; }
.ia-gov p { font-size: 14.5px; line-height: 23px; color: #444; }

/* ---------- link para a página de sistemas da mesma cidade ---------- */
.ia-cross { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; max-width: 1080px; margin: 50px auto 0; padding: 24px 28px; border-radius: 22px; background: #fff; border: 1px solid #e3e3ea; }
.ia-cross p { font-size: 16px; line-height: 26px; color: #333; max-width: 640px; }
.ia-cross p strong { color: #000; }
.ia-cross a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; padding: 10px 18px; border-radius: 99px; background: #000; color: #fff; transition: background .3s, color .3s; }
.ia-cross a:hover { background: var(--bgcolor); color: #000; }

/* ---------- responsivo ---------- */
@media (max-width: 1199px) {
  .ia-quiz-grid { grid-template-columns: 1fr; gap: 40px; }
  .ia-quiz .heading { position: static; }
  .ia-quiz .heading h2 { font-size: 42px; }
  .ia-gov { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .hero-visual .ia-chat { margin: 0 auto; }
  .ia-myths { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ia-chat { padding-bottom: 70px; }
  .ia-msgs { min-height: 250px; padding: 14px; }
  .ia-q, .ia-a { font-size: 12.5px; line-height: 19px; padding: 9px 12px; max-width: 92%; }
  .ia-tabs { padding: 10px 14px 0; }
  .ia-input { margin: 0 14px 14px; }
  .ia-badge { right: 4px; width: 158px; padding: 12px 12px 10px; border-radius: 18px; }
  .ia-badge b { font-size: 22px; }
  .ia-def { padding: 20px; }
  .ia-def dd { font-size: 15.5px; line-height: 26px; }
  .ia-quiz .heading h2 { font-size: 32px; }
  .ia-form { padding: 18px 14px; border-radius: 24px; }
  .ia-opts { grid-template-columns: 1fr; gap: 6px; }
  .ia-opts span { min-height: 42px; justify-content: flex-start; text-align: left; }
  .ia-score { flex-direction: column; align-items: flex-start; }
  .ia-gov { grid-template-columns: 1fr; }
  .ia-cross { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ia-badge, .ia-typing i { animation: none !important; }
}
