/*
 * Homepage hero service demo.
 * Dedicated final layer: no later homepage sections are changed here.
 */

.site-header {
  --demo-accent: #21759b;
  min-height: 820px !important;
  background: #f9fbff !important;
}

.site-header .hero-art {
  opacity: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 14%, rgba(212, 243, 255, 0.75), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(232, 231, 255, 0.64), transparent 25%),
    linear-gradient(180deg, #fbfdff, #f8f9ff 74%, #fff) !important;
  mix-blend-mode: normal;
}

.site-header .hero-art::before,
.site-header .hero-art::after {
  content: "";
  position: absolute;
  display: block !important;
  width: 130%;
  left: -15%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: none;
  mask-image: none;
  transition: none;
  will-change: transform, border-radius, background-position;
}

.site-header .hero-art::before {
  height: 390px;
  top: 27%;
  border-radius: 44% 56% 48% 52% / 58% 46% 54% 42%;
  background:
    linear-gradient(
      95deg,
      rgba(183, 231, 255, 0.76) 0%,
      rgba(234, 205, 255, 0.7) 30%,
      rgba(255, 197, 239, 0.74) 59%,
      rgba(206, 226, 255, 0.75) 100%
    );
  background-size: 160% 100%;
  filter: blur(18px);
  opacity: 0.86;
  transform: translate3d(-2%, 0, 0) rotate(-2deg);
  animation: hero-wave-drift 9s ease-in-out infinite alternate;
}

.site-header .hero-art::after {
  height: 300px;
  top: 53%;
  border-radius: 56% 44% 54% 46% / 48% 59% 41% 52%;
  background:
    linear-gradient(
      100deg,
      rgba(255, 235, 188, 0.4) 0%,
      rgba(201, 235, 255, 0.64) 28%,
      rgba(224, 210, 255, 0.7) 61%,
      rgba(255, 210, 244, 0.5) 100%
    );
  background-size: 170% 100%;
  filter: blur(22px);
  opacity: 0.76;
  transform: translate3d(4%, 0, 0) rotate(2deg);
  animation: hero-wave-drift-reverse 12s ease-in-out infinite alternate;
}

.site-header .color-wave-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  opacity: 0.92;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.site-header .code-fabric-canvas {
  z-index: 3;
  opacity: 0.16;
  filter: saturate(0.72) brightness(1.18);
}

.site-header .hero-paper-grid {
  z-index: 2;
  opacity: 0.08;
}

.site-header .hero-pixels {
  display: none !important;
}

.site-header .hero-color-wash {
  z-index: 1;
  width: 112%;
  height: 250px;
  left: -6%;
  right: auto;
  top: 45%;
  border-radius: 48% 52% 44% 56% / 54% 43% 57% 46%;
  background: linear-gradient(90deg, rgba(171, 227, 255, 0.5), rgba(232, 198, 255, 0.5), rgba(255, 200, 237, 0.44));
  filter: blur(20px);
  opacity: 0.78;
  animation: hero-wave-middle 7.5s ease-in-out infinite alternate;
}

.site-header .hero-shade {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 46%, rgba(255, 255, 255, 0.08)) !important;
}

.hero-content {
  min-height: 820px !important;
  width: min(1320px, calc(100% - 72px)) !important;
  padding: 140px 0 58px !important;
}

.hero-layout {
  grid-template-columns: minmax(0, 0.93fr) minmax(480px, 0.78fr) !important;
  gap: clamp(60px, 6vw, 96px) !important;
}

