/* =====================================================================
   ORTUS TECNOLOGIA | CSS da home (hero só texto e seções)
   As variáveis ajustáveis ficam no topo do site.css.
   Hero com mock e efeito de scroll: arquivado em hero.js / hero-teste/.
   ===================================================================== */

/* =====================================================================
   HERO (só texto, fundo preto, tela cheia, desde 19/11/2026)
   min-height (não height): em celular baixo o bloco cresce se o texto pedir
   mais espaço, em vez de cortar. svh/dvh evitam o “furo” da barra do browser.
   ===================================================================== */
.hero {
  box-sizing: border-box;
  /* Fallback → svh (barra móvel) → dvh (altura dinâmica, quando existir). */
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--preto);
  color: var(--texto-no-preto);
  /* Topo: cabe o header flutuante. Base: folga até a próxima seção. */
  padding:
    calc(var(--card-topo-inicial) + var(--esp-4))
    0
    var(--esp-6);
}
/* Hero (Ueslei, 21/11/2026): título grande em Mango; à esquerda, apoio e busca; à direita, os botões
   (fim do "Z" de leitura). No celular, tudo empilhado: título, apoio, botões e busca. */
.hero__miolo {
  width: var(--container);
  margin-inline: auto;
  text-align: left;
  container-type: inline-size;
}
.hero h1 {
  margin: 0;
  font-family: var(--fonte-forte);
  font-weight: 600;
  font-size: var(--fs-forte-hero);
  line-height: .86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .hero__destaque { color: var(--ciano); }
.hero__apoio {
  margin: var(--esp-5) 0 0;
  max-width: 60ch;
  font-size: var(--fs-apoio);
  line-height: var(--lh-texto);
  color: var(--preto-texto-apoio);
  text-wrap: pretty;
}
.hero__acoes {
  margin-top: var(--esp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
  justify-content: flex-start;
}
@media (min-width: 900px) {
  .hero__miolo {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "titulo titulo" "apoio ." "busca acoes";
    column-gap: var(--esp-7); align-items: end;
  }
  /* Duas linhas fixas ("Site sob medida," / "feito para trazer clientes."); o tamanho sai da
     largura do conteúdo (80% dela para a linha mais longa, que mede cerca de 7,1em). */
  .hero h1 { grid-area: titulo; font-size: calc(80cqw / 7.1); text-wrap: nowrap; }
  .hero__linha { display: block; white-space: nowrap; }
  .hero__apoio { grid-area: apoio; }
  .hero-busca { grid-area: busca; }
  .hero__acoes { grid-area: acoes; margin: 0; justify-content: flex-end; }
}

/* Campo de busca decorativo (digita sozinho). */
.hero-busca {
  margin: var(--esp-6) 0 0;
  width: min(560px, 100%);
  text-align: left;
}
.hero-busca__rotulo {
  margin: 0 0 var(--esp-2) var(--esp-1);
  font-size: var(--fs-pequeno);
  line-height: 1.3;
  color: var(--preto-texto-fraco);
}
.hero-busca__campo {
  display: flex;
  align-items: flex-start;
  gap: var(--esp-2);
  min-height: 56px;
  padding: var(--esp-3) var(--esp-4);
  background: var(--preto-campo);
  border: 1px solid var(--preto-linha);
  border-radius: var(--raio-m);
}
.hero-busca__ico {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--preto-texto-fraco);
}
.hero-busca__ico--ia { display: none; }
.hero-busca.is-ia .hero-busca__ico--busca { display: none; }
.hero-busca.is-ia .hero-busca__ico--ia { display: block; }
/* Sempre uma linha só, como um campo de busca de verdade: a frase não quebra e, quando passa da
   largura, o texto corre para a esquerda e o fim (com o cursor) fica à vista (hero-busca.js).
   Assim o campo nunca muda de altura e o hero não mexe (Ueslei, 21/11/2026). */
.hero-busca__digitado {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-apoio);
  line-height: 1.4;
  color: var(--texto-no-preto);
  white-space: nowrap;
  overflow: hidden;
}
.hero-busca__cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--ciano);
  animation: hero-busca-pisca 1s steps(1) infinite;
}
.hero-busca.is-parado .hero-busca__cursor {
  animation: none;
  opacity: 0;
}
@keyframes hero-busca-pisca {
  50% { opacity: 0; }
}

