/* ============ FLUXO: PROBLEMAS → CONNECTA → SOLUÇÕES ============ */
.flow { position: relative; padding: 130px 0; overflow: hidden; }
.flow .section-heading { max-width: 760px; margin: 0 auto 70px; text-align: center; }
.flow .section-heading h2 em { font-style: normal; color: var(--light-70); }

.flow-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); align-items: center; gap: 0; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-svg path { fill: none; stroke: var(--light-14); stroke-width: 1.2; }
.flow-svg path.is-out { stroke: rgba(var(--ink-rgb), 0.28); }
.flow-svg circle { fill: var(--light-70); }
.flow-svg circle.is-out { fill: var(--light); filter: drop-shadow(0 0 6px rgba(var(--ink-rgb), 0.9)); }

.flow-col { position: relative; z-index: 1; display: grid; gap: 14px; }
.flow-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--light-09);
  border-radius: 14px;
  background: var(--panel);
  color: var(--light-70);
  font-size: 0.92rem;
  line-height: 1.35;
  transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.4s var(--ease);
}
.flow-fixes .flow-item { margin-left: auto; color: var(--light-85); }
.flow-item svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.7; }
.flow-pains .flow-item.is-hot { border-color: var(--light-24); color: var(--light); }
.flow-fixes .flow-item.is-hot { border-color: rgba(var(--ink-rgb), 0.55); color: var(--light); box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.08), 0 14px 40px -18px rgba(var(--ink-rgb), 0.7); transform: translateX(-4px); }
.flow-fixes .flow-item.is-hot svg { color: var(--light); opacity: 1; }