.hero-copy h1 {
  max-width: 650px;
  font-size: clamp(52px, 4.75vw, 74px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.055em !important;
}

.hero-copy h1 .hero-line,
.hero-copy h1 .hero-line-accent {
  opacity: 1 !important;
  transform: none !important;
  color: #17171b !important;
  font-weight: 650 !important;
  animation: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.hero-kicker {
  width: max-content !important;
  margin: 0 0 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero-kicker b {
  padding: 8px 13px !important;
  border: 1px solid rgba(23, 23, 27, 0.07);
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.7) !important;
  color: #34353d !important;
  box-shadow: 0 10px 28px rgba(53, 59, 91, 0.08);
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.hero-copy > p {
  max-width: 570px !important;
  margin-top: 22px !important;
  color: #4d4f5a !important;
  font-size: clamp(17px, 1.25vw, 19px) !important;
  line-height: 1.52 !important;
}

.hero-copy > p::before {
  display: none !important;
}

.hero-actions {
  margin-top: 31px !important;
}

.hero-actions .hero-primary {
  min-height: 50px;
  padding: 0 21px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: linear-gradient(105deg, #9658ef, #5d69dc) !important;
  box-shadow: 0 16px 35px rgba(108, 91, 220, 0.24) !important;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions .hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(108, 91, 220, 0.3) !important;
}

.hero-meta,
.hero-scroll {
  display: none !important;
}

.service-demo-card {
  position: relative;
  height: 470px !important;
  padding: 22px 23px 20px !important;
  overflow: visible !important;
  border: 1px solid rgba(34, 35, 48, 0.09) !important;
  border-radius: 28px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  background-image: none !important;
  box-shadow:
    0 40px 90px rgba(77, 69, 124, 0.16),
    0 10px 30px rgba(54, 61, 91, 0.07),
    inset 0 1px 0 #fff !important;
  backdrop-filter: blur(22px);
  isolation: isolate;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.service-demo-card::before,
.service-demo-card::after {
  display: none !important;
}

.service-demo-card:hover {
  border-color: color-mix(in srgb, var(--demo-accent) 30%, white) !important;
  box-shadow:
    0 42px 100px rgba(77, 69, 124, 0.18),
    0 12px 34px rgba(54, 61, 91, 0.08),
    inset 0 1px 0 #fff !important;
}

.demo-card-header,
.demo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.demo-card-header {
  height: 45px;
  padding: 0 2px 15px;
}

.demo-card-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.demo-counter,
.demo-card-title strong,
.demo-status,
.demo-scene-copy > span,
.demo-url {
  font-family: "DM Sans", sans-serif;
  text-transform: uppercase;
}

.demo-counter {
  flex: 0 0 auto;
  color: var(--demo-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.demo-card-title strong {
  overflow: hidden;
  color: #20212a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: #787986;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54c884;
  box-shadow: 0 0 0 4px rgba(84, 200, 132, 0.12);
  animation: demo-status-pulse 1.8s ease-in-out infinite;
}

.demo-viewport {
  height: 300px;
  overflow: hidden;
  border: 1px solid rgba(32, 33, 42, 0.1);
  border-radius: 17px;
  background: #f4f5f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.demo-browser-bar {
  height: 39px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 13px;
  border-bottom: 1px solid rgba(32, 33, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.demo-browser-dots {
  display: flex;
  gap: 5px;
}

.demo-browser-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dadce4;
}

.demo-browser-dots i:first-child {
  background: color-mix(in srgb, var(--demo-accent) 58%, white);
}

.demo-url {
  color: #8a8b96;
  font-size: 7px;
  letter-spacing: 0.05em;
}

.demo-browser-action {
  justify-self: end;
  color: var(--demo-accent);
  font-size: 13px;
}

.demo-scene {
  position: relative;
  height: calc(100% - 39px);
  display: grid;
  grid-template-columns: 62px 1fr;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 14%, color-mix(in srgb, var(--demo-accent) 18%, transparent), transparent 29%),
    linear-gradient(135deg, #fbfbfd, #f0f2f8);
  transition: opacity 180ms ease, transform 180ms ease;
}

.demo-scene.is-changing {
  opacity: 0;
  transform: translateY(8px);
}

.demo-scene-sidebar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-right: 1px solid rgba(32, 33, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.demo-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #171820;
  color: #fff;
  font: 700 8px/1 "DM Sans", sans-serif;
}

.demo-scene-sidebar i {
  width: 20px;
  height: 4px;
  border-radius: 999px;
  background: #dde0e8;
}

.demo-scene-sidebar i:first-of-type {
  background: var(--demo-accent);
}

.demo-scene-main {
  position: relative;
  padding: 31px 31px 25px;
}

.demo-scene-copy {
  width: 62%;
  position: relative;
  z-index: 2;
}

.demo-scene-copy > span {
  display: block;
  margin-bottom: 10px;
  color: var(--demo-accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.demo-scene-copy h3 {
  max-width: 270px;
  margin: 0;
  color: #1a1b23;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.demo-copy-lines {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.demo-copy-lines i {
  height: 5px;
  border-radius: 20px;
  background: #dfe2e9;
  transform-origin: left center;
  animation: demo-line-in 4.2s ease-in-out infinite;
}

.demo-copy-lines i:nth-child(1) { width: 95%; }
.demo-copy-lines i:nth-child(2) { width: 78%; animation-delay: 90ms; }
.demo-copy-lines i:nth-child(3) { width: 52%; animation-delay: 180ms; }

.demo-metric {
  position: absolute;
  right: 25px;
  top: 27px;
  width: 117px;
  min-height: 113px;
  padding: 17px;
  border: 1px solid rgba(32, 33, 42, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 35px rgba(45, 50, 77, 0.1);
  animation: demo-card-float 4.2s ease-in-out infinite;
}

.demo-metric > span {
  display: block;
  color: #8a8c98;
  font: 600 8px/1.2 "DM Sans", sans-serif;
  text-transform: uppercase;
}

.demo-metric strong {
  display: block;
  margin-top: 10px;
  color: #191a22;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.demo-metric strong::after {
  content: "%";
  margin-left: 2px;
  color: var(--demo-accent);
  font-size: 11px;
}

.demo-metric div {
  height: 4px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaebf0;
}

.demo-metric div i {
  display: block;
  width: 88%;
  height: 100%;
  border-radius: inherit;
  background: var(--demo-accent);
  transform-origin: left center;
  animation: demo-metric-grow 4.2s cubic-bezier(.22, .8, .25, 1) infinite;
}

.demo-blocks {
  position: absolute;
  left: 31px;
  right: 25px;
  bottom: 23px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.95fr;
  gap: 9px;
}

.demo-blocks span {
  height: 51px;
  border: 1px solid rgba(32, 33, 42, 0.07);
  border-radius: 10px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--demo-accent) 22%, white) 32%, transparent 32%),
    #fff;
  box-shadow: 0 8px 18px rgba(42, 46, 72, 0.045);
  transform-origin: center bottom;
  animation: demo-block-rise 4.2s cubic-bezier(.2, .8, .25, 1) infinite;
}

.demo-blocks span:nth-child(2) { animation-delay: 100ms; }
.demo-blocks span:nth-child(3) { animation-delay: 200ms; }

.demo-pointer {
  position: absolute;
  z-index: 4;
  left: 54%;
  top: 61%;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(32, 33, 42, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 24px rgba(42, 46, 72, 0.16);
  animation: demo-pointer-move 4.2s cubic-bezier(.5, .02, .25, 1) infinite;
}

.demo-pointer::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--demo-accent);
  -webkit-mask: url("https://unpkg.com/lucide-static@latest/icons/pointer.svg") center / contain no-repeat;
  mask: url("https://unpkg.com/lucide-static@latest/icons/pointer.svg") center / contain no-repeat;
}

.demo-pointer i {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--demo-accent);
  border-radius: 50%;
  opacity: 0;
  animation: demo-click-ring 4.2s ease-out infinite;
}

.demo-card-footer {
  min-height: 74px;
  align-items: flex-start;
  padding: 16px 2px 0;
}

.demo-card-footer p {
  max-width: 390px;
  margin: 0;
  color: #686a75;
  font-size: 12px;
  line-height: 1.55;
}

.demo-progress {
  width: 54px;
  height: 3px;
  flex: 0 0 auto;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e7ed;
}

.demo-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--demo-accent);
  transform-origin: left center;
  animation: demo-progress 4.2s linear infinite;
}

.service-icon-rail {
  position: absolute;
  z-index: 5;
  right: -27px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.service-icon-rail button {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(34, 35, 48, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 25px rgba(55, 59, 88, 0.11);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-icon-rail button:hover,
.service-icon-rail button:focus-visible {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--demo-accent) 42%, white);
  box-shadow: 0 13px 30px rgba(55, 59, 88, 0.15);
  outline: none;
}

.service-icon-rail button.is-active {
  border-color: var(--demo-accent);
  box-shadow:
    0 13px 30px rgba(55, 59, 88, 0.15),
    0 0 0 3px color-mix(in srgb, var(--demo-accent) 14%, transparent);
}

.service-icon-rail img {
  width: 25px;
  height: 25px;
  display: block;
  object-fit: contain;
}

.service-icon-rail button span {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  padding: 7px 9px;
  border-radius: 7px;
  background: #1d1e25;
  color: #fff;
  font: 600 9px/1 "DM Sans", sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(5px, -50%);
  transition: opacity 150ms ease, transform 150ms ease;
}

.service-icon-rail button:hover span,
.service-icon-rail button:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

@keyframes demo-status-pulse {
  50% { transform: scale(0.72); opacity: 0.62; }
}

@keyframes demo-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes demo-line-in {
  0%, 8% { transform: scaleX(0.08); opacity: 0.25; }
  24%, 82% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0.9); opacity: 0.7; }
}

@keyframes demo-metric-grow {
  0%, 12% { transform: scaleX(0.08); }
  38%, 100% { transform: scaleX(1); }
}

@keyframes demo-block-rise {
  0%, 10% { transform: translateY(17px) scaleY(0.72); opacity: 0; }
  30%, 88% { transform: translateY(0) scaleY(1); opacity: 1; }
  100% { transform: translateY(3px); opacity: 0.78; }
}

@keyframes demo-card-float {
  0%, 100% { transform: translateY(0); }
  48% { transform: translateY(-7px); }
}

@keyframes demo-pointer-move {
  0%, 8% { transform: translate(74px, 41px) rotate(-6deg); opacity: 0; }
  20% { opacity: 1; }
  48%, 73% { transform: translate(0, 0) rotate(-6deg); opacity: 1; }
  100% { transform: translate(-35px, 18px) rotate(-6deg); opacity: 0; }
}

@keyframes demo-click-ring {
  0%, 46% { transform: scale(0.25); opacity: 0; }
  50% { opacity: 0.8; }
  65%, 100% { transform: scale(1.8); opacity: 0; }
}

@keyframes hero-wave-drift {
  0% {
    transform: translate3d(-4%, -7%, 0) rotate(-3deg) scaleX(0.98);
    border-radius: 44% 56% 48% 52% / 58% 46% 54% 42%;
    background-position: 0% 50%;
  }
  50% {
    transform: translate3d(2%, 4%, 0) rotate(1deg) scaleX(1.04);
    border-radius: 57% 43% 55% 45% / 44% 59% 41% 56%;
  }
  100% {
    transform: translate3d(6%, -2%, 0) rotate(3deg) scaleX(1);
    border-radius: 49% 51% 41% 59% / 61% 42% 58% 39%;
    background-position: 100% 50%;
  }
}

@keyframes hero-wave-drift-reverse {
  0% {
    transform: translate3d(7%, 7%, 0) rotate(2deg) scaleX(1.03);
    background-position: 100% 50%;
  }
  100% {
    transform: translate3d(-5%, -7%, 0) rotate(-2deg) scaleX(0.98);
    background-position: 0% 50%;
  }
}

@keyframes hero-wave-middle {
  0% {
    transform: translate3d(-3%, -8%, 0) rotate(-1deg) scaleX(0.97);
    border-radius: 48% 52% 44% 56% / 54% 43% 57% 46%;
  }
  100% {
    transform: translate3d(4%, 9%, 0) rotate(2deg) scaleX(1.05);
    border-radius: 58% 42% 54% 46% / 43% 56% 44% 57%;
  }
}

@media (max-width: 1080px) {
  .hero-layout {
    grid-template-columns: minmax(0, 0.86fr) minmax(460px, 0.76fr) !important;
    gap: 46px !important;
  }

  .service-icon-rail {
    right: -20px;
  }

  .service-icon-rail button {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }
}

@media (max-width: 980px) {
  .site-header,
  .hero-content {
    min-height: auto !important;
  }

  .hero-content {
    padding-bottom: 80px !important;
  }

  .hero-layout {
    grid-template-columns: 1fr !important;
  }

  .service-demo-card {
    width: min(100% - 24px, 690px) !important;
    margin-top: 10px;
  }
}

@media (max-width: 720px) {
  .hero-content {
    width: calc(100% - 32px) !important;
    padding-top: 128px !important;
  }

  .hero-copy h1 {
    font-size: clamp(54px, 15vw, 76px) !important;
  }

  .service-demo-card {
    width: 100% !important;
    height: 490px !important;
    padding: 18px !important;
    margin-top: 4px;
  }

  .demo-viewport {
    height: 320px;
  }

  .demo-scene-main {
    padding: 25px 20px 20px;
  }

  .demo-scene-copy {
    width: 58%;
  }

  .demo-scene-copy h3 {
    font-size: 22px;
  }

  .demo-metric {
    right: 17px;
    top: 21px;
    width: 105px;
  }

  .demo-blocks {
    left: 20px;
    right: 17px;
  }

  .service-icon-rail {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -24px;
    flex-direction: row;
    gap: 6px;
    transform: translateX(-50%);
  }

  .service-icon-rail button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .service-icon-rail img {
    width: 21px;
    height: 21px;
  }

  .service-icon-rail button span {
    right: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translate(50%, 5px);
  }

  .service-icon-rail button:hover span,
  .service-icon-rail button:focus-visible span {
    transform: translate(50%, 0);
  }

  .hero-meta {
    margin-top: 70px !important;
  }
}

@media (max-width: 520px) {
  .service-demo-card {
    height: 445px !important;
    padding: 14px !important;
  }

  .demo-card-header {
    height: 40px;
    padding-bottom: 11px;
  }

  .demo-card-title strong {
    max-width: 145px;
  }

  .demo-status {
    font-size: 7px;
  }

  .demo-viewport {
    height: 280px;
  }

  .demo-scene {
    grid-template-columns: 44px 1fr;
  }

  .demo-scene-sidebar {
    gap: 10px;
  }

  .demo-scene-sidebar i {
    width: 15px;
  }

  .demo-scene-main {
    padding: 20px 14px;
  }

  .demo-scene-copy {
    width: 54%;
  }

  .demo-scene-copy h3 {
    font-size: 18px;
  }

  .demo-copy-lines {
    margin-top: 12px;
  }

  .demo-metric {
    right: 12px;
    top: 17px;
    width: 94px;
    min-height: 100px;
    padding: 14px;
  }

  .demo-metric strong {
    font-size: 24px;
  }

  .demo-blocks {
    left: 14px;
    right: 12px;
    bottom: 17px;
    gap: 6px;
  }

  .demo-blocks span {
    height: 42px;
  }

  .demo-card-footer {
    padding-top: 12px;
  }

  .demo-card-footer p {
    font-size: 10px;
  }

  .service-icon-rail {
    bottom: -21px;
  }

  .service-icon-rail button {
    width: 39px;
    height: 39px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .color-wave-canvas {
    opacity: 0.78;
  }

  .site-header .hero-art::before,
  .site-header .hero-art::after,
  .site-header .hero-color-wash {
    animation: none !important;
  }

  .service-demo-card *,
  .service-demo-card *::before,
  .service-demo-card *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