@media (max-width: 767px) {
  /* Uma tela só: cabe título, apoio, botões e o campo, sem passar da altura. */
  .hero {
    max-height: 100vh;
    max-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
    padding-top: calc(var(--card-topo-inicial) + var(--esp-2));
    padding-bottom: max(var(--esp-4), env(safe-area-inset-bottom, 0px));
  }
  .hero__apoio {
    max-width: 36ch;
    margin-top: var(--esp-3);
    font-size: var(--fs-pequeno);
  }
  .hero__acoes {
    margin-top: var(--esp-4);
    flex-direction: column;
    align-items: stretch;
  }
  .hero__acoes .botao { width: 100%; }
  .hero-busca {
    width: 100%;
    margin-top: var(--esp-5);
  }
  .hero-busca__campo {
    min-height: 0;
    padding: var(--esp-2) var(--esp-3);
  }
  .hero-busca__digitado { font-size: var(--fs-pequeno); }
}

/* Entrada suave (CSS puro). Com prefers-reduced-motion, aparece direto. */
.hero h1,
.hero__apoio,
.hero__acoes,
.hero-busca {
  animation: hero-entra 500ms ease both;
}
.hero__apoio { animation-delay: 80ms; }
.hero__acoes { animation-delay: 160ms; }
.hero-busca { animation-delay: 280ms; }
@keyframes hero-entra {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero__apoio,
  .hero__acoes,
  .hero-busca { animation: none; }
  .hero-busca__cursor { animation: none; opacity: 0; }
}

.hero :focus-visible { outline-color: var(--ciano); }

/* =====================================================================
   SEÇÕES DA HOME
   ===================================================================== */

/* ----------------------------------------------------------- problemas (gelo) */
.problema__topo { max-width: 46rem; margin-inline: auto; text-align: center; }
.problema__topo p { margin: var(--esp-3) auto 0; max-width: 56ch; font-size: var(--fs-apoio); line-height: var(--lh-texto); color: var(--gelo-texto-apoio); text-wrap: pretty; }

/* Linha do caminho do visitante (mesma construção da antiga "linha do mês"). */
.problema__linha { list-style: none; margin: var(--esp-7) 0 0; padding: 0; display: grid; gap: var(--esp-5); position: relative; }
.problema__linha li { position: relative; padding-left: calc(12px + var(--esp-4)); }
.problema__linha h3 { margin: 0; font-family: var(--fonte-forte); font-weight: 600; text-transform: uppercase; letter-spacing: 0; font-size: var(--fs-forte-item); line-height: var(--lh-forte); }
.problema__linha p { margin: var(--esp-1) 0 0; max-width: 30ch; color: var(--gelo-texto-apoio); line-height: var(--lh-texto); }
.problema__linha li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ciano-escuro); box-shadow: 0 0 0 6px var(--gelo);
}
.problema__linha::before { content: ""; position: absolute; left: 5.5px; top: 1em; bottom: 1em; width: 1px; background: var(--gelo-linha-forte); }
@media (min-width: 768px) {
  .problema__linha { grid-template-columns: repeat(3, 1fr); gap: var(--esp-7); }
  .problema__linha li { padding-left: 0; padding-top: calc(12px + var(--esp-4)); }
  .problema__linha li::before { top: 0; }
  .problema__linha::before { left: 0; right: 0; top: 5.5px; bottom: auto; width: auto; height: 1px; }
}

