:root {
  --kv-teal: #16a2b5;
  --kv-teal-dark: #0d7a8a;
  --kv-pink: #ff66cc;
  --kv-ink: #0d2f34;
}

.brand-hero.kv-hero {
  min-height: calc(100svh - 88px);
  background: linear-gradient(120deg, #fff 0%, #fff 42%, #f3f8f9 100%);
}

.kv-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.kv-fallback,
.kv-wave,
.kv-network,
.kv-wash,
.kv-sweep,
.kv-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.kv-fallback {
  max-width: none;
  object-fit: cover;
  object-position: 68% center;
  opacity: .96;
  transition: opacity .6s ease;
  -webkit-mask-image:
    linear-gradient(to right, transparent 2%, #000 38%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 2%, #000 38%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

.kv-stage.is-enhanced .kv-fallback {
  opacity: 0;
}

.kv-wave {
  z-index: 1;
  -webkit-mask-image:
    linear-gradient(to right, transparent 2%, #000 38%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 2%, #000 38%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

.kv-network {
  z-index: 3;
}

.kv-field {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  filter: blur(26px);
}

.kv-field--teal {
  top: -18%;
  right: -8%;
  width: 62%;
  height: 96%;
  background: radial-gradient(circle at 40% 40%, rgba(22, 162, 181, .22), rgba(22, 162, 181, .06) 45%, transparent 70%);
}

.kv-field--pink {
  right: 24%;
  bottom: -22%;
  width: 44%;
  height: 80%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 102, 204, .2), transparent 66%);
  filter: blur(32px);
}

.kv-orb {
  position: absolute;
  z-index: 5;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: kv-orb-float 15s ease-in-out infinite;
}

.kv-orb--large {
  top: 20%;
  right: 12%;
  width: clamp(180px, 20vw, 300px);
  overflow: hidden;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .9), rgba(200, 238, 243, .42) 44%, rgba(22, 162, 181, .26) 78%);
  box-shadow: 0 40px 90px -30px rgba(13, 122, 138, .5), inset -18px -22px 50px rgba(13, 122, 138, .2), inset 14px 16px 40px rgba(255, 255, 255, .7);
  backdrop-filter: blur(6px);
}

.kv-orb--large::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .16) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.kv-orb--large::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12%;
  background: linear-gradient(rgba(22, 162, 181, 0), rgba(120, 230, 240, .55), rgba(22, 162, 181, 0));
  animation: kv-scan-y 6s ease-in-out infinite;
}

.kv-orb--pink {
  top: 54%;
  right: 34%;
  width: clamp(90px, 10vw, 140px);
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .92), rgba(255, 205, 236, .55) 44%, rgba(255, 102, 204, .4) 80%);
  box-shadow: 0 26px 60px -22px rgba(255, 102, 204, .55), inset 8px 10px 24px rgba(255, 255, 255, .8);
  animation-duration: 11s;
  animation-direction: reverse;
}

.kv-orb--small {
  right: 6%;
  bottom: 12%;
  width: clamp(60px, 7vw, 96px);
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9), rgba(207, 240, 244, .6) 45%, rgba(22, 162, 181, .28) 80%);
  box-shadow: 0 20px 44px -18px rgba(13, 122, 138, .45), inset 6px 8px 20px rgba(255, 255, 255, .8);
  animation-duration: 18s;
  animation-delay: -6s;
}

.kv-orbit {
  position: absolute;
  z-index: 4;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: kv-ring-spin 46s linear infinite;
}

.kv-orbit::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
}

.kv-orbit--outer {
  top: 32%;
  right: 20%;
  width: clamp(300px, 34vw, 520px);
  border: 1px solid rgba(22, 162, 181, .2);
}

.kv-orbit--outer::before {
  background: var(--kv-teal);
  box-shadow: 0 0 16px rgba(22, 162, 181, .9);
}

.kv-orbit--inner {
  top: 42%;
  right: 27%;
  width: clamp(180px, 21vw, 320px);
  border: 1px dashed rgba(255, 102, 204, .28);
  animation-duration: 30s;
  animation-direction: reverse;
}

