/* ============================================================
   HOME HERO VISUAL — AI marketing infographic
   Robot + growth dashboard + floating channel cards.
   Everything is sized in container units (cqw) so the whole
   scene scales like one illustration from desktop to mobile.
   ============================================================ */

@property --sdv-n {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}

/* Reset the old dark globe panel */
.home-page .hp-visual.sdv {
  height: auto !important;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  isolation: isolate;
}
.home-page .hp-visual.sdv::after,
.home-page .hp-visual.sdv::before {
  display: none;
}

.sdv-stage {
  --ink: #1d2148;
  --muted: #646a8f;
  --indigo: #5b5bf0;
  --violet: #8b5cf6;
  --sky: #38bdf8;
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 460;
  container-type: inline-size;
  font-family: var(--font-primary, "Inter", sans-serif);
  color: var(--ink);
}
.sdv-stage > * {
  position: absolute;
}

/* ── Backdrop ─────────────────────────────────────────── */
.sdv-bg {
  inset: 5% 1% 1% 3%;
  border-radius: 5.5cqw;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(167, 139, 250, 0.28), transparent 50%),
    linear-gradient(150deg, #f4f3ff 0%, #e9e9ff 48%, #e3ecff 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 3cqw 8cqw rgba(79, 70, 229, 0.16),
    inset 0 0 0 1px rgba(99, 102, 241, 0.06);
  z-index: 0;
}

.sdv-globe {
  left: 4%;
  top: 2%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 1;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.55) 1.1px, transparent 1.7px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 45% 45%, #000 30%, rgba(0, 0, 0, 0.45) 55%, transparent 70%);
  mask-image: radial-gradient(circle at 45% 45%, #000 30%, rgba(0, 0, 0, 0.45) 55%, transparent 70%);
  opacity: 0.55;
  animation: sdvGlobe 22s linear infinite;
}