/* A linha se acende com a rolagem (desde 21/11/2026): uma camada em ciano cresce
   sobre a linha cinza, e cada ponto passa de apagado a ciano quando ela chega nele.
   Tudo segue a mesma linha do tempo (--linha), a da própria lista na tela.
   Sem suporte a animação ligada à rolagem, ou com movimento reduzido, fica como antes. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .problema__linha { view-timeline-name: --linha; }
    .problema__linha::after {
      content: ""; position: absolute; left: 5.5px; top: 1em; bottom: 1em; width: 1px;
      background: var(--ciano-escuro); transform-origin: top;
      animation: linha-desce linear both; animation-timeline: --linha; animation-range: entry 90% contain 39%; /* era contain 30%: 30% mais devagar (Ueslei, 21/11/2026) */
    }
    .problema__linha li::before {
      animation: ponto-acende linear both; animation-timeline: --linha;
    }
    .problema__linha li:nth-child(1)::before { animation-range: entry 90% entry 100%; }
    .problema__linha li:nth-child(2)::before { animation-range: contain 13% contain 17%; }
    .problema__linha li:nth-child(3)::before { animation-range: contain 34% contain 38%; }
    @media (min-width: 768px) {
      .problema__linha::after {
        left: 0; right: 0; top: 5.5px; bottom: auto; width: auto; height: 1px;
        transform-origin: left; animation-name: linha-cresce;
      }
    }
  }
}
@keyframes linha-desce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes linha-cresce { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ponto-acende {
  from { background: var(--gelo-linha-forte); transform: scale(.6); }
  to { background: var(--ciano-escuro); transform: scale(1); }
}

.problema__custo {
  margin: var(--esp-6) auto 0; max-width: 52ch; text-align: center;
  font-size: var(--fs-destaque); line-height: var(--lh-texto); text-wrap: balance;
}

/* ----------------------------------------------------------- como a Ortus resolve (preto, 3 colunas) */
.solucao { text-align: center; }
.solucao__apoio {
  margin: var(--esp-3) auto 0; max-width: 48ch;
  font-size: var(--fs-apoio); line-height: var(--lh-texto); color: var(--preto-texto-apoio); text-wrap: pretty;
}
.solucao__grade {
  list-style: none; margin: var(--esp-6) 0 0; padding: 0;
  display: grid; gap: var(--esp-6); text-align: left;
}
@media (min-width: 768px) {
  .solucao__grade { grid-template-columns: repeat(3, 1fr); gap: var(--esp-7); }
}
/* Linha fina em cima de cada item, no lugar dos ícones (Ueslei, 21/11/2026: ícones davam "cara de IA"). */
.solucao__item { margin: 0; padding-top: var(--esp-4); border-top: 1px solid var(--preto-linha-forte); }
.solucao__item h3 {
  margin: 0; font-family: var(--fonte-forte); font-weight: 600; text-transform: uppercase; letter-spacing: 0;
  font-size: var(--fs-forte-item); line-height: var(--lh-forte);
}
.solucao__item p {
  margin: var(--esp-1) 0 0; max-width: 36ch;
  font-size: var(--fs-corpo); line-height: var(--lh-texto); color: var(--preto-texto-apoio);
}
.solucao__linha {
  margin: var(--esp-6) auto 0; max-width: 48ch;
  font-size: var(--fs-apoio); line-height: var(--lh-texto); color: var(--preto-texto-apoio); text-wrap: pretty;
}
.solucao__acao { margin-top: var(--esp-4); }

/* ----------------------------------------------------------- projetos recentes (gelo) */
.projetos { text-align: center; }
.projetos .pg-projetos { margin-top: var(--esp-6); text-align: left; }
.projetos__acao { margin-top: var(--esp-6); }

/* ----------------------------------------------------------- portal, próximo passo (preto) */
.portal-proximo__grade {
  display: grid; gap: var(--esp-6); align-items: center;
}
@media (min-width: 900px) {
  .portal-proximo__grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--esp-7); }
}
.portal-proximo__texto .titulo-secao { max-width: 18ch; }
.portal-proximo__texto p {
  margin: var(--esp-3) 0 0; max-width: 48ch;
  font-size: var(--fs-apoio); line-height: var(--lh-texto); color: var(--preto-texto-apoio); text-wrap: pretty;
}
.portal-proximo__acao { margin-top: var(--esp-5); }
.portal-proximo__midia { margin: 0; min-width: 0; }
/* Mock estático em escala menor (mesmas classes do mock.css). */
.portal-proximo__janela {
  width: 100%;
  font-size: clamp(7px, 1.05vw, 11px);
}
.portal-proximo__janela .portal__conteudo { overflow: hidden; }
.portal-proximo__janela .graficos--baixo { display: none; }
@media (max-width: 899px) {
  .portal-proximo__midia { order: -1; }
}

/* ----------------------------------------------------------- sobre, resumo (gelo) */
.sobre-resumo__grade { display: grid; gap: var(--esp-5); align-items: center; }
@media (min-width: 900px) { .sobre-resumo__grade { grid-template-columns: auto minmax(0, 600px); justify-content: center; gap: var(--esp-7); } }
.sobre-resumo__foto { margin: 0; width: 230px; max-width: 100%; }
@media (min-width: 900px) { .sobre-resumo__foto { width: 302px; } }
.sobre-resumo__perfil { display: block; color: inherit; text-decoration: none; border-radius: var(--raio-g); }
.sobre-resumo__moldura { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--raio-g); }
.sobre-resumo__moldura > img {
  display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover;
  transition: transform 450ms ease;
}
.sobre-resumo__moldura:hover > * { transform: scale(1.08); }
.sobre-resumo p { margin: var(--esp-3) 0 0; font-size: var(--fs-apoio); line-height: var(--lh-texto); max-width: 48ch; color: var(--gelo-texto-apoio); }
.sobre-resumo__acoes { margin-top: var(--esp-5); display: flex; align-items: center; gap: var(--esp-4); }
.sobre-resumo__acoes .botao--link { margin-left: calc(-1 * var(--esp-1)); }
.sobre-resumo__linkedin { display: grid; place-items: center; width: 44px; height: 44px; margin: -10px; color: var(--texto-no-gelo); border-radius: var(--raio-p); transition: color 200ms ease; } /* área de toque de 44px; o ícone continua com 24px e no mesmo lugar */
.sobre-resumo__linkedin svg { display: block; width: 24px; height: 24px; }
.sobre-resumo__linkedin:hover { color: var(--ciano-escuro); }
.sobre-resumo__linkedin:focus-visible { outline: 2px solid var(--ciano-escuro); outline-offset: -6px; }

