/* Home: enterprise integration hub, after Dilara's mockups (design/reference). */

/* the band: near black, a beam of light from the top right, a pool of blue light on the floor under the hub */

.teo-website-integration {
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, var(--teo-website-background) 0, #00040e 180px, #00040e calc(100% - 180px), var(--teo-website-background) 100%);
}

.teo-website-integration::before, .teo-website-integration::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.teo-website-integration::before {
  inset: 0;
  background:
    radial-gradient(ellipse 34% 44% at 100% 8%, rgba(52, 140, 250, 0.7), rgba(19, 90, 220, 0.26) 55%, transparent 80%),
    radial-gradient(ellipse 46% 30% at 68% 8%, rgba(0, 24, 70, 0.7), transparent 75%),
    radial-gradient(ellipse 20% 42% at 100% 66%, rgba(10, 84, 214, 0.42), transparent 75%),
    radial-gradient(ellipse 50% 34% at 69% 72%, rgba(10, 70, 190, 0.55), rgba(2, 29, 74, 0.4) 52%, transparent 80%),
    radial-gradient(ellipse 34% 14% at 70% 92%, rgba(16, 80, 200, 0.28), transparent 75%),
    linear-gradient(180deg, transparent 55%, rgba(2, 18, 48, 0.55) 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
}

/* the beam itself: a soft streak falling from the top right corner down to the left */
.teo-website-integration::after {
  top: -4%;
  right: -8%;
  width: 26%;
  height: 78%;
  background: linear-gradient(90deg, transparent 0, rgba(40, 130, 245, 0.26) 28%, rgba(130, 200, 255, 0.72) 48%, rgba(60, 150, 250, 0.34) 62%, transparent 100%);
  transform: rotate(34deg);
  transform-origin: 70% 0;
  filter: blur(22px);
  /* the turned streak crosses the top of the band about 15% down its length: it starts there, or it ends in a line */
  -webkit-mask-image: linear-gradient(180deg, transparent 14%, #000 34%, #000 56%, transparent 92%);
  mask-image: linear-gradient(180deg, transparent 14%, #000 34%, #000 56%, transparent 92%);
}

/* text on the left, the hub on the right, bleeding a little past the shell on wide screens */

.teo-website-integration .teo-website-split {
  grid-template-columns: minmax(0, 0.64fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
}

.teo-website-integration .teo-website-heading {
  margin-bottom: 0;
}

.teo-website-integration .teo-website-eyebrow {
  color: #8fb4cf;
  font-weight: 500;
  letter-spacing: 0.24em;
}

/* medium weight and a little open, as drawn */
.teo-website-integration .teo-website-title {
  max-width: 7.4em;
  font-size: clamp(36px, 4.6vw, 66px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.teo-website-integration .teo-website-title em {
  background: linear-gradient(180deg, #c4e6f8 0%, #8ac5f2 55%, #6aaeea 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.teo-website-integration .teo-website-lead {
  margin-top: 28px;
  max-width: 30em;
  color: #c4ccd7;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.65;
}

.teo-website-integration-more {
  margin: 30px 0 0;
}

.teo-website-integration-more .teo-website-link {
  font-size: 15px;
}

.teo-website-integration-more .teo-website-link i {
  transition: transform 0.2s ease;
}

.teo-website-integration-more .teo-website-link:hover i, .teo-website-integration-more .teo-website-link:focus-visible i {
  transform: translateX(4px);
}

/* the stage keeps the mockup's proportions; everything inside is measured in cqw, hundredths of its width */
.teo-website-integration-stage {
  position: relative;
  aspect-ratio: 864 / 622;
  container-type: inline-size;
  margin-right: calc(-1 * clamp(0px, (100vw - var(--teo-website-shell)) / 2, 80px));
}

.teo-website-integration-scene {
  position: absolute;
  inset: 0;
  perspective: 320cqw;
  perspective-origin: 50% 38%;
}

/* the floor, tilted away from the viewer around the centre of the hub */
.teo-website-integration-plane {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(42deg);
}

.teo-website-integration-floor {
  position: absolute;
  left: -72cqw;
  top: -62cqw;
  width: 144cqw;
  height: 124cqw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30, 110, 245, 0.5), rgba(12, 58, 165, 0.26) 46%, transparent 100%);
  transform: translateZ(-0.3cqw);
}

/* spokes: a wide soft glow under a bright core, drawn outwards from the hub when the band comes into view */

.teo-website-integration-spokes {
  position: absolute;
  left: -50cqw;
  top: -50cqw;
  width: 100cqw;
  height: 100cqw;
  overflow: visible;
}

.teo-website-integration-spoke-glow, .teo-website-integration-spoke, .teo-website-integration-pulse {
  fill: none;
  stroke-linecap: round;
}

.teo-website-integration-spoke-glow {
  stroke: rgba(36, 120, 255, 0.5);
  stroke-width: 2;
}

.teo-website-integration-spoke {
  stroke: #c4e8ff;
  stroke-width: 0.5;
}

.teo-website-integration-spoke-glow, .teo-website-integration-spoke {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.3, 0.7, 0.3, 1) var(--teo-delay, 0s);
}

.teo-website-integration-stage.teo-website-visible .teo-website-integration-spoke-glow,
.teo-website-integration-stage.teo-website-visible .teo-website-integration-spoke {
  stroke-dashoffset: 0;
}

/* a small pulse of light travels from each system to the hub, one after the other */
.teo-website-integration-pulse {
  stroke: #f2fbff;
  stroke-width: 0.75;
  stroke-dasharray: 8 300;
  stroke-dashoffset: 8;
}

.teo-website-integration-stage.teo-website-visible .teo-website-integration-pulse {
  animation: teo-website-integration-pulse 4.4s linear infinite;
  animation-delay: calc(1.4s + var(--teo-delay, 0s));
}

@keyframes teo-website-integration-pulse {
  0% {
    stroke-dashoffset: 8;
  }

  42%, 100% {
    stroke-dashoffset: -100;
  }
}

.teo-website-integration-port {
  fill: #eaf7ff;
  stroke: rgba(77, 164, 255, 0.55);
  stroke-width: 0.7;
  opacity: 0;
  transition: opacity 0.4s ease calc(var(--teo-delay, 0s) + 0.5s);
}

.teo-website-integration-stage.teo-website-visible .teo-website-integration-port {
  opacity: 1;
}

/* tiles and hub: stacks of thin slabs under a smoked glass face with a bright rim */

.teo-website-integration-tiles {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transform-style: preserve-3d;
}

.teo-website-integration-tile {
  --teo-step: 0.6cqw;
  position: absolute;
  left: var(--teo-x);
  top: var(--teo-y);
  width: 20cqw;
  height: 13cqw;
  margin: -6.5cqw 0 0 -10cqw;
  transform: rotate(var(--teo-tilt));
  transform-style: preserve-3d;
}

.teo-website-integration-hub {
  --teo-step: 0.9cqw;
  --teo-delay: 0s;
  position: absolute;
  left: -15cqw;
  top: -11cqw;
  width: 30cqw;
  height: 22cqw;
  transform-style: preserve-3d;
}

.teo-website-integration-layer, .teo-website-integration-face, .teo-website-integration-glow {
  position: absolute;
  inset: 0;
  border-radius: 1.6cqw;
}

.teo-website-integration-layer {
  background: #08142f;
  border: 0.14cqw solid rgba(120, 170, 255, 0.45);
  transform: translateZ(calc(var(--teo-level) * var(--teo-step)));
}

.teo-website-integration-layer-light {
  background: linear-gradient(180deg, #1650d8 0%, #3a88ff 62%, #d6f0ff 100%);
  border-color: #c4e6ff;
  box-shadow: 0 0 1.2cqw 0.3cqw rgba(48, 128, 255, 0.8), 0 0 3.6cqw 0.8cqw rgba(30, 100, 240, 0.35);
}

.teo-website-integration-hub .teo-website-integration-layer {
  inset: calc(-1 * var(--teo-grow, 0cqw));
  border-radius: 2.4cqw;
}

.teo-website-integration-face {
  transform: translateZ(calc(4 * var(--teo-step)));
  background: linear-gradient(165deg, #24344f 0%, #0e1a33 38%, #060c1f 100%);
  border: 0.2cqw solid rgba(205, 218, 242, 0.92);
  border-right-color: rgba(150, 175, 220, 0.6);
  border-bottom-color: rgba(150, 175, 220, 0.5);
  box-shadow: inset 0 0 0 0.6cqw rgba(3, 8, 22, 0.55), inset 0 0 0 0.74cqw rgba(160, 192, 245, 0.22), inset 0 1.4cqw 2.4cqw -1.2cqw rgba(170, 205, 255, 0.28);
}

.teo-website-integration-hub-face {
  transform: translateZ(calc(8 * var(--teo-step)));
  border-radius: 2.4cqw;
  background: linear-gradient(165deg, #10306e 0%, #04184a 42%, #020d2c 100%);
  border-width: 0.34cqw;
  border-color: rgba(214, 230, 252, 0.95) rgba(170, 196, 240, 0.75) rgba(170, 196, 240, 0.7) rgba(214, 230, 252, 0.9);
  box-shadow: inset 0 0 0 0.9cqw rgba(2, 8, 26, 0.5), inset 0 0 0 1.05cqw rgba(150, 190, 255, 0.24), inset 0 2cqw 3cqw -1.6cqw rgba(160, 205, 255, 0.3), 0 0 2.4cqw rgba(60, 140, 255, 0.35);
}

/* the labels are stretched to make up for the tilt of the floor, so they read upright */
.teo-website-integration-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e6eef6;
  font-size: clamp(11px, 2.55cqw, 22px);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow: 0 0 1.2cqw rgba(140, 200, 255, 0.35);
  transform: scaleY(1.24);
}

.teo-website-integration-label small {
  margin-top: 0.25em;
  color: #9cc6ee;
  font-size: max(9px, 0.6em);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.teo-website-integration-hub-face .teo-website-integration-label {
  color: #f0f5fb;
  font-family: var(--teo-website-font-display);
  font-size: clamp(12px, 2.9cqw, 24px);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-shadow: 0 0 1.6cqw rgba(140, 200, 255, 0.55);
}

/* light pooling on the floor under each tile and under the hub */
.teo-website-integration-glow {
  inset: -50% -34% -120%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(44, 124, 255, 0.55), rgba(28, 92, 232, 0.22) 55%, transparent 100%);
  transform: translateZ(-0.1cqw);
}

.teo-website-integration-hub-glow {
  inset: -60% -45% -110%;
  background: radial-gradient(closest-side, rgba(56, 140, 255, 0.7), rgba(28, 92, 232, 0.28) 50%, transparent 100%);
}

/* reveal: the hub first, then each spoke draws out and its tile lights up */

.teo-website-integration-tile > span, .teo-website-integration-hub > span {
  opacity: 0;
  transition: opacity 0.5s ease calc(var(--teo-delay, 0s) + 0.35s);
}

.teo-website-integration-hub > span {
  transition-delay: 0s;
}

.teo-website-integration-stage.teo-website-visible .teo-website-integration-tile > span,
.teo-website-integration-stage.teo-website-visible .teo-website-integration-hub > span {
  opacity: 1;
}

.teo-website-integration-stage.teo-website-visible .teo-website-integration-hub-glow {
  animation: teo-website-integration-breathe 5s ease-in-out 1.2s infinite;
}

@keyframes teo-website-integration-breathe {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.68;
  }
}

/* narrow screens */

@media (max-width: 900px) {
  .teo-website-integration .teo-website-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .teo-website-integration-stage {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .teo-website-integration::after {
    top: -2%;
    width: 40%;
    height: 34%;
    opacity: 0.6;
  }

  .teo-website-integration-scene {
    perspective: 260cqw;
  }

  .teo-website-integration-spoke-glow {
    stroke-width: 1.2;
  }

  .teo-website-integration-layer-light {
    box-shadow: 0 0 1cqw 0.2cqw rgba(48, 128, 255, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .teo-website-integration-spoke-glow, .teo-website-integration-spoke {
    stroke-dashoffset: 0;
    transition: none;
  }

  .teo-website-integration-port, .teo-website-integration-tile > span, .teo-website-integration-hub > span {
    opacity: 1;
    transition: none;
  }

  .teo-website-integration-pulse {
    display: none;
  }

  .teo-website-integration-stage.teo-website-visible .teo-website-integration-pulse,
  .teo-website-integration-stage.teo-website-visible .teo-website-integration-hub-glow {
    animation: none;
  }
}
