/* ============================================================
   Trend — /contact/ (esquema da mater.agency/lets-talk, 13/09/2026)
   ------------------------------------------------------------
   Folha própria, enfileirada só no `template-contact.php`, depois do
   bundle. Medidas vêm do modelo a 1440 (campo de 71px, cartão de 163px,
   coluna da cabeça de 395px, bolinha da FAQ de 71px); cores, fontes e
   raios são os tokens do tema. O formulário é o do Contact Form 7, por
   isso os seletores `.wpcf7-*`.
   ============================================================ */

.ct {
  --ct-dark: var(--site-dark);            /* o "navy" do modelo é a nossa tinta roxa */
  --ct-mint: var(--brand-accent-bright);  /* turquesa sobre a tinta: permitido (não é sobre o roxo) */
  --ct-field-h: 71px;
  --ct-field-x: 28px;
  background: var(--surface-page);
  color: var(--brand-ink);
}

/* O header sobre fundo claro: a pílula sólida já no topo (o site.js
   segue alternando `is-scrolled`; o visual não muda). Mesma regra da
   About e da /services/. */
/* o header sólido desde o topo (hero claro) vem do theme.css — lista
   "HERO CLARO" junto das regras do `.is-scrolled`; não copie aqui. */

/* ------------------------------------------------------------
   1. HERO — chamada à esquerda, apoio à direita, três cartões
   ------------------------------------------------------------ */
.ct-hero {
  padding: clamp(150px, 20vh, 220px) 0 0;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.ct-hero__grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 48px;
}
.ct-hero__title {
  width: 65%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  font-size: var(--title-call);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
.ct-hero__lead {
  width: 35%;
  padding-left: 2.5%;
  margin: 0;
  font-size: var(--title-lead);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  color: var(--text-body);
}

/* palavra a palavra: cada uma sobe de dentro da própria linha */
.ct-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.ct-w > span {
  display: inline-block;
  animation: ct-rise 0.7s var(--ease-out) both;
  animation-delay: calc(0.1s + var(--i, 0) * 0.06s);
}
@keyframes ct-rise { from { transform: translateY(110%); opacity: 0; } }
.ct-in { animation: ct-fade 0.5s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes ct-fade { from { opacity: 0; transform: translateY(35px); } }

.ct-topics { display: flex; flex-wrap: wrap; gap: 16px; }
.ct-topic {
  flex: 1 1 calc(33.333% - 11px);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
  border: 0;
  border-radius: 20px;
  background: var(--ct-dark);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background-color 0.35s ease-out, color 0.35s ease-out, transform 0.35s var(--ease-out);
}
.ct-topic:hover { transform: translateY(-2px); }
.ct-topic:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.ct-topic.is-active { background: var(--brand-accent); color: var(--brand-ink); }
.ct-topic__step { font-size: 15px; font-weight: var(--weight-medium); line-height: 1.7; letter-spacing: 0.02em; }
.ct-topic__step span { opacity: 0.5; }
/* no cartão ativo (turquesa) o 0,5 dava 2,7:1; 0,75 dá 4,9:1 (TRED-141) */
.ct-topic.is-active .ct-topic__step span { opacity: 0.75; }
.ct-topic__title {
  font-size: clamp(1.125rem, 0.93rem + 0.6vw, 1.5rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ------------------------------------------------------------
   2. O FORMULÁRIO — linhas "cabeça | campos"
   ------------------------------------------------------------ */
.ct-forms { padding: clamp(48px, 5vw, 72px) 0 20px; }
.ct-form__fallback { margin: 0; font-size: var(--text-lg); color: var(--text-body); }
.ct-form__fallback a { color: var(--text-link); text-underline-offset: 3px; }

.ct-row {
  display: grid;
  grid-template-columns: 395px minmax(0, 1fr);
  column-gap: 42px;
  align-items: start;
  margin-bottom: 64px;
}
.ct-row--basic { margin-bottom: 56px; }
.ct-row--last { margin-bottom: 0; }
.ct-row__title {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);   /* 20 → 24: h4 → h3 do DESIGN.md */
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--brand-ink);
  text-wrap: balance;
}
.ct-row__lead {
  margin: 0;
  max-width: 300px;
  font-size: var(--title-lead);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  color: var(--text-muted);
}

/* três textos, um por assunto: o `data-topic` do embrulho escolhe */
.ct-form [data-for] { display: none; }
.ct-form[data-topic="grow"] [data-for="grow"],
.ct-form[data-topic="question"] [data-for="question"],
.ct-form[data-topic="partner"] [data-for="partner"] { display: inline; }
.ct-req { color: var(--brand-accent); font-style: normal; }
.ct-req--grow { display: none; }
.ct-form[data-topic="grow"] .ct-req--grow { display: inline; }

/* a segunda metade abre e fecha em grade (0fr → 1fr), como no modelo */
.ct-half {
  display: grid;
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.6s var(--ease-out), visibility 0.6s;
}
.ct-half.is-collapsed {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.4s ease-out, visibility 0.4s ease-out;
}
.ct-half__inner { overflow: hidden; min-height: 0; }

/* — campos — */
.ct-field { position: relative; margin: 0 0 30px; }
.ct-field .wpcf7-form-control-wrap { display: block; }
.ct-field input,
.ct-field select,
.ct-field textarea {
  display: block;
  width: 100%;
  min-height: var(--ct-field-h);
  padding: 27px var(--ct-field-x) 7px;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--ct-dark);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: var(--weight-medium);
  line-height: 1.6;
  letter-spacing: -0.01em;
  outline: none;
  transition: box-shadow 0.35s ease-out;
}
.ct-field input:focus-visible,
.ct-field select:focus-visible,
.ct-field textarea:focus-visible {
  box-shadow: inset 0 -3px 0 var(--ct-mint);
  /* o alto contraste do Windows (forced-colors) apaga o box-shadow, e o campo
     ficava sem indicador nenhum; contorno transparente não aparece no modo
     normal e lá vira a cor do sistema (TRED-141) */
  outline: 3px solid transparent;
  outline-offset: -3px;
}
/* o rótulo flutuante faz o papel do placeholder; ele fica, invisível,
   só para o `:placeholder-shown` funcionar */
.ct-field input::placeholder,
.ct-field textarea::placeholder { color: transparent; }
.ct-field textarea { min-height: 162px; padding-top: 44px; resize: vertical; }
.ct-field input:-webkit-autofill,
.ct-field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--white);
  box-shadow: inset 0 0 0 100px var(--ct-dark);
}

