/* Cyber Dome page (prefix cd-)
   Sizes follow the 1920 comp: clamp(min, designPx / 19.2 vw, designPx).
   1. (shared parts: product.css)   2. Glass dome   3. Steps layout
   4. Dome Cloud tree       5. Benefits            6. Managed Services
   7. Responsive */

/* 2. Hero + glass dome ---------------------------------------------------- */
.cd-top {
  position: relative;
  /* tall enough to hold the dome artwork at any width (top + height in vw),
     so it can never run out of its section */
  min-height: 104.48vw;
  background: var(--bg-hero);
}
.cd-top::after {
  /* melt the dome reflection into the page background */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12vw;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.art--dome {
  /* always full-width (scales with the screen); .cd-top grows with it */
  top: 25.83vw;              /* 496 */
  left: 7.92vw;              /* 152 */
  width: 91.93vw;            /* 1765 */
  aspect-ratio: 1765 / 1510;
  background-image: url("../img/cyber-dome/dome.png");
  background-image: image-set(
    url("../img/cyber-dome/dome.webp") type("image/webp"),
    url("../img/cyber-dome/dome.png") type("image/png")
  );
  /* soft bottom edge: the reflection fades out instead of being cut */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 97%);
}

/* 3. Cyber Dome steps -------------------------------------------------------- */
.cd-intro {
  position: relative;
  z-index: 2;
  padding: clamp(5rem, 19.69vw, 378px) 0 clamp(4rem, 25.52vw, 490px);
}
.cd-intro .container-xxl {
  width: auto;      /* Bootstrap sets 100%, which overflows next to the left margin */
  max-width: none;
  padding-inline: 0 var(--pad-x);
  margin-left: 8.54vw;       /* 164 */
}
/* 4. Dome Cloud tree --------------------------------------------------------- */
.cd-cloud {
  position: relative;
  padding-top: clamp(2.5rem, 7.24vw, 139px);
  text-align: center;
}
.art--dots {
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1920 / 1422;
  background-image: url("../img/cyber-dome/dots.jpg");
  background-image: image-set(
    url("../img/cyber-dome/dots.webp") type("image/webp"),
    url("../img/cyber-dome/dots.jpg") type("image/jpeg")
  );
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 80%, transparent 100%);
}
.cd-cloud__head {
  position: relative;
  z-index: 1;
}
.cd-cloud__sphere {
  position: relative;
  width: clamp(150px, 17.19vw, 330px);
  aspect-ratio: 1;
  margin: 0 auto;
}
.cd-cloud__sphere::before {
  /* green halo behind the orb */
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(91, 232, 76, 0.45), rgba(91, 232, 76, 0.12) 60%, transparent 100%);
  animation: orb-glow 5s ease-in-out infinite;
}
.cd-cloud__orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #031503 center / cover no-repeat;
  background-image: url("../img/cyber-dome/sphere.jpg");
  background-image: image-set(
    url("../img/cyber-dome/sphere.webp") type("image/webp"),
    url("../img/cyber-dome/sphere.jpg") type("image/jpeg")
  );
  box-shadow: 0 0 40px rgba(91, 232, 76, 0.35);
  animation: orb-float 6s ease-in-out infinite;
}
@keyframes orb-glow {
  0%, 100% { opacity: 0.75; transform: scale(0.97); }
  50%      { opacity: 1;    transform: scale(1.03); }
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.cd-cloud__title {
  margin: clamp(1.5rem, 3.39vw, 65px) 0 0;
  line-height: 1;
}
.cd-cloud__name {
  display: block;
  font-size: clamp(1.5rem, 2.4vw, 2.875rem);       /* 46 */
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.06em;
  color: var(--green);
  text-transform: uppercase;
}
.cd-cloud__sub {
  display: block;
  margin-top: clamp(2px, 0.36vw, 7px);
  font-size: clamp(1rem, 1.46vw, 1.75rem);         /* 28 */
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--green-soft);
  text-transform: uppercase;
}

