/* Bespoke visual stages, photo-telemetry overlays, radial charts, and stack planes. */
.pv-diagram,
.pv-media-stage {
  --pv-canvas: #ffffff;
  --pv-surface: #edf4f9;
  --pv-subtle: #f5f9fc;
  --pv-deck: #e4eff7;
  --pv-border: #9ab3c7;
  --pv-border-soft: #c7d8e6;
  --pv-text: #142b3b;
  --pv-muted: #364b5e;
  --pv-accent: #0f5670;
  --pv-accent-bright: #1b7fa3;
  --pv-accent-bg: #e3f2f8;
  --pv-emerald: #145c42;
  --pv-emerald-bright: #1d8a64;
  --pv-emerald-bg: #e2f4ec;
  --pv-amber: #6e4411;
  --pv-amber-bright: #c47a1c;
  --pv-amber-bg: #faefd9;
  --pv-track: #d5e4ef;

  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--pv-text);
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  line-height: 1.5;
}

html[data-home-theme="dark"] .pv-diagram,
html[data-home-theme="dark"] .pv-media-stage {
  --pv-canvas: #0c1726;
  --pv-surface: #122338;
  --pv-subtle: #09121e;
  --pv-deck: #152a42;
  --pv-border: #486887;
  --pv-border-soft: #274059;
  --pv-text: #f5f8ff;
  --pv-muted: #c4d4e8;
  --pv-accent: #7dd3fc;
  --pv-accent-bright: #38bdf8;
  --pv-accent-bg: #122b42;
  --pv-emerald: #6ee7b7;
  --pv-emerald-bright: #2dd4bf;
  --pv-emerald-bg: #102c27;
  --pv-amber: #f4cf83;
  --pv-amber-bright: #f59e0b;
  --pv-amber-bg: #2b2213;
  --pv-track: #1b3149;
}

.pv-diagram *,
.pv-diagram *::before,
.pv-diagram *::after,
.pv-media-stage *,
.pv-media-stage *::before,
.pv-media-stage *::after {
  box-sizing: border-box;
}

.pv-eyebrow {
  display: inline-block;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pv-accent);
}

/* ==========================================================================
   1. Human Photo + Vector Telemetry Overlay + Rollover Dock (.pv-media-stage)
   ========================================================================== */
.pv-media-stage {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(125, 166, 198, 0.34);
  background: #081321;
  aspect-ratio: 16 / 11;
  isolation: isolate;
  box-shadow: 0 16px 36px rgba(9, 22, 36, 0.16);
}

.pv-media-stage--case {
  margin-top: clamp(16px, 2vw, 24px);
  aspect-ratio: 16 / 10;
}

.pv-media-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  z-index: 1;
  filter: saturate(0.96) contrast(1.03);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.pv-media-photo--horizon {
  inset: 0 0 auto 0;
  height: 70%;
  object-position: center 96%;
}

.pv-media-stage:is(:hover, :focus-within) .pv-media-photo {
  transform: scale(1.04);
}

.pv-media-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 24%, rgba(13, 79, 107, 0.42), transparent 54%),
    linear-gradient(180deg, rgba(7, 17, 30, 0.28) 0%, rgba(7, 17, 30, 0.46) 52%, rgba(7, 17, 30, 0.92) 100%);
}

.pv-vector-hud {
  position: absolute;
  inset: 0 0 32% 0;
  width: 100%;
  height: 68%;
  z-index: 3;
  pointer-events: none;
  display: block;
}

.pv-hud-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pvHudPulse 3.6s ease-in-out infinite;
}

.pv-hud-flow {
  stroke-dasharray: 6 6;
  animation: pvHudDash 14s linear infinite;
}

@keyframes pvHudPulse {
  0%, 100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 0.48;
    transform: scale(1.22);
  }
}

@keyframes pvHudDash {
  to {
    stroke-dashoffset: -120;
  }
}

.pv-media-top-bar {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.pv-hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 19, 33, 0.82);
  border: 1px solid rgba(125, 211, 252, 0.36);
  color: #e8f3ff;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

.pv-hud-pill--emerald {
  border-color: rgba(110, 231, 183, 0.44);
  color: #a7f3d0;
}

.pv-hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.75);
  flex-shrink: 0;
}

/* Cognizant-inspired bottom rollover dock */
.pv-rollover-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 14px 16px 15px;
  background: rgba(8, 19, 33, 0.88);
  backdrop-filter: blur(8px);
  color: #f5f8ff;
  transition: background-color 0.35s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.pv-rollover-dock::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(35deg, #0d4f6b 10%, #1d8ab0 55%, #2dd4bf 96%);
}

.pv-media-stage:is(:hover, :focus-within) .pv-rollover-dock {
  background: rgba(7, 17, 30, 0.95);
}

.pv-dock-kicker {
  display: block;
  margin-bottom: 3px;
  color: #7dd3fc;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pv-dock-title {
  margin: 0;
  color: #f5f8ff;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
}

.pv-dock-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.645, 0.045, 0.355, 1),
    opacity 0.3s ease,
    margin-top 0.3s ease;
  margin-top: 0;
}

.pv-dock-reveal > div {
  overflow: hidden;
}

.pv-media-stage:is(:hover, :focus-within) .pv-dock-reveal {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 8px;
}

.pv-dock-summary {
  margin: 0;
  color: #d4e2f0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.pv-dock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pv-dock-tags li {
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(19, 41, 64, 0.9);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: #e2effb;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.7rem;
  line-height: 1.35;
}

