/* Página Head of AI no Notazz: rede neural, fluxogramas, agente interativo e simulação de automação.
   Usa os tokens de site.css e o layout de page.css. */

/* ---------- hero ---------- */
.hx-hero { min-height: 100svh; }
.hx-net { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity 2.4s var(--ease); -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 26%, #000 52%); mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 26%, #000 52%); }
.hx-net.is-on { opacity: 1; }
.hx-hero::after { content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 28%; background: linear-gradient(rgba(0,0,0,0), #000); pointer-events: none; }
.hx-title { max-width: 11ch; }
.hx-now { color: #fff; }
.hx-hero-bottom { grid-template-columns: minmax(0, 58ch) minmax(240px, 300px); justify-content: space-between; }
.hx-headline { position: relative; border-top: 1px solid var(--line-2); counter-reset: hl; }
.hx-headline::before { content: ""; position: absolute; inset: -18px -24px -18px -28px; z-index: -1; border-radius: 18px; background: radial-gradient(closest-side, rgba(0,0,0,.82), rgba(0,0,0,.55) 70%, rgba(0,0,0,0)); pointer-events: none; }
.hx-headline li { counter-increment: hl; display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font: 500 10.5px/1.3 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.hx-headline li::after { content: counter(hl, decimal-leading-zero); color: var(--dim); }
.hx-cue { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); }

/* ---------- fluxogramas (ciclo e automação) ---------- */
.flow { position: relative; }
.flow-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.flow-nodes { position: relative; display: grid; }
.flow-node { grid-column: var(--c); grid-row: var(--r); position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; border: 1px solid var(--line-2); border-radius: 16px; background: #050505; transition: border-color .7s var(--ease), background .7s var(--ease), box-shadow .7s var(--ease); }
.flow-node .fn-n { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); transition: color .6s; }
.flow-node h3 { font: 300 clamp(19px, 1.5vw, 23px)/1.18 var(--display); letter-spacing: -.02em; color: #fff; }
.flow-node p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.flow-node::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(110deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.95) 50%, rgba(255,255,255,0) 65%) 200% 0 / 260% 100% no-repeat; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; pointer-events: none; }

/* aceso e apagado: só quando o JS controla o fluxo */
.flow.is-js .flow-node > * { opacity: .26; transition: opacity .8s var(--ease); }
.flow.is-js .flow-node.is-on > * { opacity: 1; }
.flow.is-js .flow-node.is-on { border-color: rgba(255,255,255,.34); background: #0a0a0a; box-shadow: 0 30px 70px -44px rgba(255,255,255,.1); }
.flow.is-js .flow-node.is-on .fn-n { color: #fff; }
.flow.is-js .flow-node.is-on::before { animation: edge-sweep 1.5s var(--ease-io) forwards; }
@keyframes edge-sweep { 0% { opacity: 1; background-position: 200% 0; } 85% { opacity: 1; } 100% { opacity: 0; background-position: -110% 0; } }
.flow-node.is-hit { animation: node-hit .8s var(--ease); }
@keyframes node-hit { from { box-shadow: 0 0 0 0 rgba(255,255,255,.4); } to { box-shadow: 0 0 0 16px rgba(255,255,255,0); } }

/* fios */
.w-base { fill: none; stroke: #232323; stroke-width: 1; }
.w-live { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.w-head { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .35s; }
.wire.is-done .w-head { opacity: 1; }
.w-label { font: 500 10px var(--label); letter-spacing: .22em; fill: var(--dim); transition: fill .4s; }
.wire.is-done .w-label { fill: var(--muted); }
.wire.is-flash .w-label { fill: #fff; }
.wire.is-flash .w-live { stroke-width: 2; }
.w-spark { opacity: 0; transition: opacity .25s; }
.w-dot { fill: #fff; }

/* ciclo: 4 colunas em serpentina, a última peça fecha o ciclo */
.hx-cycle .p-head { margin-bottom: clamp(40px, 4.4vw, 64px); }
.flow-cycle .flow-nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 72px 64px; }
.flow-node.is-loop { justify-content: center; border-style: dashed; background: transparent; }
.flow-node.is-loop p { font: 300 clamp(17px, 1.3vw, 20px)/1.35 var(--display); letter-spacing: -.01em; color: var(--soft); max-width: 22ch; }
.flow-node.is-loop .fn-n i { display: inline-block; font: 400 16px/1 var(--text); font-style: normal; color: currentColor; }
.flow-cycle.is-closed .is-loop .fn-n i { animation: loop-spin 2.6s var(--ease-io) infinite; }
.flow-cycle.is-closed .is-loop { border-color: rgba(255,255,255,.5); }
@keyframes loop-spin { to { transform: rotate(-360deg); } }
.hx-cycle.is-pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 16px) 0 32px; }

/* automação: losango de decisão com dois caminhos */
.flow-auto .flow-nodes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 44px 60px; align-items: center; }
.flow-node.is-decision { width: 176px; height: 176px; padding: 0; justify-self: center; align-items: center; justify-content: center; gap: 8px; text-align: center; border: 0; background: none; box-shadow: none; }
.flow-node.is-decision::before { display: none; }
.flow-node.is-decision::after { content: ""; position: absolute; inset: 0; z-index: -1; margin: auto; width: 70.7%; height: 70.7%; transform: rotate(45deg); border: 1px solid var(--line-2); border-radius: 12px; background: #050505; transition: border-color .7s var(--ease), background .7s var(--ease); }
.flow-node.is-decision h3 { font-size: clamp(16px, 1.25vw, 18px); max-width: 8.5ch; }
.flow.is-js .flow-node.is-decision.is-on { border: 0; background: none; box-shadow: none; }
.flow.is-js .flow-node.is-decision.is-on::after { border-color: rgba(255,255,255,.45); background: #0c0c0c; }
.flow-node.is-decision.is-hit { animation: none; }
.flow-node.is-decision.is-hit::after { animation: decide .9s var(--ease); }
@keyframes decide { from { transform: rotate(45deg); box-shadow: 0 0 0 0 rgba(255,255,255,.35); } to { transform: rotate(135deg); box-shadow: 0 0 0 14px rgba(255,255,255,0); } }

.auto-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; margin-top: clamp(40px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); }
.auto-sim[hidden] { display: none; }
.auto-sim .label { color: var(--soft); }
.auto-count { display: inline-flex; align-items: baseline; gap: 10px; font: 500 11px var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.auto-count b { font: 300 30px/1 var(--display); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- responsabilidades ---------- */
.resp { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 clamp(40px, 6vw, 96px); align-items: start; }
.resp-side { position: sticky; top: calc(50svh - 160px); display: flex; flex-direction: column; gap: 20px; }
.resp-counter { display: flex; align-items: flex-start; gap: 12px; font: 100 clamp(120px, 15vw, 236px)/.84 var(--thin); letter-spacing: -.06em; color: #fff; }
.resp-now { display: inline-block; overflow: hidden; padding: 0 .02em .06em 0; }
.resp-now span { display: inline-block; }
.resp-total { margin-top: .5em; font: 500 12px var(--label); letter-spacing: .22em; color: var(--dim); }
.resp-name { min-height: 1.5em; font: 500 11.5px/1.5 var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.resp-ticks { display: flex; gap: 6px; }
.resp-ticks i { flex: 1; max-width: 46px; height: 2px; background: var(--line-2); transition: background .6s var(--ease); }
.resp-ticks i.is-on { background: #fff; }
.resp-list { border-top: 1px solid var(--line); }
.resp-row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: clamp(28px, 3.2vw, 44px) 0; border-bottom: 1px solid var(--line); }
.resp-row::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease-io); }
.rr-n { font: 500 11px/2.6 var(--label); letter-spacing: .2em; color: var(--dim); transition: color .5s; }
.resp-row h3 { margin-bottom: 14px; font: 300 clamp(26px, 2.8vw, 40px)/1.08 var(--display); letter-spacing: -.03em; color: #fff; transition: color .6s var(--ease), transform .9s var(--ease); }
.resp-row p { max-width: 52ch; font-size: 16px; line-height: 1.7; color: var(--muted); transition: color .6s var(--ease); }
.resp.is-js .resp-row h3 { color: var(--dim); }
.resp.is-js .resp-row p { color: #4d4d4d; }
.resp.is-js .resp-row.is-active h3 { color: #fff; transform: translateX(10px); }
.resp.is-js .resp-row.is-active p { color: var(--muted); }
.resp.is-js .resp-row.is-active .rr-n { color: #fff; }
.resp.is-js .resp-row.is-active::before { transform: scaleX(1); }

/* ---------- agente ---------- */
.hub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 48px clamp(40px, 6vw, 96px); align-items: center; }
.hub-stage { position: relative; width: 100%; max-width: 580px; aspect-ratio: 1; margin: 0 auto; }
.hub-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub-wires .orbit { fill: none; stroke: #1e1e1e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hub-wires .orbit-2 { stroke: #141414; }
.hub-wires .spoke { stroke: #242424; stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke .5s var(--ease); }
.hub-wires .spoke.is-on { stroke: rgba(255,255,255,.85); }
.hub-wires .sig { fill: #fff; }
.hub-core { position: absolute; left: 50%; top: 50%; z-index: 1; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); background: radial-gradient(circle at 34% 28%, #1b1b1b, #030303 70%); box-shadow: 0 0 90px rgba(255,255,255,.06), inset 0 0 30px rgba(255,255,255,.04); }
.hub-core::before { content: ""; position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.16); animation: hub-spin 40s linear infinite; }
.hub-core::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); animation: hub-breathe 3.4s var(--ease-io) infinite; }
.hub-core.is-ping { animation: core-ping .8s var(--ease); }
@keyframes hub-spin { to { transform: rotate(360deg); } }
@keyframes hub-breathe { from { transform: scale(1); opacity: .55; } to { transform: scale(1.55); opacity: 0; } }
@keyframes core-ping { from { box-shadow: 0 0 0 0 rgba(255,255,255,.35), 0 0 90px rgba(255,255,255,.06); } to { box-shadow: 0 0 0 22px rgba(255,255,255,0), 0 0 90px rgba(255,255,255,.06); } }
.hub-core span { font: 300 clamp(20px, 2.2vw, 30px)/1 var(--display); letter-spacing: -.02em; color: #fff; }
.hub-core small { font: 500 10px var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.hub-node { position: absolute; left: var(--x, 50%); top: var(--y, 50%); z-index: 2; transform: translate(-50%, -50%); padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 99px; background: #000; font: 500 10.5px/1.25 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease); }
.hub-node:hover { color: #fff; border-color: #fff; }
.hub-node[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.06), 0 0 46px rgba(255,255,255,.22); }
.hub-panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hub-k { color: var(--dim); }
.hub-title { font: 300 clamp(34px, 3.8vw, 56px)/1.02 var(--display); letter-spacing: -.04em; color: #fff; }
.hub-desc { min-height: 5.1em; max-width: 46ch; line-height: 1.7; color: var(--muted); }
.hub-log { margin-top: 8px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; background: #040404; font: 400 13px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.hub-log-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 10px var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.hub-log-bar span:first-child { display: flex; gap: 6px; }
.hub-log-bar i { width: 7px; height: 7px; border-radius: 50%; background: #262626; }
.hub-log-out { height: calc(13px * 1.7 * 4 + 28px); padding: 14px 16px; overflow: hidden; color: var(--soft); }
.hub-log-out p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-log-out .dim { color: var(--dim); }
.hub-log-out .ok { color: #fff; }
.hub-log-out p:last-child::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 4px; vertical-align: -2px; background: #fff; animation: blink 1.05s steps(1) infinite; }

/* ---------- princípio ---------- */
.hx-belief { position: relative; padding: clamp(120px, 15vw, 230px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.hx-belief::before { content: ""; position: absolute; left: 50%; top: 45%; width: min(1100px, 130vw); aspect-ratio: 2; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255,255,255,.04), rgba(255,255,255,0)); pointer-events: none; }
.hx-belief .wrap { position: relative; display: flex; flex-direction: column; gap: clamp(36px, 4.4vw, 64px); }
.hx-quote { max-width: 22ch; font: 300 clamp(32px, 5vw, 80px)/1.08 var(--display); letter-spacing: -.04em; color: #fff; text-wrap: balance; }
.hx-quote .k { background: linear-gradient(#fff, #fff) no-repeat 0 96% / 100% 1px; }
.has-gsap .hx-quote .k { background-size: 0% 1px; }
.hx-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.hx-keys li { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 0 0; font: 300 clamp(17px, 1.4vw, 21px)/1.3 var(--display); color: #fff; }
.hx-keys li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.hx-keys span { font: 500 10.5px var(--label); letter-spacing: .22em; color: var(--dim); }
.hx-keys li::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease-io); }
.hx-keys.in li::before { transform: scaleX(1); }
.hx-keys.in li:nth-child(2)::before { transition-delay: .15s; }
.hx-keys.in li:nth-child(3)::before { transition-delay: .3s; }
.hx-keys.in li:nth-child(4)::before { transition-delay: .45s; }

/* ---------- jornada ---------- */
.journey { position: relative; }
.journey-line { position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: var(--line-2); }
.journey-line i { position: absolute; inset: 0; background: linear-gradient(90deg, #5c5c5c, #fff); transform: scaleX(var(--p, 1)); transform-origin: left; }
.journey ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.journey li { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 40px; }
.journey li::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; border: 1px solid #3a3a3a; background: #070707; transition: background .5s, border-color .5s; }
.journey li.is-now::before { width: 15px; height: 15px; top: -2px; left: -2px; }
.journey time { font: 500 11px/1.4 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.journey h3 { font: 300 clamp(20px, 1.8vw, 26px)/1.15 var(--display); letter-spacing: -.02em; color: var(--soft); }
.journey p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.journey .is-now time, .journey .is-now h3 { color: #fff; }
.journey li.is-lit::before, .journey:not(.is-js) li::before { background: #fff; border-color: #fff; }
.journey li.is-now.is-lit::before, .journey:not(.is-js) li.is-now::before { animation: ring 2.2s cubic-bezier(.2,.6,.3,1) infinite; }
.journey.is-js .journey-line i { transform: scaleX(var(--p, 0)); }
.journey.is-js li > * { opacity: .3; transition: opacity .8s var(--ease); }
.journey.is-js li.is-lit > * { opacity: 1; }

/* ---------- especialidades ---------- */
.hx-marquee .marquee-row + .marquee-row { margin-top: 8px; }

/* ---------- celular e tablet ---------- */
@media (max-width: 900px) {
  .hx-net { opacity: 0; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 40%, transparent 78%); mask-image: linear-gradient(180deg, #000 0, #000 40%, transparent 78%); }
  .hx-net.is-on { opacity: .6; }
  .hx-hero-bottom { grid-template-columns: 1fr; }
  .hx-cue { display: none; }

  .flow-node { grid-column: auto; grid-row: auto; padding: 18px 18px 20px; }
  .flow-node p { font-size: 13.5px; }
  .flow-cycle .flow-nodes { grid-template-columns: 1fr; gap: 34px; padding-left: 26px; }
  .flow-auto .flow-nodes { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .flow-auto .flow-node { grid-column: span 2; }
  .flow-auto .flow-node[data-id="a"] { grid-column: 1; }
  .flow-auto .flow-node[data-id="h"] { grid-column: 2; }
  .flow-node.is-decision { grid-column: span 2; width: 156px; height: 156px; }

  .resp { grid-template-columns: 1fr; }
  .resp-side { display: none; }
  .resp-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .resp.is-js .resp-row.is-active h3 { transform: none; }

  .hub { grid-template-columns: 1fr; }
  .hub-stage { max-width: 460px; }
  .hub-node { padding: 9px 12px; font-size: 9px; letter-spacing: .08em; white-space: normal; max-width: 132px; text-align: center; }

  .hx-keys { grid-template-columns: 1fr 1fr; }
  .hx-keys li:nth-child(3) { padding-left: 0; border-left: 0; }
  .hx-keys li:nth-child(n+3) { margin-top: 20px; border-top: 1px solid var(--line); }

  .journey-line { left: 5px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .journey-line i { background: linear-gradient(180deg, #5c5c5c, #fff); transform: scaleY(var(--p, 1)); transform-origin: top; }
  .journey.is-js .journey-line i { transform: scaleY(var(--p, 0)); }
  .journey ol { grid-template-columns: 1fr; gap: 36px; }
  .journey li { padding: 0 0 0 36px; }
  .journey li::before { top: 4px; }
  .journey li.is-now::before { top: 2px; left: -2px; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-net { transition: none; }
  .flow-node::before, .hub-core::before, .hub-core::after { animation: none !important; }
  .resp-row h3, .resp-row p { transition: none; }
}