.kv-orbit--inner::before {
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: var(--kv-pink);
  box-shadow: 0 0 14px rgba(255, 102, 204, .9);
}

.kv-pulse {
  position: absolute;
  z-index: 4;
  left: 46%;
  top: 58%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--kv-pink);
  box-shadow: 0 0 26px rgba(255, 102, 204, .85);
}

.kv-pulse span {
  position: absolute;
  width: 200px;
  height: 200px;
  margin: -93px 0 0 -93px;
  border: 1.5px solid rgba(255, 102, 204, .5);
  border-radius: 50%;
  animation: kv-ring-pulse 4.5s ease-out infinite;
}

.kv-pulse span:nth-child(2) {
  border-color: rgba(255, 102, 204, .4);
  animation-delay: 1.5s;
}

.kv-pulse span:nth-child(3) {
  border-color: rgba(22, 162, 181, .35);
  animation-delay: 3s;
}

.kv-grid {
  z-index: 2;
  left: auto;
  right: 0;
  width: 62%;
  background-image:
    linear-gradient(rgba(22, 162, 181, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 162, 181, .09) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: kv-grid-pan 12s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at 60% 50%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 50%, #000 20%, transparent 72%);
}

.kv-panel {
  position: absolute;
  z-index: 7;
  border: 1px solid rgba(22, 162, 181, .18);
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 12px 32px -18px rgba(13, 122, 138, .52);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: kv-hud-in .8s ease forwards;
}

.kv-hud {
  top: 13%;
  right: 7%;
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation-delay: 1.1s;
}

.kv-hud__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(22, 162, 181, .22);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 26px -14px rgba(13, 122, 138, .5);
  color: #33565c;
  font-size: 12px;
  font-weight: 750;
}

.kv-hud__row::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--kv-teal);
  animation: kv-blink 1.8s ease-in-out infinite;
}

.kv-hud__row b {
  margin-left: auto;
  color: var(--kv-teal);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.kv-bars {
  right: 9%;
  bottom: 14%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
  padding: 12px 16px;
  border-radius: 14px;
  animation-delay: 1.35s;
}

.kv-bars span {
  width: 6px;
  height: var(--h1);
  border-radius: 3px;
  background: linear-gradient(to top, var(--kv-teal), #7fd8e2);
  animation: kv-bar-grow var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}

.kv-neural {
  top: 42%;
  right: 6%;
  width: 190px;
  height: 132px;
  padding: 14px;
  border-radius: 14px;
  animation-delay: 1.2s;
}

.kv-neural b {
  display: block;
  margin-bottom: 9px;
  color: #7a969b;
  font-size: 10px;
  letter-spacing: .08em;
}

.kv-neural svg {
  width: 100%;
  height: 84px;
  overflow: visible;
}

.kv-neural line {
  stroke-width: 1;
  stroke-dasharray: 3 5;
  animation: kv-synapse var(--kv-synapse-speed, 1.8s) linear var(--kv-synapse-delay, 0s) infinite;
}

.kv-synapses--input line {
  stroke: rgba(255, 102, 204, .42);
}

.kv-synapses--hidden line,
.kv-synapses--output line {
  stroke: rgba(22, 162, 181, .4);
}

.kv-neural line:nth-child(3n+1) {
  --kv-synapse-speed: 1.35s;
  --kv-synapse-delay: -.45s;
}

.kv-neural line:nth-child(3n+2) {
  --kv-synapse-speed: 2.15s;
  --kv-synapse-delay: -1.1s;
}

.kv-neural line:nth-child(3n) {
  --kv-synapse-speed: 2.65s;
  --kv-synapse-delay: -.8s;
}

.kv-neural circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: kv-fire 2.2s ease-in-out infinite;
}

.kv-neurons--input circle {
  fill: var(--kv-pink);
}

.kv-neurons--hidden-a circle {
  fill: #78ccd6;
}

.kv-neurons--hidden-b circle {
  fill: var(--kv-teal);
}

.kv-neurons--output circle {
  fill: var(--kv-teal-dark);
}

.kv-neural circle:nth-child(3n+1) { animation-duration: 1.75s; animation-delay: -.4s; }
.kv-neural circle:nth-child(3n+2) { animation-duration: 2.45s; animation-delay: -1.2s; }
.kv-neural circle:nth-child(3n) { animation-duration: 3.05s; animation-delay: -.8s; }

.kv-gauge {
  top: 22%;
  right: 30%;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--kv-teal) 0turn, #7fd8e2 .72turn, rgba(22, 162, 181, .12) .72turn);
  box-shadow: 0 18px 44px -20px rgba(13, 122, 138, .6);
  animation-delay: 1.45s;
}

