/* Paleta: branco (primária), laranja (secundária), azul (terceira) */
:root {
  color-scheme: light;

  /* Superfícies e texto (tema claro) */
  --fundo: #ffffff;
  --superficie: #f6f7fb;
  --superficie-2: #eef1f7;
  --linha: #e5e8f0;
  --linha-suave: var(--linha-suave);
  --texto: #0f172a;
  --muted: #5b6475;
  --header-bg: rgba(255, 255, 255, 0.8);
  --contorno: rgba(15, 23, 42, 0.25);
  --ponto: rgba(15, 23, 42, 0.15);
  --sombra: rgba(15, 23, 42, 0.25);
  --editor-borda: rgba(15, 23, 42, 0.2);
  --vidro-brilho: rgba(255, 255, 255, 0.95);
  --vidro-brilho-2: rgba(255, 255, 255, 0.3);
  --tag-bg: rgba(255, 255, 255, 0.75);

  --laranja: #f97316;
  --laranja-escuro: #ea580c;
  --laranja-texto: #c2410c;  /* laranja para textos pequenos (contraste no branco) */
  --azul: #2563eb;
  --azul-escuro: #1d4ed8;
  --azul-claro: #dbeafe;
  --azul-texto: #1d4ed8;

  --holo: linear-gradient(120deg, #c2410c, #ea580c, #f97316, #ea580c, #c2410c);
  --holo-botao: linear-gradient(120deg, #f97316, #fb923c, #fdba74, #fb923c, #f97316);
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --max: 1200px;
  --cabecalho: 72px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Tema escuro: mesmas cores de marca, superfícies escuras */
:root[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #0b0b0f;
  --superficie: #131318;
  --superficie-2: #1a1a21;
  --linha: #25252d;
  --linha-suave: rgba(255, 255, 255, 0.12);
  --texto: #f5f5f7;
  --muted: #a1a1aa;
  --header-bg: rgba(11, 11, 15, 0.75);
  --contorno: rgba(255, 255, 255, 0.35);
  --ponto: rgba(255, 255, 255, 0.18);
  --sombra: rgba(0, 0, 0, 0.6);
  --editor-borda: rgba(255, 255, 255, 0.12);
  --vidro-brilho: rgba(255, 255, 255, 0.45);
  --vidro-brilho-2: rgba(255, 255, 255, 0.08);
  --tag-bg: rgba(255, 255, 255, 0.05);
  --laranja-texto: #fb923c;
  --azul: #3b82f6;
  --azul-escuro: #2563eb;
  --azul-claro: rgba(59, 130, 246, 0.16);
  --azul-texto: #93c5fd;
  --holo: linear-gradient(120deg, #ea580c, #f97316, #fdba74, #f97316, #ea580c);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--fundo);
  color: var(--texto);
  /* Fontes do próprio sistema: nada para baixar, nada bloqueando a primeira pintura */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
p { color: var(--muted); }
button { font: inherit; color: inherit; }

section { max-width: var(--max); margin: 0 auto; padding: 96px 24px; }
section[id] { scroll-margin-top: var(--cabecalho); }

/* Texto com gradiente laranja animado */
.destaque {
  background: var(--holo);
  background-size: 300% 300%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: holo 5s ease-in-out infinite;
}

/* ================= Cabeçalho ================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--cabecalho);
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linha);
  animation: cabecalho-entrar 0.7s var(--curva) both;
}
.marca { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--texto); }
.marca-icone {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--laranja), var(--azul));
  clip-path: polygon(50% 0%, 100% 100%, 50% 75%, 0% 100%);
}
.marca-texto span { color: var(--laranja-escuro); }
.menu { display: flex; gap: 26px; font-size: 0.95rem; color: var(--muted); }
.menu a { transition: color 0.2s ease; }
.menu a:hover { color: var(--azul); }
.header-acoes { display: flex; align-items: center; gap: 18px; }
.link-entrar { font-size: 0.95rem; color: var(--muted); transition: color 0.2s ease; }
.link-entrar:hover { color: var(--azul); }

/* Botão de tema (lua no claro, sol no escuro) */
.tema-botao {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--linha);
  background: var(--superficie);
  color: var(--texto);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.25s var(--curva);
}
.tema-botao:hover { border-color: var(--laranja); color: var(--laranja-texto); transform: rotate(-12deg); }
.tema-botao:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.tema-botao svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tema-botao .icone-sol { display: none; }
[data-tema="escuro"] .tema-botao .icone-sol { display: block; }
[data-tema="escuro"] .tema-botao .icone-lua { display: none; }
.so-curto { display: none; }

/* ================= Botões ================= */
.botao {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 12px;
  font-weight: 500; font-size: 1rem; line-height: 1;
  transition: transform 0.25s var(--curva), box-shadow 0.25s ease, background-color 0.25s ease;
}
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: scale(0.96); }
.botao svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.25s var(--curva); }
.botao:hover svg { transform: translate(2px, -2px); }
.botao::after {
  content: ""; position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.botao:hover::after { left: 130%; }

.botao-laranja {
  color: #1c0d02;
  background: var(--holo-botao);
  background-size: 300% 300%;
  animation: holo 5s ease-in-out infinite;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}
.botao-laranja:hover { box-shadow: 0 12px 30px -10px rgba(234, 88, 12, 0.6); }
.botao-azul { background: var(--azul); color: #fff; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25); }
.botao-azul:hover { background: var(--azul-escuro); box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.55); }
.botao-contorno { background: transparent; color: var(--texto); box-shadow: inset 0 0 0 1.5px var(--contorno); }
.botao-contorno:hover { box-shadow: inset 0 0 0 1.5px var(--texto); }
.botao-pequeno { padding: 11px 18px; font-size: 0.9rem; border-radius: 10px; }

.acoes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.acoes-centro { justify-content: center; }

/* ================= Sequência inicial (fluxo) =================
   Sem JavaScript: hero e etapas aparecem empilhados, sem o bloco de código.
   Com JavaScript (.js-fluxo): seção alta com área fixa e animação pela rolagem. */
.fluxo { position: relative; max-width: none; margin: 0; padding: 0; }
.ancora-servicos { position: absolute; top: 90vh; left: 0; width: 1px; height: 1px; }
.fluxo-viewport { position: relative; }

/* Camada 1: hero */
.camada-hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: calc(var(--cabecalho) + 64px) 24px 96px;
  background: radial-gradient(70% 55% at 50% 108%, rgba(249, 115, 22, 0.18) 0%, rgba(37, 99, 235, 0.08) 40%, transparent 70%);
}
.hero-conteudo { display: flex; flex-direction: column; align-items: center; max-width: 1000px; }
.selo {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--azul-claro);
  font-size: 14px; font-weight: 500; color: var(--azul-texto);
  margin-bottom: 20px;
  animation: hero-in 0.8s var(--curva) 0.15s both;
}
.selo::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--laranja);
  animation: pulsar 2s ease-out infinite;
}
.hero-titulo {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 22px;
  animation: hero-sobe 0.9s var(--curva) both;
}
.linha-1, .linha-2 {
  font-size: clamp(40px, min(6.6vw, 8.6vh), 88px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
.linha-1 { color: var(--texto); }
.mascara { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.1em; }
.linha-2 {
  display: inline-block;
  background: var(--holo);
  background-size: 300% 300%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: line-mask-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both, holo 5s ease-in-out infinite;
}
.hero-descricao {
  max-width: 640px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.45;
  margin-bottom: 34px;
  animation: hero-sobe 0.9s var(--curva) 0.1s both;
}
.hero-acoes {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px;
  animation: hero-in 0.9s var(--curva) 0.56s both;
}

/* Camada 2: etapas */
.camada-etapas {
  position: relative;
  background: radial-gradient(60% 55% at 50% 52%, rgba(249, 115, 22, 0.12), rgba(37, 99, 235, 0.06) 45%, transparent 72%);
}

/* Bolhas decorativas (atrás do texto; --p vem do JavaScript, de 0 a 1 conforme a rolagem) */
.bolhas {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --p: 0;
  --k: 1;
}
.bolha {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--tam) * var(--k));
  height: calc(var(--tam) * var(--k));
  margin: calc(var(--tam) * var(--k) / -2) 0 0 calc(var(--tam) * var(--k) / -2);
  border-radius: 50%;
  transform:
    translate3d(calc(var(--dx, 0px) * var(--p)), calc(var(--dy, 0px) * var(--p) * -1), 0)
    scale(calc(1 + var(--s, 0) * var(--p)));
  animation:
    bolha-entra 1.2s var(--curva) var(--d, 0s) both,
    boiar var(--b, 7s) ease-in-out calc(var(--d, 0s) + 1.2s) infinite;
  will-change: transform;
}
.bolha-luz {
  background: radial-gradient(circle at 40% 40%, rgba(249, 115, 22, 0.38), rgba(251, 146, 60, 0.12) 45%, transparent 70%);
  filter: blur(18px);
}
.bolha-luz.azul {
  background: radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.3), rgba(96, 165, 250, 0.1) 45%, transparent 70%);
}
.bolha-vidro {
  background:
    radial-gradient(circle at 30% 28%, var(--vidro-brilho), var(--vidro-brilho-2) 22%, transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(249, 115, 22, 0.22), transparent 62%);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25), 0 10px 24px -12px rgba(249, 115, 22, 0.35);
}
.bolha-vidro.azul {
  background:
    radial-gradient(circle at 30% 28%, var(--vidro-brilho), var(--vidro-brilho-2) 22%, transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(37, 99, 235, 0.22), transparent 62%);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25), 0 10px 24px -12px rgba(37, 99, 235, 0.35);
}
.bolha-tag {
  display: grid; place-items: center;
  background: var(--tag-bg);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.4), 0 12px 30px -12px rgba(249, 115, 22, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: calc(var(--tam) * var(--k) * 0.3);
  font-weight: 700;
  color: var(--laranja-texto);
}
.bolha-tag.azul {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.4), 0 12px 30px -12px rgba(37, 99, 235, 0.45);
  color: var(--azul);
}

