/* =====================================================================
   Tech look for the public site (loaded by partials/header.ejs only):
   grid backdrops, glow, mono accents, code window, circuit lines,
   capability ticker and a connection diagram.
   Motion is decorative and is switched off for prefers-reduced-motion.
   ===================================================================== */
:root {
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --grid-line: color-mix(in srgb, var(--text) 7%, transparent);
  --glow: color-mix(in srgb, var(--brand) 45%, transparent);
  --code-bg: #0b1020; --code-text: #d7defa; --code-muted: #7f89b3;
}
@media (prefers-color-scheme: dark) {
  :root { --grid-line: color-mix(in srgb, var(--text) 6%, transparent); --code-bg: #070a16; }
}

/* ---------- Mono accents ---------- */
.eyebrow, .kicker, .stat .label, .tech-label, .step::before, .footer-bottom { font-family: var(--mono); }
.eyebrow { letter-spacing: .04em; text-transform: none; font-weight: 500; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 2.4s ease-in-out infinite;
}
.kicker { letter-spacing: .06em; text-transform: none; font-weight: 600; }
.kicker::before { content: "// "; opacity: .6; }
.tech-label { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Grid backdrops ---------- */
.hero { isolation: isolate; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 30%, transparent 75%);
}
.hero::before { z-index: -2; }
.hero h1 { letter-spacing: -.035em; }
.section-soft { background-color: var(--bg-soft); background-image: radial-gradient(var(--grid-line) 1px, transparent 1px); background-size: 22px 22px; }

/* ---------- Glow ---------- */
.card { transition: border-color .2s, box-shadow .2s, transform .2s; }
a.product-tile:hover, .section .card:not(.flat):hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent), 0 14px 44px -14px var(--glow);
}
.icon-tile { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent); }
.step::before { box-shadow: 0 0 0 4px var(--brand-soft), 0 0 18px var(--glow); font-size: .9rem; }
.btn:not(.btn-ghost):not(.btn-danger) { box-shadow: 0 6px 20px -8px var(--glow); }
.btn:not(.btn-ghost):not(.btn-danger):hover { box-shadow: 0 8px 28px -6px var(--glow); }
.gradient-text {
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; animation: sheen 8s linear infinite;
}

/* ---------- Hero visual: code window + portal mock + chips + circuits ---------- */
.hero-visual { position: relative; padding: 18px 0 28px 18px; isolation: isolate; }
.hero-visual .circuits { position: absolute; left: -70px; top: -50px; width: calc(100% + 110px); height: calc(100% + 90px); z-index: -1; color: var(--brand); pointer-events: none; }
.circuits path { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-opacity: .28; }
.circuits path.flow { stroke: var(--accent); stroke-opacity: .95; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 8 300; animation: flow 5s linear infinite; }
.circuits path.flow.b { animation-delay: -2s; animation-duration: 6.5s; }
.circuits path.flow.c { animation-delay: -3.5s; animation-duration: 4.5s; stroke: var(--brand); }
.circuits circle { fill: var(--bg); stroke: currentColor; stroke-opacity: .55; stroke-width: 1.4; }

