/* ── hero ── */
.hero { position: relative; height: 100vh; min-height: 640px; overflow: hidden; isolation: isolate; }
#scene { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13,16,19,.92) 0%, rgba(13,16,19,.55) 38%, rgba(13,16,19,0) 62%),
    linear-gradient(0deg, rgba(13,16,19,1) 0%, rgba(13,16,19,0) 22%),
    linear-gradient(180deg, rgba(13,16,19,.85) 0%, rgba(13,16,19,0) 18%); }
.hero .copy { position: absolute; left: var(--gutter); bottom: clamp(72px, 13vh, 140px); max-width: 700px; z-index: 10; }
.hero h1 { margin-top: 22px; font-size: clamp(44px, 5.6vw, 84px); line-height: .98; letter-spacing: -0.045em; }
.hero .lead { margin-top: 26px; max-width: 34em; }
.hero .actions { margin-top: 36px; }



/* ── HUD ── */
.hud { position: absolute; z-index: 10; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.hud b { color: var(--ink); font-weight: 500; }
.hud .live { display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 10px var(--accent); animation: blink 2s infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: .35; } }
.hud.tr { top: 92px; right: var(--gutter); text-align: right; line-height: 2; }
.hud.br { bottom: 32px; right: var(--gutter); text-align: right; }
.hud.bl { bottom: 32px; left: var(--gutter); }
.count { font: 500 40px var(--sans); letter-spacing: -0.03em; color: var(--ink); text-transform: none; display: block; line-height: 1; margin-top: 6px; }