.kv-gauge__inner {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #7a969b;
  text-align: center;
  font-size: 9px;
  font-weight: 750;
}

.kv-gauge__inner b {
  display: block;
  color: var(--kv-teal);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kv-tokens {
  right: 22%;
  bottom: 16%;
  width: 176px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation-delay: 1.6s;
}

.kv-tokens span {
  padding: 3px 8px;
  border: 1px solid rgba(22, 162, 181, .2);
  border-radius: 6px;
  background: rgba(22, 162, 181, .1);
  color: #2c6f79;
  font-size: 10px;
  font-weight: 750;
  animation: kv-blink 3.2s ease-in-out infinite;
}

.kv-wash {
  z-index: 8;
  background: linear-gradient(100deg, #fff 0%, rgba(255, 255, 255, .9) 26%, rgba(255, 255, 255, .35) 46%, rgba(255, 255, 255, 0) 62%);
}

.kv-sweep {
  z-index: 9;
  right: auto;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(22, 162, 181, .1), transparent);
  animation: kv-sweep 7s ease-in-out 1.2s infinite;
}

.kv-hero__content {
  position: relative;
  z-index: 10;
}

.home-v6 .kv-hero .brand-hero__copy {
  width: min(640px, 55vw);
  padding: clamp(64px, 9vh, 104px) 0;
}

.kv-hero .brand-hero__support {
  display: block;
}

.kv-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  color: #9db3b7;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
}

.kv-scroll-hint::after {
  content: "";
  width: 1px;
  height: 30px;
  background: linear-gradient(#c9dbde, transparent);
  animation: kv-scroll-float 2.4s ease-in-out infinite;
}

@keyframes kv-orb-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(18px, -26px, 0); }
  66% { transform: translate3d(-14px, -12px, 0); }
}

@keyframes kv-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes kv-ring-pulse {
  0% { transform: scale(.6); opacity: 0; }
  25% { opacity: .55; }
  100% { transform: scale(2.1); opacity: 0; }
}

@keyframes kv-scan-y {
  0% { transform: translateY(-10%); opacity: 0; }
  12%, 88% { opacity: .8; }
  100% { transform: translateY(760%); opacity: 0; }
}

@keyframes kv-grid-pan {
  to { background-position: 60px 60px; }
}

@keyframes kv-hud-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes kv-bar-grow {
  0%, 100% { height: var(--h1); }
  50% { height: var(--h2); }
}

@keyframes kv-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .32; }
}