.code-window {
  background: var(--code-bg); color: var(--code-text); border-radius: 14px; border: 1px solid #1d2442;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55); overflow: hidden;
  font: 500 .8rem/1.75 var(--mono); max-width: 450px;
}
.code-window .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #1a2140; background: rgba(255, 255, 255, .02); }
.code-window .bar i { width: 10px; height: 10px; border-radius: 50%; }
.code-window .bar i:nth-child(1) { background: #ff5f57; }
.code-window .bar i:nth-child(2) { background: #febc2e; }
.code-window .bar i:nth-child(3) { background: #28c840; }
.code-window .bar span { margin-left: 8px; color: var(--code-muted); font-size: .75rem; }
.code-window pre { margin: 0; padding: 14px 16px 18px; white-space: pre-wrap; word-break: break-word; font: inherit; }
.code-window .ln { display: block; opacity: 0; animation: line-in .35s ease forwards; }
.code-window .ln:nth-child(1) { animation-delay: .2s; }
.code-window .ln:nth-child(2) { animation-delay: .9s; }
.code-window .ln:nth-child(3) { animation-delay: 1.4s; }
.code-window .ln:nth-child(4) { animation-delay: 1.9s; }
.code-window .ln:nth-child(5) { animation-delay: 2.4s; }
.code-window .ln:nth-child(6) { animation-delay: 2.9s; }
.c-prompt { color: #8b84ff; } .c-ok { color: #34d399; } .c-info { color: #22d3ee; } .c-dim { color: var(--code-muted); } .c-key { color: #f0abfc; }
.cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: -2px; margin-left: 2px; background: #22d3ee; animation: blink 1s steps(1) infinite; }

.hero-visual .mock {
  position: relative; margin: -14px 0 0 auto; max-width: 380px; z-index: 1;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px -30px var(--glow), var(--shadow);
}
/* Mini dashboard ("Neetdut console") in the hero */
.dash { padding: 16px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dash-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.dash-logo {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 800 .7rem/1 "Inter", sans-serif; font-style: normal;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent));
}
.live { display: inline-flex; align-items: center; gap: 6px; font: 600 .7rem/1 var(--mono); color: var(--success); padding: 4px 8px; border-radius: 999px; background: var(--success-soft); }
.live b, .dash-status b { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse-dot 2s ease-in-out infinite; }
.dash-chart { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 6px; background: var(--bg); }
.dash-chart-label { display: flex; justify-content: space-between; align-items: baseline; font: 500 .7rem/1 var(--mono); color: var(--muted); margin-bottom: 6px; }
.dash-chart-label strong { color: var(--accent); font-size: .78rem; }
.dash-chart svg { display: block; width: 100%; height: 72px; overflow: visible; }
.dash-chart .grid { stroke: var(--grid-line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.dash-chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-chart .s1 { stop-color: var(--accent); stop-opacity: .35; }
.dash-chart .s2 { stop-color: var(--accent); stop-opacity: 0; }
.dash-chart .plot { clip-path: inset(0 100% 0 0); animation: reveal 1.8s .3s ease-out forwards; }
.dash-chart .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; opacity: 0; animation: fade-in .3s 2.1s forwards; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dash-stat { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg); display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: center; }
.dash-stat .ico { grid-row: span 1; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.dash-stat strong { font: 700 1.15rem/1 var(--mono); letter-spacing: -.02em; justify-self: end; }
.dash-stat .lbl { grid-column: 1 / -1; margin-top: 8px; font: 500 .68rem/1 var(--mono); color: var(--muted); }
.dash-stat .delta { grid-column: 1 / -1; margin-top: 4px; font: 600 .68rem/1 var(--mono); color: var(--success); }
.dash-status { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font: 500 .72rem/1 var(--mono); color: var(--muted); }
.dash-status span { display: inline-flex; align-items: center; gap: 6px; }
.dash-status span:nth-child(2) b { animation-delay: -.6s; }
.dash-status span:nth-child(3) b { animation-delay: -1.2s; }
.dash-status .build b { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
@keyframes reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes pulse-dot { 50% { opacity: .45; } }

.chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  font: 600 .74rem/1 var(--mono); color: var(--text); background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(8px); animation: float 6s ease-in-out infinite;
}
.chip b { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.chip.a { top: 0; right: 2%; }
.chip.b { bottom: 4px; left: 0; animation-delay: -3s; }

@media (max-width: 860px) {
  .hero-visual { padding: 8px 0 0; }
  .hero-visual .circuits, .chip.b { display: none; }
  .hero-visual .mock { margin: -12px 0 0 auto; max-width: 92%; }
  .code-window { max-width: 94%; }
  .chip.a { top: -8px; }
}

/* ---------- Capability ticker ---------- */
.ticker { border-block: 1px solid var(--border); background: var(--bg); overflow: hidden; position: relative; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; gap: 40px; list-style: none; margin: 0; padding: 16px 20px; }
.ticker li { font: 500 .85rem/1 var(--mono); color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.ticker li::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--accent); }

/* ---------- Connection diagram ---------- */
.hub { max-width: 820px; margin: 0 auto; }
.hub svg { width: 100%; height: auto; display: block; overflow: visible; }
.hub .wire { fill: none; stroke: var(--border); stroke-width: 2; }
.hub .pulse { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 10 300; animation: flow 3.6s linear infinite; }
.hub .pulse.d2 { animation-delay: -.9s; }
.hub .pulse.d3 { animation-delay: -1.8s; }
.hub .pulse.d4 { animation-delay: -2.7s; }
.hub .node rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.hub .node.core rect { stroke: var(--brand); stroke-width: 2; }
.hub .node.core .halo { fill: none; stroke: var(--brand); stroke-opacity: .25; stroke-width: 10; }
.hub .node text { fill: var(--text); font: 700 15px "Inter", system-ui, sans-serif; text-anchor: middle; }
.hub .node text.sub { fill: var(--muted); font: 500 11.5px var(--mono); }
.hub .node.core text.sub { fill: var(--brand); }
@media (max-width: 640px) { .hub .node text { font-size: 19px; } .hub .node text.sub { font-size: 14px; } }

/* ---------- CTA band + footer ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 30px 80px -40px var(--glow); }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), transparent); opacity: .7;
}
.footer-bottom { font-size: .8rem; }

@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes sheen { to { background-position: 200% center; } }
@keyframes flow { to { stroke-dashoffset: -308; } }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .eyebrow::before, .gradient-text, .circuits path.flow, .hub .pulse, .chip, .cursor, .live b, .dash-status b { animation: none; }
  .dash-chart .plot { animation: none; clip-path: none; }
  .dash-chart .dot { animation: none; opacity: 1; }
  .circuits path.flow, .hub .pulse { display: none; }
  .code-window .ln { animation: none; opacity: 1; }
  .ticker-track { animation: none; width: auto; }
  .ticker ul { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .ticker ul + ul { display: none; }
}

/* Wordmark: "TECHNOLOGIES" in mono caps, as in public/img/logo.svg */
.logo span.tech { font: 600 .68rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; margin-left: 8px; color: var(--brand); }
.logo .logo-svg { filter: drop-shadow(0 4px 12px var(--glow)); }
