/* ============================================================
   SPOCS — hero carousel
   ============================================================ */
.hero-slides.cs {
  aspect-ratio: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0e2142 0%, #081629 70%);
  isolation: isolate;
}
.cs:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.cs-viewport { display: grid; position: relative; touch-action: pan-y; }
.cs-slide {
  grid-area: 1 / 1;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.cs-slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; z-index: 1; }

/* visual area */
.cs-visual {
  position: relative;
  aspect-ratio: 600 / 350;
  overflow: hidden;
  border-bottom: 1px solid rgba(200,164,77,0.16);
}
.cs-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cs-slide .cs-svg { transform: scale(1.025); transition: transform 6s ease-out; }
.cs-slide.is-active .cs-svg { transform: scale(1); }

/* optional photo behind the graphic */
.cs-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-slide.has-photo .cs-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,22,41,.82) 0%, rgba(8,22,41,.45) 55%, rgba(8,22,41,.7) 100%);
}
.cs-slide.has-photo .cs-svg { z-index: 2; opacity: .9; }
.cs-slide.has-photo .bg-grid, .cs-slide.has-photo .inset-bg, .cs-slide.has-photo .card { opacity: .55; }

/* caption */
.cs-cap { padding: 20px 26px 6px; display: flex; flex-direction: column; gap: 8px; }
.cs-eye {
  display: block;
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.cs-h {
  font-family: var(--ff-disp); font-weight: 400;
  font-size: clamp(20px, 1.75vw, 26px); line-height: 1.2; color: #ECF1F7; margin: 0;
}
.cs-p { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(236,241,247,0.70); max-width: 60ch; }
.cs-cta { padding: 11px 18px !important; font-size: 14px !important; min-height: 44px; align-self: flex-start; }
.cs-cta-vis { position: absolute; left: 4.6%; bottom: 5%; z-index: 3; }
.cs-cta-cap { display: none !important; }
.cs-slide:not(.is-active) .cs-cta-vis { visibility: hidden; }

.cs-cap > * { opacity: 0; transform: translateY(10px); }
.cs-slide.is-active .cs-cap > * { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.cs-slide.is-active .cs-cap > :nth-child(1) { transition-delay: .15s; }
.cs-slide.is-active .cs-cap > :nth-child(2) { transition-delay: .25s; }
.cs-slide.is-active .cs-cap > :nth-child(3) { transition-delay: .38s; }
.cs-slide.is-active .cs-cap > :nth-child(4) { transition-delay: .5s; }

/* controls */
.cs-ctrl { display: flex; align-items: center; gap: 14px; padding: 10px 18px 14px 26px; margin-top: auto; }
.cs-count { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .14em; color: rgba(236,241,247,0.45); flex: none; min-width: 52px; }
.cs-count b { color: var(--gold); font-weight: 500; }
.cs-dots { display: flex; gap: 6px; flex: 1; min-width: 0; }
.cs-dot {
  flex: 1; height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; position: relative;
}
.cs-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: rgba(255,255,255,0.14); transition: background .2s; }
.cs-dot:hover::before { background: rgba(255,255,255,0.3); }
.cs-fill { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left center; }
.cs-dot:focus-visible { outline: 2px solid var(--gold); outline-offset: -8px; border-radius: 4px; }
.cs-btns { display: flex; gap: 6px; flex: none; }
.cs-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 1px solid rgba(255,255,255,0.16); border-radius: 50%;
  color: rgba(236,241,247,0.8); cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.cs-btn:hover { border-color: var(--gold); color: var(--gold); }
.cs-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cs-btn svg { width: 18px; height: 18px; }
.cs-play .i-play { display: none; }
.cs-play.is-paused .i-play { display: block; }
.cs-play.is-paused .i-pause { display: none; }
.cs-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- SVG styling ---------- */
.cs-svg .bg-grid { stroke: rgba(255,255,255,0.035); stroke-width: 1; fill: none; }
.cs-svg .m-rest { fill: rgba(236,241,247,0.045); stroke: rgba(236,241,247,0.22); stroke-width: .6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cs-svg .m-south { fill: rgba(200,164,77,0.20); stroke: #C8A44D; stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cs-svg .m-south.flat { fill: rgba(200,164,77,0.10); stroke: rgba(200,164,77,0.6); }
.cs-svg .m-south.big { fill: rgba(200,164,77,0.07); stroke-width: 1.4; }
.cs-svg .inset-bg { fill: rgba(4,16,31,0.55); stroke: rgba(200,164,77,0.28); }
.cs-svg .frame { fill: none; stroke: #C8A44D; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; }
.cs-svg .leader { fill: none; stroke: rgba(200,164,77,0.45); stroke-width: .8; stroke-dasharray: 1; }
.cs-svg .link { fill: none; stroke: rgba(200,164,77,0.75); stroke-width: 1.2; stroke-dasharray: 1; }
.cs-svg .link.thin { stroke: rgba(236,241,247,0.28); stroke-width: .9; }
.cs-svg .flow { fill: none; stroke: #2BB8C4; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 2 8; opacity: .8; }
.cs-svg .route { fill: none; stroke: #ECF1F7; stroke-width: 1.5; stroke-dasharray: 1; stroke-linejoin: round; }
.cs-svg .route.solid { stroke: #C8A44D; stroke-width: 2; }
.cs-svg .sk-bg-line { stroke: rgba(255,255,255,0.12); stroke-width: 2; }
.cs-svg .node-dot { fill: #C8A44D; }
.cs-svg .node-ring { fill: none; stroke: rgba(200,164,77,0.55); stroke-width: 1; }
.cs-svg .node.small .node-dot { fill: #2BB8C4; }
.cs-svg .node.small .node-ring { stroke: rgba(43,184,196,0.5); }
.cs-svg .lbl { font-family: var(--ff-body, sans-serif); font-size: 9.5px; letter-spacing: .14em; fill: rgba(236,241,247,0.92); font-weight: 600; paint-order: stroke; stroke: rgba(4,16,31,0.85); stroke-width: 3px; }
.cs-svg .lbl.cap { font-family: var(--ff-mono, monospace); font-size: 9px; letter-spacing: .2em; font-weight: 500; fill: rgba(236,241,247,0.6); stroke: none; }
.cs-svg .lbl.gold { fill: #C8A44D; }
.cs-svg .lbl.step { font-size: 13px; letter-spacing: .01em; font-weight: 500; fill: rgba(236,241,247,0.88); stroke: none; }
.cs-svg .lbl.full { font-size: 12px; letter-spacing: .02em; font-weight: 500; fill: rgba(236,241,247,0.82); stroke: none; }
.cs-svg .lbl.brand { font-family: var(--ff-disp, serif); font-size: 30px; letter-spacing: .3em; font-weight: 400; fill: #ECF1F7; stroke: none; }
.cs-svg .card { fill: rgba(13,32,64,0.75); stroke: rgba(255,255,255,0.10); }
.cs-svg .card.screen { stroke: rgba(43,184,196,0.25); }
.cs-svg .bar { fill: rgba(200,164,77,0.8); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); }
.cs-svg .trend { fill: none; stroke: #C8A44D; stroke-width: 2; stroke-dasharray: 1; stroke-linecap: round; }
.cs-svg .trend.alt { stroke: #2BB8C4; stroke-width: 1.5; }
.cs-svg .wave { fill: none; stroke: #2BB8C4; stroke-width: 2; stroke-dasharray: 1; stroke-linecap: round; }
.cs-svg .wave.alt { stroke: rgba(200,164,77,0.7); stroke-width: 1.4; }
.cs-svg .ring-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 6; }
.cs-svg .ring { fill: none; stroke: #C8A44D; stroke-width: 6; stroke-dasharray: 1; stroke-dashoffset: 1; --to: .28; }
.cs-svg .ring.t { stroke: #2BB8C4; stroke-width: 4; }
.cs-svg .sk { fill: rgba(236,241,247,0.18); }
.cs-svg .sk-bg { fill: rgba(255,255,255,0.08); }
.cs-svg .meter { fill: #C8A44D; transform-box: fill-box; transform-origin: left; transform: scaleX(0); }
.cs-svg .meter.t { fill: #2BB8C4; }
.cs-svg .tl-fill, .cs-svg .vfill { fill: #C8A44D; transform-box: fill-box; transform: scaleX(0); transform-origin: left; }
.cs-svg .vfill { transform: scaleY(0); transform-origin: top; }
.cs-svg .hub { fill: #142a4a; stroke: #C8A44D; stroke-width: 1.4; }
.cs-svg .hub-ring { fill: none; stroke: rgba(200,164,77,0.35); stroke-dasharray: 3 5; transform-box: fill-box; transform-origin: center; }
.cs-svg .hex { fill: none; stroke: rgba(200,164,77,0.28); stroke-width: .8; }
.cs-svg .hex-on { fill: rgba(200,164,77,0.32); stroke: #C8A44D; stroke-width: 1; opacity: 0; }
.cs-svg .dot { fill: rgba(255,255,255,0.14); }
.cs-svg .dot.on { fill: #C8A44D; }
.cs-svg .pulse { fill: none; stroke: #C8A44D; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.cs-svg .fnode { fill: #0b1d36; stroke: #C8A44D; stroke-width: 1.4; }
.cs-svg .ico { fill: none; stroke: #ECF1F7; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cs-svg .faint { opacity: .35; }

/* ---------- animations (only while a slide is active) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cs-slide .fade, .cs-slide .node { opacity: 0; }
  .cs-slide.is-active .fade { animation: csFade .8s ease forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .faint.fade { animation-name: csFadeFaint; }
  .cs-slide.is-active .node { animation: csFade .5s ease forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .node-ring { animation: csRing 2.6s ease-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
  .cs-slide .draw { stroke-dashoffset: 1; }
  .cs-slide.is-active .draw { animation: csDraw 1.2s ease forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .ring.draw { animation-name: csRing2; }
  .cs-slide .m-south { opacity: 0; }
  .cs-slide.is-active .m-south { animation: csFade .9s ease forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .flow { animation: csFlow 3s linear infinite, csFadeIn80 .6s ease forwards; animation-delay: var(--d, 0s); opacity: 0; }
  .cs-slide.is-active .flow.fast { animation-duration: 1.6s, .6s; }
  .cs-slide.is-active .bar { animation: csGrowY .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .meter { animation: csGrowW 1s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .tl-fill { animation: csGrowX 3.2s ease-in-out .5s forwards; }
  .cs-slide.is-active .vfill { animation: csGrowY2 2.4s ease-in-out .4s forwards; }
  .cs-slide.is-active .hex-on { animation: csFade .6s ease forwards; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .pulse { animation: csPulse 2.4s ease-out infinite; animation-delay: var(--d, 0s); }
  .cs-slide.is-active .hub-ring { animation: csSpin 18s linear infinite; }
  .cs-slide .dot { opacity: 0; }
  .cs-slide.is-active .dot { animation: csFade .4s ease forwards; animation-delay: var(--d, 0s); }
  .cs.is-paused .cs-slide.is-active * { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-slide, .cs-slide .cs-svg, .cs-cap > * { transition: none !important; }
  .cs-svg .draw, .cs-svg .frame, .cs-svg .ring { stroke-dashoffset: 0; }
  .cs-svg .ring { stroke-dashoffset: var(--to); }
  .cs-svg .bar, .cs-svg .tl-fill { transform: none; }
  .cs-svg .vfill { transform: none; }
  .cs-svg .meter { transform: scaleX(var(--w)); }
  .cs-svg .hex-on { opacity: 1; }
  .cs-svg .pulse { opacity: .5; }
}
@keyframes csFade { to { opacity: 1; } }
@keyframes csFadeFaint { to { opacity: .35; } }
@keyframes csFadeIn80 { to { opacity: .8; } }
@keyframes csDraw { to { stroke-dashoffset: 0; } }
@keyframes csRing2 { to { stroke-dashoffset: var(--to); } }
@keyframes csFlow { to { stroke-dashoffset: -100; } }
@keyframes csGrowY { to { transform: scaleY(1); } }
@keyframes csGrowY2 { to { transform: scaleY(1); } }
@keyframes csGrowX { to { transform: scaleX(1); } }
@keyframes csGrowW { to { transform: scaleX(var(--w)); } }
@keyframes csRing { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes csPulse { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes csSpin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cs-h { font-size: 24px; }
}
@media (max-width: 420px) {
  .cs-count { display: none; }
}
@media (max-width: 760px) {
  .cs-cta-vis { display: none !important; }
  .cs-cta-cap { display: inline-flex !important; }
  .cs-cap { padding: 16px 18px 4px; }
  .cs-h { font-size: 21px; }
  .cs-p { font-size: 14px; }
  .cs-ctrl { padding: 6px 12px 10px 18px; gap: 10px; }
  .cs-btns { gap: 4px; }
  .cs-svg .lbl { font-size: 13px; }
  .cs-svg .lbl.cap { font-size: 11px; }
  .cs-svg .lbl.full { font-size: 13px; }
}
