/* Homepage network: the nav's spark falls into the page and blooms into the service areas (public/js/neural.js).
   Off by default; views/home.ejs adds html.neural-on when motion and WebGL are allowed, and the classic cards show otherwise. */
.neural { display: none; }
html.neural-on .neural { display: block; }
html.neural-on .services-classic { display: none; }

.neural {
  --ground: #05090B;
  --ink-n: #E8E4D9;
  --ink-n2: #AAB4B2;
  --ink-n3: #6E7C7D;
  --glass: rgba(8, 14, 17, .74);
  --edge: rgba(208, 228, 224, .12);
  --amber: #FFB04A;
  --ice: #73E4EE;
  position: relative;
  background: var(--ground);
  color: var(--ink-n);
}
/* a soft membrane where the light page meets the network */
.neural::before { content: ''; position: absolute; left: 0; right: 0; top: -90px; height: 90px; pointer-events: none; background: linear-gradient(180deg, rgba(5, 9, 11, 0), var(--ground)); }
.neural-track { position: relative; height: calc(var(--screens, 5) * 100vh); }
.neural-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.neural-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; touch-action: pan-y; }
.neural-stage::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(1, 3, 4, .65) 100%); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* labels that follow the 3D nodes */
.neural-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.nl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 12px/1.2 var(--sans); letter-spacing: .02em; color: var(--ink-n); opacity: 0; transition: opacity .45s ease; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); will-change: transform; }
.nl::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--c, var(--amber)); box-shadow: 0 0 10px var(--c, var(--amber)); vertical-align: 1px; }
.nl.show { opacity: .92; }
.nl.dim { opacity: .38; }
.nl.hot { opacity: 1; color: #fff; }
.nl.hot::before { animation: nl-ping 1s ease-out infinite; }
.nl-note { font: 500 11px/1.2 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .03em; color: var(--ink-n2); }
.nl-note::before { width: 5px; height: 5px; border-radius: 1px; transform: rotate(45deg); }
@keyframes nl-ping { 0% { box-shadow: 0 0 0 0 var(--c, var(--amber)); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* intro heading */
.neural-head { position: absolute; z-index: 3; left: max(24px, calc((100vw - 1180px) / 2)); top: clamp(104px, 16vh, 150px); max-width: 30rem; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.neural-head.on { opacity: 1; transform: none; }
.neural-kicker, .neural-panel-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font: 500 11.5px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-n3); }
.neural-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.01em; color: #fff; }
.neural-head p { margin: 14px 0 0; color: var(--ink-n2); font-size: 17px; }
.neural-head .neural-hint { margin-top: 26px; font: 500 12px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.neural-hint span { display: inline-block; animation: neural-bob 1.6s ease-in-out infinite; }
@keyframes neural-bob { 50% { transform: translateY(4px); } }

/* panels: one per service area, plus Ask Axon */
.neural-panels { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.neural-panel { --g: var(--amber); position: absolute; right: max(24px, calc((100vw - 1180px) / 2)); top: calc(50% - 14px); width: min(440px, 40vw); max-height: calc(100% - 236px); overflow: auto; padding: 26px 26px 22px; border-radius: 18px; background: var(--glass); border: 1px solid var(--edge); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); opacity: 0; visibility: hidden; transform: translate(26px, -46%); transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s linear .6s; pointer-events: auto; scrollbar-width: thin; }
.neural-panel.on { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .5s var(--ease) .08s, transform .6s var(--ease) .08s, visibility 0s; }
.neural-panel::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--g), transparent); }
.neural-panel-kicker span:first-child { color: var(--g); }
.neural-panel h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.08; color: #fff; margin: 0; }
.neural-panel-blurb { margin: 10px 0 18px; color: var(--ink-n2); font-size: 15.5px; line-height: 1.55; }
.neural-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.neural-services a { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); transition: border-color .25s, background .25s, transform .25s var(--ease); }
.neural-services a:hover, .neural-services a:focus-visible { border-color: color-mix(in srgb, var(--g) 60%, transparent); background: color-mix(in srgb, var(--g) 9%, transparent); transform: translateX(-3px); outline: none; }
.ns-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: var(--g); background: color-mix(in srgb, var(--g) 12%, transparent); }
.ns-icon svg { width: 24px; height: 24px; }
.ns-text b { display: block; font-size: 15.5px; color: #fff; }
.ns-text small { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--ink-n2); }
.ns-go svg { width: 18px; height: 18px; color: var(--ink-n3); transition: color .2s, transform .2s var(--ease); }
.neural-services a:hover .ns-go svg { color: var(--g); transform: translateX(3px); }
.neural-notes { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--edge); display: flex; flex-wrap: wrap; gap: 8px; }
.neural-notes p { width: 100%; margin: 0 0 4px; font: 500 11px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-n3); }
.neural-note { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--ink-n); text-decoration: none; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s; }
.neural-note:hover, .neural-note:focus-visible { border-color: var(--g); background: color-mix(in srgb, var(--g) 10%, transparent); outline: none; }
.nk { font: 600 10px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.nk[data-kind="Security"] { color: #FF8270; }
.nk[data-kind="AI risk"] { color: var(--ice); }

/* Ask Axon */
.neural-ask { width: min(560px, 46vw); padding: 30px 30px 24px; }
.neural-ask h3 { font-size: clamp(30px, 3vw, 40px); }
.neural-ask-sub { margin: 10px 0 0; color: var(--ink-n2); font-size: 16px; line-height: 1.5; }
.neural-ask .neuron-dot { width: 7px; height: 7px; }
.neural-mode { color: var(--ink-n2); }
.neural-mode[data-mode="live"] { color: #7ee2b8; }
.neural-mode[data-mode="demo"] { color: var(--amber); }
.neural-log { display: grid; gap: 12px; margin: 18px 0 0; max-height: min(34vh, 330px); overflow: auto; scrollbar-width: thin; }
.neural-log:empty { display: none; }
.nmsg { font-size: 14.5px; line-height: 1.6; color: var(--ink-n); }
.nmsg.user { justify-self: end; max-width: 88%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--ice) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ice) 30%, transparent); }
.nmsg.ai { padding-left: 12px; border-left: 2px solid var(--amber); }
.nmsg.ai p { margin: 0 0 9px; }
.nmsg.ai p:last-child { margin-bottom: 0; }
.nmsg.ai ul, .nmsg.ai ol { margin: 0 0 9px; padding-left: 20px; }
.nmsg.ai li { margin: 3px 0; }
.nmsg.ai a { color: var(--ice); }
.nmsg.ai strong { color: #fff; }
.nmsg .nerr { color: #FF8270; }
.nmsg .nthink { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-n3); font: 500 12px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.nmsg .nthink i { width: 4px; height: 12px; border-radius: 2px; background: var(--amber); animation: neural-eeg .9s ease-in-out infinite; }
.nmsg .nthink i:nth-child(2) { animation-delay: .12s; } .nmsg .nthink i:nth-child(3) { animation-delay: .24s; }
@keyframes neural-eeg { 50% { transform: scaleY(.3); opacity: .5; } }
.nrel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nrel a { font-size: 12px; font-weight: 600; text-decoration: none; padding: 4px 9px; border-radius: 99px; color: var(--ink-n); border: 1px solid rgba(255, 255, 255, .14); }
.nrel a:hover { border-color: var(--amber); }
.neural-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.neural-suggest p { width: 100%; margin: 0 0 2px; font: 500 11px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-n3); }
.neural-suggest[hidden] { display: none; }
.neural-suggest button { font: inherit; font-size: 14px; text-align: left; color: var(--ink-n); padding: 8px 12px; border-radius: 12px; cursor: pointer; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); transition: border-color .2s, background .2s; }
.neural-suggest button:hover { border-color: var(--amber); background: rgba(255, 176, 74, .08); }
.neural-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 20px; padding: 8px 8px 8px 18px; border-radius: 16px; background: rgba(0, 0, 0, .45); border: 1.5px solid rgba(255, 176, 74, .55); transition: border-color .2s, box-shadow .2s; }
.neural-form:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 176, 74, .14), 0 0 30px -6px rgba(255, 176, 74, .5); }
/* until someone types, the box breathes so it reads as "type here" */
.neural-form.empty:not(:focus-within) { animation: neural-ready 2.4s ease-in-out infinite; }
@keyframes neural-ready { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 74, 0), 0 0 18px -8px rgba(255, 176, 74, .4); } 50% { box-shadow: 0 0 0 5px rgba(255, 176, 74, .12), 0 0 34px -4px rgba(255, 176, 74, .55); } }
.neural-form textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; color: #fff; font: inherit; font-size: 18px; line-height: 26px; padding: 13px 0; height: 52px; max-height: 140px; overflow: hidden; caret-color: var(--amber); }
.neural-form textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.neural-form textarea::placeholder { color: var(--ink-n2); }
.neural-send { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 20px; border-radius: 12px; border: 0; cursor: pointer; background: var(--amber); color: #1A1206; font: 700 16px/1 var(--sans); transition: transform .2s var(--ease), background .2s; }
.neural-send:hover { transform: translateY(-1px); }
.neural-send svg { width: 19px; height: 19px; }
.neural-send.stop { background: #FF8270; }
.neural-ask-foot { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--ink-n3); }
.neural-ask-foot a { color: var(--ink-n2); text-decoration: none; }
.neural-ask-foot a:hover { color: var(--amber); }

/* where you are: one numbered segment per area, each filling as you scroll through it */
.neural-dock { position: absolute; z-index: 4; left: 50%; bottom: 18px; transform: translate(-50%, 12px); width: min(1000px, calc(100% - 48px)); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 18px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(8, 14, 17, .78); border: 1px solid var(--edge); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; pointer-events: none; transition: opacity .45s, transform .45s var(--ease); }
.neural-dock.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.neural-dock-now { display: none; }
.neural-dock-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.neural-dock-steps li { flex: 1 1 0; min-width: 0; transition: flex-grow .5s var(--ease); }
.neural-dock-steps li.cur { flex-grow: 2.1; }
.neural-dock-steps button { --g: var(--amber); --p: 0; width: 100%; display: grid; gap: 9px; padding: 8px 10px 6px; border: 0; border-radius: 11px; background: none; cursor: pointer; text-align: left; color: var(--ink-n3); font: 600 15px/1.2 var(--sans); transition: color .25s, background .25s; }
.neural-dock-steps button:hover { color: var(--ink-n); background: rgba(255, 255, 255, .04); }
.nd-label { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.nd-num { flex: none; font: 600 12px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .06em; color: inherit; opacity: .8; }
.nd-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-bar { position: relative; display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.nd-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); background: var(--g); border-radius: inherit; box-shadow: 0 0 10px var(--g); }
.neural-dock-steps button[data-state="done"] { color: var(--ink-n2); }
.neural-dock-steps button[aria-current="step"] { color: #fff; background: rgba(255, 255, 255, .05); }
.neural-dock-steps button[aria-current="step"] .nd-num { color: var(--g); opacity: 1; }
.neural-dock-hint { display: flex; align-items: center; gap: 8px; margin: 0; padding-left: 16px; border-left: 1px solid var(--edge); font: 600 12px/1.2 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); white-space: nowrap; }
.neural-dock-hint i { font-style: normal; font-size: 16px; animation: neural-bob 1.6s ease-in-out infinite; }
.neural-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--edge); font-size: 14px; color: var(--ink-n2); }
.neural-next span { font: 600 11px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-right: 4px; }
.neural-next b { color: #fff; font-weight: 600; }
.neural-next i { font-style: normal; color: var(--amber); animation: neural-bob 1.6s ease-in-out infinite; }
.neural-skip { position: absolute; z-index: 4; left: 16px; top: 90px; padding: 8px 12px; border-radius: 8px; background: var(--amber); color: #1A1206; font-weight: 600; font-size: 13px; text-decoration: none; transform: translateY(-160%); opacity: 0; }
.neural-skip:focus { transform: none; opacity: 1; }

/* the spark that travels between the nav and the network (canvas made by neural.js) */
.neural-spark { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
html.spark-out .site-nav .neuron-link .neuron-dot { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 176, 74, .7); }
html.spark-out .site-nav .neuron-link .neuron-dot::after { animation: none; opacity: 0; }
html.spark-home .site-nav .neuron-link { border-color: #FFB04A; box-shadow: 0 0 22px 0 rgba(255, 176, 74, .6); }
html.spark-home .site-nav .neuron-link .neuron-dot { transform: scale(1.6); transition: transform .2s; }

/* while the network fills the screen, the header goes dark with it */
.site-header { transition: border-color .2s, box-shadow .2s, background .35s; }
html.neural-dark .site-header { background: rgba(5, 9, 11, .72); border-color: rgba(208, 228, 224, .08); box-shadow: none; }
html.neural-dark .site-nav a:not(.btn):not(.neuron-link) { color: #E8E4D9; }
html.neural-dark .site-nav a.active { color: #FFB04A; }
html.neural-dark .logo-mark { color: #E8E4D9; }
html.neural-dark .logo-mark i { box-shadow: 0 0 0 2px #05090B; }
html.neural-dark .nav-toggle span { background: #E8E4D9; }

@media (max-width: 900px) {
  html.neural-dark .site-nav { background: #05090B; border-color: rgba(208, 228, 224, .1); }
  html.neural-dark .site-nav a:not(.btn) { border-color: rgba(208, 228, 224, .1); }
}
@media (max-width: 820px) {
  .neural-head { left: 16px; right: 16px; top: 96px; }
  .neural-head h2 { font-size: clamp(30px, 8vw, 40px); }
  .neural-head p { font-size: 15.5px; }
  .neural-panel, .neural-ask { left: 16px; right: 16px; width: auto; top: auto; bottom: 100px; max-height: calc(100% - 300px); transform: translate(0, 24px); padding: 20px 18px 16px; }
  .neural-panel.on { transform: none; }
  .neural-panel-blurb { margin: 8px 0 12px; font-size: 14px; line-height: 1.45; }
  .neural-panel h3 { font-size: 24px; }
  .neural-notes { margin-top: 12px; padding-top: 12px; }
  .neural-note:nth-of-type(n+3) { display: none; }
  .neural-services a { grid-template-columns: 36px 1fr auto; gap: 12px; padding: 10px 12px; }
  .ns-icon { width: 36px; height: 36px; }
  .ns-text small { display: none; }
  .neural-log { max-height: 24vh; }
  .neural-ask { padding: 20px 18px 16px; }
  .neural-ask h3 { font-size: 26px; }
  .neural-ask-sub { font-size: 14.5px; margin-top: 6px; }
  .neural-form { margin-top: 14px; padding: 6px 6px 6px 14px; }
  .neural-form textarea { font-size: 16px; line-height: 22px; padding: 12px 0; height: 46px; }
  .neural-send { width: 46px; height: 46px; padding: 0; justify-content: center; }
  .neural-send-text { display: none; }
  .neural-suggest { margin-top: 12px; }
  .neural-suggest button { font-size: 13.5px; padding: 7px 10px; }
  .neural-dock { bottom: 12px; width: calc(100% - 24px); grid-template-columns: 1fr; gap: 8px; padding: 12px 14px 10px; }
  .neural-dock-now { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; font-size: 15px; }
  .nd-count { font: 600 12px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); white-space: nowrap; }
  .nd-name { color: #fff; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .neural-dock-steps { gap: 5px; }
  .neural-dock-steps button { padding: 8px 0 6px; gap: 0; }
  .nd-label { display: none; }
  .nd-bar { height: 6px; }
  .neural-dock-hint { display: none; }
  .neural-next { margin-top: 12px; padding-top: 10px; font-size: 13px; }
  .nl { font-size: 11px; }
  .nl-note { display: none; }
}
