/* ==========================================================================
   CB NOVA TECH — ILLUSTRATIVE VISUALS
   Markup-drawn panels used by the alternating feature bands.

   Why these are built in CSS rather than shipped as images:
     - Zero bandwidth. A comparable stock photo set would add 1.5–3MB.
     - Perfectly sharp at every DPI with no srcset juggling.
     - They inherit the brand palette, so a rebrand needs no re-export.
     - No licensing risk and no "obvious cheap stock photo" aesthetic.

   All of them are decorative and marked aria-hidden in the templates.
   ========================================================================== */

.cb-vis {
  position: relative;
  /* Contain absolutely-positioned children and prevent any overhang from
     creating horizontal scroll on small screens. */
  isolation: isolate;
}

/* Shared panel shell ------------------------------------------------------ */

.cb-vis__panel {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-xl);
  box-shadow: var(--cb-shadow-xl);
}
.cb-vis.is-dark .cb-vis__panel,
.cb-section--dark .cb-vis__panel {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--cb-border-dark);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.cb-vis__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cb-sp-4);
  padding-bottom: var(--cb-sp-4);
  margin-bottom: var(--cb-sp-5);
  border-bottom: 1px solid var(--cb-line-soft);
}
.cb-vis.is-dark .cb-vis__panel-head,
.cb-section--dark .cb-vis__panel-head { border-bottom-color: var(--cb-border-dark); }

.cb-vis__panel-title {
  font-family: var(--cb-font-display);
  font-size: var(--cb-fs-sm);
  font-weight: var(--cb-fw-bold);
  color: var(--cb-ink);
}
.cb-vis.is-dark .cb-vis__panel-title,
.cb-section--dark .cb-vis__panel-title { color: #fff; }

.cb-vis__tabs { display: flex; gap: 6px; }
.cb-vis__tab {
  width: 26px; height: 5px;
  border-radius: 3px;
  background: var(--cb-mist-deep);
}
.cb-vis__tab.is-active { background: var(--cb-grad-brand); width: 34px; }
.cb-section--dark .cb-vis__tab { background: rgba(255,255,255,0.14); }

.cb-vis__divider {
  height: 1px;
  background: var(--cb-line-soft);
  margin-block: var(--cb-sp-5);
}
.cb-section--dark .cb-vis__divider { background: var(--cb-border-dark); }

/* ==========================================================================
   WEBSITE
   ========================================================================== */

.cb-vis--website { padding-bottom: 56px; padding-right: 40px; }

.cb-vis__browser {
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-lg);
  box-shadow: var(--cb-shadow-xl);
  overflow: hidden;
}
.cb-vis__chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--cb-mist);
  border-bottom: 1px solid var(--cb-border);
}
.cb-vis__dot { width: 8px; height: 8px; border-radius: 50%; background: #cfdcec; }
.cb-vis__addr {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 10px;
  padding: 3px 10px;
  font-size: 10.5px;
  color: var(--cb-ink-faint);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-pill);
  /* Truncate rather than wrap — a wrapped URL breaks the chrome illusion. */
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cb-vis__addr svg { color: var(--cb-success); flex: none; }

.cb-vis__viewport { padding: var(--cb-sp-5); background: var(--cb-white); }

.cb-vis__hero-block {
  display: grid;
  gap: 9px;
  padding: var(--cb-sp-5);
  margin-bottom: var(--cb-sp-4);
  background: var(--cb-grad-hero);
  border-radius: var(--cb-r-md);
}
.cb-vis__line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.20);
}
.cb-vis__line--title { height: 14px; width: 66%; background: rgba(255,255,255,0.62); }
.cb-vis__line--90 { width: 90%; }
.cb-vis__line--80 { width: 80%; }
.cb-vis__line--70 { width: 70%; }
.cb-vis__line--55 { width: 55%; }
.cb-vis__pill {
  display: block;
  width: 96px; height: 26px;
  margin-top: 6px;
  border-radius: var(--cb-r-sm);
  background: var(--cb-grad-brand);
}
.cb-vis__pill--sm { width: 64px; height: 20px; }

.cb-vis__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cb-vis__card {
  display: block;
  height: 54px;
  border-radius: var(--cb-r-sm);
  background: var(--cb-mist);
  border: 1px solid var(--cb-line-soft);
}
.cb-vis__card--tall { height: 76px; }

/* Overlapping phone */
.cb-vis__phone {
  position: absolute;
  right: 0; bottom: 24px;
  width: 116px;
  padding: 8px;
  background: var(--cb-navy-900);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(4,18,43,0.30);
}
.cb-vis__phone-screen {
  display: grid;
  gap: 8px;
  padding: 12px 10px;
  background: var(--cb-white);
  border-radius: 12px;
}
.cb-vis__phone-screen .cb-vis__line { background: var(--cb-mist-deep); }

