/* hero.css - the synoptic hero scene for the water demos: an SVG site drawing with live pins.
   Brand tokens come from engine/engine.css (:root --bq-*). No ad-hoc colours. */
.nb-hero { position: relative; display: flex; justify-content: center; padding-top: 22px; background: var(--bq-panel); border: 1px solid var(--bq-border); border-radius: 14px; overflow: hidden; }
.hero-stage { position: relative; container-type: inline-size; width: 100%; max-width: 880px; }
.nb-hero svg { display: block; width: 100%; height: auto; }
.nb-hero .hero-tag { position: absolute; left: 12px; top: 10px; font-size: clamp(9px, 1.6cqw, 12px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bq-orange); background: var(--bq-bg); border: 1px solid var(--bq-border); border-radius: 999px; padding: 3px 10px; }
.nb-hero .hero-sim { position: absolute; right: 12px; top: 10px; font-size: clamp(9px, 1.5cqw, 11px); color: var(--bq-muted); background: var(--bq-bg); border: 1px solid var(--bq-border); border-radius: 999px; padding: 3px 10px; }

.hero-ground { fill: var(--bq-elevated); }
.hero-line { stroke: var(--bq-border); stroke-width: 2; fill: none; }
.hero-bldg { fill: var(--bq-elevated); stroke: var(--bq-border); stroke-width: 2; }
.hero-win { fill: var(--bq-border); }
.hero-label { fill: var(--bq-muted); font-size: 13px; font-family: var(--bq-font); }
.hero-water { fill: var(--bq-info); fill-opacity: .55; }
.hero-body { fill: var(--bq-bg); stroke: var(--bq-muted); stroke-width: 3; }
.hero-pipe { fill: none; stroke: var(--bq-border); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.hero-flow { fill: none; stroke: var(--bq-info); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10 12; animation: heroflow var(--dur, 2s) linear infinite; opacity: .9; }
.hero-flow.idle { animation-play-state: paused; opacity: .25; }
@keyframes heroflow { to { stroke-dashoffset: -44; } }
.hero-pump { fill: var(--bq-elevated); stroke: var(--bq-muted); stroke-width: 3; }
.hero-pump-rotor { fill: none; stroke: var(--bq-orange); stroke-width: 4; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: herospin 1.2s linear infinite; }
.hero-pump.off .hero-pump-rotor { animation-play-state: paused; stroke: var(--bq-faint); }
@keyframes herospin { to { transform: rotate(360deg); } }
.hero-drip { fill: var(--bq-info); opacity: 0; }
.hero-leak .hero-drip, .hero-spill .hero-drip { opacity: .9; animation: herodrip 1.1s ease-in infinite; }
.hero-leak .hero-drip:nth-child(2), .hero-spill .hero-drip:nth-child(2) { animation-delay: .35s; }
.hero-leak .hero-drip:nth-child(3), .hero-spill .hero-drip:nth-child(3) { animation-delay: .7s; }
@keyframes herodrip { 0% { transform: translateY(0); opacity: .9; } 100% { transform: translateY(34px); opacity: 0; } }
.hero-tank.st-warning .hero-body, .hero-zone.st-warning .hero-body { stroke: var(--bq-warning); }
.hero-tank.st-critical .hero-body, .hero-zone.st-critical .hero-body { stroke: var(--bq-critical); animation: heropulse 1s ease-in-out infinite; }
@keyframes heropulse { 50% { stroke-opacity: .35; } }

.hero-pin { position: absolute; transform: translate(-50%, -50%); min-width: 0; text-align: center; background: rgba(13, 27, 42, .88); border: 1px solid var(--bq-border); border-left: 3px solid var(--bq-ok); border-radius: 8px; padding: .4cqw 1cqw; font-size: clamp(8px, 1.5cqw, 12px); line-height: 1.25; pointer-events: none; white-space: nowrap; }
.hero-pin .pn { display: block; color: var(--bq-muted); font-weight: 600; }
.hero-pin .pv { font-size: clamp(11px, 2.4cqw, 19px); font-weight: 700; color: var(--bq-text); font-variant-numeric: tabular-nums; }
.hero-pin .pu { font-size: clamp(8px, 1.4cqw, 11px); color: var(--bq-muted); margin-left: 3px; font-style: normal; }
.hero-pin .ps { display: block; color: var(--bq-faint); font-size: clamp(7px, 1.25cqw, 10px); }
.hero-pin.st-warning { border-left-color: var(--bq-warning); }
.hero-pin.st-critical { border-left-color: var(--bq-critical); background: rgba(229, 72, 77, .22); }
.hero-pin.st-critical::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--bq-critical); border-radius: 10px; animation: heroring 1.2s ease-out infinite; }
@keyframes heroring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
.hero-bubble { fill: var(--bq-ok); fill-opacity: .55; animation: herobub var(--bdur, 2.4s) ease-in infinite; }
@keyframes herobub { 0% { transform: translateY(0); opacity: .7; } 100% { transform: translateY(-46px); opacity: 0; } }
.hero-dose { fill: var(--bq-orange); }
@media (prefers-reduced-motion: reduce) { .hero-flow, .hero-pump-rotor, .hero-bubble, .hero-drip { animation: none !important; } }
@container (max-width: 480px) { .hero-pin .ps { display: none; } .hero-pin .pn { font-size: 7px; } }