.etapas-grade {
  max-width: var(--max); margin: 0 auto;
  padding: 64px 24px 96px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.espaco-codigo, .pontos, .codigo-fluxo { display: none; }
.etapa + .etapa { margin-top: 48px; }

.etapa-rotulo { color: var(--laranja-texto); font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.etapa-titulo {
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--texto);
  max-width: 460px;
}
.etapa-descricao { font-size: 18px; line-height: 1.5; max-width: 400px; margin-top: 18px; }

.etapa-topicos { list-style: none; counter-reset: topico; }
.etapa-topicos li {
  counter-increment: topico;
  display: grid; grid-template-columns: 40px 1fr; align-items: baseline;
  padding: 22px 0;
  max-width: 360px;
  border-top: 1px solid var(--linha-suave);
  font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: -0.015em;
  color: var(--texto);
}
.etapa-topicos li:last-child { border-bottom: 1px solid var(--linha-suave); }
.etapa-topicos li::before {
  content: "0" counter(topico);
  font-size: 13px; font-weight: 700;
  color: var(--azul);
  font-variant-numeric: tabular-nums;
}

.ponto {
  box-sizing: content-box;
  width: 28px; height: 3px;
  padding: 10px 0;
  border: 0; border-radius: 3px;
  background: var(--ponto);
  background-clip: content-box;
  cursor: pointer;
  transition: width 0.5s var(--curva), background-color 0.4s ease;
}
.ponto:hover { background-color: rgba(37, 99, 235, 0.45); }
.ponto.ativa { width: 56px; background-color: var(--laranja); }
.ponto:focus-visible { outline: 2px solid var(--azul); outline-offset: 4px; }

/* --- Com JavaScript: área fixa e animação pela rolagem --- */
.js-fluxo .fluxo { height: 420vh; height: 420svh; }
.js-fluxo .fluxo-viewport {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.js-fluxo .camada-hero {
  position: absolute; inset: 0; z-index: 2;
  justify-content: flex-start;
  padding: calc(var(--cabecalho) + 48px) 24px 0;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  will-change: opacity, transform;
}
.js-fluxo .camada-etapas {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}
.js-fluxo .etapas-grade {
  width: 100%; max-width: 1400px;
  padding: calc(var(--cabecalho) + 15px) 40px 20px;
  grid-template-columns: 1fr min(400px, 31vw) 1fr;
  align-items: center;
  gap: 40px;
}
.js-fluxo .espaco-codigo { display: block; }
.js-fluxo .coluna-texto,
.js-fluxo .coluna-topicos { display: grid; }
.js-fluxo .etapa {
  grid-area: 1 / 1;
  margin-top: 0;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 0.7s var(--curva), transform 0.9s var(--curva), filter 0.7s ease;
}
.js-fluxo .etapa.ativa { opacity: 1; filter: none; transform: none; pointer-events: auto; }
.js-fluxo .etapa-topicos.ativa li { animation: topico-entra 0.8s var(--curva) both; }
.js-fluxo .etapa-topicos.ativa li:nth-child(2) { animation-delay: 0.08s; }
.js-fluxo .etapa-topicos.ativa li:nth-child(3) { animation-delay: 0.16s; }

.js-fluxo .pontos {
  display: flex; gap: 8px;
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

.js-fluxo .codigo-fluxo {
  display: flex; justify-content: center;
  position: absolute; top: calc(50% + 40px); left: 50%;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 345px)) scale(0.9);
  will-change: transform;
}
.js-fluxo .editor { animation: bloco-entra 1.2s var(--curva) 0.5s both; }

/* ================= Bloco de código (janela de editor, escura sobre o branco) ================= */
.editor {
  position: relative;
  width: min(380px, 30vw);
  container-type: inline-size;
  border-radius: 16px;
  overflow: hidden;
  background: #0e0e11;
  border: 1px solid var(--editor-borda);
  box-shadow:
    0 40px 80px -30px rgba(15, 23, 42, 0.45),
    0 0 120px -30px rgba(249, 115, 22, 0.45),
    0 0 160px -50px rgba(37, 99, 235, 0.35);
}

/* Barra de título com semáforo e abas */
.editor-barra {
  display: flex; align-items: flex-end; gap: 3.5cqw;
  height: 10.5cqw;
  padding: 0 3.5cqw;
  background: #16161a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.editor-semaforo { display: flex; gap: 1.6cqw; align-self: center; }
.editor-semaforo span { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #ff5f57; }
.editor-semaforo span:nth-child(2) { background: #febc2e; }
.editor-semaforo span:nth-child(3) { background: #28c840; }
.editor-abas { display: flex; gap: 0.6cqw; }
.aba {
  display: flex; align-items: center; gap: 1.4cqw;
  margin-bottom: -1px;
  padding: 2.2cqw 2.8cqw 2.4cqw;
  border-radius: 2cqw 2cqw 0 0;
  font-size: 2.9cqw;
  white-space: nowrap;
  color: #71717a;
  transition: color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}
.aba::before { content: ""; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; flex-shrink: 0; }
.aba-html::before { background: #fb923c; }
.aba-tsx::before { background: #60a5fa; }
.aba-ts::before { background: #3b82f6; }
.aba.ativa {
  color: #f5f5f7;
  background: #0e0e11;
  box-shadow: inset 0 2px 0 var(--laranja);
}

/* Telas: as três ficam empilhadas na mesma célula e trocam com fade */
.editor-telas { display: grid; }
.tela {
  grid-area: 1 / 1;
  display: flex; flex-direction: column;
  padding: 4cqw 4.5cqw 4cqw 2.5cqw;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.tela.ativa { opacity: 1; }
.tela-codigo {
  flex: 1;
  font-family: var(--mono);
  font-size: 3.2cqw;
  line-height: 1.8;
  color: #d4d4d8;
  overflow: hidden;
  counter-reset: linha;
}
.ln { display: block; white-space: pre; }
.ln::before {
  counter-increment: linha;
  content: counter(linha);
  display: inline-block;
  width: 5cqw;
  margin-right: 3.5cqw;
  text-align: right;
  color: #4b4b55;
}
.tela-terminal {
  margin: 4cqw 0 0 2cqw;
  padding: 2.8cqw 3.4cqw;
  border-radius: 2.4cqw;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--mono);
  font-size: 2.8cqw;
  line-height: 1.7;
  color: #a1a1aa;
}
.tela-terminal .prompt { color: #fb923c; }
.tela-terminal .ok { color: #4ade80; }
.cursor {
  display: inline-block;
  width: 1.5cqw; height: 3.6cqw;
  margin-left: 0.6cqw;
  vertical-align: -0.5cqw;
  background: var(--laranja);
  animation: piscar 1s steps(1) infinite;
}

/* Barra de status */
.editor-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5cqw 3.5cqw;
  background: linear-gradient(90deg, var(--laranja), #fb923c);
  color: #1c0d02;
  font-size: 2.6cqw; font-weight: 500;
}
.editor-status svg {
  width: 2.8cqw; height: 2.8cqw;
  margin-right: 1cqw;
  vertical-align: -0.5cqw;
  fill: none; stroke: currentColor; stroke-width: 1.4;
}
.lingua:not(.ativa) { display: none; }

/* Cores do código (tema escuro do editor) */
.c-kw { color: #c792ea; }
.c-fn { color: #60a5fa; }
.c-var { color: #f5f5f7; }
.c-attr { color: #fdba74; }
.c-str { color: #c3e88d; }
.c-tag { color: #fb923c; }
.c-com { color: #6b7280; }

/* ================= Trajetória (linha do tempo) ================= */
.tempo {
  position: relative;
  list-style: none;
  margin-top: 56px;
  --progresso: 0;  /* vem do JavaScript, de 0 a 1 conforme a rolagem */
}
/* Trilho cinza e preenchimento laranja → azul que cresce com a rolagem */
.tempo::before,
.tempo::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  border-radius: 2px;
}
.tempo::before { background: var(--linha); }
.tempo::after {
  background: linear-gradient(180deg, var(--laranja), var(--azul));
  transform-origin: top;
  transform: scaleY(var(--progresso));
}

.tempo-item { position: relative; width: 50%; padding: 0 48px 40px 0; text-align: right; }
.tempo-item:nth-child(even) { margin-left: 50%; padding: 0 0 40px 48px; text-align: left; }
.tempo-item:last-child { padding-bottom: 0; }

/* Ponto na linha: acende (laranja nos ímpares, azul nos pares) quando a leitura chega nele */
.tempo-item::before {
  content: "";
  position: absolute; top: 26px; right: -9px; z-index: 1;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--fundo);
  border: 2px solid var(--linha);
  transition: border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}
.tempo-item:nth-child(even)::before { right: auto; left: -9px; }
.tempo-item.alcancado::before {
  border-color: var(--laranja);
  background: var(--laranja);
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.18);
}
.tempo-item.alcancado:nth-child(even)::before {
  border-color: var(--azul);
  background: var(--azul);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18);
}

.tempo-card {
  display: inline-block;
  max-width: 460px;
  padding: 24px 26px;
  text-align: left;
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, transform 0.3s var(--curva);
}
.tempo-card:hover { border-color: var(--laranja); transform: translateY(-3px); }
.tempo-item:nth-child(even) .tempo-card:hover { border-color: var(--azul); }
.tempo-data {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--laranja-texto);
}
.tempo-item:nth-child(even) .tempo-data { color: var(--azul-texto); }
.tempo-card h3 { font-size: 1.2rem; letter-spacing: -0.01em; color: var(--texto); }
.tempo-card p { font-size: 0.98rem; margin-top: 8px; }
.tempo-card .tempo-cargo { margin-top: 2px; font-size: 0.95rem; font-weight: 500; color: var(--texto); opacity: 0.75; }
.tempo-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tempo-tags li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--linha);
  background: var(--fundo);
  font-size: 0.78rem; font-weight: 500;
  color: var(--muted);
}

/* ================= Títulos das seções ================= */
.rotulo-secao { font-size: 15px; font-weight: 500; color: var(--azul); margin-bottom: 14px; }
.bloco h2, .prerodape h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 800px;
  color: var(--texto);
}
.subtitulo { margin-top: 14px; max-width: 640px; }

/* ================= Projetos ================= */
.grade-projetos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.projeto {
  background: var(--fundo);
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px -20px var(--sombra);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.projeto:hover { transform: translateY(-4px); border-color: rgba(37, 99, 235, 0.35); box-shadow: 0 20px 40px -22px rgba(37, 99, 235, 0.45); }
.projeto-capa { height: 190px; display: grid; place-items: center; overflow: hidden; background: var(--superficie-2); }
.projeto-capa img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
  transition: transform 0.6s var(--curva);
}
.projeto:hover .projeto-capa img { transform: scale(1.05); }
.capa-nome {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 6px 24px rgba(15, 23, 42, 0.3);
}
.projeto-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.capa-1 { background: linear-gradient(135deg, #fdba74, #f97316 55%, #c2410c); }
.capa-2 { background: linear-gradient(135deg, #93c5fd, #2563eb 55%, #1e3a8a); }
.capa-3 { background: linear-gradient(135deg, #f97316, #fdba74 40%, #93c5fd 60%, #2563eb); }
.projeto-corpo { padding: 26px; }
.tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  color: var(--azul-texto); background: var(--azul-claro);
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.projeto h3 { font-size: 1.3rem; margin-bottom: 8px; letter-spacing: -0.01em; color: var(--texto); }
.tecnologias-projeto { font-size: 0.85rem; font-weight: 500; color: var(--laranja-texto); margin-top: 12px; }
.link-seta { display: inline-block; margin-top: 14px; color: var(--azul); font-weight: 700; }
.link-seta:hover { color: var(--azul-texto); }

/* ================= Faixa de chamada (garantia) ================= */
.faixa-cta { padding-top: 0; padding-bottom: 0; }
.faixa-cta-conteudo {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 48px 56px;
  border-radius: 28px;
  background: linear-gradient(120deg, #ea580c, #f97316 40%, #2563eb);
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(234, 88, 12, 0.55);
}
/* brilho decorativo */
.faixa-cta-conteudo::before {
  content: "";
  position: absolute; top: -40%; right: -10%;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  pointer-events: none;
}

/* Selo de nota no estilo do PageSpeed */
.faixa-nota {
  position: relative;
  width: 150px; height: 150px;
  display: grid; place-items: center; align-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.5);
}
.faixa-nota svg { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.nota-trilho { fill: none; stroke: #dcfce7; stroke-width: 8; }
.nota-arco {
  fill: none; stroke: #16a34a; stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.33, 1, 0.68, 1);
}
.faixa-nota.preparada .nota-arco { stroke-dashoffset: 326.7; }
.faixa-nota.preparada.cheia .nota-arco { stroke-dashoffset: 0; }
.nota-numero { position: relative; font-size: 2.6rem; font-weight: 700; line-height: 1; color: #15803d; font-variant-numeric: tabular-nums; }
.nota-rotulo { position: relative; margin-top: 4px; font-size: 0.75rem; font-weight: 500; color: #3f4a5a; }

.faixa-texto { position: relative; }
.faixa-selo {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff;
}
.faixa-texto h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 560px;
}
.faixa-texto > p:not(.faixa-selo) { margin-top: 12px; max-width: 560px; color: rgba(255, 255, 255, 0.9); }
.faixa-lista { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.faixa-lista li { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 500; }
.faixa-lista li::before {
  content: "✓";
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px; font-weight: 700;
}
.faixa-botao {
  position: relative;
  background: #fff;
  color: var(--laranja-escuro);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.5);
}
.faixa-botao:hover { box-shadow: 0 16px 36px -12px rgba(15, 23, 42, 0.6); }

@media (max-width: 1024px) {
  .faixa-cta-conteudo { grid-template-columns: auto 1fr; padding: 40px; }
  .faixa-botao { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .faixa-cta-conteudo { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 36px 24px; gap: 24px; }
  .faixa-texto h2, .faixa-texto > p:not(.faixa-selo) { margin-left: auto; margin-right: auto; }
  .faixa-lista { flex-direction: column; align-items: flex-start; width: fit-content; margin: 16px auto 0; text-align: left; }
  .faixa-botao { justify-self: stretch; white-space: normal; }
}

/* ================= Stack ================= */
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.stack li {
  padding: 14px 24px;
  border: 1px solid var(--linha);
  border-radius: 999px;
  background: var(--fundo);
  font-weight: 500;
  color: var(--texto);
  box-shadow: 0 6px 18px -14px var(--sombra);
  transition: border-color 0.2s, color 0.2s;
}
.stack li:hover { border-color: var(--azul); color: var(--azul); }
.nota-stack { margin-top: 28px; font-size: 1rem; }

/* ================= Processo ================= */
.passos { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.passos li { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--radius); padding: 32px; }
.passo-num {
  display: inline-block;
  font-size: 2.6rem; font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--laranja);
  margin-bottom: 14px;
}
.passos h3 { font-size: 1.25rem; margin-bottom: 8px; color: var(--texto); }

/* ================= FAQ ================= */
.faq { margin-top: 40px; max-width: 800px; display: grid; gap: 12px; }
.faq details { background: var(--superficie); border: 1px solid var(--linha); border-radius: 14px; padding: 20px 24px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--laranja); background: var(--fundo); }
.faq summary {
  cursor: pointer;
  font-weight: 700; font-size: 1.05rem;
  color: var(--texto);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--azul); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; color: var(--laranja-escuro); }
.faq details p { margin-top: 12px; }

/* ================= Chamada final ================= */
.prerodape {
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(249, 115, 22, 0.14), transparent 60%),
    radial-gradient(ellipse at 70% 0%, rgba(37, 99, 235, 0.12), transparent 60%);
  border-top: 1px solid var(--linha);
  max-width: none;
}
.prerodape h2 { margin: 0 auto; }
.prerodape p { margin-top: 18px; font-size: 1.1rem; }

/* ================= Rodapé ================= */
.rodape {
  border-top: 1px solid var(--linha);
  padding: 40px clamp(16px, 4vw, 48px) 32px;
  background: var(--superficie);
  color: var(--muted);
  font-size: 0.9rem;
}
.rodape-topo {
  max-width: var(--max); margin: 0 auto 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
}
.rodape-links { display: flex; gap: 22px; }
.rodape-links a:hover { color: var(--azul); }
.rodape > p { max-width: var(--max); margin: 0 auto; text-align: center; border-top: 1px solid var(--linha); padding-top: 24px; }

/* ================= Animações ================= */
@keyframes cabecalho-entrar {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Título e texto do topo: só deslizam, sem começar invisíveis (o Chrome conta o LCP na hora) */
@keyframes hero-sobe {
  from { transform: translateY(18px); }
  to   { transform: translateY(0); }
}
@keyframes line-mask-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes holo {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes bloco-entra {
  from { opacity: 0; transform: translateY(140px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes topico-entra {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulsar {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6); }
  50%      { box-shadow: 0 0 0 7px rgba(249, 115, 22, 0); }
}
@keyframes piscar { 50% { opacity: 0; } }
@keyframes bolha-entra {
  from { opacity: 0; scale: 0.4; }
  to   { opacity: 1; scale: 1; }
}
@keyframes boiar {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -16px; }
}
@keyframes flutuar-pilula {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Revelar ao rolar (só quando o JavaScript ativa a classe) */
.js-animado .revelar {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease var(--atraso, 0ms), transform 0.7s var(--curva) var(--atraso, 0ms);
}
.js-animado .revelar.visivel { opacity: 1; transform: none; }

/* Projetos, passos e pílulas surgem com um leve estouro de escala */
.js-animado .projeto.revelar,
.js-animado .passos li.revelar,
.js-animado .stack li.revelar {
  transform: scale(0.85);
  transition: opacity 0.6s ease var(--atraso, 0ms), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--atraso, 0ms);
}
.js-animado .projeto.revelar.visivel,
.js-animado .passos li.revelar.visivel,
.js-animado .stack li.revelar.visivel { transform: scale(1); }
.js-animado .projeto.revelar.visivel:hover { transform: translateY(-6px); }

/* Linha do tempo: cards entram deslizando do lado em que estão */
.js-animado .tempo-item.revelar { transform: translateX(-32px); }
.js-animado .tempo-item.revelar:nth-child(even) { transform: translateX(32px); }
.js-animado .tempo-item.revelar.visivel { transform: none; }

.js-animado .stack li.revelar.visivel { animation: flutuar-pilula 4s ease-in-out infinite; }
.js-animado .stack li.revelar.visivel:nth-child(even) { animation-delay: 1s; }
.js-animado .stack li.revelar.visivel:hover { animation-play-state: paused; }

/* ================= Responsivo ================= */
@media (max-width: 1024px) {
  .menu, .link-entrar { display: none; }
  .grade-projetos, .passos { grid-template-columns: 1fr 1fr; }

  /* Sequência inicial: texto em cima, bloco de código no meio, tópicos embaixo */
  .js-fluxo .etapas-grade {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 100%;
    padding: calc(var(--cabecalho) + 20px) 20px 56px;
    text-align: center;
    gap: 0;
  }
  .js-fluxo .espaco-codigo { display: none; }
  .js-fluxo .codigo-fluxo { top: 54%; }
  .js-fluxo .pontos { bottom: 18px; }
  .editor { width: min(420px, 90vw); }
  .etapa-rotulo { font-size: 13px; margin-bottom: 8px; }
  .etapa-titulo { font-size: clamp(20px, 5vw, 30px); line-height: 1.2; max-width: 560px; margin: 0 auto; }
  .etapa-descricao { font-size: 14px; margin: 8px auto 0; max-width: 460px; }
  .etapa-topicos li {
    grid-template-columns: 30px 1fr;
    padding: 9px 0;
    max-width: 360px;
    margin: 0 auto;
    font-size: 14px;
    text-align: left;
  }
}

/* Linha do tempo em uma coluna, com a linha à esquerda */
@media (max-width: 760px) {
  .tempo::before, .tempo::after { left: 9px; }
  .tempo-item,
  .tempo-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 28px 40px; text-align: left; }
  .tempo-item::before,
  .tempo-item:nth-child(even)::before { left: 0; right: auto; top: 24px; }
  .tempo-card { display: block; }
  .js-animado .tempo-item.revelar,
  .js-animado .tempo-item.revelar:nth-child(even) {
    /* entram pela esquerda, onde há espaço, para não criar rolagem lateral */ transform: translateX(-24px); }
  .js-animado .tempo-item.revelar.visivel { transform: none; }
}

@media (max-width: 1024px) and (max-height: 720px) {
  .js-fluxo .etapa-descricao { display: none; }
}

@media (max-width: 640px) {
  section { padding: 72px 20px; }
  .header-acoes { gap: 8px; }
  .header-acoes .botao { padding: 10px 14px; font-size: 0.85rem; }
  .tema-botao { width: 36px; height: 36px; border-radius: 10px; }
  .marca { font-size: 1rem; gap: 8px; }
  .js-fluxo .camada-hero { padding-top: calc(var(--cabecalho) + 32px); }
  .linha-1, .linha-2 { font-size: clamp(34px, 10.5vw, 44px); }
  .hero-descricao { font-size: 16px; }
  .hero-acoes { flex-direction: column; width: 100%; max-width: 400px; }
  .hero-acoes .botao { width: 100%; }
  .etapas-grade { grid-template-columns: 1fr; }
  .grade-projetos, .passos { grid-template-columns: 1fr; }
  .bolhas { --k: 0.65; }
  .so-desktop { display: none; }
}

@media (max-width: 400px) {
  .so-largo { display: none; }
  .so-curto { display: inline; }
}

/* Movimento reduzido: sem animações, sem transições */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .revelar { opacity: 1 !important; transform: none !important; }
}