/* Tree: the canvas is the comp's 1920 x 570 box; 1cqw = 19.2 design px */
.cd-tree {
  position: relative;
  z-index: 1;
  max-width: 1920px;
  margin: clamp(2.75rem, 5.05vw, 97px) auto 0;
}
.cd-tree__inner {
  container-type: inline-size;
}
.cd-tree__canvas {
  position: relative;
  height: 29.69cqw;
}
.cd-tree__stem {
  position: absolute;
  left: 50%;
  top: -4.01cqw;
  height: 4.01cqw;
  border-left: 2px dashed var(--green);
  transform: translateX(-1px);
}
.cd-tree__frame {
  position: absolute;
  left: 5.625cqw;
  top: 0;
  width: 88.7cqw;
  height: 24.17cqw;
  border: 2px dashed var(--green);
  border-radius: 1.56cqw;
  /* as in the comp, the bottom line stops at the vendor row (comp x 458–1462)
     instead of running between those cards */
  -webkit-mask-image:
    linear-gradient(to bottom, #000 calc(100% - 6px), transparent calc(100% - 6px)),
    linear-gradient(90deg, #000 20.55%, transparent 20.55%, transparent 79.5%, #000 79.5%);
          mask-image:
    linear-gradient(to bottom, #000 calc(100% - 6px), transparent calc(100% - 6px)),
    linear-gradient(90deg, #000 20.55%, transparent 20.55%, transparent 79.5%, #000 79.5%);
}
.cd-tree__group {
  position: absolute;
  top: 2.55cqw;
  font-size: max(0.89cqw, 8px);   /* 17 */
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: var(--green-soft);
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}
.cd-tree__group--deception { left: 14.32cqw; }
/* bracket = left arm | label | right arm, so the gap always fits the label */
.cd-tree__bracket {
  position: absolute;
  left: 28.54cqw;
  top: 3.23cqw;
  width: 28.23cqw;
  height: 2.08cqw;
  display: flex;
  align-items: flex-start;
}
.cd-tree__bracket::before,
.cd-tree__bracket::after {
  content: "";
  flex: 1 1 0;
  height: 100%;
  border-top: 2px solid var(--green);
}
.cd-tree__bracket::before {
  border-left: 2px solid var(--green);
  border-top-left-radius: 0.63cqw;
}
.cd-tree__bracket::after {
  border-right: 2px solid var(--green);
  border-top-right-radius: 0.63cqw;
}
.cd-tree__group--drp {
  position: static;
  flex: 0 0 auto;
  padding: 0 0.55cqw;
  transform: translateY(-50%);
  margin-top: 1px;
}

.cd-tree__row {
  position: absolute;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cd-tree__row--top {
  left: 8.125cqw;
  top: 5.31cqw;
  width: 83.7cqw;
  height: 12.24cqw;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.84cqw;
}
.cd-tree__row--bottom {
  left: 23.85cqw;
  top: 19.64cqw;
  width: 52.29cqw;
  height: 10.05cqw;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.93cqw;
}

.cd-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.97cqw;
  border: 2px solid var(--green);
  border-radius: 1.46cqw;
  background: rgba(3, 5, 3, 0.55);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.cd-node:hover {
  border-color: var(--green-light);
  background-color: rgba(10, 28, 9, 0.75);
  box-shadow: 0 0 0 1px var(--green-glow), 0 0 28px rgba(91, 232, 76, 0.22);
}
.cd-node__icon,
.cd-node__logo {
  display: block;
  height: 2.92cqw;
  width: auto;
  max-width: 85%;
  object-fit: contain;
  transition: transform 0.35s var(--ease);
}
.cd-node:hover .cd-node__icon,
.cd-node:hover .cd-node__logo {
  transform: scale(1.08);
}
.cd-node__logo--dceye {
  width: 8.07cqw;
  height: 2.92cqw;
}
.cd-node__label {
  margin-top: 2.34cqw;
  font-size: max(0.99cqw, 8px);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: 0.08em;
  color: var(--green-soft);
  text-transform: uppercase;
}

.cd-node--vendor {
  padding-top: 2.55cqw;
}
.cd-node--vendor .cd-node__logo {
  height: 3.65cqw;
  max-width: 90%;
}
.cd-node__logo--crowdstrike { width: 9.01cqw; }
.cd-node__logo--vectra      { width: 6.61cqw; }
.cd-node__logo--siem        { width: 2.81cqw; }
.cd-node--vendor .cd-node__label {
  margin-top: 0.31cqw;
  font-size: max(1.15cqw, 9px);
}

/* 5. Benefits ------------------------------------------------------------------- */
.cd-benefits {
  position: relative;
  z-index: 1;
  padding-top: clamp(3.5rem, 9.58vw, 184px);
  text-align: center;
}
.cd-benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.14vw, 41px);
  max-width: calc(1680px + var(--pad-x) * 2);
  margin: clamp(2rem, 2.86vw, 55px) auto 0;
  padding-inline: var(--pad-x);
}
.cd-benefits .container-xxl {
  max-width: none;
  padding-inline: 0;
}
/* 6. Managed Services ---------------------------------------------------------- */
.cd-managed {
  position: relative;
  padding: clamp(4rem, 11.35vw, 218px) 0 clamp(4rem, 10.99vw, 211px);
}
.art--network {
  top: -2.24vw;
  right: -0.2vw;
  width: 84.38vw;             /* 1620 */
  aspect-ratio: 1620 / 997;
  background-image: url("../img/cyber-dome/network.png");
  background-image: image-set(
    url("../img/cyber-dome/network.webp") type("image/webp"),
    url("../img/cyber-dome/network.png") type("image/png")
  );
}
.cd-managed .container-xxl {
  position: relative;
  z-index: 1;
  max-width: calc(1700px + var(--pad-x) * 2);
}
.cd-managed__head {
  padding-left: 2.81vw;       /* 164 - 110 */
}
.cd-managed__eyebrow {
  margin: 0;
  font-size: clamp(0.8125rem, 1.09vw, 1.3125rem);     /* 21 */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.2em;
  color: var(--green);
  text-transform: uppercase;
}
.cd-managed__title {
  margin: clamp(0.75rem, 1.56vw, 30px) 0 0;
  font-size: var(--fs-pr-title);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-transform: uppercase;
}
.cd-managed__title span {
  display: block;
}
.cd-managed__lead {
  margin: clamp(0.5rem, 0.94vw, 18px) 0 0;
  font-size: clamp(1rem, 1.46vw, 1.75rem);            /* 28 */
  font-weight: 400;
  color: var(--ink);
}

.cd-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.92vw, 56px);
  align-items: start;
  margin-top: clamp(2.5rem, 9.06vw, 174px);
}
.cd-services__col {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.82vw, 35px);
}
.cd-scard {
  padding: clamp(1.25rem, 2.03vw, 39px) clamp(1rem, 1.25vw, 24px) clamp(1rem, 1.15vw, 22px) clamp(1rem, 2.08vw, 40px);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-card);
  background: rgba(3, 5, 3, 0.78);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.cd-scard:hover {
  border-color: var(--green-light);
  box-shadow: 0 0 0 1px var(--green-glow), 0 18px 48px rgba(91, 232, 76, 0.12);
}
.cd-scard__title {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.47vw, 9px);
  margin: 0;
  font-size: clamp(0.9375rem, 1.04vw, 1.25rem);       /* 20 */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--green);
  text-transform: uppercase;
}
.cd-scard__title img {
  flex: 0 0 auto;
  width: clamp(44px, 2.86vw, 55px);
  height: clamp(30px, 2.08vw, 40px);
  object-fit: contain;
  transition: transform 0.35s var(--ease);
}
.cd-scard:hover .cd-scard__title img {
  transform: scale(1.1);
}
.cd-scard__list {
  margin: clamp(0.75rem, 0.94vw, 18px) 0 0;
  padding: 0;
  list-style: none;
}
.cd-scard__list li {
  position: relative;
  padding: clamp(6px, 0.5vw, 9.5px) 0 clamp(6px, 0.5vw, 9.5px) clamp(1.75rem, 1.51vw, 29px);
  margin-left: clamp(0px, 0.26vw, 5px);
  font-size: clamp(0.875rem, 0.99vw, 1.1875rem);      /* 19 */
  font-weight: 400;
  line-height: 1.12;
  color: var(--ink);
}
.cd-scard__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: clamp(16px, 1.09vw, 21px);
  aspect-ratio: 1;
  background: url("../img/icons/list-bullet-eye.png") center / contain no-repeat;
  background-image: image-set(
    url("../img/icons/list-bullet-eye.webp") type("image/webp"),
    url("../img/icons/list-bullet-eye.png") type("image/png")
  );
  transform: translateY(-50%);
}
.cd-scard__list li.is-hl {
  color: var(--green);
}

