/* ═══════════════════════════════════════════════════════════
   ROIA · linguagem do hero levada para o resto do site
   - campo de luz contínuo atrás das seções escuras (roia-tech.js)
   - pontos que acendem sob o cursor
   - etiquetas numeradas com fio no lugar do traço das seções
   - títulos que se preenchem palavra por palavra com a rolagem
   - trilhas (do contato à venda, como trabalhamos) guiadas pela rolagem
   - vidro com luz correndo na borda (formulário, etapas, perguntas)
   ═══════════════════════════════════════════════════════════ */

/* ─── fundo contínuo ─── */
.site-field, .site-spot { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.site-field { z-index: -2; display: block; opacity: 0; transition: opacity 1s var(--ease); }
.site-field.is-on { opacity: 1; }
.site-spot {
  z-index: -1;
  background-image: radial-gradient(circle, rgba(175, 238, 252, 0.7) 1.1px, transparent 1.8px);
  background-size: 26px 26px; background-position: 13px 13px;
  -webkit-mask-image: radial-gradient(220px circle at var(--mx, -400px) var(--my, -400px), #000 0%, transparent 100%);
  mask-image: radial-gradient(220px circle at var(--mx, -400px) var(--my, -400px), #000 0%, transparent 100%);
  opacity: var(--mo, 0);
}
.tech .on-night, .tech .contact { background: transparent; }
.tech .on-night-2 { background: rgba(15, 32, 51, 0.42); }
.tech .clients { background: rgba(10, 21, 34, 0.55); }
.tech .site-footer { background: rgba(8, 17, 28, 0.7); }

/* seções claras: papel milimetrado bem leve, some nas bordas */
.tech .on-mist { isolation: isolate; }
.tech .on-mist::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(13, 27, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 27, 42, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 80% at 70% 40%, #000 0%, transparent 85%);
  mask-image: radial-gradient(70% 80% at 70% 40%, #000 0%, transparent 85%);
}

/* ─── etiquetas das seções ─── */
.tech main { counter-reset: sec 1; }
.tech .section .eyebrow {
  counter-increment: sec;
  position: relative; width: fit-content;
  gap: 10px; padding: 7px 13px 7px 26px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: 0.14em; color: var(--on-night-muted);
  border: 1px solid var(--on-night-border-strong); background: rgba(13, 27, 42, 0.45);
}
.tech .section .eyebrow::before {
  content: counter(sec, decimal-leading-zero);
  width: auto; height: auto; background: none; opacity: 1; color: var(--teal-3);
}
.tech .section .eyebrow::after {
  content: ''; position: absolute; left: 11px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--teal-3); box-shadow: 0 0 0 4px rgba(63, 169, 200, 0.16);
}
.tech .section .eyebrow > .wire {
  position: absolute; left: calc(100% + 10px); top: 50%; height: 1px; width: clamp(48px, 8vw, 120px);
  background: linear-gradient(90deg, var(--teal-line), transparent);
  transform-origin: left center; transform: scaleX(0); transition: transform 0.9s var(--ease-out) 0.25s;
}
.tech .in .eyebrow > .wire, .tech .eyebrow.in > .wire { transform: scaleX(1); }
.tech .on-mist .eyebrow { color: var(--on-mist-muted); border-color: rgba(13, 27, 42, 0.16); background: rgba(255, 255, 255, 0.55); }
.tech .on-mist .eyebrow::before { color: var(--teal-2); }
.tech .on-mist .eyebrow::after { background: var(--teal-2); box-shadow: 0 0 0 4px rgba(10, 116, 160, 0.14); }
.tech .on-mist .eyebrow > .wire { background: linear-gradient(90deg, rgba(10, 116, 160, 0.5), transparent); }

/* ─── títulos que se preenchem com a rolagem ─── */
.wf { display: inline; }
.wf-i { opacity: var(--a, 1); transition: color 0.25s var(--ease); }
.wf-i.wf-on { color: var(--teal-3); }
.on-mist .wf-i.wf-on { color: var(--teal-2); }

/* ─── do contato à venda: trilha guiada pela rolagem ─── */
.js.tech .chain::after, .js.tech .chain.in::after { --chain-p: inherit; transition: none; }
.tech .chain-head {
  position: absolute; left: 24px; top: 24px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; z-index: 2;
  background: var(--teal); box-shadow: 0 0 0 5px rgba(11, 134, 168, 0.18), 0 0 18px 2px rgba(11, 134, 168, 0.55);
  transform: translateY(var(--head-y, 0px)); opacity: var(--head-o, 0);
  transition: opacity 0.3s var(--ease);
}
.tech .chain-item .chain-num { transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tech .chain-item.is-lit .chain-num {
  background: var(--night); color: var(--mist); border-color: var(--teal);
  box-shadow: 0 0 0 6px rgba(11, 134, 168, 0.12);
}
.tech .chain-item strong, .tech .chain-item p { transition: opacity 0.4s var(--ease); }
.tech .chain-item:not(.is-lit) strong { opacity: 0.45; }
.tech .chain-item:not(.is-lit) p { opacity: 0.55; }

/* ─── como trabalhamos: linha guiada pela rolagem + etapas em vidro ─── */
.js.tech .timeline::after, .js.tech .timeline.in::after { --tl-p: inherit; transition: none; }
.tech .timeline { padding-top: 52px; }
.tech .timeline::before, .tech .timeline::after { top: 10px; }
.tech .tl-step { padding: 26px 24px 28px; }
.tech .tl-step::before { top: -48px; left: 24px; transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tech .tl-step.is-lit::before { background: var(--teal-3); box-shadow: 0 0 0 6px rgba(63, 169, 200, 0.16), 0 0 16px rgba(63, 169, 200, 0.6); }

/* ─── vidro ─── */
.tech .glass {
  position: relative; border-radius: 24px;
  background: linear-gradient(180deg, rgba(28, 60, 92, 0.5), rgba(10, 22, 37, 0.62));
  border: 1px solid rgba(63, 169, 200, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -34px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.tech .glass::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(160, 230, 248, 0.85) 46%, rgba(63, 169, 200, 0.4) 52%, transparent 68%) 0 0 / 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.tech .glass.is-lit::after, .tech .glass.glass--live::after { opacity: 1; animation: glass-run 4.5s linear infinite; }
@keyframes glass-run { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.tech .tl-step.glass { border-radius: 22px; }
.tech .tl-step:not(.is-lit) { opacity: 0.7; transition: opacity 0.4s var(--ease); }
.tech .tl-step.is-lit { opacity: 1; }

.tech .lead-form.glass { background: linear-gradient(180deg, rgba(28, 60, 92, 0.62), rgba(10, 22, 37, 0.78)); }
.tech .lead-form input, .tech .lead-form select { background: rgba(8, 17, 28, 0.55); }

/* perguntas: linhas de vidro */
.tech .faq-list { border-top: 0; display: grid; gap: 12px; }
.tech .faq-item.glass { border-radius: 18px; padding: 0 22px; border-bottom: 1px solid rgba(63, 169, 200, 0.18); }
.tech .faq-item.glass summary { padding: 22px 0; }
.tech .faq-item.glass[open] { border-color: rgba(63, 169, 200, 0.45); }
.tech .faq-item.glass[open]::after { opacity: 1; animation: glass-run 4.5s linear infinite; }
.tech .faq-item.glass .faq-answer { padding-bottom: 22px; }

@media (max-width: 900px) {
  .tech .tl-step { padding: 20px 18px 22px; }
  .tech .tl-step::before { top: 26px; left: -36px; }
  .tech .timeline { padding-top: 0; }
  .tech .timeline::before, .tech .timeline::after { top: 6px; }
  .tech .section .eyebrow > .wire { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-field { transition: none; }
  .wf-i { opacity: 1 !important; }
  .tech .glass::after { animation: none !important; }
  .tech .chain-item:not(.is-lit) strong, .tech .chain-item:not(.is-lit) p, .tech .tl-step:not(.is-lit) { opacity: 1; }
}

/* ─── cabeçalho: vidro escuro e barra de progresso da leitura ─── */
.tech .site-header { background: rgba(9, 19, 31, 0.93); }
.tech .site-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(63, 169, 200, 0.15), var(--teal-3));
  box-shadow: 0 0 10px rgba(63, 169, 200, 0.6);
  transform-origin: left center; transform: scaleX(var(--sp, 0));
}

/* linhas das trilhas sempre por baixo das bolinhas (a entrada com transform
   criava um contexto de empilhamento e a linha passava por cima) */
.tech .chain::before, .tech .chain::after, .tech .timeline::before, .tech .timeline::after { z-index: 0; }
.tech .chain-head { z-index: 1; }
.tech .chain-item, .tech .tl-step { z-index: 2; }