@keyframes kv-fire {
  0%, 100% { opacity: .22; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

@keyframes kv-synapse {
  to { stroke-dashoffset: -24; }
}

@keyframes kv-sweep {
  0% { transform: translateX(-40%); opacity: 0; }
  30% { opacity: .5; }
  100% { transform: translateX(140%); opacity: 0; }
}

@keyframes kv-scroll-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 1100px) {
  .kv-hud { right: 4%; }
  .kv-neural { right: 3%; }
  .kv-bars { right: 5%; }
  .kv-gauge { right: 28%; }
  .kv-tokens { right: 18%; }
}

@media (max-width: 900px) {
  .brand-hero.kv-hero {
    min-height: 760px;
    align-items: flex-start;
  }

  .home-v6 .kv-hero .brand-hero__copy {
    width: min(650px, 82vw);
    padding: 66px 0 310px;
  }

  .kv-bars,
  .kv-tokens {
    display: none;
  }

  .kv-neural {
    top: auto;
    right: 5%;
    bottom: 27%;
    display: block;
  }

  .kv-hud {
    top: auto;
    right: 5%;
    bottom: 8%;
    width: 220px;
  }

  .kv-gauge {
    top: auto;
    right: 36%;
    bottom: 12%;
  }

  .kv-orb--large {
    top: auto;
    right: 9%;
    bottom: 10%;
    width: min(34vw, 250px);
  }

  .kv-orb--pink {
    top: auto;
    right: 42%;
    bottom: 10%;
  }

  .kv-orbit--outer {
    top: auto;
    right: 10%;
    bottom: 3%;
  }

  .kv-orbit--inner {
    top: auto;
    right: 29%;
    bottom: 8%;
  }

  .kv-pulse {
    left: 40%;
    top: auto;
    bottom: 21%;
  }

  .kv-grid {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 52%;
  }

  .kv-wash {
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, .98) 46%, rgba(255, 255, 255, .6) 66%, rgba(255, 255, 255, .08) 100%);
  }
}

@media (max-width: 700px) {
  .brand-hero.kv-hero {
    min-height: 780px;
  }

  .home-v6 .kv-hero .brand-hero__copy {
    width: 100%;
    padding: 52px 0 330px;
  }

  .kv-hero .brand-hero h1 {
    font-size: clamp(52px, 16vw, 72px);
  }

  .kv-hero .brand-hero__lead {
    font-size: 19px;
  }

  .kv-hud {
    left: 18px;
    right: auto;
    bottom: 42px;
    width: min(218px, 58vw);
    gap: 6px;
  }

  .kv-hud__row {
    gap: 7px;
    padding: 8px 10px;
    font-size: 10.5px;
  }

  .kv-hud__row b {
    font-size: 11px;
  }

  .kv-gauge {
    right: 18px;
    bottom: 70px;
    width: 94px;
    height: 94px;
  }

  .kv-gauge__inner {
    width: 72px;
    height: 72px;
    font-size: 8.5px;
  }

  .kv-gauge__inner b {
    font-size: 18px;
  }

  .kv-neural {
    top: auto;
    right: 18px;
    bottom: 185px;
    width: 190px;
    height: 132px;
  }

  .kv-fallback,
  .kv-wave {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 42%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 42%, #000 100%);
  }

  .kv-orb--large {
    right: -2%;
    bottom: 9%;
    width: 220px;
  }

  .kv-orb--pink {
    right: 48%;
    bottom: 11%;
    width: 90px;
  }

  .kv-orb--small {
    display: none;
  }

  .kv-orbit--outer {
    right: -15%;
    bottom: 1%;
    width: 340px;
  }

  .kv-orbit--inner {
    right: 9%;
    bottom: 8%;
    width: 210px;
  }

  .kv-pulse {
    left: 32%;
    bottom: 19%;
  }

  .kv-scroll-hint {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand-hero.kv-hero {
    min-height: 760px;
  }

  .home-v6 .kv-hero .brand-hero__copy {
    padding-top: 42px;
  }

  .kv-hero .brand-signal {
    max-width: 100%;
    font-size: 11px;
  }

  .kv-hero .actions {
    gap: 8px;
  }

  .kv-hero .btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .kv-hud {
    left: 12px;
    bottom: 34px;
  }

  .kv-gauge {
    right: 12px;
    bottom: 64px;
  }

  .kv-neural {
    right: 12px;
    bottom: 170px;
    width: 180px;
    height: 126px;
    padding: 12px;
  }

  .kv-neural b {
    margin-bottom: 7px;
    font-size: 9.5px;
  }

  .kv-neural svg { height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .kv-stage * {
    animation: none !important;
  }

  .kv-panel {
    opacity: 1;
  }

  .kv-fallback {
    transition: none;
  }

  .kv-wave,
  .kv-network {
    display: none;
  }
}
