/* =====================================================================
   Datamatix: páginas de cidades e regiões (componentes compartilhados)
   Complementa style.css. Animações com prefixo "ct" (sem colisão com o site).
   ===================================================================== */

/* ---------- hero: cidade – UF sem quebrar no fim do H1 ---------- */
.hero-text h1 .nw { white-space: nowrap; }
/* nomes longos: cidade – UF sempre em uma linha; a fonte diminui só quando falta espaço.
   --em = largura do texto medida em "em" (ex.: Martinho Campos – MG ≈ 10,9 → usar 11.2) */
.hero-text:has(.fit) { container-type: inline-size; }
.hero-text h1 .fit { display: inline-block; white-space: nowrap; font-size: min(.9em, calc(100cqi / var(--em, 11))); }

/* ---------- hero: link secundário ---------- */
.ct-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: #000; padding: 6px 0; background: linear-gradient(#000, #000) 0 100% / 100% 2px no-repeat; transition: background-size .35s; }
.ct-link:hover { background-size: 0 2px; background-position: 100% 100%; }
.ct-link .ico { font-size: 20px; }

/* ---------- hero: painel de gestão + aplicativo ---------- */
.ct-app { position: relative; width: 100%; max-width: 520px; padding: 0 0 70px 56px; }
.ct-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; }
.ct-win-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid #efeff3; }
.ct-win-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e3e3ea; }
.ct-win-bar span { margin-left: 10px; font-size: 12.5px; font-weight: 600; color: #65656e; }
.ct-win-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.ct-side { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; background: #f7f7fa; }
.ct-side li { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #9a9aa3; font-size: 16px; transition: background .4s, color .4s; }
.ct-side li.on { background: #000; color: var(--bgcolor); }
.ct-main { padding: 16px 18px 18px; }
.ct-kpis { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 8px; }
.ct-kpis div { background: #f7f7fa; border-radius: 14px; padding: 10px 12px; }
.ct-kpis small, .ct-chart-h small { display: block; font-size: 11.5px; color: #65656e; }
.ct-kpis b { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-chart { margin-top: 10px; border: 1px solid #efeff3; border-radius: 14px; padding: 10px 12px 4px; }
.ct-chart-h { display: flex; align-items: center; justify-content: space-between; }
.ct-chart-h em { font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--bgcolor); border-radius: 99px; padding: 2px 8px; opacity: 0; transition: opacity .4s 1.4s; }
.ct-chart svg { display: block; width: 100%; height: auto; margin-top: 6px; }
.ct-area { opacity: 0; transition: opacity .8s .9s; }
.ct-line { fill: none; stroke: var(--main-color); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s cubic-bezier(.6,0,.2,1); }
.ct-app.on .ct-line { stroke-dashoffset: 0; }
.ct-app.on .ct-area, .ct-app.on .ct-chart-h em { opacity: 1; }
.ct-phone { position: absolute; left: 0; bottom: 0; width: 150px; padding: 54px 14px 14px; background: #000; color: #fff; border-radius: 30px; border: 5px solid #1b1b1f; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); animation: float 7s ease-in-out infinite; }
.ct-phone::before { content: ""; position: absolute; top: 9px; left: 50%; width: 44px; height: 6px; margin-left: -22px; border-radius: 99px; background: #1b1b1f; }
.ct-phone small { display: block; font-size: 11px; color: #a9a9b3; }
.ct-phone > b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ct-phone em { display: block; font-style: normal; font-size: 11px; color: #a9a9b3; }
.ct-ph-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 12px; }
.ct-ph-bars i { flex: 1; height: var(--h, 20%); border-radius: 4px 4px 2px 2px; background: #26262c; transition: height .7s var(--ease-back); }
.ct-ph-bars i:last-child { background: var(--bgcolor); }
.ct-toast { position: absolute; top: 18px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; background: #fff; color: #000; border-radius: 12px; padding: 7px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; opacity: 0; transform: translateY(-10px) scale(.96); transition: opacity .35s, transform .45s var(--ease-back); }
.ct-toast .ico { flex: none; font-size: 13px; color: #000; background: var(--bgcolor); border-radius: 50%; padding: 2px; }
.ct-app.ping .ct-toast { opacity: 1; transform: none; }

/* ---------- segmentos: links para os cases ---------- */
.ct-cases { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 40px; }
.ct-cases p { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #65656e; }
.ct-cases ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ct-cases a { display: inline-block; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 99px; background: #fff; border: 1px solid #e3e3ea; transition: background .3s, border-color .3s; }
.ct-cases a:hover { background: var(--bgcolor); border-color: var(--bgcolor); }

/* ---------- cadeia produtiva local (etapas numeradas) ---------- */
.ct-chain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: ch; }
.ct-chain-grid li { position: relative; background: var(--soft); border-radius: 26px; padding: 28px 24px 26px; counter-increment: ch; }
.ct-chain-grid li::before { content: counter(ch, decimal-leading-zero); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 14px; background: #000; color: var(--bgcolor); font-size: 14px; font-weight: 700; }
.ct-chain-grid li:not(:last-child)::after { content: ""; position: absolute; top: 49px; right: -18px; width: 18px; height: 2px; background: var(--bgcolor); }
.ct-chain-grid h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; padding-bottom: 8px; }
.ct-chain-grid p { font-size: 15px; line-height: 25px; color: #444; }
.ct-chain-note { margin-top: 30px; text-align: center; font-size: 18px; color: #333; }
.ct-chain-note strong { color: #000; }

/* ---------- inteligência artificial ---------- */
.ct-ai { background: #000; position: relative; overflow: hidden; }
.ct-ai::before { content: ""; position: absolute; right: -240px; top: -120px; width: 820px; height: 820px; background: radial-gradient(closest-side, rgba(102,55,237,.3), transparent); pointer-events: none; }
.ct-ai .container { position: relative; }
.ct-ai-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 60px; align-items: center; }
.ct-ai .heading { margin-bottom: 0; }
.ct-ai .heading h2 { color: #fff; font-size: 50px; }
.ct-ai .heading p { color: #a9a9b3; width: 100%; }
.ct-ai .heading > span { background: transparent; border: 1px solid var(--bgcolor); color: var(--bgcolor); }

.ct-nn { background: #0d0d10; border: 1px solid #222228; border-radius: 30px; padding: 22px; color: #fff; }
.ct-nn-head { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #a9a9b3; }
.ct-nn-head span { display: inline-flex; align-items: center; gap: 10px; }
.ct-ai-dot { width: 10px; height: 10px; border-radius: 50%; background: conic-gradient(var(--bgcolor), var(--main-color), var(--bgcolor)); animation: ctSpin 2.4s linear infinite; }
@keyframes ctSpin { to { transform: rotate(360deg); } }
.ct-nn-map { position: relative; aspect-ratio: 520 / 330; margin: 14px 0 6px; }
.ct-nn-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; }
.ct-nn-l path { stroke: #26262c; stroke-width: 1.5; }
.ct-nn-s path, .ct-nn-o path { stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 12 120; stroke-dashoffset: 12; }
.ct-nn-s path { stroke: var(--bgcolor); animation: ctSig 2.2s linear infinite; }
.ct-nn-s path:nth-child(2) { animation-delay: .55s; } .ct-nn-s path:nth-child(3) { animation-delay: 1.1s; } .ct-nn-s path:nth-child(4) { animation-delay: 1.65s; }
.ct-nn-o path { stroke: #855ff1; opacity: 0; }
@keyframes ctSig { to { stroke-dashoffset: -100; } }
.ct-nn.k0 .ct-nn-o path:nth-child(1), .ct-nn.k1 .ct-nn-o path:nth-child(2), .ct-nn.k2 .ct-nn-o path:nth-child(3) { opacity: 1; animation: ctSig 1.1s linear infinite; }
.ct-nn-in li, .ct-nn-out li { position: absolute; top: var(--y); display: flex; align-items: center; gap: 7px; transform: translateY(-50%); font-size: 13px; font-weight: 600; white-space: nowrap; padding: 7px 12px; border-radius: 99px; background: #111114; border: 1px solid #26262c; color: #d6d6dd; }
.ct-nn-in li { left: 0; }
.ct-nn-in .ico { color: var(--bgcolor); font-size: 15px; }
.ct-nn-out li { right: 0; transition: background .4s, color .4s, border-color .4s; }
.ct-nn-out .ico { color: #855ff1; font-size: 15px; transition: color .4s; }
.ct-nn.k0 .ct-nn-out li:nth-child(1), .ct-nn.k1 .ct-nn-out li:nth-child(2), .ct-nn.k2 .ct-nn-out li:nth-child(3) { background: var(--bgcolor); border-color: var(--bgcolor); color: #000; }
.ct-nn.k0 .ct-nn-out li:nth-child(1) .ico, .ct-nn.k1 .ct-nn-out li:nth-child(2) .ico, .ct-nn.k2 .ct-nn-out li:nth-child(3) .ico { color: #000; }
.ct-nn-core { position: absolute; left: 50%; top: 50%; width: 17.7%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: grid; place-items: center; background: #000; box-shadow: 0 0 0 1px #2d2d34, 0 0 50px rgba(102,55,237,.45); }
.ct-nn-core::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--bgcolor); border-right-color: var(--main-color); animation: ctSpin 3s linear infinite; }
.ct-nn-core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--main-color); animation: ctRing 2.2s ease-out infinite; }
@keyframes ctRing { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.ct-nn-core b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, var(--bgcolor), #855ff1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ct-nn-cap { min-height: 76px; padding-top: 16px; border-top: 1px solid #1f1f23; font-size: 15px; line-height: 24px; color: #a9a9b3; transition: opacity .3s; }
.ct-nn-cap b { color: #fff; }
.ct-nn-cap.out { opacity: 0; }

/* ---------- Ayamnese (Rio Branco) ---------- */
.ct-aya { background: #000; position: relative; overflow: hidden; }
.ct-aya::before { content: ""; position: absolute; left: -260px; bottom: -200px; width: 820px; height: 820px; background: radial-gradient(closest-side, rgba(84,250,128,.16), transparent); pointer-events: none; }
.ct-aya .container { position: relative; }
.ct-aya-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.ct-aya .heading { margin-bottom: 0; }
.ct-aya .heading h2 { color: #fff; font-size: 46px; }
.ct-aya .heading p { color: #a9a9b3; width: 100%; }
.ct-aya .heading p + p { margin-top: 14px; }
.ct-aya .heading p strong { color: #fff; }
.ct-aya .heading > span { background: transparent; border: 1px solid var(--bgcolor); color: var(--bgcolor); }
.ct-aya-list { list-style: none; display: grid; gap: 10px; margin: 24px 0 30px; }
.ct-aya-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 24px; color: #d6d6dd; }
.ct-aya-list .ico { flex: none; margin-top: 4px; color: var(--bgcolor); font-size: 16px; }
.ct-aya-act { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; }
.ct-aya-wa { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #fff; }
.ct-aya-wa .ico { font-size: 19px; color: var(--bgcolor); }
.ct-aya-wa:hover { text-decoration: underline; }
.ct-aya-card { background: #0d0d10; border: 1px solid #222228; border-radius: 30px; padding: 22px; color: #fff; }
.ct-aya-steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 14px; }
.ct-aya-steps li { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px; background: #111114; border: 1px solid #26262c; font-size: 13.5px; font-weight: 600; color: #75757f; transition: color .35s, border-color .35s; }
.ct-aya-steps i { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #3a3a42; transition: background .35s, border-color .35s; }
.ct-aya-steps i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s var(--ease-back); }
.ct-aya-steps li.done { color: #fff; border-color: #2f3a33; }
.ct-aya-steps li.done i { background: var(--bgcolor); border-color: var(--bgcolor); }
.ct-aya-steps li.done i::after { transform: rotate(45deg) scale(1); }
.ct-aya-scan { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #75757f; transition: color .3s; }
.ct-aya-scan i { position: relative; flex: 1; height: 4px; border-radius: 99px; background: #1f1f23; overflow: hidden; }
.ct-aya-scan i::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--bgcolor), #855ff1, transparent); transform: translateX(-100%); opacity: 0; }
.ct-aya-card.scan .ct-aya-scan { color: #fff; }
.ct-aya-card.scan .ct-aya-scan i::after { opacity: 1; animation: ayScan 1s linear infinite; }
@keyframes ayScan { to { transform: translateX(260%); } }
.ct-aya-res { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.ct-aya-res li { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border-radius: 99px; background: #111114; border: 1px solid #26262c; font-size: 12.5px; font-weight: 700; color: #a9a9b3; white-space: nowrap; transition: background .4s, color .4s, border-color .4s, transform .4s var(--ease-back); }
.ct-aya-res b { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ct-aya-res .g { --c: #54fa80; } .ct-aya-res .y { --c: #ffd35a; } .ct-aya-res .r { --c: #ff7a7a; }
.ct-aya-res li.on { background: var(--c); border-color: var(--c); color: #000; transform: scale(1.04); }
.ct-aya-res li.on b { background: #000; }
.ct-aya-cap { min-height: 76px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #1f1f23; font-size: 15px; line-height: 24px; color: #a9a9b3; transition: opacity .3s; }
.ct-aya-cap b { color: #fff; }
.ct-aya-cap.out { opacity: 0; }
.ct-aya-tag { display: block; margin-top: 6px; text-align: right; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #5c5c66; }
.ct-aya-note { display: flex; gap: 10px; align-items: flex-start; max-width: 860px; margin: 44px auto 0; font-size: 14px; line-height: 23px; color: #8a8a94; text-align: left; }
.ct-aya-note .ico { flex: none; margin-top: 3px; font-size: 16px; color: #ffd35a; }
@media (max-width: 1199px) {
  .ct-aya-grid { grid-template-columns: 1fr; gap: 40px; }
  .ct-aya .heading h2 { font-size: 42px; }
}
@media (max-width: 767px) {
  .ct-aya .heading h2 { font-size: 32px; }
  .ct-aya-card { padding: 18px 14px; border-radius: 24px; }
  .ct-aya-tag { font-size: 10px; }
  .ct-aya-steps { grid-template-columns: 1fr; gap: 8px; }
  .ct-aya-steps li { padding: 9px 12px; font-size: 13px; }
  .ct-aya-res { gap: 6px; }
  .ct-aya-res li { flex-direction: column; gap: 5px; padding: 9px 4px; border-radius: 14px; font-size: 11px; white-space: normal; text-align: center; line-height: 1.2; }
  .ct-aya-cap { font-size: 14px; line-height: 22px; min-height: 92px; }
  .ct-aya-note { font-size: 13px; margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-aya-scan i::after { animation: none !important; }
}

/* ---------- chamada final ---------- */
.ct-final { padding-top: 0; }
.ct-final-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: center; background: var(--bgcolor) url(../img/hero-lines.avif) right center / cover no-repeat; border-radius: 36px; padding: 56px 60px; overflow: hidden; }
.ct-final-tag { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.ct-final-tag .pulse { background: var(--main-color); }
.ct-final h2 { font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -.045em; margin: 18px 0 12px; }
.ct-final h2 span { color: var(--main-color); }
.ct-final-txt p { font-size: 17px; line-height: 28px; color: #0b3b1a; max-width: 560px; }
.ct-final-act { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ct-final-act .btn { background: #fff; }
.ct-final-wa { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #000; }
.ct-final-wa .ico { font-size: 19px; }
.ct-final-wa:hover { text-decoration: underline; }

/* ---------- responsivo ---------- */
@media (max-width: 1199px) {
  .ct-chain-grid { grid-template-columns: repeat(2, 1fr); }
  .ct-chain-grid li:nth-child(2)::after { display: none; }
  .ct-ai-grid { grid-template-columns: 1fr; gap: 40px; }
  .ct-ai .heading h2 { font-size: 42px; }
  .ct-final-card { grid-template-columns: 1fr; padding: 46px 40px; }
  .ct-final-act { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 16px 24px; }
}
@media (max-width: 991px) {
  .hero-visual .ct-app { margin: 0 auto; }
}
@media (max-width: 767px) {
  .ct-chain-grid { grid-template-columns: 1fr; gap: 12px; }
  .ct-chain-grid li::after { display: none; }
  .ct-chain-note { font-size: 16px; }
  .ct-app { padding: 0 0 60px 34px; }
  .ct-win-body { grid-template-columns: 40px minmax(0, 1fr); }
  .ct-side li { width: 28px; height: 28px; font-size: 14px; }
  .ct-main { padding: 12px; }
  .ct-kpis { grid-template-columns: 1fr 1fr; }
  .ct-kpis div:last-child { display: none; }
  .ct-kpis b { font-size: 16px; }
      .ct-phone { width: 112px; padding: 46px 10px 10px; border-radius: 24px; border-width: 4px; }
  .ct-phone > b { font-size: 22px; }
  .ct-phone small, .ct-phone em { font-size: 9.5px; white-space: nowrap; }
  .ct-ph-bars { height: 40px; }
  .ct-toast { left: 6px; right: 6px; font-size: 10px; padding: 6px 7px; }
  .ct-ai .heading h2 { font-size: 32px; }
  .ct-nn { padding: 18px 14px; border-radius: 24px; }
  .ct-nn-head { font-size: 11px; }
  .ct-nn-in li, .ct-nn-out li { font-size: 10.5px; gap: 5px; padding: 5px 8px; }
  .ct-nn-in .ico, .ct-nn-out .ico { font-size: 12px; }
  .ct-nn-core b { font-size: 16px; }
  .ct-nn-cap { font-size: 14px; line-height: 22px; min-height: 92px; }
  .ct-final-card { padding: 36px 22px; border-radius: 26px; }
  .ct-final h2 { font-size: 30px; }
}
@media (max-width: 374px) {
  .hero-text h1 { font-size: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-nn-s path, .ct-nn-o path, .ct-nn-core::before, .ct-nn-core::after, .ct-phone { animation: none !important; }
}