.ct-label {
  position: absolute;
  left: var(--ct-field-x);
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
  transform-origin: left top;
  font-size: 18px;
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), color 0.35s ease-out, opacity 0.35s ease-out;
}
.ct-field--area .ct-label { top: 36px; }
.ct-field:has(input:focus, textarea:focus, input:not(:placeholder-shown), textarea:not(:placeholder-shown)) .ct-label {
  transform: translateY(-125%) scale(0.65);
  color: var(--ct-mint);
}

/* select nativo com a cara do campo: a primeira opção (vazia) é o
   placeholder; escolhida uma opção, o rótulo pequeno aparece em cima */
.ct-field--select select {
  padding: 23px 64px 23px var(--ct-field-x);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}
.ct-field--select select option { color: var(--brand-ink); background: var(--white); }
.ct-field--select .ct-label { opacity: 0; }
.ct-field--select:has(option:checked:not([value=""])) select { color: var(--white); padding: 31px 64px 9px var(--ct-field-x); }
.ct-field--select:has(option:checked:not([value=""])) .ct-label { opacity: 1; transform: translateY(-125%) scale(0.65); color: var(--ct-mint); }
.ct-field--select::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ct-mint);
  border-bottom: 2px solid var(--ct-mint);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

/* — os chips de serviço (checkbox do CF7 com `use_label_element`) — */
.ct-chips .wpcf7-form-control-wrap { display: block; }
.ct-chips .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 20px; }
.ct-chips .wpcf7-list-item { margin: 0; }
.ct-chips label { position: relative; display: block; cursor: pointer; }
.ct-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ct-chips .wpcf7-list-item-label {
  display: block;
  padding: 14px 26px 16px;
  border: 1px solid var(--brand-ink);
  border-radius: var(--radius-pill);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
  text-align: center;
  transition: background-color 0.35s ease-out, color 0.35s ease-out, border-color 0.35s ease-out;
}
.ct-chips label:hover .wpcf7-list-item-label { border-color: var(--brand-primary); color: var(--brand-primary); }
.ct-chips input:checked + .wpcf7-list-item-label { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--white); }
.ct-chips input:focus-visible + .wpcf7-list-item-label { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* — consentimento (registro A2P 10DLC: legível, alvo cheio) — */
.ct-consent { margin: 48px 0 0; }
.ct-consent .wpcf7-form-control-wrap,
.ct-consent .wpcf7-acceptance,
.ct-consent .wpcf7-list-item { display: block; margin: 0; }
.ct-consent label {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 19px 29px 17px 31px;
  background: var(--purple-50);
  cursor: pointer;
}
.ct-consent input {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 1px 0 0;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--brand-ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.35s ease-out, border-color 0.35s ease-out;
}
.ct-consent input:checked { background: var(--brand-primary); border-color: var(--brand-primary); }
.ct-consent input:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ct-consent input:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.ct-consent .wpcf7-list-item-label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1.45;
  color: var(--text-body);
}
.ct-consent a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }

.ct-submit { margin: 32px 0 0; display: flex; justify-content: center; }
.ct-submit .wpcf7-submit { cursor: pointer; }
.ct-submit .wpcf7-spinner { align-self: center; }

/* — o que o CF7 devolve: erro por campo, resposta do envio — */
.ct-field .wpcf7-not-valid { box-shadow: inset 0 -3px 0 var(--danger); }
.ct-field .wpcf7-not-valid-tip {
  position: absolute;
  right: var(--ct-field-x);
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #F09A9A;   /* o vermelho de alerta clareado para ler sobre a tinta */
  pointer-events: none;
}
.ct-field--area .wpcf7-not-valid-tip { top: 36px; }
.ct-field--select .wpcf7-not-valid-tip { right: 64px; }
.ct-chips .wpcf7-not-valid-tip,
.ct-consent .wpcf7-not-valid-tip { display: block; margin-top: 10px; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-danger); }
.ct-form .wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 14px 16px !important;
  border-width: 1px !important;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-strong);
}
.ct-form form.sent .wpcf7-response-output { border-color: var(--brand-accent) !important; background: rgba(22, 185, 193, 0.08); }
.ct-form form.invalid .wpcf7-response-output,
.ct-form form.failed .wpcf7-response-output,
.ct-form form.aborted .wpcf7-response-output { border-color: var(--danger) !important; background: rgba(198, 75, 75, 0.07); }

/* ------------------------------------------------------------
   3. "FALE COM UMA PESSOA" — cabeça à esquerda, corpo à direita
      (a FAQ é o bloco `.faq2` do theme.css)
   ------------------------------------------------------------ */
.ct-direct { padding: 50px 0 65px; }

.ct-split__head { max-width: 930px; margin-bottom: 48px; }
.ct-split__head .sec-eyebrow { margin-bottom: var(--space-4); }
.ct-split__head h2 {
  margin: 0;
  font-size: var(--title-section);
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--brand-ink);
  text-wrap: balance;
}
.ct-split__body { max-width: 930px; margin-left: auto; }

.ct-direct h3 {
  margin: 0 0 20px;
  font-size: clamp(1.125rem, 0.95rem + 0.5vw, 1.25rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--brand-ink);
}
/* duas colunas, não quatro como o modelo: o e-mail inteiro precisa caber
   numa linha, e a 25% ele quebrava no meio da palavra */