.cb-vis__badges {
  position: absolute;
  left: 0; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cb-vis__badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  font-size: var(--cb-fs-xs);
  font-weight: var(--cb-fw-semibold);
  color: var(--cb-navy-700);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-pill);
  box-shadow: var(--cb-shadow-md);
}
.cb-vis__badge svg { color: var(--cb-blue-600); flex: none; }

/* The phone overlaps too aggressively on narrow screens — drop it and let
   the browser panel stand alone rather than shrink both into mush. */
@media (max-width: 520px) {
  .cb-vis--website { padding-right: 0; padding-bottom: 48px; }
  .cb-vis__phone { display: none; }
}

/* ==========================================================================
   DATA
   ========================================================================== */

.cb-vis__panel-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--cb-sp-5);
  align-items: end;
}

.cb-vis__bars {
  display: flex;
  align-items: flex-end;
  gap: clamp(6px, 1.4vw, 12px);
  height: 130px;
  min-width: 0;
}
.cb-vis__bar {
  flex: 1;
  min-width: 0;
  height: var(--h, 50%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--cb-blue-500), var(--cb-blue-700));
  /* Grow-from-baseline reveal, staggered per bar. */
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 720ms var(--cb-ease-out);
  transition-delay: var(--d, 0ms);
}
.cb-vis__bar:nth-last-child(-n+2) {
  background: linear-gradient(180deg, var(--cb-cyan-400), var(--cb-blue-600));
}
.is-visible .cb-vis__bar { transform: scaleY(1); }

.cb-vis__donut { width: 96px; flex: none; color: var(--cb-navy-800); }
.cb-section--dark .cb-vis__donut { color: #fff; }
.cb-vis__donut svg { width: 100%; height: auto; }
.cb-vis__donut-arc {
  /* 2πr where r = 38 → ~238.76. Dash pattern shows ~68% of the ring. */
  stroke-dasharray: 238.76;
  stroke-dashoffset: 238.76;
  transition: stroke-dashoffset 1.3s var(--cb-ease-out) 260ms;
}
.is-visible .cb-vis__donut-arc { stroke-dashoffset: 76; }

.cb-vis__panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cb-sp-3) var(--cb-sp-5);
  padding-top: var(--cb-sp-5);
  margin-top: var(--cb-sp-5);
  border-top: 1px solid var(--cb-line-soft);
}
.cb-section--dark .cb-vis__panel-foot { border-top-color: var(--cb-border-dark); }
.cb-vis__foot-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--cb-fs-xs);
  font-weight: var(--cb-fw-medium);
  color: var(--cb-ink-muted);
}
.cb-vis__foot-item svg { color: var(--cb-blue-600); flex: none; }
.cb-section--dark .cb-vis__foot-item { color: var(--cb-on-dark-muted); }
.cb-section--dark .cb-vis__foot-item svg { color: var(--cb-cyan-400); }

@media (max-width: 460px) {
  .cb-vis__panel-body { grid-template-columns: 1fr; }
  .cb-vis__donut { width: 80px; justify-self: center; }
}

/* ==========================================================================
   SECURITY
   ========================================================================== */

.cb-vis--security { display: grid; gap: var(--cb-sp-6); justify-items: center; }

.cb-vis__shield-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(240px, 70vw);
  aspect-ratio: 1;
}
.cb-vis__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(11, 95, 208, 0.18);
}
.cb-vis__ring--2 { inset: 15%; border-color: rgba(23, 184, 224, 0.24); }
.cb-section--dark .cb-vis__ring { border-color: rgba(111, 220, 255, 0.18); }
.cb-section--dark .cb-vis__ring--2 { border-color: rgba(111, 220, 255, 0.28); }

/* One slow pulse. Long enough to read as "alive", never as "distracting". */
@keyframes cb-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.04); opacity: 0.45; }
}
.cb-vis__ring--1 { animation: cb-pulse 5.5s var(--cb-ease) infinite; }
.cb-vis__ring--2 { animation: cb-pulse 5.5s var(--cb-ease) infinite 1.6s; }

.cb-vis__shield {
  display: grid; place-items: center;
  width: 96px; height: 96px;
  color: #fff;
  background: var(--cb-grad-brand);
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(11, 95, 208, 0.36);
}

