/* =========================================================
   HERO BACKGROUND ONLY SHORTCODE
========================================================= */
c-ui-hero-shortcode { outline: 5px solid red !important; }
.c-ui-hero-shortcode {

  position: relative;
  width: min(100%, 900px);
  max-width: 900px;
  height: auto;
  aspect-ratio: 900 / 550;
  container-type: inline-size;
  isolation: isolate;
  color: var(--c-ui-color-g800);
  font-family: var(--c-ui-font-family);
  font-size: 16px;
  line-height: 1;
  background:
    linear-gradient(180deg, var(--G50) 0%, #f8fafc 100%);
}

.c-ui-hero-shortcode,
.c-ui-hero-shortcode *,
.c-ui-hero-shortcode *::before,
.c-ui-hero-shortcode *::after {
  box-sizing: border-box;
}

.c-ui-hero-shortcode :where(p, h1, h2, h3, h4, h5, h6) {
  margin: 0;
}

.c-ui-hero-shortcode :where(img) {
  max-width: none;
}

.c-ui-hero-background-only__stage {
  position: absolute;
  inset: 0 auto auto 0;
  width: 900px;
  height: 550px;
  transform-origin: top left;
  transform: scale(calc(100cqw / 900px));
}

/* Background = full-canvas 28px dot grid on the cream base (Edge-Compute
   style adapted to this composition's light theme). The previous 6 ghost
   panels were removed in favour of a single uniform pattern. */
.c-ui-hero-background-only__bg-grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(17, 23, 31, 0.22) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  pointer-events: none;
}

.c-ui-hero-background-only__map {
  position: absolute;
  left: 24px;
  bottom: 18px;
  z-index: 1;
  width: 446px;
  pointer-events: none;
}

.c-ui-hero-background-only__map img {
  display: block;
  width: 100%;
  height: auto;
}

.c-ui-map-dot {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #22d861;
  color: var(--G50);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  box-shadow:
    0 0 0 4px rgba(34, 216, 97, 0.16),
    0 10px 18px rgba(0, 0, 0, 0.16);
  animation: uiMapDotPulse 2.8s ease-in-out infinite;
}

.c-ui-map-dot--uk { left: 140px; top: 110px; animation-delay: 0s; }
.c-ui-map-dot--spain { left: 24px; bottom: 22px; animation-delay: 0.25s; }
.c-ui-map-dot--france { left: 132px; bottom: 100px; animation-delay: 0.5s; }
.c-ui-map-dot--germany { left: 282px; top: 182px; animation-delay: 0.75s; }
.c-ui-map-dot--italy { left: 340px; bottom: 90px; animation-delay: 1s; }
.c-ui-map-dot--balkans { left: 230px; top: 266px; animation-delay: 1.25s; }
.c-ui-map-dot--scandinavia { left: 328px; top: 20px; animation-delay: 1.5s; }
.c-ui-map-dot--east { left: 300px; top: 120px; animation-delay: 1.75s; }

@keyframes uiMapDotPulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(34, 216, 97, 0.16),
      0 10px 18px rgba(0, 0, 0, 0.16);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(34, 216, 97, 0.12),
      0 0 24px rgba(34, 216, 97, 0.22),
      0 10px 18px rgba(0, 0, 0, 0.16);
    transform: scale(1.04);
  }
}

.c-ui-hero-background-only__panel {
  position: absolute;
  right: 22px;
  top: 16px;
  z-index: 2;
  width: 586px;
  height: 346px;
  padding: 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.1);
}

.c-ui-hero-background-only__panel-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--G50) 0%, #fbfbfb 100%);
  box-shadow: inset 0 0 0 1px rgba(17, 23, 31, 0.06);
}

.c-ui-hero-background-only__tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 54px;
  padding: 22px 30px 14px;
  border-bottom: 1px solid rgba(17, 23, 31, 0.1);
}

.c-ui-hero-background-only__tab {
  position: relative;
  color: #697277;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.c-ui-hero-background-only__tab--active {
  color: #22d861;
}

.c-ui-hero-background-only__tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 4px;
  border-radius: 999px;
  background: #22d861;
}

.c-ui-hero-background-only__cursor {
  position: absolute;
  left: 92px;
  top: 12px;
  z-index: 2;
  width: 21px;
  height: 23px;
  pointer-events: none;
  transform-origin: center center;
  transform: translate(var(--c-ui-hero-cursor-x, 0px), var(--c-ui-hero-cursor-y, 10px));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.c-ui-hero-background-only__cursor svg {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 12px rgba(34, 216, 97, 0.22))
    drop-shadow(0 3px 10px rgba(0, 0, 0, 0.14));
}