.ct-direct__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; row-gap: 24px; }
.ct-direct__list li { width: 50%; }
.ct-direct__list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-ink);
  text-decoration: none;
  transition: color 0.35s ease-out;
}
.ct-direct__round {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  transition: border-color 0.35s ease-out, color 0.35s ease-out, transform 0.35s var(--ease-out);
}
.ct-direct__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct-direct__label { font-size: var(--text-lg); font-weight: var(--weight-bold); line-height: 1.1; letter-spacing: -0.01em; }
.ct-direct__sub { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.3; white-space: nowrap; }
.ct-direct__list a:hover,
.ct-direct__list a:focus-visible { color: var(--brand-primary); outline: none; }
.ct-direct__list a:hover .ct-direct__round,
.ct-direct__list a:focus-visible .ct-direct__round { border-color: var(--brand-primary); transform: translateY(-2px); }
.ct-direct__list a:focus-visible .ct-direct__round { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* ------------------------------------------------------------
   RESPONSIVO
   ------------------------------------------------------------ */
@media (max-width: 1400px) {
  .ct-row { grid-template-columns: 320px minmax(0, 1fr); column-gap: 25px; }
}
@media (max-width: 1060px) {
  .ct-hero__grid { flex-direction: column; gap: 20px; margin-bottom: 48px; }
  .ct-hero__title, .ct-hero__lead { width: 100%; padding: 0; }
  .ct-topic { flex-basis: calc(50% - 8px); }
  .ct-row { grid-template-columns: 1fr; row-gap: 24px; margin-bottom: 48px; }
  .ct-row--basic { margin-bottom: 40px; }
  .ct-row__lead { max-width: 46ch; }
  .ct-split__head { margin-bottom: 32px; }
  .ct-split__body { max-width: none; margin-left: 0; }
  .ct-direct { padding: 30px 0; }
}
@media (max-width: 760px) {
  .ct { --ct-field-h: 62px; --ct-field-x: 20px; }
  .ct-hero { margin-bottom: 48px; }
  .ct-topic { padding: 24px 16px; min-height: 140px; gap: 16px; }
  .ct-topics { gap: 12px; }
  .ct-topic:last-child { flex-basis: 100%; }
  .ct-field input, .ct-field select, .ct-field textarea { font-size: 17px; padding-top: 24px; padding-bottom: 6px; }
  .ct-field--select select { padding: 20px 52px 20px var(--ct-field-x); }
  .ct-field--select:has(option:checked:not([value=""])) select { padding: 27px 52px 7px var(--ct-field-x); }
  .ct-field--select::after { right: 22px; }
  .ct-label { font-size: 17px; }
  .ct-field .wpcf7-not-valid-tip { position: static; transform: none; display: block; margin-top: 6px; color: var(--text-danger); }
  .ct-chips .wpcf7-checkbox { gap: 12px; }
  .ct-chips .wpcf7-list-item-label { padding: 14px 18px 16px; }
  .ct-consent { margin-top: 44px; }
  .ct-consent label { gap: 16px; padding: 16px 18px; }
  .ct-submit .wpcf7-submit { width: 100%; }
  /* "Talk to a person" no celular (01/10/2026, a pedido): ligar e escrever
     viram dois cartões de largura toda; LinkedIn e Instagram, dois ícones
     redondos lado a lado embaixo. As quatro linhas centradas uma a uma
     deixavam os ícones em zigue-zague e davam às redes o mesmo peso de
     ligar e escrever, que é o que a frase acima pede.
     No cartão, ícone e nome formam um par centrado na 1ª linha e o número
     ou o e-mail vem na 2ª, na largura toda — o e-mail tem ~235px e não
     cabe ao lado do ícone. Os pares têm larguras diferentes, mas dentro de
     cartões iguais isso não vira zigue-zague. `display: contents` põe nome
     e detalhe direto na fila do cartão. */
  .ct-direct__list { justify-content: center; column-gap: var(--space-4); row-gap: var(--space-3); }
  .ct-direct__list li { width: 100%; }
  .ct-direct__list a {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-5) var(--space-4);
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-xs);
  }
  .ct-direct__list a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
  .ct-direct__list a:focus-visible .ct-direct__round { outline: none; }
  .ct-direct__round { width: 40px; height: 40px; }
  .ct-direct__text { display: contents; }
  .ct-direct__sub { flex-basis: 100%; }
  /* as redes: só o ícone, 52px de alvo; o nome continua para o leitor de tela */
  .ct-direct__list li.is-social { width: auto; margin-top: var(--space-3); }
  .ct-direct__list .is-social a { position: relative; display: block; padding: 0; background: none; border: 0; border-radius: 50%; box-shadow: none; }
  .ct-direct__list .is-social a:focus-visible { outline: none; }
  .ct-direct__list .is-social a:focus-visible .ct-direct__round { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
  .is-social .ct-direct__round { width: 52px; height: 52px; }
  .is-social .ct-direct__text {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* Tudo centrado (01/10/2026, ver o fim do theme.css) — menos o que é
     campo: o rótulo flutuante e o aceite ficam alinhados com o texto que
     a pessoa digita e com a caixa de marcar. */
  .ct-topic { align-items: center; text-align: center; }
  .ct-row__lead { margin-inline: auto; }
  .ct-chips .wpcf7-checkbox { justify-content: center; }
  .ct-field,
  .ct-consent { text-align: left; }
  /* O spinner do CF7 é invisível mas ocupa 66px (18 + 24 de cada lado) ao
     lado do botão: o "100%" sobrava 284 de 350 e o botão ficava fora do
     eixo. Fora do fluxo, ele gira dentro da ponta direita da pílula. */
  .ct-submit { position: relative; }
  .ct-submit .wpcf7-spinner { position: absolute; top: 50%; right: 0; margin: -9px 20px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-w > span, .ct-in { animation: none; }
  .ct-topic, .ct-half, .ct-label, .ct-direct__round { transition: none; }
}
