/* ControlStack service map (Overview section of nist-cmmc.html). Connector lines are drawn by controlstack-diagram.js. */
.csd { max-width: 1200px; margin: 0 auto; }
.csd-stage {
  --navy: #6fb1ff; --green: #3fd98a; --purple: #b18cff; --blue: #4d8dff; --orange: #ff9147;
  position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "head head head" "ops ops ops" "identity hub saas" "testing endpoint data";
  column-gap: clamp(20px, 2.6vw, 40px); row-gap: clamp(28px, 3vw, 44px); align-items: start;
  padding: clamp(24px, 2.6vw, 38px) clamp(16px, 2.2vw, 32px) clamp(26px, 2.6vw, 38px);
  border: 1px solid #3f7cc24d; border-radius: 20px; color: #e6eef8; overflow: hidden;
  background:
    radial-gradient(ellipse 42% 38% at 50% 56%, #1f5fd84d, transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 100%, #1c7a4a26, transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, #c2581c1f, transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 30%, #6b3fbf26, transparent 70%),
    linear-gradient(180deg, #071a31 0%, #04111f 100%);
  box-shadow: 0 30px 80px #000a, inset 0 1px 0 #ffffff14;
}
/* Fine grid and slowly drifting light behind everything */
.csd-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(#6fb1ff0d 1px, transparent 1px), linear-gradient(90deg, #6fb1ff0d 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse 75% 70% at 50% 55%, #000 30%, transparent 85%); animation: csd-grid 18s linear infinite; }
.csd-stage::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 56%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from 0deg, transparent, #2f6df01f, transparent 30%, #3fd98a14, transparent 55%, #b18cff17, transparent 80%); filter: blur(40px); transform: translate(-50%, -50%); animation: csd-aurora 30s linear infinite; }
.csd-wires { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

.csd-head { grid-area: head; position: relative; z-index: 1; text-align: center; }
.csd-title { font: 800 clamp(30px, 3.2vw, 46px)/1.05 Exo, Arial, sans-serif; letter-spacing: -1px; color: #fff; }
.csd-title span { background: linear-gradient(90deg, #4d8dff, #6fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.csd-sub { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; font: 600 clamp(13px, 1.3vw, 18px)/1.3 Exo, Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #8cc4ff; }
.csd-sub::before, .csd-sub::after { content: ""; width: clamp(24px, 4vw, 56px); height: 1px; background: linear-gradient(90deg, transparent, #8cc4ff); }
.csd-sub::after { transform: scaleX(-1); }
.csd-eyebrow { margin-bottom: 10px; font: 700 11px/1.2 Exo, Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #6fb1ff; }

/* Overview copy and key benefits, inside the diagram under the title */
.csd-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 2.8vw, 40px); align-items: center; margin-top: clamp(22px, 2.4vw, 32px); text-align: left; }
.csd-intro-copy h2 { font: 700 clamp(22px, 1.9vw, 27px)/1.2 Exo, Arial, sans-serif; color: #fff; }
.csd-intro-copy p { margin-top: 12px; font-size: 15px; line-height: 1.7; color: #c3d5e8; }
.csd-intro-copy strong { color: #fff; }
.csd-benefits { position: relative; padding: 18px 22px; border: 1px solid #6fb1ff33; border-radius: 16px; background: linear-gradient(180deg, #0f2a4ae6, #0a1d36e6); box-shadow: 0 18px 40px #0008, inset 0 1px 0 #ffffff12; overflow: hidden; }
.csd-benefits::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #4d8dff, #3fd98a); box-shadow: 0 0 16px #4d8dff; }
.csd-benefits h3 { font: 700 14px/1.3 Exo, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #8cc4ff; }
.csd-benefits ul { margin: 10px 0 0; padding: 0; list-style: none; }
.csd-benefits li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font: 600 14.5px/1.45 "Open Sans", Arial, sans-serif; color: #eef4fb; }
.csd-benefits li + li { border-top: 1px solid #ffffff12; }
.csd-check { display: inline-grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #3fd98a, #1f9e5c); color: #04111f; box-shadow: 0 0 12px #3fd98a66; }

.csd-card {
  --tone: var(--navy); position: relative; z-index: 1; padding: 18px 20px 20px; border: 1px solid #ffffff1a; border-radius: 16px;
  background: linear-gradient(180deg, #0f2a4ae6, #0a1d36e6); backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px #0008, inset 0 1px 0 #ffffff12; overflow: hidden;
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s ease;
}
.csd-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tone); box-shadow: 0 0 18px var(--tone), 0 0 4px var(--tone); }
.csd-card::after { content: ""; position: absolute; inset: 0 auto auto -40%; width: 40%; height: 3px; background: linear-gradient(90deg, transparent, #fff, transparent); animation: csd-sheen 5s ease-in-out infinite; }
.csd-card[data-tone="green"] { --tone: var(--green); }
.csd-card[data-tone="purple"] { --tone: var(--purple); }
.csd-card[data-tone="blue"] { --tone: var(--blue); }
.csd-card[data-tone="orange"] { --tone: var(--orange); }
.csd-card:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); box-shadow: 0 22px 50px #000a, 0 0 30px color-mix(in srgb, var(--tone) 22%, transparent); }
.csd-card h3 { font: 700 14px/1.3 Exo, Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--tone); }
.csd-ops { grid-area: ops; }
.csd-identity { grid-area: identity; }
.csd-saas { grid-area: saas; }
.csd-testing { grid-area: testing; }
.csd-endpoint { grid-area: endpoint; }
.csd-data { grid-area: data; }
.csd-identity, .csd-saas { align-self: center; }

.csd-ico { display: inline-grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--tone) 14%, #0a1d36); color: var(--tone); transition: transform .3s ease, box-shadow .3s ease; }
.csd-card li:hover .csd-ico, .csd-feature:hover .csd-ico { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 22px color-mix(in srgb, var(--tone) 45%, transparent); }

.csd-ops-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 18px 0 0; padding: 0; list-style: none; }
.csd-ops-list li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 8px; text-align: center; }
.csd-ops-list li + li { border-left: 1px solid #ffffff14; }
.csd-ops-list .csd-ico { margin-bottom: 8px; animation: csd-blink 6s ease-in-out infinite; }
.csd-ops-list li:nth-child(2) .csd-ico { animation-delay: 1s; }
.csd-ops-list li:nth-child(3) .csd-ico { animation-delay: 2s; }
.csd-ops-list li:nth-child(4) .csd-ico { animation-delay: 3s; }
.csd-ops-list li:nth-child(5) .csd-ico { animation-delay: 4s; }
.csd-ops-list li:nth-child(6) .csd-ico { animation-delay: 5s; }
.csd-ops-list strong { font: 600 14.5px/1.3 "Open Sans", Arial, sans-serif; color: #fff; }
.csd-ops-list span:not(.csd-ico) { font-size: 13px; line-height: 1.3; color: #9db6d2; }

.csd-list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.csd-list li { display: flex; align-items: center; gap: 12px; font: 600 14.5px/1.35 "Open Sans", Arial, sans-serif; color: #eef4fb; }
.csd-feature { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.csd-feature > div { flex: 1 1 auto; min-width: 0; }
.csd-feature .csd-ico { width: 50px; height: 50px; border-radius: 14px; }
.csd-feature .csd-ico svg { width: 24px; height: 24px; }
.csd-feature strong { display: block; font: 600 15.5px/1.35 "Open Sans", Arial, sans-serif; color: #fff; }
.csd-feature span:not(.csd-ico) { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: #9db6d2; }
.csd-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.csd-pills li { padding: 4px 10px; border: 1px solid #4d8dff59; border-radius: 999px; background: #4d8dff1f; font: 600 12px/1.3 "Open Sans", Arial, sans-serif; color: #b9d3ff; }

/* Hub */
.csd-hub { --core: clamp(120px, 11vw, 150px); grid-area: hub; position: relative; z-index: 1; display: grid; place-items: center; justify-self: center; align-self: center; width: calc(var(--core) * 1.42); aspect-ratio: 1; }
.csd-orbit, .csd-ping, .csd-hub::before, .csd-hub::after { position: absolute; border-radius: 50%; }
.csd-hub::before { content: ""; inset: -14%; background: radial-gradient(circle, #2f6df040, transparent 65%); animation: csd-breathe 4s ease-in-out infinite; }
.csd-hub::after { content: ""; inset: 9%; border: 1px solid transparent; background: conic-gradient(from 0deg, #6fd0ff, transparent 25%, #4d8dff 50%, transparent 75%, #6fd0ff) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: csd-spin 8s linear infinite reverse; }
.csd-orbit { inset: 0; border: 1.5px dashed #6fb1ff66; animation: csd-spin 40s linear infinite; }
.csd-ping { inset: 0; border: 2px solid #4d8dff; opacity: 0; animation: csd-ping 3.2s ease-out infinite; }
.csd-core {
  position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 10px; width: var(--core); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #6aa0ff, #2457e0 50%, #10328f 100%); color: #fff;
  box-shadow: 0 0 0 1px #9cc2ff66 inset, 0 0 40px #2f6df099, 0 0 90px #2f6df04d; animation: csd-glow 3.2s ease-in-out infinite;
}
.csd-core strong { font: 700 clamp(18px, 1.6vw, 23px)/1 Exo, Arial, sans-serif; text-shadow: 0 2px 12px #0006; }
.csd-globe { width: clamp(32px, 2.8vw, 42px); height: auto; }
.csd-meridian { transform-box: fill-box; transform-origin: center; animation: csd-turn 4s ease-in-out infinite; }

/* Connector lines drawn by script */
.csd-wire { fill: none; stroke-width: 2; stroke-linecap: round; }
.csd-wire.is-dashed { stroke-dasharray: 7 9; animation: csd-flow 1.2s linear infinite; }
.csd-wire.is-solid { stroke-width: 2.4; }
.csd-wire-glow { fill: none; stroke-width: 10; opacity: .12; filter: blur(3px); }
.csd-dot { stroke-width: 2; }
.csd-dot.is-end { fill: #071a31; }
.csd-pulse { opacity: .4; transform-box: fill-box; transform-origin: center; animation: csd-dot-pulse 2.4s ease-out infinite; }
.csd-comet-tail { opacity: .28; }

/* Reveal when scrolled into view (only once the script has armed it) */
.csd-stage.is-armed:not(.is-visible) .csd-card { opacity: 0; transform: translateY(18px); }
.csd-stage.is-armed:not(.is-visible) .csd-wires { opacity: 0; }
.csd-wires { transition: opacity 1s ease .4s; }
.csd-stage.is-visible .csd-identity { transition-delay: .1s; }
.csd-stage.is-visible .csd-saas { transition-delay: .2s; }
.csd-stage.is-visible .csd-testing { transition-delay: .3s; }
.csd-stage.is-visible .csd-endpoint { transition-delay: .4s; }
.csd-stage.is-visible .csd-data { transition-delay: .5s; }

@keyframes csd-flow { to { stroke-dashoffset: -16; } }
@keyframes csd-spin { to { transform: rotate(360deg); } }
@keyframes csd-ping { 0% { transform: scale(.7); opacity: .6; } 100% { transform: scale(1.2); opacity: 0; } }
@keyframes csd-glow { 50% { box-shadow: 0 0 0 1px #9cc2ff80 inset, 0 0 55px #2f6df0bb, 0 0 120px #2f6df066; } }
@keyframes csd-breathe { 50% { transform: scale(1.08); opacity: .7; } }
@keyframes csd-turn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.25); } }
@keyframes csd-dot-pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes csd-sheen { 0%, 55% { left: -40%; } 100% { left: 110%; } }
@keyframes csd-blink { 0%, 12%, 100% { transform: none; box-shadow: none; } 5% { transform: scale(1.12); box-shadow: 0 0 22px #6fb1ff80; } }
@keyframes csd-grid { to { background-position: 36px 36px; } }
@keyframes csd-aurora { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes csd-flow-v { to { background-position: 0 18px; } }

@media (max-width: 1100px) {
  .csd-ops-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .csd-ops-list li:nth-child(4) { border-left: 0; }
  .csd-list li { font-size: 15px; }
}
@media (max-width: 900px) {
  .csd-intro { grid-template-columns: minmax(0, 1fr); }
  .csd-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hub" "ops" "identity" "saas" "endpoint" "testing" "data"; row-gap: 28px; }
  .csd-spine { position: absolute; z-index: 0; top: 0; bottom: 60px; left: 50%; width: 2px; background: repeating-linear-gradient(180deg, #4d8dff 0 9px, transparent 9px 18px); background-size: 2px 18px; box-shadow: 0 0 10px #4d8dff; animation: csd-flow-v 1.2s linear infinite; }
  .csd-hub { --core: 130px; }
  .csd-wires { display: none; }
}
@media (min-width: 901px) { .csd-spine { display: none; } }
@media (max-width: 640px) {
  .csd-card { padding: 18px 18px 20px; }
  .csd-ops-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csd-ops-list li:nth-child(n) { border-left: 0; }
  .csd-ops-list li:nth-child(even) { border-left: 1px solid #ffffff14; }
  .csd-feature { align-items: flex-start; }
  .csd-feature .csd-ico { width: 52px; height: 52px; }
  .csd-card h3 { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .csd-stage, .csd-stage *, .csd-stage::before, .csd-stage::after, .csd-stage *::before, .csd-stage *::after { animation: none !important; }
  .csd-card, .csd-wires { transition: none; }
}