.flow-hub { position: relative; z-index: 1; display: grid; place-items: center; height: 100%; min-height: 220px; }
.flow-core {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(var(--ink-rgb), 0.35), rgba(var(--ink-rgb), 0.06) 70%), var(--panel);
  border: 1px solid rgba(var(--ink-rgb), 0.45);
  box-shadow: 0 0 0 10px rgba(var(--ink-rgb), 0.05), 0 0 80px -10px rgba(var(--ink-rgb), 0.6);
}
.flow-core::before, .flow-core::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px solid rgba(var(--ink-rgb), 0.18);
  animation: flow-ring 4s ease-out infinite;
}
.flow-core::after { animation-delay: 2s; }
@keyframes flow-ring { from { transform: scale(0.82); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.flow-core img { width: 54px; height: 54px; }
.flow-core .brand-icon-light { display: none; }
html[data-theme="light"] .flow-core .brand-icon-dark { display: none; }
html[data-theme="light"] .flow-core .brand-icon-light { display: block; }
.flow-core.is-pulse { animation: flow-pulse 0.6s var(--ease); }
@keyframes flow-pulse { 40% { box-shadow: 0 0 0 16px rgba(var(--ink-rgb), 0.1), 0 0 110px -6px rgba(var(--ink-rgb), 0.85); } }
.flow-cta { display: flex; justify-content: center; gap: 12px; margin-top: 70px; }

@media (max-width: 860px) {
  .flow { padding: 100px 0; }
  .flow-stage { grid-template-columns: 1fr; gap: 90px; }
  .flow-col { justify-items: center; }
  .flow-item, .flow-fixes .flow-item { margin: 0 auto; }
  .flow-fixes .flow-item.is-hot { transform: translateY(-3px); }
  .flow-hub { min-height: 0; }
  .flow-core { width: 116px; height: 116px; }
  .flow-core img { width: 44px; height: 44px; }
}

/* ============ PERGUNTE A UMA IA ============
   Mesmo desenho do componente AskAI: mascote em bolha que acorda e olha
   para o painel, painel de vidro com as IAs lado a lado. */
.ask-ai { position: relative; display: inline-flex; }
.ask-ai-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 56px;
  padding: 0 12px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--light-05);
  color: var(--light);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ask-ai-btn:hover { transform: translateY(-2px); }
.ask-ai-btn:active { transform: scale(0.97); }
.ask-ai-btn:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; }
.ask-ai-btn.is-compact { height: 44px; gap: 12px; padding: 0 9px 0 14px; border-radius: 13px; font-size: 0.875rem; }
.ask-ai.is-blob .ask-ai-btn {
  width: 52px;
  height: 52px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  background: rgba(var(--void-rgb), 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 0 0 1px var(--light-09);
}
.ask-ai.is-blob .ask-ai-btn:hover { box-shadow: 0 10px 30px -12px var(--preview-shadow), inset 0 0 0 1px var(--light-14); }

.ai-mascot {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--light);
  color: var(--void);
  border-radius: 58% 42% 55% 45% / 52% 58% 42% 48%;
  transform: rotate(-7deg);
  animation: ai-mascot-blob 9s ease-in-out infinite;
  transition: transform 0.44s cubic-bezier(0.22, 1.5, 0.5, 1);
}
.ai-mascot.is-compact { width: 28px; height: 28px; transform: none; }
.ask-ai-btn:hover .ai-mascot { transform: rotate(-7deg) translateY(-2px); }
.ask-ai.is-awake .ai-mascot { transform: rotate(6deg) scale(1.05); }
.ai-mascot-eyes { display: flex; gap: 8px; transform: translate(1px, -1px); transition: transform 0.3s ease; }
.ai-mascot.is-compact .ai-mascot-eyes { gap: 5px; transform: none; }
.ai-mascot-eyes i { display: block; width: 4px; height: 10px; border-radius: 5px; background: currentColor; animation: ai-mascot-blink 6.5s infinite; }
.ai-mascot.is-compact .ai-mascot-eyes i { width: 3px; height: 7px; }
/* olhar acordado: para onde o painel abriu */
.ask-ai.is-awake .ai-mascot-eyes { transform: translate(1px, -4px); }
.ask-ai.is-awake:has(.ask-ai-pop.down) .ai-mascot-eyes { transform: translate(1px, 4px); }
@keyframes ai-mascot-blob {
  0%, 100% { border-radius: 58% 42% 55% 45% / 52% 58% 42% 48%; }
  33% { border-radius: 45% 55% 48% 52% / 58% 44% 56% 42%; }
  66% { border-radius: 52% 48% 42% 58% / 45% 52% 48% 55%; }
}
@keyframes ai-mascot-blink { 0%, 42%, 46%, 100% { transform: scaleY(1); } 44% { transform: scaleY(0.12); } }

.ask-ai-tip, .ask-ai-tile-tip {
  position: absolute;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--light);
  color: var(--void);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.2s ease;
}
.ask-ai-tip { right: calc(100% + 10px); top: 50%; transform: translate(4px, -50%) scale(0.95); }
.ask-ai.is-blob:not(.is-awake) .ask-ai-btn:hover .ask-ai-tip,
.ask-ai.is-blob:not(.is-awake) .ask-ai-btn:focus-visible .ask-ai-tip { opacity: 1; transform: translate(0, -50%); transition-delay: 0.25s; }