/* ── targets ── */
.targets { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.tgt { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .4s; will-change: transform; }
.tgt.on { opacity: 1; }
.tgt .box { position: absolute; width: 26px; height: 26px; left: -13px; top: -13px; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s; transform: scale(2.4); }
.tgt.on .box { transform: scale(1.7); opacity: .5; }
.tgt.id .box { transform: scale(1); opacity: 1; }
.tgt .box::before, .tgt .box::after { content: ''; position: absolute; width: 8px; height: 8px; border: 1.5px solid var(--ink); }
.tgt .box::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.tgt .box::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.tgt .pip { position: absolute; width: 4px; height: 4px; left: -2px; top: -2px; background: var(--ink); }
.tgt .tag { position: absolute; left: 20px; top: -26px; white-space: nowrap; padding: 7px 10px 8px; background: rgba(13,16,19,.78);
  border-left: 1px solid rgba(242,244,245,.35); backdrop-filter: blur(4px); clip-path: inset(0 100% 0 0);
  transition: clip-path .5s .25s cubic-bezier(.2,.8,.2,1); }
.tgt.on .tag.u, .tgt.id .tag.k { clip-path: inset(0 0 0 0); }
.tgt.id .tag.u { display: none; }
.tgt:not(.id) .pip { background: var(--dim); }
.tag.u { background: rgba(13,16,19,.5); border-left-style: dashed; }
.tag.u b { color: var(--muted); font-weight: 400; }
.tag.u span { color: var(--dim); animation: blink 1.4s infinite; }
.tgt.flip .tag { left: auto; right: 20px; border-left: 0; border-right: 1px solid rgba(242,244,245,.35); text-align: right; clip-path: inset(0 0 0 100%); }
.tgt.flip.on .tag.u, .tgt.flip.id .tag.k { clip-path: inset(0 0 0 0); }
.tgt.threat.flip .tag.k { border-right-color: var(--accent); }
.tag b { display: block; font: 500 13px var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.tag i { display: block; margin-top: 2px; font: 400 12px var(--sans); font-style: normal; color: #B7BDC1; }
.tag span { display: block; margin-top: 3px; font: 400 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.tgt.ping .box { animation: reacq .5s; }
.tgt .drop { position: absolute; left: 0; top: 13px; width: 1px; height: calc(var(--drop, 0px) - 13px);
  background: repeating-linear-gradient(180deg, rgba(242,244,245,.5) 0 3px, transparent 3px 7px); }
.tgt .drop::after { content: ''; position: absolute; left: -4px; bottom: -2px; width: 9px; height: 3px; border: 1px solid rgba(242,244,245,.5); border-radius: 50%; }
@keyframes reacq { 40% { transform: scale(1.5); } }

.tgt.threat.id .box::before, .tgt.threat.id .box::after { border-color: var(--accent); }
.tgt.threat.id .pip { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.tgt.threat .tag.k { border-left-color: var(--accent); }
.tgt.threat .tag.k b { color: var(--accent); }
.tgt.threat .tag.k span { color: #B7BDC1; }

.sensor .box { width: 14px; height: 14px; left: -7px; top: -7px; border: 1.5px solid var(--accent); transform: rotate(45deg) !important; }
.sensor .box::before, .sensor .box::after { display: none; }
.sensor .tag { clip-path: none; border-left-color: var(--accent); background: none; backdrop-filter: none; }
.sensor .tag b { font: 500 11px var(--mono); letter-spacing: .14em; color: var(--accent); }

/* ── noise to clarity: what the sensor hears beside what you see ── */
.n2c { display: grid; grid-template-columns: 1fr 1fr; height: 470px; border: 1px solid var(--line); background: var(--bg); }
.n2c > div { position: relative; overflow: hidden; padding: 22px 24px; }
.n2c > div + div { border-left: 1px solid var(--line); }
.n2c .k { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.noise { height: calc(100% - 36px); overflow: hidden; font: 400 12.5px/1.85 var(--mono); color: #3E4448; white-space: nowrap; }
.noise .row { animation: scrollup 14s linear infinite; }
.n2c:not(.visible) .noise .row { animation-play-state: paused; }
@keyframes scrollup { to { transform: translateY(-50%); } }
.noise::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(0deg, var(--bg), transparent); }
.clear { display: grid; gap: 10px; align-content: start; }
.clear .d { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--surface); opacity: 0; transform: translateY(6px); }
.n2c.visible .clear .d { animation: dev 9s var(--ease) infinite; }
.clear .d:nth-child(2) { animation-delay: .5s !important; } .clear .d:nth-child(3) { animation-delay: 1s !important; }
.clear .d:nth-child(4) { animation-delay: 1.5s !important; } .clear .d:nth-child(5) { animation-delay: 2s !important; }
.clear .d:nth-child(6) { animation-delay: 2.5s !important; }
@keyframes dev { 0% { opacity: 0; transform: translateY(6px); } 8%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
.clear .d b { font-weight: 500; font-size: 15px; } .clear .d small { display: block; font: 400 11px var(--mono); color: var(--muted); letter-spacing: .04em; }
.clear .d .st { font: 500 11px var(--mono); color: var(--ink-2); letter-spacing: .06em; text-align: right; }
.clear .d.hot { border-color: rgba(94,230,214,.5); } .clear .d.hot b, .clear .d.hot .st { color: var(--accent); }
.clear .ic { width: 24px; height: 24px; color: var(--ink-2); } .clear .d.hot .ic { color: var(--accent); }

/* ── uses: four photographs ── */
.uses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.use { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.use:hover { transform: translateY(-2px); border-color: var(--line-2); }
.use .photo { aspect-ratio: 4 / 5; }
.use .body { display: grid; gap: 10px; align-content: start; padding: 22px 22px 26px; }
.use .k { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.use p { color: var(--muted); font-size: 15.5px; }

/* ── one picture across every site ── */
.site-map { position: relative; display: grid; grid-template-columns: 1fr 230px; background: var(--bg); border: 1px solid var(--line); }
.site-map .canvas { position: relative; aspect-ratio: 800 / 550; overflow: hidden; }
.site-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.site-map .lbl { font: 500 9px var(--mono); letter-spacing: .12em; fill: var(--dim); text-transform: uppercase; }
.site-map .sensor { fill: var(--bg); stroke: var(--accent); stroke-width: 1.4; }
.site-map .cover { fill: rgba(94,230,214,.05); stroke: rgba(94,230,214,.22); stroke-dasharray: 2 4; }
.site-map .ping { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.site-map.visible .ping { animation: ping 3.2s ease-out infinite; }
@keyframes ping { 0% { opacity: .7; transform: scale(.2); } 100% { opacity: 0; transform: scale(1); } }
.site-map .bldg { fill: #171C21; stroke: rgba(242,244,245,.14); }
.site-map .road { fill: none; stroke: rgba(242,244,245,.07); stroke-width: 16; stroke-linecap: square; }
.site-map .fence { fill: none; stroke: rgba(242,244,245,.22); stroke-dasharray: 6 4; }
.site-map .trail { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 5; opacity: .85; }
.site-map .tgt-dot { fill: var(--accent); }
.site-map .tgt-ring { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.site-map .feed { display: grid; gap: 8px; align-content: start; padding: 16px; border-left: 1px solid var(--line); font: 400 11px/1.5 var(--mono); }
.site-map .feed .k { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 0 0 4px; border: 0; background: none; opacity: 1; }
.site-map .feed div { padding: 8px 10px; background: rgba(13,16,19,.88); border-left: 1px solid var(--line-2); color: var(--muted); opacity: .35; transition: opacity .4s, border-color .4s, color .4s; }
.site-map .feed div.on { opacity: 1; border-left-color: var(--accent); color: var(--ink-2); }
.site-map .feed b { color: var(--ink); font-weight: 500; }
.site-map .legend { position: absolute; left: 16px; bottom: 14px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.site-map .legend b { color: var(--accent); font-weight: 500; }

/* ── how it works: three stages joined by pulses ── */
.flow { display: grid; grid-template-columns: 1fr 64px 1.15fr 64px 1fr; align-items: stretch; }
.flow .stage { display: grid; gap: 14px; align-content: start; padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.flow .stage.core { background: #0F1A1A; border-color: rgba(94,230,214,.35); }
.flow .n { font: 500 11px var(--mono); letter-spacing: .16em; color: var(--dim); }
.flow .stage.core .n { color: var(--accent); }
.flow p { color: var(--muted); font-size: 15.5px; }
.flow .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.flow .chips span { font: 500 11px var(--mono); letter-spacing: .06em; padding: 5px 8px; border: 1px solid var(--line-2); color: var(--ink-2); }
.flow .wire { position: relative; align-self: center; height: 1px; background: var(--line-2); }
.flow .wire::after { content: ''; position: absolute; top: -2px; left: 0; width: 18px; height: 5px; background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0; }
.flow.visible .wire::after { animation: pulse 2.6s var(--ease) infinite; }
.flow .wire.w2::after { animation-delay: 1.3s; }
@keyframes pulse { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 18px); opacity: 0; } }
.flow .mark { width: 44px; height: 44px; }

/* ── two products ── */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product { display: grid; gap: 18px; align-content: start; padding: clamp(28px, 3.5vw, 48px); background: var(--surface); border: 1px solid var(--line); min-height: 400px;
  transition: transform .2s var(--ease), border-color .2s; }
.product:hover { transform: translateY(-2px); border-color: var(--line-2); }
.product h3 { font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.035em; }
.product p { color: var(--muted); max-width: 30em; }
.product ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--ink-2); font-size: 15.5px; }
.product li { display: flex; gap: 12px; }
.product li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 9px; background: var(--accent); }
.product .tlink { margin-top: 8px; }

/* ── close ── */
.close { text-align: center; }
.close h2 { max-width: 16ch; margin: 0 auto; }
.close .lead { margin: 22px auto 0; }
.close .actions { justify-content: center; margin-top: 36px; }

@media (max-width: 1023px) {
  .uses { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow .wire { width: 1px; height: 40px; justify-self: center; }
  .flow .wire::after { display: none; }
  .products { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero::before { background: linear-gradient(0deg, rgba(13,16,19,1) 0%, rgba(13,16,19,.9) 38%, rgba(13,16,19,0) 70%),
    linear-gradient(180deg, rgba(13,16,19,.85) 0%, rgba(13,16,19,0) 18%); }
  .hero .copy { right: var(--gutter); bottom: 64px; }
  .hud.tr { top: 80px; }
  .hud.br, .count { display: none; }
  .hud.bl { bottom: 20px; }
  .tag span, .tag i { display: none; }
  .n2c { grid-template-columns: 1fr; min-height: 0; }
  .n2c > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .n2c { height: auto; }
  .noise { height: 150px; }
  .uses { grid-template-columns: 1fr; }
  .use .photo { aspect-ratio: 16 / 9; }
  .site-map { grid-template-columns: 1fr; }
  .site-map .feed { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .hud .live { animation: none; }
  .clear .d { opacity: 1; transform: none; animation: none !important; }
}

/* the hero's still, when WebGL is blocked or lost: a dotted field with a teal ring round the sensor */
.hero.no-gl #scene { background:
  radial-gradient(closest-side, transparent 92%, rgba(94,230,214,.55) 95%, transparent 99%) 63% 52% / 46vw 30vw no-repeat,
  radial-gradient(rgba(242,244,245,.22) 1.1px, transparent 1.6px) 0 0 / 14px 14px,
  var(--bg);
  -webkit-mask-image: radial-gradient(55% 60% at 66% 52%, #000 35%, transparent 80%);
  mask-image: radial-gradient(55% 60% at 66% 52%, #000 35%, transparent 80%); }