/* ── Light ribbons ───────────────────────────────────── */
.sdv-ribbon {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.sdv-ribbon--back {
  z-index: 2;
}
.sdv-ribbon--front {
  z-index: 6;
}
.sdv-ribbon ellipse,
.sdv-ribbon path {
  fill: none;
  stroke: url(#sdvRib);
  stroke-width: 9;
  stroke-linecap: round;
  opacity: 0.55;
  filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.45));
}
.sdv-ribbon--front path {
  stroke-width: 7;
  opacity: 0.7;
}
.sdv-ribbon .sdv-flow {
  stroke: #fff;
  stroke-width: 3;
  opacity: 0.95;
  stroke-dasharray: 70 1100;
  animation: sdvFlow 4.5s linear infinite;
  filter: drop-shadow(0 0 5px #a5b4fc);
}
.sdv-ribbon--front .sdv-flow {
  stroke-dasharray: 50 600;
  animation-duration: 3.2s;
  animation-delay: -1.2s;
}

/* ── Robot ───────────────────────────────────────────── */
.sdv-robot {
  left: 5%;
  bottom: 3%;
  height: 86%;
  width: auto;
  z-index: 5;
  filter: drop-shadow(0 3cqw 3cqw rgba(67, 56, 202, 0.28));
  animation: sdvRobot 6s ease-in-out infinite;
  pointer-events: none;
}

/* ── Dashboard window ────────────────────────────────── */
.sdv-dash {
  left: 39%;
  right: 1.5%;
  top: 19%;
  height: 60%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  border-radius: 3cqw;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 3cqw 7cqw rgba(79, 70, 229, 0.18),
    inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  animation: sdvRise 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sdv-dash-bar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 0.9cqw;
  padding: 1.6cqw 2.2cqw;
  background: linear-gradient(90deg, #4f46e5, #6d5df6 60%, #7c8bff);
}
.sdv-dash-bar i {
  width: 1.2cqw;
  height: 1.2cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.sdv-dash-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6cqw;
  padding: 2cqw;
}

.sdv-seo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2cqw;
  border-radius: 2.2cqw;
  background: #fff;
  box-shadow: 0 1cqw 3cqw rgba(79, 70, 229, 0.1);
}
.sdv-seo-head {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
}
.sdv-g {
  display: grid;
  place-items: center;
  flex: none;
  width: 6.2cqw;
  height: 6.2cqw;
  border-radius: 1.6cqw;
  background: #f5f6ff;
}
.sdv-g svg {
  width: 62%;
  height: 62%;
}
.sdv-seo-copy {
  min-width: 0;
  line-height: 1.1;
}
.sdv-seo-copy small {
  display: block;
  font-size: 2.15cqw;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}
.sdv-count {
  display: block;
  font-size: 0;
  font-weight: 800;
  color: #16a34a;
  counter-reset: sdvn var(--sdv-n);
  animation: sdvCount 2.2s 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sdv-count::after {
  content: "+" counter(sdvn) "%";
  font-size: 3.5cqw;
  letter-spacing: -0.02em;
}
.sdv-up {
  margin-left: auto;
  font-size: 2.6cqw;
  color: #22c55e;
  animation: sdvBob 2.4s ease-in-out infinite;
}

.sdv-chart {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  gap: 1.6cqw;
  margin-top: 1.8cqw;
  padding: 0 0.6cqw 0.4cqw;
  border-bottom: 1px solid #e6e8ff;
  background: repeating-linear-gradient(
    to top,
    transparent 0 24%,
    rgba(99, 102, 241, 0.07) 24% calc(24% + 1px)
  );
}
.sdv-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 0.8cqw 0.8cqw 0.3cqw 0.3cqw;
  background: linear-gradient(180deg, #6d63ff, #4338ca);
  box-shadow: 0 0.6cqw 1.6cqw rgba(79, 70, 229, 0.3);
  transform-origin: bottom;
  animation:
    sdvBar 0.9s calc(0.8s + var(--i) * 0.12s) cubic-bezier(0.2, 0.8, 0.2, 1) both,
    sdvBarPulse 3.6s calc(2.2s + var(--i) * 0.25s) ease-in-out infinite;
}
.sdv-chart span:nth-child(-n + 2) {
  background: linear-gradient(180deg, #a5b4fc, #818cf8);
  box-shadow: none;
}
.sdv-chart svg {
  position: absolute;
  inset: 6% 3% 0;
  width: 94%;
  height: 94%;
  overflow: visible;
}
.sdv-chart polyline {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: sdvLine 1.6s 1.4s ease-out forwards;
}

.sdv-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  margin: 0;
  padding: 1.2cqw;
  list-style: none;
  border-radius: 2.2cqw;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1cqw 3cqw rgba(79, 70, 229, 0.08);
}
.sdv-list li {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  min-width: 0;
  padding: 0.75cqw 0.9cqw;
  border-radius: 1.2cqw;
  font-size: 1.75cqw;
  font-weight: 500;
  color: #3a3f66;
  white-space: nowrap;
  animation:
    sdvItem 0.5s calc(1s + var(--i) * 0.08s) ease-out both,
    sdvActive 10.5s calc(2.4s + var(--i) * 1.5s) ease-in-out infinite;
}
.sdv-list li span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sdv-list li i {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.2cqw;
  height: 3.2cqw;
  border-radius: 0.9cqw;
  font-size: 1.8cqw;
  color: var(--indigo);
  background: #eef0ff;
}

/* ── Floating channel cards ──────────────────────────── */
.sdv-card {
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 1.8cqw;
  padding: 1.8cqw 3cqw 1.8cqw 1.8cqw;
  border-radius: 2.6cqw;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 2.4cqw 5.5cqw rgba(79, 70, 229, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  animation:
    sdvPop 0.8s var(--in, 0.6s) cubic-bezier(0.2, 0.9, 0.25, 1.2) both,
    sdvFloat var(--fd, 6s) var(--fdl, 1.4s) ease-in-out infinite;
}
.sdv-card strong {
  display: block;
  font-size: 2.6cqw;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.sdv-card span {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  font-size: 1.9cqw;
  color: var(--muted);
}
.sdv-card span i {
  color: #22c55e;
}
.sdv-ico {
  display: grid !important;
  place-items: center;
  flex: none;
  width: 6.4cqw;
  height: 6.4cqw;
  border-radius: 1.8cqw;
  background: #f3f4ff;
}
.sdv-ico svg {
  width: 62%;
  height: 62%;
}
.sdv-card--meta {
  top: 4%;
  right: 6%;
  --in: 0.5s;
  --fd: 6.5s;
}
.sdv-card--meta .sdv-ico i {
  font-size: 3.6cqw;
  background: linear-gradient(135deg, #0064e1, #0091ff 55%, #6d5df6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sdv-card--google {
  left: 0;
  top: 37%;
  --in: 0.75s;
  --fd: 5.5s;
  --fdl: 0.8s;
}
.sdv-card--social {
  left: 4%;
  bottom: 5%;
  --in: 1s;
  --fd: 7s;
  --fdl: 2s;
}
.sdv-card--social .sdv-ico {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 1cqw 2.4cqw rgba(124, 58, 237, 0.35);
}
.sdv-card--social .sdv-ico i {
  font-size: 3cqw;
  color: #fff;
}

/* ── Avatars & sparkles ──────────────────────────────── */
.sdv-avatar {
  z-index: 3;
  display: grid;
  place-items: center;
  width: 6cqw;
  height: 6cqw;
  border-radius: 50%;
  font-size: 2.8cqw;
  color: #6d5df6;
  background: #fff;
  box-shadow:
    0 0 0 0.9cqw rgba(109, 93, 246, 0.14),
    0 1.4cqw 3cqw rgba(79, 70, 229, 0.18);
  animation: sdvPulse 3.2s ease-in-out infinite;
}
.sdv-avatar--1 {
  left: 34%;
  top: 7%;
}
.sdv-avatar--2 {
  left: 19%;
  top: 22%;
  animation-delay: -1.1s;
  color: #4f46e5;
}
.sdv-avatar--3 {
  right: 16%;
  bottom: 3%;
  animation-delay: -2.2s;
}
.sdv-avatar--2,
.sdv-avatar--3 {
  width: 5cqw;
  height: 5cqw;
  font-size: 2.3cqw;
}

.sdv-spark {
  z-index: 3;
  width: 3.6cqw;
  height: 3.6cqw;
  fill: #7c7cf8;
  filter: drop-shadow(0 0 6px rgba(124, 124, 248, 0.7));
  animation: sdvTwinkle 2.8s ease-in-out infinite;
}
.sdv-spark--1 {
  left: 4%;
  top: 60%;
}
.sdv-spark--2 {
  left: 61%;
  top: 9%;
  width: 2.6cqw;
  height: 2.6cqw;
  animation-delay: -1s;
}
.sdv-spark--3 {
  right: 3%;
  bottom: 18%;
  width: 3cqw;
  height: 3cqw;
  fill: #38bdf8;
  animation-delay: -1.8s;
}

/* ── Keyframes ───────────────────────────────────────── */
@keyframes sdvGlobe {
  to {
    background-position: 110px 0;
  }
}
@keyframes sdvFlow {
  from {
    stroke-dashoffset: 1170;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes sdvRobot {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -2.2cqw;
  }
}
@keyframes sdvRise {
  from {
    opacity: 0;
    translate: 3cqw 2cqw;
  }
}
@keyframes sdvCount {
  from {
    --sdv-n: 0;
  }
  to {
    --sdv-n: 320;
  }
}
@keyframes sdvBob {
  50% {
    translate: 0.5cqw -0.5cqw;
  }
}
@keyframes sdvBar {
  from {
    transform: scaleY(0);
  }
}
@keyframes sdvBarPulse {
  50% {
    filter: brightness(1.15);
  }
}
@keyframes sdvLine {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes sdvItem {
  from {
    opacity: 0;
    translate: 1.5cqw 0;
  }
}
@keyframes sdvActive {
  0%,
  13% {
    color: #fff;
    background: linear-gradient(90deg, #5b5bf0, #7c6cf7);
    box-shadow: 0 0.8cqw 2cqw rgba(91, 91, 240, 0.35);
  }
  16%,
  100% {
    color: #3a3f66;
    background: transparent;
    box-shadow: none;
  }
}
@keyframes sdvPop {
  from {
    opacity: 0;
    scale: 0.85;
  }
}
@keyframes sdvFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -1.6cqw;
  }
}
@keyframes sdvPulse {
  50% {
    box-shadow:
      0 0 0 1.6cqw rgba(109, 93, 246, 0.06),
      0 1.4cqw 3cqw rgba(79, 70, 229, 0.18);
  }
}
@keyframes sdvTwinkle {
  0%,
  100% {
    opacity: 0.35;
    scale: 0.7;
    rotate: 0deg;
  }
  50% {
    opacity: 1;
    scale: 1.05;
    rotate: 45deg;
  }
}

/* ── Responsive ──────────────────────────────────────── */
@media (min-width: 1200px) {
  .home-page .hp-visual.sdv .sdv-stage {
    width: calc(100% + 64px);
    margin-left: -40px;
  }
}
@media (max-width: 991px) {
  .home-page .hp-visual.sdv {
    width: min(100%, 640px);
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sdv-stage *,
  .sdv-stage *::after {
    animation: none !important;
  }
  .sdv-count {
    --sdv-n: 320;
  }
  .sdv-chart polyline {
    stroke-dashoffset: 0;
  }
}