.ask-ai-pop {
  position: absolute;
  z-index: 60;
  width: min(384px, calc(100vw - 24px));
  padding: 20px 20px 16px;
  border-radius: 25px;
  background: rgba(var(--void-rgb), 0.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  color: var(--light);
  box-shadow: inset 0 0 0 1px var(--light-14), 0 24px 60px -16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.18s ease;
}
.ask-ai-pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.ask-ai-pop.up { bottom: calc(100% + 16px); }
.ask-ai-pop.down { top: calc(100% + 16px); transform: translateY(-8px) scale(0.95); transform-origin: top left; }
.ask-ai-pop.down.is-open { transform: none; }
.ask-ai-pop.right { right: 0; }
.ask-ai-pop.left { left: 0; transform-origin: bottom left; }
.ask-ai-title { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; color: var(--light); }
.ask-ai-sub { margin: 6px 0 0; color: var(--light-55); font-size: 0.875rem; line-height: 1.55; }
.ask-ai-row { display: flex; gap: 6px; margin-top: 23px; }
.ask-ai-tile {
  --brand: var(--light);
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  height: 77px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--light-05);
  color: var(--light-55);
  transition: transform 0.2s ease-out, background 0.2s ease-out, color 0.2s ease-out;
}
.ask-ai-tile:first-child { border-radius: 21px 15px 15px 21px; }
.ask-ai-tile:last-child { border-radius: 15px 21px 21px 15px; }
.ask-ai-tile:hover, .ask-ai-tile:focus-visible { transform: translateY(-4px); background: var(--light-09); color: var(--brand); outline: none; }
.ask-ai-tile:focus-visible { outline: 2px solid var(--light); outline-offset: -2px; }
.ask-ai-logo { display: inline-flex; }
.ask-ai-logo svg { display: block; width: 27px; height: 27px; }
/* em repouso as logos ficam neutras; no foco aparecem com as cores da marca */
.ask-ai-tile .ask-ai-logo { filter: grayscale(1); opacity: 0.6; transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease; }
.ask-ai-tile:hover .ask-ai-logo, .ask-ai-tile:focus-visible .ask-ai-logo { filter: none; opacity: 1; transform: translateY(-7px) scale(0.92); }
.ask-ai-name { position: absolute; bottom: 8px; color: var(--light-85); font-size: 10px; opacity: 0; transform: translateY(4px); transition: opacity 0.18s ease, transform 0.18s ease; }
.ask-ai-tile:hover .ask-ai-name, .ask-ai-tile:focus-visible .ask-ai-name { opacity: 1; transform: none; }
.ask-ai-go { position: absolute; top: 7px; right: 7px; color: var(--light); opacity: 0; transition: opacity 0.18s ease; }
.ask-ai-go svg { display: block; width: 11px; height: 11px; }
.ask-ai-tile:hover .ask-ai-go, .ask-ai-tile:focus-visible .ask-ai-go { opacity: 1; }
.ask-ai-tile-tip { bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px) scale(0.95); }
.ask-ai-tile:hover .ask-ai-tile-tip { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.25s; }
.ask-ai-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--light-55);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ask-ai-copy:hover, .ask-ai-copy.is-done { background: var(--light-05); color: var(--light); }
.ask-ai-copy svg { width: 14px; height: 14px; }
.ask-ai-fallback { width: 100%; margin-top: 12px; padding: 8px; border: 1px solid var(--light-14); border-radius: 10px; background: var(--void); color: var(--light); font: inherit; font-size: 0.8rem; resize: none; }
.ask-ai-float { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 55; }

/* Faixa do rodapé */
.footer-ask { border-bottom: 1px solid var(--edge); }
.footer-ask-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; padding: 42px 0; }
.footer-ask-copy { max-width: 560px; }
.footer-ask-copy strong { display: block; color: var(--light); font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.footer-ask-copy p { margin: 8px 0 0; color: var(--light-55); font-size: 0.9rem; line-height: 1.5; }
.footer-ask-copy p a { color: var(--light); text-decoration: underline; text-underline-offset: 3px; }
.footer-ask-list { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-ask-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 7px;
  border: 1px solid var(--light-14);
  border-radius: 999px;
  color: var(--light-85);
  font-size: 0.84rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.footer-ask-list a:hover { border-color: var(--light-38); background: var(--light-05); color: var(--light); }
.footer-ask-list a { --brand: var(--light); }
.footer-ask-list .ask-ai-logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--light-05); color: var(--light); }
.footer-ask-list .ask-ai-logo svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .ask-ai-tip { display: none; }
  .ask-ai-pop { padding: 16px; border-radius: 22px; }
  .ask-ai-row { gap: 4px; margin-top: 14px; }
  .ask-ai-tile { height: 64px; border-radius: 12px; }
  .ask-ai-logo svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-mascot, .ai-mascot-eyes i, .flow-core::before, .flow-core::after, .flow-core.is-pulse { animation: none; }
}
