/* =========================================================
   i9ia · Institucional
   Premium tech aesthetic — referenciado em Stripe, Linear, Vercel, Apple
   ========================================================= */

:root {
  /* ---------- Brand (Manual i9ia) ---------- */
  --brand-deep:     #0F0851;
  --brand-electric: #4501FA;
  --brand-primary:  #6A3ADD;
  --brand-lavender: #B063FE;

  /* ---------- Surfaces ---------- */
  --bg:             #FFFFFF;
  --bg-soft:        #FAFAFB;
  --bg-elev:        #FFFFFF;
  --bg-dark:        #0A0420;        /* derivado do brand-deep, único momento escuro */
  --bg-dark-2:      #14092E;

  /* ---------- Text ---------- */
  --ink:            #0A0A0F;
  --ink-soft:       #2A2A33;
  --ink-mute:       #5A5A66;
  --ink-dim:        #94949E;
  --ink-on-dark:    #F4F2FA;
  --ink-on-dark-mu: #9D98B8;

  /* ---------- Lines ---------- */
  --rule:           rgba(10, 10, 15, 0.07);
  --rule-strong:    rgba(10, 10, 15, 0.14);
  --rule-on-dark:   rgba(244, 242, 250, 0.10);

  /* ---------- Accent (sparingly) ---------- */
  --accent:         var(--brand-primary);
  --accent-soft:    rgba(106, 58, 221, 0.08);
  --accent-bd:      rgba(106, 58, 221, 0.20);

  /* ---------- Type ---------- */
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Roboto Mono", "Menlo", monospace;

  /* ---------- Scale ---------- */
  --fs-display: clamp(3rem, 7vw, 6rem);
  --fs-h2:      clamp(2rem, 3vw, 3.25rem);
  --fs-h3:      clamp(1.125rem, 0.4vw + 1rem, 1.375rem);
  --fs-lead:    clamp(1.0625rem, 0.25vw + 1rem, 1.25rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-xs:      0.75rem;

  /* ---------- Layout ---------- */
  --container:  1200px;
  --gutter:     clamp(1.25rem, 4vw, 2rem);

  /* ---------- Motion ---------- */
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:     180ms;
  --t-mid:      320ms;
  --t-slow:     600ms;

  /* ---------- Radii ---------- */
  --r-sm:       6px;
  --r:          10px;
  --r-lg:       16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }

html, body { background: var(--bg); }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 0, "cv01" 0;
  overflow-x: hidden;
}

::selection { background: var(--brand-primary); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }

p { color: var(--ink-mute); max-width: 60ch; }
strong { font-weight: 600; color: var(--ink); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: none;
}
.tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
  font-weight: 400;
}

/* =========================================================
   HEADER · sticky, minimal
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 68px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 0.6rem; }

/* Logo SVG inline · cores hardcoded no <symbol> (símbolo roxo + texto preto) */
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
  aspect-ratio: 1001.41 / 323.76;
}
.brand-logo--lg { height: 38px; }
.nav__logo { transition: opacity var(--t-fast) var(--ease); }
.nav__logo:hover { opacity: 0.75; }

.nav__menu {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav__menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease);
}
.nav__menu a:hover { color: var(--ink); }

.nav__cta { display: flex; align-items: center; gap: 0.5rem; }

.nav__toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  position: relative;
}
.nav__toggle span {
  position: absolute; left: 50%; top: 50%;
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav__toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
.nav__toggle span:nth-child(2) { transform: translate(-50%, calc(-50% + 4px)); }
.nav__toggle.is-open span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 880px) {
  .nav__menu { display: none; }
  .nav__cta .btn--primary { display: none; }
  .nav__toggle { display: block; }
}

/* Menu mobile (hambúrguer) · DEVE FICAR FORA de <header> no HTML.
   `.site-header` tem `backdrop-filter` que cria containing block para position:fixed,
   forçando este elemento a posicionar-se relativo ao header (68px) em vez do viewport.
   Ver hotfix 2026-05-07 em docs/runbooks/hotfixes/2026-05-07-mobile-menu-transparent.md */
