/* NewEvol homepage hero visual: "Neural Nexus" (include/hero-visual.php + js/hero-animation.js). Everything is scoped to .nhv.
   The complete static composition is the default. Ambient CSS motion starts as soon as this stylesheet applies (no JS needed); js adds .is-live for the Canvas particles, pauses off-screen / when the
   tab is hidden, and is disabled by prefers-reduced-motion.
   Layout: no outer panel; the .nhv block fills the col-lg-7 column of the hero container; stacked below the copy under 992px;
   <=768 a simplified card grid (no connector lines). Colours are hero-local variables. */
.nhv {
  --nhv-cyan: #1fc8e0;
  --nhv-violet: #7c5cff;
  --nhv-purple: #b06cff;
  --nhv-ink: #13215a;
  --nhv-muted: #54639a;
  --tx: -50%;
  --ty: -50%;
  /* animation timing (one place to tune the speed) */
  --t-core-in: .5s; --t-lines-in: .4s; --t-card-in: .35s; --t-card-step: .04s; --t-hover: .18s; --t-panel: .25s;
  --t-float: 5s; --t-glow: 2.5s; --t-hexrun: 2.8s; --t-dash: 2.6s; --t-orbit-a: 22s; --t-orbit-b: 30s; --t-orbit-flat: 45s; 
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;                                     /* fills the col-lg-7 column of the hero container; no panel, border, shadow or background of its own */
  margin: 0;
  isolation: isolate;
  container: nhv / inline-size;
  color: var(--nhv-ink);
  font-family: var(--regular, 'latoregular', Arial, sans-serif);
  line-height: 1.3;
}
.nhv *, .nhv *::before, .nhv *::after { box-sizing: border-box; }
.nhv__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* stage: reserved up-front (flex fill on desktop, aspect-ratio when stacked) so nothing shifts */
.nhv__stage { position: relative; flex: 1 1 auto; min-height: 0; aspect-ratio: 720 / 520; container: nhvs / size; }
.nhv__orbits, .nhv__lines, .nhv__canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.nhv__orbits { perspective: 900px; }