/* ----------------------------------------------------------- CTA final com o processo (preto) */
.cta-final__grade { display: grid; gap: var(--esp-6); }
@media (min-width: 900px) { .cta-final__grade { grid-template-columns: 5fr 6fr; gap: var(--esp-7); align-items: start; } }
.cta-final p { margin: var(--esp-3) 0 0; max-width: 40ch; font-size: var(--fs-apoio); line-height: var(--lh-texto); color: var(--preto-texto-apoio); }
.cta-final__acoes { margin-top: var(--esp-5); display: flex; flex-wrap: wrap; gap: var(--esp-2) var(--esp-4); align-items: center; }
.cta-final .botao--link { margin-left: calc(-1 * var(--esp-1)); }
/* Celular: o botão do WhatsApp ocupa a largura toda e o link fica centralizado embaixo dele,
   como os botões do hero (Ueslei, 21/11/2026). */
@media (max-width: 767px) {
  .cta-final__acoes { flex-direction: column; align-items: stretch; }
  .cta-final__acoes .botao { width: 100%; }
  .cta-final .botao--link { margin-left: 0; justify-content: center; }
}

.processo__titulo { margin: 0 0 var(--esp-4); font-size: var(--fs-subtitulo); font-weight: 600; }
.processo__lista { list-style: none; margin: 0; padding: 0; }
.processo__passo { position: relative; padding: 0 0 var(--esp-5) calc(28px + var(--esp-4)); }
.processo__passo:last-child { padding-bottom: 0; }
.processo__passo h4 { margin: 0; font-size: var(--fs-subtitulo); font-weight: 600; line-height: 1.3; }
.processo__passo p { margin: var(--esp-1) 0 0; max-width: 46ch; color: var(--preto-texto-apoio); line-height: var(--lh-texto); }

.processo__ponto {
  position: absolute; left: 0; top: -1px; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--ciano); color: var(--preto); border: 1px solid var(--ciano);
  transition: background-color 375ms ease, color 375ms ease, border-color 375ms ease;
}
.processo__passo:not(:last-child)::before,
.processo__passo:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 27px; bottom: -1px; width: 2px;
}
.processo__passo:not(:last-child)::before { background: var(--preto-linha); }
.processo__passo:not(:last-child)::after {
  background: var(--ciano);
  transform-origin: top; transform: scaleY(1);
  transition: transform 750ms linear;
}
.js .processo:not(.is-visivel) .processo__passo::after { transform: scaleY(0); }
.js .processo:not(.is-visivel) .processo__ponto {
  background: var(--preto); color: var(--texto-no-preto); border-color: var(--preto-linha-forte);
}
.processo__passo:nth-child(1) .processo__ponto { transition-delay: 0s; }
.processo__passo:nth-child(1)::after { transition-delay: .375s; }
.processo__passo:nth-child(2) .processo__ponto { transition-delay: 1.125s; }
.processo__passo:nth-child(2)::after { transition-delay: 1.5s; }
.processo__passo:nth-child(3) .processo__ponto { transition-delay: 2.25s; }
.processo__passo:nth-child(3)::after { transition-delay: 2.625s; }
.processo__passo:nth-child(4) .processo__ponto { transition-delay: 3.375s; }

/* ----------------------------------------------------------- FAQ (gelo) */
.faq__grade { display: grid; gap: var(--esp-5); }
@media (min-width: 900px) { .faq__grade { grid-template-columns: 5fr 7fr; gap: var(--esp-7); } }
.faq__lista { border-top: 1px solid var(--gelo-linha); }
.faq details { border-bottom: 1px solid var(--gelo-linha); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--esp-4);
  padding: var(--esp-4) 0; font-size: var(--fs-subtitulo); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--ciano-escuro); transition: transform 200ms ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 2px; border-radius: var(--raio-p); }
.faq details p { margin: 0; padding: 0 calc(20px + var(--esp-4)) var(--esp-4) 0; max-width: 60ch; color: var(--gelo-texto-apoio); }

/* ----------------------------------------------------------- movimento reduzido (seções) */
@media (prefers-reduced-motion: reduce) {
  .processo__passo::after, .processo__ponto { transition-delay: 0s !important; }
  .sobre-resumo__moldura > * { transition: none; }
  .sobre-resumo__moldura:hover > * { transform: none; }
}

/* Título do hero no celular: as mesmas duas linhas ("Site sob medida," / "feito para trazer clientes."),
   com a letra limitada pela largura para a linha mais longa caber (cerca de 7,1em). */
@media (max-width: 899px) {
  .hero__linha { display: block; }
  .hero h1 { font-size: min(var(--fs-forte-hero), calc(100cqw / 7.3)); }
}