.nav__mobile {
  position: fixed;
  inset: 68px 0 0 0;
  z-index: 49;
  background: var(--bg);
  padding: 2rem var(--gutter);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
.nav__mobile.is-open { display: flex; }
/* :not(.btn) garante que o CTA "Fale conosco" mantenha estilo de botão
   (background preto, texto branco) e não vire link grande com fundo preto invisível.
   Hotfix 2026-05-07 · ver docs/runbooks/hotfixes/ */
.nav__mobile a:not(.btn) {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.nav__mobile .btn { margin-top: 1.5rem; align-self: flex-start; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--bg-soft); }

.btn--text {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding-inline: 0.5rem;
}
.btn--text:hover { color: var(--accent); }

.btn--ondark {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}
.btn--ondark:hover { background: var(--brand-lavender); color: var(--bg-dark); border-color: var(--brand-lavender); }

.btn--ghost-dark {
  background: transparent;
  color: var(--ink-on-dark);
  border-color: var(--rule-on-dark);
}
.btn--ghost-dark:hover { border-color: var(--brand-lavender); color: var(--brand-lavender); background: rgba(176, 99, 254, 0.08); }

.btn .arrow {
  width: 14px; height: 14px;
  transition: transform var(--t-fast) var(--ease);
}
.btn:hover .arrow { transform: translateX(2px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 4.5vw, 4rem);
  overflow: hidden;
}
.hero__layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
@media (max-width: 960px) {
  .hero__layout { grid-template-columns: 1fr; gap: 3rem; }
}

.hero .tag { margin-bottom: 1.25rem; }

.hero__title {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 1.25rem;
  max-width: 14ch;
}
.hero__title .accent { color: var(--accent); }

.hero__lead { font-size: var(--fs-lead); margin-bottom: 1.5rem; max-width: 50ch; }

.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Visual: Símbolo da marca como elemento gráfico refinado */
.hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.hero__visual::before {
  /* Halo radial sutil atrás do símbolo */
  content: "";
  position: absolute;
  width: 75%;
  height: 75%;
  background: radial-gradient(circle, rgba(176, 99, 254, 0.4), rgba(106, 58, 221, 0.15) 35%, transparent 70%);
  filter: blur(50px);
  z-index: 0;
}
.hero__visual .symbol {
  position: relative;
  z-index: 1;
  width: 78%;
  aspect-ratio: 765 / 787;
  background: linear-gradient(140deg, var(--brand-electric) 0%, var(--brand-primary) 45%, var(--brand-lavender) 100%);
  -webkit-mask: url("assets/logo/symbol-light.svg") center / contain no-repeat;
          mask: url("assets/logo/symbol-light.svg") center / contain no-repeat;
}
@media (max-width: 960px) {
  .hero__visual { aspect-ratio: 4/3; max-width: 380px; margin: 0 auto; }
  .hero__visual .symbol { width: 60%; }
  .hero__visual::before { width: 60%; height: 60%; }
}

/* =========================================================
   SECTION shell
   ========================================================= */
.section {
  padding-block: clamp(3.5rem, 6.5vw, 5.5rem);
  position: relative;
}
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--rule); }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 3.5vw, 3rem);
}
.section__head .tag { margin-bottom: 1rem; }
.section__head h2 { margin-bottom: 1rem; }
.section__head p { font-size: var(--fs-lead); color: var(--ink-soft); }

/* =========================================================
   CAPABILITIES · grid 2x2 enxuto
   ========================================================= */
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(10, 10, 15, 0.04),
    0 12px 32px -4px rgba(10, 10, 15, 0.06);
}
@media (max-width: 720px) {
  .capabilities__grid { grid-template-columns: 1fr; }
}

.capability {
  background: var(--bg);
  padding: clamp(2rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: background var(--t-mid) var(--ease);
}
.capability:hover { background: var(--bg-soft); }

.capability__icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
}
.capability__icon svg { width: 18px; height: 18px; }

.capability h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}
.capability p {
  font-size: 0.95rem;
  color: var(--ink-mute);
  line-height: 1.55;
  max-width: 42ch;
}

/* =========================================================
   APPROACH · 4 fases enxutas
   ========================================================= */
.approach__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(10, 10, 15, 0.03),
    0 8px 24px -4px rgba(10, 10, 15, 0.04);
}
@media (max-width: 880px) { .approach__steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .approach__steps { grid-template-columns: 1fr; } }