/* 7. Responsive ----------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .cd-benefits__grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 860px;
    row-gap: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  .art--dome {
    background-image: image-set(
      url("../img/cyber-dome/dome-1280.webp") type("image/webp"),
      url("../img/cyber-dome/dome.png") type("image/png")
    );
  }
  .art--dots {
    background-image: image-set(
      url("../img/cyber-dome/dots-1280.webp") type("image/webp"),
      url("../img/cyber-dome/dots.jpg") type("image/jpeg")
    );
  }
  .art--network {
    background-image: image-set(
      url("../img/cyber-dome/network-1200.webp") type("image/webp"),
      url("../img/cyber-dome/network.png") type("image/png")
    );
    opacity: 0.6;
  }

  /* services: 2 balanced columns (cards keep their order) */
  .cd-services {
    display: block;
    columns: 2;
    column-gap: 1rem;
  }
  .cd-services__col {
    display: contents;
  }
  .cd-scard {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

@media (max-width: 767.98px) {
  /* Phones: hero → glass dome (centred on the sphere) → "CYBER DOME" → steps.
     The intro wrappers become display:contents so the title and the steps
     can sit on either side of the artwork. */
  .cd-top {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .cd-top > .pr-hero { order: 1; }
  .cd-intro,
  .cd-intro .container-xxl {
    display: contents;
  }
  .cd-intro .pr-title {
    order: 3;
    position: relative;
    z-index: 2;
    padding: 0.5rem var(--pad-x) 0;
  }
  .art--dome {
    position: relative;
    order: 2;
    top: auto;
    width: 150%;
    left: calc(50% - 150% * 0.645);
    margin-top: 1.5rem;
    /* drop the empty top ~20% of the artwork so the dome sits close to the hero */
    aspect-ratio: 1765 / 1210;
    background-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 75%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 75%, transparent 100%);
  }
  .cd-intro .pr-steps {
    order: 4;
    position: relative;
    z-index: 2;
    margin: 1rem 0 0;
    padding: 0 var(--pad-x) 2.5rem;
  }

  /* Tree: identical layout, scaled to fit. The empty margin outside the
     dashed frame (comp x 0-100 and 1820-1920) is cropped so the cards get
     as much width as possible. */
  .cd-tree {
    overflow-x: clip;       /* crop the empty sides only — */
    overflow-y: visible;    /* floating / animating parts never get cut top or bottom */
    padding-top: 26px;
    margin-top: calc(clamp(2.75rem, 5.05vw, 97px) - 26px);
  }
  .cd-tree__inner {
    width: calc(100% * 1920 / 1720);
    margin-left: calc(-100% * 100 / 1720);
  }
  .cd-tree__stem {
    top: -26px;
    height: 26px;
  }
  .cd-tree__group {
    font-size: max(0.89cqw, 7px);
    letter-spacing: 0.04em;
  }
  .cd-node__label {
    font-size: max(0.99cqw, 7.5px);
    letter-spacing: 0.04em;
  }
  .cd-node--vendor .cd-node__label {
    font-size: max(1.15cqw, 8px);
  }
  .cd-node {
    border-width: 1px;
  }
  .cd-tree__frame,
  .cd-tree__stem {
    border-width: 1px;
  }
  .cd-tree__bracket::before,
  .cd-tree__bracket::after {
    border-width: 1px;
  }
  .cd-node__label {
    padding-inline: 2px;
  }

  .art--network {
    top: 0;
    width: 140%;
    right: -40%;
    opacity: 0.45;
  }
  .cd-managed__head {
    padding-left: 0;
  }
  .cd-services {
    columns: 1;
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 575.98px) {
  .cd-benefits__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cd-cloud__orb,
  .cd-cloud__sphere::before {
    animation: none;
  }
}

/* Short desktop screens: hero (product.css) + steps pulled up by 26.3vw; the
   dome artwork moves up by the same amount so text and art stay aligned, and
   the dome-reflection gap below the steps is ~40% shorter. */
@media (min-width: 992px) and (max-height: 920px) {
  .cd-intro {
    padding: max(4rem, 7.29vw) 0 max(4rem, 15.63vw); /* 378 -> 140, 490 -> 300 */
  }
  .art--dome {
    top: -0.47vw;                                     /* 25.83vw - 26.3vw */
  }
  .cd-top {
    min-height: 78.18vw;                              /* 104.48vw - 26.3vw */
  }
}
