/* Blue scene for the intelligence-engine section */
html[data-scene="blue"] { --bg: #1B2E4F; --fg: #FFFFFF; --fg-muted: #C2DAFF; --line: rgba(255,255,255,.18); }

/* ---------- Bank watch (interactive panel in the platform tour) ---------- */
.tour-panel.bw { gap: 12px; padding: 22px 24px; }
.bw-top, .bw-figure { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bw-figure { align-items: flex-end; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #F1F4F8; }
.seg button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--pf-muted);
  font: 500 12px var(--font); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg button:hover { color: var(--pf-ink); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--pf-ink); box-shadow: 0 1px 2px rgba(20,36,61,.14); }
.seg button:active { transform: scale(.96); }
.bw-bal { display: grid; gap: 2px; }
.bw-bal span { font-size: 12px; color: var(--pf-muted); }
.bw-bal strong { font-size: 28px; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.bw-chart { position: relative; height: 160px; margin-top: 6px; margin-bottom: 18px; cursor: crosshair; touch-action: pan-y; }
.bw-chart svg { width: 100%; height: 100%; overflow: visible; }
.bw-band { fill: rgba(31,157,107,.08); stroke: rgba(31,157,107,.35); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; transition: y .5s var(--ease-out), height .5s var(--ease-out); }
.bw-area { fill: rgba(108,137,183,.08); }
.bw-line { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bw-line.is-drawn { stroke-dasharray: 2400; animation: bw-draw 1.1s var(--ease-out); }
@keyframes bw-draw { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
.bw-cross { stroke: #B9C3D1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .2s; }
.is-hovering .bw-cross { opacity: 1; }
.bw-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--signal); transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 0 0 4px rgba(108,137,183,.16); transition: left .12s linear, top .12s linear, border-color .2s; }
.bw-dot.is-out { border-color: var(--watch); box-shadow: 0 0 0 4px rgba(201,138,46,.2); }
.bw-tip { position: absolute; display: grid; gap: 1px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px)); opacity: 0; transition: opacity .2s, left .12s linear, top .12s linear; }
.is-hovering .bw-tip { opacity: 1; }
.bw-tip span { font-size: 11px; color: #A9B8CF; }
.bw-x { position: absolute; left: 0; right: 0; bottom: -20px; display: flex; justify-content: space-between; font-size: 11px; color: var(--pf-muted); }
.bw-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12px; color: var(--pf-muted); }
.bw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bw-legend i { width: 14px; height: 8px; border-radius: 2px; }
.lg-band { background: rgba(31,157,107,.16); border: 1px dashed rgba(31,157,107,.5); }
.lg-line { background: var(--signal); height: 2px !important; }
.bw-hint { margin-left: auto; }
.alert-row.is-ok { background: #EEF8F3; }
.alert-row.is-ok i { background: var(--ok); box-shadow: 0 0 0 4px rgba(31,157,107,.18); }

/* ---------- Who we serve: expanding industry cards ---------- */
/* The whole section (heading, cards, controls) fits one screen: the card row takes what the rest leaves. */
.industries { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: clamp(96px, 12vh, 120px) 0 clamp(40px, 6vh, 72px); }
.industries > .wrap { width: 100%; }
.ind-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: clamp(24px, 4vh, 40px); }
.ind-head h2 { max-width: 22ch; font-size: clamp(28px, 2.9vw, 42px); }
/* Card sizes are set on the track by js/industries.js; these are the no-JS fallbacks. */
.ind-track { --ind-open: min(880px, 64vw); --ind-closed: 76px; height: clamp(340px, calc(100svh - 400px), 520px); overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
.ind-track::-webkit-scrollbar { display: none; }
.ind-rail { display: flex; gap: 12px; height: 100%; width: max-content; padding-right: 15%; }
.ind-card { --glow: .55; --gx: 25%; position: relative; flex: 0 0 var(--ind-closed); border-radius: 22px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 80% at var(--gx) 15%, rgba(108,137,183,var(--glow)), transparent 60%), linear-gradient(165deg, #243C66, #0E1B2E 85%);
  transition: flex-basis .8s var(--ease-out), transform .35s var(--ease-out); }
/* Same platform blues on every card; only the glow strength and position vary */
.ind-card:nth-child(2) { --glow: .42; --gx: 70%; } .ind-card:nth-child(3) { --glow: .6; --gx: 40%; } .ind-card:nth-child(4) { --glow: .45; --gx: 20%; }
.ind-card:nth-child(5) { --glow: .58; --gx: 65%; } .ind-card:nth-child(6) { --glow: .4; --gx: 35%; } .ind-card:nth-child(7) { --glow: .52; --gx: 75%; } .ind-card:nth-child(8) { --glow: .48; --gx: 30%; }
.ind-card.is-active { flex-basis: var(--ind-open); min-width: min(520px, 80vw); }
.ind-card { scroll-margin-top: 84px; }
.ind-card:not(.is-active):hover { transform: translateY(-2px); }
.ind-media { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 28%; transform: scale(1.06); transition: transform 1.4s var(--ease-out); }
.ind-card.is-active .ind-media { transform: scale(1); }
/* Open card: the portrait photo sits on the right and fades into the navy ground, so the copy on the left never covers a face. */
@media (min-width: 761px) {
  .ind-media { transition: transform 1.4s var(--ease-out), left .6s var(--ease-out); }
  .ind-card.is-active .ind-media { left: 40%; -webkit-mask-image: linear-gradient(to right, transparent, #000 32%); mask-image: linear-gradient(to right, transparent, #000 32%); }
}
.ind-card:not(.is-active):hover .ind-media { transform: scale(1.09); }
/* Blue grade over photographs, and a dark foot so text always reads */
.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(36,60,102,.42); mix-blend-mode: multiply; }
.ind-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,27,46,0) 40%, rgba(14,27,46,.86) 100%); }
.ind-hit { position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; border-radius: inherit; }
.ind-card.is-active .ind-hit { cursor: default; }
.ind-hit:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.ind-label { position: absolute; left: 50%; bottom: 26px; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg);
  font-size: 18px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; transition: opacity .35s; }