.step {
  background: var(--bg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.step p { font-size: 0.92rem; color: var(--ink-mute); line-height: 1.55; max-width: 30ch; }

/* =========================================================
   PHILOSOPHY · uma frase elegante (substitui o manifesto pesado)
   ========================================================= */
.philosophy {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  border-top: 1px solid var(--rule);
}
.philosophy blockquote {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--ink);
  max-width: 24ch;
}
.philosophy blockquote .accent { color: var(--accent); }
.philosophy__attribution {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.philosophy__attribution::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--ink-dim);
}
.philosophy__attribution span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
}

/* =========================================================
   CTA · única seção escura, focada
   ========================================================= */
.cta {
  background: var(--bg-dark);
  color: var(--ink-on-dark);
  padding-block: clamp(3.5rem, 6.5vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -50% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(106, 58, 221, 0.45), transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}
.cta__inner { position: relative; max-width: 800px; }
.cta .tag { color: var(--brand-lavender); }
.cta .tag::before { background: var(--brand-lavender); }
.cta h2 {
  color: var(--ink-on-dark);
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-block: 1rem 1.5rem;
  max-width: 18ch;
}
.cta p { color: var(--ink-on-dark-mu); font-size: var(--fs-lead); margin-bottom: 2.5rem; }

.cta__email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-on-dark);
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--rule-on-dark);
  margin-bottom: 2.5rem;
  transition: color var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.cta__email:hover { color: var(--brand-lavender); border-color: var(--brand-lavender); }
.cta__email .arrow { transition: transform var(--t-mid) var(--ease); }
.cta__email:hover .arrow { transform: translate(3px, -3px); }

.cta__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* =========================================================
   FOOTER · minimal, premium
   ========================================================= */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 6vw, 5rem) 1.75rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}
@media (max-width: 880px) { .footer__top { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; } }

/* Selector .brand-logo (era .footer__brand img — quebrado, elemento é <svg> não <img>) */
.footer__brand .brand-logo { margin-bottom: 1.25rem; }
.footer__brand p { font-size: 0.92rem; color: var(--ink-mute); max-width: 36ch; line-height: 1.55; }

.footer__col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.005em;
}
.footer__col li { margin-bottom: 0.625rem; }
.footer__col a {
  font-size: 0.92rem;
  color: var(--ink-mute);
  transition: color var(--t-fast) var(--ease);
}
.footer__col a:hover { color: var(--ink); }