.cb-vis__layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--cb-sp-3);
  width: 100%;
}
.cb-vis__layer {
  display: inline-flex; align-items: center; gap: var(--cb-sp-3);
  padding: 0.7rem 0.9rem;
  font-size: var(--cb-fs-xs);
  font-weight: var(--cb-fw-semibold);
  color: var(--cb-navy-700);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-md);
  box-shadow: var(--cb-shadow-sm);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms var(--cb-ease-out), transform 520ms var(--cb-ease-out);
  transition-delay: var(--d, 0ms);
}
.is-visible .cb-vis__layer { opacity: 1; transform: none; }
.cb-vis__layer svg { color: var(--cb-blue-600); flex: none; }
.cb-section--dark .cb-vis__layer {
  color: var(--cb-on-dark);
  background: rgba(255,255,255,0.05);
  border-color: var(--cb-border-dark);
  box-shadow: none;
}
.cb-section--dark .cb-vis__layer svg { color: var(--cb-cyan-400); }

/* ==========================================================================
   TRAINING
   ========================================================================== */

.cb-vis__mail {
  display: flex;
  align-items: flex-start;
  gap: var(--cb-sp-4);
  padding: var(--cb-sp-4);
  background: rgba(192, 37, 37, 0.045);
  border: 1px solid rgba(192, 37, 37, 0.20);
  border-radius: var(--cb-r-md);
  min-width: 0;
}
.cb-vis__mail-icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border-radius: var(--cb-r-sm);
}
.cb-vis__mail-icon--warn { color: var(--cb-danger); background: rgba(192, 37, 37, 0.11); }

.cb-vis__mail-body { min-width: 0; flex: 1; }
.cb-vis__mail-from {
  display: block;
  font-family: var(--cb-font-mono);
  font-size: 11px;
  color: var(--cb-danger);
  /* Long spoofed domains must ellipsis, not overflow. */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cb-vis__mail-subject {
  display: block;
  margin-top: 3px;
  font-size: var(--cb-fs-sm);
  font-weight: var(--cb-fw-semibold);
  color: var(--cb-ink);
  line-height: 1.35;
}
.cb-section--dark .cb-vis__mail-subject { color: #fff; }

.cb-vis__flag {
  flex: none;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: var(--cb-fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cb-danger);
  border-radius: var(--cb-r-pill);
}

.cb-vis__checks { display: grid; gap: var(--cb-sp-3); }
.cb-vis__checks li {
  display: flex; align-items: center; gap: var(--cb-sp-3);
  font-size: var(--cb-fs-sm);
  color: var(--cb-ink-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 480ms var(--cb-ease-out), transform 480ms var(--cb-ease-out);
  transition-delay: var(--d, 0ms);
}
.is-visible .cb-vis__checks li { opacity: 1; transform: none; }
.cb-vis__checks svg { color: var(--cb-success); flex: none; }
.cb-section--dark .cb-vis__checks li { color: var(--cb-on-dark-muted); }

/* ==========================================================================
   CONSULTING
   ========================================================================== */

.cb-vis__cycle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--cb-sp-4);
}
.cb-vis__stage {
  display: grid;
  gap: var(--cb-sp-2);
  padding: var(--cb-sp-5);
  background: var(--cb-white);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-r-lg);
  box-shadow: var(--cb-shadow-sm);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 540ms var(--cb-ease-out), transform 540ms var(--cb-ease-out);
  transition-delay: var(--d, 0ms);
}
.is-visible .cb-vis__stage { opacity: 1; transform: none; }
.cb-vis__stage-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  color: var(--cb-blue-600);
  background: linear-gradient(140deg, rgba(11,95,208,0.10), rgba(23,184,224,0.10));
  border-radius: var(--cb-r-md);
  margin-bottom: var(--cb-sp-2);
}
.cb-vis__stage-label {
  font-family: var(--cb-font-display);
  font-size: var(--cb-fs-base);
  font-weight: var(--cb-fw-bold);
  color: var(--cb-ink);
}
.cb-vis__stage-text { font-size: var(--cb-fs-xs); color: var(--cb-ink-muted); line-height: 1.5; }

.cb-section--dark .cb-vis__stage {
  background: rgba(255,255,255,0.05);
  border-color: var(--cb-border-dark);
  box-shadow: none;
}
.cb-section--dark .cb-vis__stage-icon { color: var(--cb-cyan-300); background: rgba(111,220,255,0.10); }
.cb-section--dark .cb-vis__stage-label { color: #fff; }
.cb-section--dark .cb-vis__stage-text { color: var(--cb-on-dark-muted); }

@media (max-width: 400px) {
  .cb-vis__cycle { grid-template-columns: 1fr; }
}

/* ==========================================================================
   GENERIC PLACEHOLDER
   ========================================================================== */

.cb-vis--generic .cb-vis__panel {
  background: var(--cb-mist);
  border-style: dashed;
  box-shadow: none;
  color: var(--cb-ink-faint);
}