.ind-card.is-active .ind-label { opacity: 0; }
.ind-body { position: absolute; left: clamp(22px, 3vw, 40px); right: clamp(22px, 3vw, 40px); bottom: clamp(22px, 3vw, 40px); z-index: 3; max-width: 640px; pointer-events: none;
  color: #fff; opacity: 0; transform: translateY(18px); transition: opacity .4s var(--ease-out), transform .7s var(--ease-out); }
.ind-card.is-active .ind-body { opacity: 1; transform: none; transition-delay: .35s; }
.ind-count { font-size: 13px; color: #B9C9EA; }
.ind-body h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; font-weight: 400; letter-spacing: -.025em; margin: 8px 0 12px; }
.ind-text { color: #D7E0F0; max-width: 46ch; }
.ind-chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ind-chips li { padding: 7px 14px; border-radius: 999px; font-size: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ind-controls { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: clamp(14px, 2.4vh, 24px); }
.ind-dashes { display: flex; gap: 4px; }
.ind-dash { position: relative; width: 30px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.ind-dash::before { content: ""; position: absolute; left: 2px; right: 2px; top: 13px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.5); transition: background-color .3s; }
.ind-dash:hover::before { background: rgba(255,255,255,.75); }
.ind-dash[aria-current="true"]::before { background: #fff; }
.ind-arrows { display: flex; gap: 10px; }
.ind-arrow { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease-out); }
.ind-arrow:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.ind-arrow:active { transform: scale(.94); }
.ind-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Intelligence engine: data-flow diagram on blue ---------- */
.engine { position: relative; overflow: hidden; isolation: isolate; padding: clamp(110px, 16vh, 180px) 0; }
.engine::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 62%, rgba(108,137,183,.45), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(151,180,224,.12), transparent 70%); }
.engine-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: clamp(56px, 9vh, 88px); }
.engine-head h2 { max-width: 16ch; }
.engine-head .lede { margin: 0; max-width: 46ch; }
.flow { position: relative; display: grid; grid-template-columns: 1.1fr .9fr 1.1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-col { position: relative; z-index: 1; display: grid; gap: 16px; }
.node { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .3s var(--ease-out), border-color .3s, background-color .3s; }
.node:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.11); }
.node b { font-weight: 500; font-size: 16px; letter-spacing: -.01em; }
.node span { font-size: 13.5px; line-height: 1.45; color: var(--fg-muted); }
.node.hub { position: relative; justify-items: center; text-align: center; padding: 30px 22px; border-color: rgba(194,218,255,.5);
  background: linear-gradient(160deg, rgba(108,137,183,.42), rgba(27,46,79,.7));
  box-shadow: 0 0 0 8px rgba(108,137,183,.08), 0 0 70px rgba(108,137,183,.5); }
/* The glow breathes by fading a pre-drawn shadow in and out: opacity is cheap, animating box-shadow is not */
.node.hub::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 90px rgba(108,137,183,.65); opacity: 0;
  animation: hub-breathe 4s ease-in-out infinite; pointer-events: none; }
.node.hub img { width: 40px; height: 40px; margin-bottom: 10px; }
@keyframes hub-breathe { 50% { opacity: 1; } }
.node.end { background: #fff; color: var(--ink); border-color: transparent; box-shadow: 0 30px 60px -30px rgba(3,10,24,.7); }
.end-rows { list-style: none; margin: 10px 0 0; padding: 0; }
.end-rows li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid #EEF1F5; font-size: 13.5px; }
.end-rows .st { font-size: 11px; }
.node.end .end-rows span { color: var(--slate); font-size: 13.5px; }
.flow-base { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 1.5; }
.flow-pulse { fill: none; stroke: #C2DAFF; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 7 93; stroke-dashoffset: 100;
  animation: flow-run 2.7s linear infinite; }
@keyframes flow-run { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .flow { grid-template-columns: 1fr; gap: 0; max-width: 560px; margin-inline: auto; }
  .flow-lines { display: none; }
  .flow-col + .flow-col::before { content: ""; display: block; justify-self: center; width: 2px; height: 34px; margin: 6px 0;
    background: linear-gradient(#C2DAFF, rgba(194,218,255,0)); }
}
@media (max-width: 900px) {
  .tour-frame .bw-hint, .tour-frame .bw-legend { display: none; }
  .bw-chart { height: 110px; }
  .engine-head, .ind-head { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .ind-track { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .ind-rail { flex-direction: column; gap: 8px; width: auto; padding-right: 0; }
  .ind-card { flex: 0 0 64px; }
  .ind-card.is-active { flex: 0 0 460px; }
  .ind-label { writing-mode: horizontal-tb; transform: translateY(-50%); left: 20px; top: 50%; bottom: auto; }
  .ind-body h3 { font-size: 30px; }
  .ind-dashes { gap: 2px; min-width: 0; }
  .ind-dash { width: 24px; height: 24px; }
  .ind-dash::before { top: 11px; }
  .ind-chips li { font-size: 13px; padding: 6px 12px; }
  .bw-figure { flex-wrap: wrap; }
  .tour-frame .alert-row { display: none; }
}