.footer__bottom {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--fs-small);
  color: var(--ink-dim);
}
.footer__social { display: flex; gap: 0.5rem; }
.footer__social a {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: var(--ink-mute);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.footer__social a:hover { background: var(--bg-soft); color: var(--ink); }
.footer__social svg { width: 16px; height: 16px; }

/* =========================================================
   REVEAL on scroll · sutil, com fallback (sempre visível por padrão)
   ========================================================= */
.reveal { opacity: 1; transform: none; transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }

/* Apenas quando JS marca o body com .js-ready: aplica o estado inicial oculto */
.js-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   AGENTS · seção "Conversas que resolvem" (WhatsApp agents)
   ========================================================= */
.agents {
  background:
    radial-gradient(circle at 90% 20%, rgba(176, 99, 254, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  border-block: 1px solid var(--rule);
  overflow: hidden;
}

.agents__layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 880px) {
  .agents__layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.agents__content h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-block: 1rem 1.25rem;
  max-width: 14ch;
}

.agents__lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  margin-bottom: 2rem;
  line-height: 1.55;
  max-width: 50ch;
}

.agents__pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.agents__pillars li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.agents__pillars li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.agents__pillars li::before {
  content: "→";
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 1rem;
  grid-row: 1 / 3;
  align-self: center;
}
.agents__pillars strong {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.agents__pillars span {
  grid-column: 2;
  font-size: 0.95rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* Mockup de conversa · não tenta clonar WhatsApp · brand-aligned */
.agents__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.chat {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 0 16px 40px rgba(10, 10, 15, 0.08), 0 4px 12px rgba(106, 58, 221, 0.06);
}

.chat__day {
  align-self: center;
  font-size: var(--fs-xs);
  color: var(--ink-dim);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.7rem;
  background: var(--bg-soft);
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

.chat__bubble {
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  max-width: 80%;
  letter-spacing: -0.005em;
}

.chat__bubble--user {
  align-self: flex-end;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}

.chat__bubble--agent {
  align-self: flex-start;
  background: rgba(106, 58, 221, 0.06);
  border: 1px solid rgba(106, 58, 221, 0.18);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat__bubble--doc {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--brand-primary);
  background: rgba(106, 58, 221, 0.08);
  border: 1px dashed rgba(106, 58, 221, 0.28);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}
.chat__bubble--doc svg { flex-shrink: 0; }

/* =========================================================
   CTA Form · formulário inline na seção #contato (STORY-2.1)
   ========================================================= */

/* override .cta p default margins/colors para elementos do form */
.cta .cta__form p,
.cta .cta__form-fallback,
.cta .cta__form-success p,
.cta .cta__form-error-banner {
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.cta__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.cta__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .cta__form-row { grid-template-columns: 1fr; }
}

.cta__form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cta__form-field label {
  font-size: var(--fs-small);
  color: var(--ink-on-dark-mu);
  letter-spacing: -0.005em;
  font-weight: 500;
}

.cta__form-field input,
.cta__form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem; /* >=16px evita zoom no iOS */
  line-height: 1.45;
  color: var(--ink-on-dark);
  background: rgba(244, 242, 250, 0.04);
  border: 1px solid var(--rule-on-dark);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}

.cta__form-field textarea {
  resize: vertical;
  min-height: 7rem;
}

.cta__form-field input::placeholder,
.cta__form-field textarea::placeholder {
  color: var(--ink-on-dark-mu);
  opacity: 0.7;
}

.cta__form-field input:hover,
.cta__form-field textarea:hover {
  border-color: rgba(244, 242, 250, 0.20);
}

.cta__form-field input:focus-visible,
.cta__form-field textarea:focus-visible {
  outline: none;
  border-color: var(--brand-lavender);
  background: rgba(176, 99, 254, 0.06);
  box-shadow: 0 0 0 3px rgba(176, 99, 254, 0.15);
}

.cta__form-field.is-invalid input,
.cta__form-field.is-invalid textarea {
  border-color: #ff7a7a;
  background: rgba(255, 122, 122, 0.06);
}

.form-error {
  font-size: var(--fs-xs);
  color: #ff9b9b;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.form-error:empty {
  display: none;
}

/* honeypot — invisível para humanos, presente no DOM para bots */
.cta__form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cta__form-error-banner {
  padding: 0.85rem 1rem;
  background: rgba(255, 122, 122, 0.10);
  border: 1px solid rgba(255, 122, 122, 0.28);
  border-radius: var(--r-sm);
  color: #ffb3b3;
  font-size: var(--fs-small);
  line-height: 1.5;
}

.cta__form-submit {
  align-self: flex-start;
  min-width: 180px;
  padding-inline: 1.5rem;
  position: relative;
}

@media (max-width: 600px) {
  .cta__form-submit { width: 100%; }
}

.cta__form-submit[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.cta__form.is-loading .cta__form-submit::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.6rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: cta-form-spin 0.7s linear infinite;
}

@keyframes cta-form-spin {
  to { transform: rotate(360deg); }
}

.cta__form-lgpd {
  font-size: var(--fs-xs);
  color: var(--ink-on-dark-mu);
  max-width: 60ch;
  line-height: 1.5;
}

.cta__form-success {
  padding: 1.5rem 1.75rem;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: var(--r);
  margin-bottom: 1.5rem;
  max-width: 640px;
}
.cta__form-success p {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--ink-on-dark);
}
.cta__form-success p::before {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

.cta__form-fallback {
  font-size: var(--fs-small);
  color: var(--ink-on-dark-mu);
}
.cta__form-fallback a {
  color: var(--ink-on-dark);
  border-bottom: 1px solid var(--rule-on-dark);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.cta__form-fallback a:hover,
.cta__form-fallback a:focus-visible {
  color: var(--brand-lavender);
  border-color: var(--brand-lavender);
  outline: none;
}