/* Touch devices and narrow viewports always show the dock summary without needing hover */
@media (hover: none), (max-width: 760px) {
  .pv-media-stage {
    aspect-ratio: auto;
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .pv-rollover-dock {
    position: relative;
    margin-top: 150px;
  }

  .pv-dock-reveal {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 7px;
  }
}

/* ==========================================================================
   2. Pricing: Concentric Radial Allocation & Seat Scaling Chart (.pv-radial)
   ========================================================================== */
.pv-radial {
  padding: 20px 22px;
  border-top: 2px solid var(--pv-border);
  border-bottom: 1px solid var(--pv-border);
  background: linear-gradient(180deg, var(--pv-subtle) 0%, var(--pv-canvas) 100%);
  display: grid;
  gap: 16px;
}

.pv-radial-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.pv-radial-body {
  display: grid;
  grid-template-columns: minmax(175px, 215px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.pv-radial-svg {
  display: block;
  width: 100%;
  max-width: 215px;
  height: auto;
  margin: 0 auto;
}

.pv-radial-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.pv-radial-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.pv-radial-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  background: var(--pv-accent-bright);
}

.pv-radial-swatch--emerald {
  background: var(--pv-emerald-bright);
}

.pv-radial-swatch--sky {
  background: #0284c7;
}

html[data-home-theme="dark"] .pv-radial-swatch--sky {
  background: #7dd3fc;
}

.pv-radial-swatch--amber {
  background: var(--pv-amber-bright);
}

.pv-radial-label {
  display: block;
  font-size: 0.87rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--pv-text);
}

.pv-radial-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--pv-muted);
}

.pv-radial-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--pv-border-soft);
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.75rem;
  color: var(--pv-muted);
}

/* ==========================================================================
   3. Financial Services: Triangulated Lineage Mesh & Tie-Out Chart (.pv-fin-mesh)
   ========================================================================== */
.pv-fin-mesh {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--pv-border);
  background: #0b1727;
  color: #f5f8ff;
  box-shadow: 0 14px 32px rgba(9, 22, 36, 0.14);
}

.pv-fin-mesh-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 13px 18px 10px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.16);
  background: rgba(13, 28, 47, 0.92);
}

.pv-fin-mesh-head .pv-eyebrow {
  color: #7dd3fc;
}

.pv-fin-mesh-svg {
  display: block;
  width: 100%;
  height: auto;
}

.pv-fin-mesh-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(125, 211, 252, 0.16);
  background: rgba(9, 20, 34, 0.95);
}

.pv-fin-metric strong {
  display: block;
  font-size: 0.8rem;
  color: #f5f8ff;
  margin-bottom: 2px;
}

.pv-fin-metric span {
  display: block;
  font-size: 0.74rem;
  line-height: 1.35;
  color: #c4d4e8;
}

/* ==========================================================================
   4. Software Companies: Architectural 3-Plane Stack Graph (.pv-stack-iso)
   ========================================================================== */
.pv-stack-iso {
  position: relative;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--pv-border);
  background:
    radial-gradient(circle at 88% 12%, rgba(27, 127, 163, 0.12), transparent 48%),
    linear-gradient(180deg, var(--pv-subtle) 0%, var(--pv-canvas) 100%);
  overflow: hidden;
}

.pv-stack-spine {
  position: relative;
  display: grid;
  gap: 18px;
}

.pv-stack-spine::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 24px;
  width: 2px;
  background: linear-gradient(180deg, var(--pv-accent-bright), var(--pv-emerald-bright));
  opacity: 0.55;
}

.pv-stack-plane {
  position: relative;
  padding: 14px 16px 14px 48px;
  border-radius: 6px;
  border: 1px solid var(--pv-border-soft);
  background: linear-gradient(135deg, var(--pv-canvas) 0%, var(--pv-deck) 100%);
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.06);
}

.pv-stack-node {
  position: absolute;
  left: 15px;
  top: 18px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pv-accent-bg);
  border: 2px solid var(--pv-accent-bright);
  box-shadow: 0 0 0 4px var(--pv-canvas);
}

.pv-stack-plane:nth-child(2) .pv-stack-node {
  border-color: #0284c7;
}

.pv-stack-plane:nth-child(3) .pv-stack-node {
  background: var(--pv-emerald-bg);
  border-color: var(--pv-emerald-bright);
}

.pv-stack-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.pv-stack-head h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--pv-text);
}

.pv-ops-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pv-ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--pv-border-soft);
  border-radius: 999px;
  background: var(--pv-canvas);
  color: var(--pv-text);
  font-size: 0.79rem;
  font-weight: 600;
}

/* Platform SVGs contain dark wordmarks (e.g. AWS #252f3e), so tile stays crisp white in both themes. */
.pv-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d5dfe8;
  flex-shrink: 0;
}

.pv-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Container & mobile reflow */
@container (max-width: 480px) {
  .pv-radial-body,
  .pv-fin-mesh-legend {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .pv-radial,
  .pv-stack-iso {
    padding: 16px;
  }

  .pv-radial-body,
  .pv-fin-mesh-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv-stack-plane {
    padding-left: 42px;
  }
}

/* Reduced motion safety */
@media (prefers-reduced-motion: reduce) {
  .pv-media-photo,
  .pv-rollover-dock,
  .pv-dock-reveal {
    transition: none !important;
  }

  .pv-media-stage:is(:hover, :focus-within) .pv-media-photo {
    transform: none !important;
  }

  .pv-hud-pulse,
  .pv-hud-flow {
    animation: none !important;
  }
}