/* orbital rings (3D-tilted ellipses with a travelling point) */
.nhv__orbit { position: absolute; left: var(--cx); top: var(--cy); border-radius: 50%; border: 1px solid rgba(124, 92, 255, .26); transform: translate(-50%, -50%); }
.nhv__orbit b { position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(31, 200, 224, .8), 0 0 9px 2px rgba(31, 200, 224, .75); }
.nhv__orbit--flat { width: 58cqmin; height: 58cqmin; border-style: dashed; border-color: rgba(31, 200, 224, .38); }
.nhv__orbit--flat b { display: none; }
.nhv__orbit--a { width: 86cqmin; height: 86cqmin; border-top-color: rgba(31, 200, 224, .9); transform: translate(-50%, -50%) rotateX(72deg); }
.nhv__orbit--b { width: 68cqmin; height: 68cqmin; border-left-color: rgba(176, 108, 255, .9); transform: translate(-50%, -50%) rotateY(72deg); }
.nhv__orbit--b b { background: #f1e6ff; box-shadow: 0 0 0 1px rgba(176, 108, 255, .8), 0 0 9px 2px rgba(176, 108, 255, .7); }

/* decorative connectors (stage-percent Beziers) + end nodes */
.nhv__path { fill: none; stroke: url(#nhv-grad); stroke-width: 1.4; stroke-opacity: .55; transition: stroke-opacity .3s ease, stroke-width .3s ease; }
.nhv__path--glow { stroke-width: 2.6; stroke-opacity: .95; stroke-dasharray: 10 160; opacity: 0; }
[data-line].is-on .nhv__path:not(.nhv__path--glow):not(.nhv__path--pulse), [data-line].is-hot .nhv__path:not(.nhv__path--glow):not(.nhv__path--pulse) { stroke-opacity: 1; stroke-width: 2.4; }
.nhv__path--pulse { stroke-width: 4; stroke-opacity: 1; stroke-dasharray: 34 2000; stroke-dashoffset: -2000; opacity: 0; }
[data-line].is-pulse .nhv__path--pulse { opacity: 1; animation: nhv-pulse-dash .6s ease-out 1; }
@keyframes nhv-pulse-dash { from { stroke-dashoffset: -420; } to { stroke-dashoffset: 34; } }
.nhv__dot { position: absolute; z-index: 2; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; border: 2px solid var(--nhv-cyan); box-shadow: 0 0 8px rgba(31, 200, 224, .7); transition: transform .3s ease, box-shadow .3s ease; }
.nhv__dot.is-hot, .nhv__dot.is-on { transform: scale(1.5); box-shadow: 0 0 14px rgba(124, 92, 255, .8); }

/* central holographic hexagon */
.nhv__core { position: absolute; left: var(--cx); top: var(--cy); z-index: 3; width: clamp(120px, min(45cqmin, 37cqw), 250px); aspect-ratio: 1; transform: translate(var(--tx), var(--ty)); perspective: 700px; container: nhvc / inline-size; }
.nhv__core::before { content: ''; position: absolute; inset: -32%; z-index: -1; background: radial-gradient(circle, rgba(124, 92, 255, .42), rgba(31, 200, 224, .16) 46%, transparent 70%); }
.nhv__core-in { position: relative; width: 100%; height: 100%; }
.nhv__hex { display: block; width: 100%; height: 100%; filter: drop-shadow(0 14px 20px rgba(54, 36, 150, .35)); overflow: visible; }
.nhv__core-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-bottom: 2%; text-align: center; color: #fff; text-shadow: 0 0 12px rgba(120, 230, 255, .65); }
.nhv__core-name { font: max(20px, 15.5cqw)/1 var(--bold, 'latobold', Arial, sans-serif); letter-spacing: .01em; }
.nhv__core-sub { font: max(12px, 5.2cqw)/1.2 var(--medium, 'latomedium', Arial, sans-serif); letter-spacing: .06em; color: #d3f6ff; text-shadow: none; white-space: nowrap; }
.nhv__core-sub span { display: block; }
@container nhvc (min-width: 220px) { .nhv__core-sub span { display: inline; } }
.nhv__hex-run { stroke-dasharray: 9 91; stroke-dashoffset: 0; opacity: 0; }
.nhv__hex-run--b { stroke-dasharray: 7 93; }

/* module cards: frosted glass with a cyan -> violet border (informational: they are not controls) */
.nhv__mod {
  position: absolute; z-index: 4; width: clamp(110px, 27cqw, 200px); display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-appearance: none; appearance: none;
  border: 1.5px solid transparent; border-radius: 14px; transform: translate(var(--tx), var(--ty));
  background: linear-gradient(rgba(255, 255, 255, .78), rgba(244, 240, 255, .72)) padding-box, linear-gradient(135deg, #2fd4e8, #8b5cf6) border-box;
  box-shadow: 0 8px 22px rgba(110, 90, 220, .16), inset 0 0 0 1px rgba(255, 255, 255, .6);
  transition: transform var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.nhv__mod.is-hot { transform: translate(var(--tx), calc(var(--ty) - 3px)); box-shadow: 0 14px 30px rgba(124, 92, 255, .32), 0 0 18px rgba(31, 200, 224, .42), inset 0 0 0 1px rgba(255, 255, 255, .7); }
.nhv__mod.is-selected { box-shadow: 0 14px 32px rgba(124, 92, 255, .42), 0 0 0 2px rgba(124, 92, 255, .55), 0 0 24px rgba(31, 200, 224, .5), inset 0 0 0 1px rgba(255, 255, 255, .75); }
.nhv__mod:focus-visible { outline: 3px solid #4b2fe0; outline-offset: 3px; z-index: 5; }
@media (hover: hover) { .nhv__mod:hover { transform: translate(var(--tx), calc(var(--ty) - 3px)); box-shadow: 0 14px 30px rgba(124, 92, 255, .32), 0 0 18px rgba(31, 200, 224, .42), inset 0 0 0 1px rgba(255, 255, 255, .7); } }
.nhv__chip { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #2fd4e8, #7c5cff); box-shadow: 0 3px 10px rgba(80, 90, 230, .35); }
.nhv__chip svg { width: 17px; height: 17px; }
.nhv__mod-t { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.nhv__mod-t strong { font: 14px/1.2 var(--bold, 'latobold', Arial, sans-serif); color: var(--nhv-ink); }
.nhv__mod-t span { margin-top: 1px; font-size: 12.5px; line-height: 1.25; color: var(--nhv-muted); }
.nhv__mod--ai { width: clamp(150px, 31cqw, 232px); padding: 10px 13px; background: linear-gradient(rgba(255, 255, 255, .82), rgba(238, 230, 255, .8)) padding-box, linear-gradient(135deg, #8b5cf6, #2fd4e8) border-box; box-shadow: 0 10px 28px rgba(124, 92, 255, .32), 0 0 22px rgba(139, 92, 246, .3), inset 0 0 0 1px rgba(255, 255, 255, .7); }
.nhv__mod--ai .nhv__chip { width: 36px; height: 36px; background: linear-gradient(135deg, #8b5cf6, #2fd4e8); }
.nhv__mod--ai .nhv__chip svg { width: 21px; height: 21px; }
.nhv__mod--ai .nhv__mod-t strong { font-size: 16px; }
@container nhvs (max-width: 680px) {
  .nhv__mod:not(.nhv__mod--ai) .nhv__chip { display: none; }
  .nhv__mod { padding: 8px 10px; }
  .nhv__mod-t strong { font-size: 13px; }
}

/* module information area: plain text under the diagram (no panel), one pane per module, all stacked in one grid cell so the height never changes */
.nhv__ribbon { position: relative; z-index: 5; display: grid; max-width: 620px; margin: 10px auto 0; text-align: center; }
.nhv__pane { grid-area: 1 / 1; align-self: start; min-width: 0; visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity var(--t-panel) ease, transform var(--t-panel) ease, visibility 0s linear var(--t-panel); }
.nhv__pane.is-active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nhv__pane-h { margin: 0; font: 20px/1.2 var(--bold, 'latobold', Arial, sans-serif); color: var(--nhv-ink); }
.nhv__pane-p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--nhv-ink); }
.nhv__explore { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 4px; padding: 0 4px; font: 15px/1 var(--bold, 'latobold', Arial, sans-serif); color: #4b2fe0; text-decoration: none; }
.nhv__explore:hover { color: #3a20c8; text-decoration: underline; text-underline-offset: 4px; }
.nhv__explore:focus-visible { outline: 2px solid #4b2fe0; outline-offset: 2px; border-radius: 4px; }
.nhv__explore svg { width: 14px; height: 14px; transition: transform var(--t-hover) ease; }
.nhv__explore:hover svg { transform: translateX(3px); }
.nhv__ping { position: absolute; inset: -6%; z-index: 2; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, transparent 52%, rgba(124, 92, 255, .5) 66%, rgba(31, 200, 224, .35) 70%, transparent 74%); }
.nhv__ping.is-go { animation: nhv-ping .5s ease-out 1; }
@keyframes nhv-ping { from { opacity: .95; transform: scale(.85); } to { opacity: 0; transform: scale(1.5); } }

/* intro reveal (pure CSS: it ends in the fully visible state, so nothing depends on JavaScript) */
.nhv__core { animation: nhv-core-in var(--t-core-in) ease-out backwards; }
.nhv__orbits, .nhv__lines, .nhv__dot { animation: nhv-fade var(--t-lines-in) ease backwards; }
.nhv__mod { animation: nhv-pop var(--t-card-in) ease-out calc(var(--i, 0) * var(--t-card-step)) backwards; }
.nhv__ribbon { animation: nhv-fade .4s ease backwards; }
@keyframes nhv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nhv-core-in { from { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.82); } to { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); } }
@keyframes nhv-pop { from { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.92); } to { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); } }

/* ambient motion (only after load; paused off-screen and hidden tabs) */
.nhv .nhv__core-in { animation: nhv-float var(--t-float) ease-in-out infinite; }
.nhv .nhv__core::before { animation: nhv-glow var(--t-glow) ease-in-out infinite; }
.nhv .nhv__hex-run { opacity: 1; animation: nhv-run var(--t-hexrun) linear infinite; }
.nhv .nhv__hex-run--b { animation-duration: calc(var(--t-hexrun) * 1.6); animation-direction: reverse; }
.nhv .nhv__path--glow { opacity: 1; animation: nhv-dash var(--t-dash) linear infinite; }
.nhv .nhv__orbit--flat { animation: nhv-spin-flat var(--t-orbit-flat) linear infinite; }
.nhv .nhv__orbit--a { animation: nhv-spin-a var(--t-orbit-a) linear infinite; }
.nhv .nhv__orbit--b { animation: nhv-spin-b var(--t-orbit-b) linear infinite reverse; }
@keyframes nhv-float { 0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); } 50% { transform: translateY(-7px) rotateX(5deg) rotateY(-6deg); } }
@keyframes nhv-glow { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes nhv-run { to { stroke-dashoffset: -100; } }
@keyframes nhv-dash { to { stroke-dashoffset: -340; } }
@keyframes nhv-spin-flat { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes nhv-spin-a { from { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0); } to { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg); } }
@keyframes nhv-spin-b { from { transform: translate(-50%, -50%) rotateY(72deg) rotateZ(0); } to { transform: translate(-50%, -50%) rotateY(72deg) rotateZ(360deg); } }

.nhv.is-offscreen *, .nhv.is-offscreen *::before, .nhv.is-offscreen *::after { animation-play-state: paused !important; }
.nhv .nhv__ping, .nhv .nhv__path--pulse { animation-play-state: running !important; }

/* layout: the visual lives in the col-lg-7 column of the hero container (same grid as the copy); stacked below the copy under 992px */
.nhv-col { padding-top: 0; }
@media (max-width: 991.98px) {
  .main-banner:has(.nhv) .banner-caption { padding-bottom: 28px; }
  .nhv-col { padding-bottom: 56px; }
  .nhv { max-width: 720px; margin: 0 auto; }
}
/* <=768: simplified card grid; no connector lines, no particles */
@media (max-width: 768px) {
  .nhv { --tx: 0px; --ty: 0px; max-width: 560px; }
  .nhv__stage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; padding: 40px 0 6px; aspect-ratio: auto; container-type: inline-size; }
  .nhv__orbits, .nhv__lines, .nhv__dot, .nhv__canvas { display: none; }
  .nhv__core { position: relative; left: auto; top: auto; grid-column: 1 / -1; order: 0; justify-self: center; width: 150px; margin: 4px 0 12px; }
  .nhv__core::after { content: ''; position: absolute; inset: -9%; border-radius: 50%; border: 1px dashed rgba(31, 200, 224, .5); }
  .nhv .nhv__core::after { animation: nhv-spin-m 60s linear infinite; }
  .nhv__mod { position: static; width: auto; order: var(--mo); padding: 8px 10px; gap: 8px; }
  .nhv__mod--ai { grid-column: 1 / -1; width: auto; order: 1; }
  .nhv__chip { width: 28px; height: 28px; }
  .nhv__mod:not(.nhv__mod--ai) .nhv__chip { display: grid; }
  .nhv__pane-p { font-size: 14px; }
}
@keyframes nhv-spin-m { to { transform: rotate(360deg); } }
@media (min-width: 769px) { .nhv__mod { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  .nhv *, .nhv *::before, .nhv *::after { animation: none !important; transition: none !important; }
  .nhv__canvas { display: none; }
}

/* Home hero: tighter vertical spacing (scoped to the banner that contains the visual) */
.main-banner:has(.nhv) { min-height: 0; }
.main-banner:has(.nhv) .banner-caption { padding-top: 64px; padding-bottom: 64px; }
.main-banner:has(.nhv) .banner-caption .banner-title h1 { margin-bottom: 18px; }
.main-banner:has(.nhv) .banner-caption .simple-txt { margin-bottom: 10px !important; }
.main-banner:has(.nhv) .banner-caption .simple-txt:last-of-type { margin-bottom: 20px !important; }
@media (max-width: 991.98px) {
  .main-banner:has(.nhv) .banner-caption { padding-top: 40px; padding-bottom: 12px; }
}