.c-ui-hero-background-only__cursor.is-clicking {
  animation: uiHeroCursorClick 0.3s ease;
}

@keyframes uiHeroCursorClick {
  0%, 100% {
    transform:
      translate(var(--c-ui-hero-cursor-x, 0px), var(--c-ui-hero-cursor-y, 10px))
      scale(1);
  }
  50% {
    transform:
      translate(var(--c-ui-hero-cursor-x, 0px), var(--c-ui-hero-cursor-y, 10px))
      scale(0.82);
  }
}

.c-ui-hero-background-only__content {
  padding: 12px 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c-ui-hero-background-only__content > .c-ui-modem-card,
.c-ui-hero-background-only__content > .c-ui-speed-card,
.c-ui-hero-background-only__content > .c-ui-map-panel {
  display: none;
}

.c-ui-hero-shortcode.is-state-modems .c-ui-hero-background-only__content > .c-ui-modem-card {
  display: block;
}

.c-ui-hero-shortcode.is-state-moving-speed .c-ui-hero-background-only__content > .c-ui-speed-card {
  display: block;
}

.c-ui-hero-shortcode.is-state-map .c-ui-hero-background-only__content > .c-ui-map-panel {
  display: block;
}

.c-ui-modem-card,
.c-ui-speed-card,
.c-ui-map-panel {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(17, 23, 31, 0.05),
    0 8px 20px rgba(17, 23, 31, 0.04);
}

.c-ui-modem-card {
  padding: 12px 14px;
}

.c-ui-modem-card__header {
  display: block;
  margin-bottom: 8px;
}

.c-ui-modem-card__title {
  color: #2d3436;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}

.c-ui-modem-chart {
  position: relative;
  height: 102px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(rgba(120, 125, 126, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 125, 126, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(211, 219, 195, 0.92) 0%, rgba(241, 223, 189, 0.92) 62%, rgba(228, 193, 183, 0.92) 100%);
  background-size: 100% 28px, 52px 100%, 100% 100%;
  box-shadow: inset 0 0 0 1px rgba(17, 23, 31, 0.06);
}

.c-ui-modem-chart__svg,
.c-ui-speed-card__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.c-ui-modem-chart__polyline {
  fill: none;
  stroke-width: 1.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.c-ui-modem-chart__polyline--dark { stroke: #656d70; }
.c-ui-modem-chart__polyline--light { stroke: var(--G50); }

.c-ui-speed-card {
  padding: 16px 18px 14px;
}

.c-ui-speed-card__chart {
  position: relative;
  display: flex;
  flex-direction: column;
}

.c-ui-speed-card__y-label {
  position: absolute;
  left: 10px;
  top: 122px;
  color: #3f4245;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  transform: rotate(-90deg);
  transform-origin: left top;
}

.c-ui-speed-card__plot {
  position: relative;
  height: 172px;
  margin-left: 34px;
  overflow: hidden;
}

.c-ui-speed-card__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(144, 147, 153, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 147, 153, 0.2) 1px, transparent 1px);
  background-size: 100% 34px, 110px 100%;
}

.c-ui-speed-card__polyline {
  fill: none;
  stroke: var(--G700);
  stroke-width: 1.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.c-ui-speed-card__x-axis {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px 0 110px;
  color: #3f4245;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}

.c-ui-map-panel {
  padding: 12px;
}

.c-ui-map-panel__viewport {
  position: relative;
  height: 214px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(57, 217, 122, 0.08) 0%, rgba(57, 217, 122, 0.02) 36%, transparent 64%),
    #eef1f3;
  box-shadow: inset 0 0 0 1px rgba(17, 23, 31, 0.06);
}

.c-ui-map-panel__img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 420px;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.94;
}

.c-ui-map-panel__marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  transform: translate(-50%, -100%);
  background: #22d861;
  box-shadow:
    0 0 0 6px rgba(34, 216, 97, 0.14),
    0 10px 20px rgba(0, 0, 0, 0.14);
}

.c-ui-map-panel__marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 12px;
  height: 12px;
  background: #22d861;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: reduce) {
  .c-ui-map-dot,
  .c-ui-hero-background-only__cursor {
    animation: none !important;
    transition: none !important;
  }
}
