/* Focused hero hierarchy: one promise, one action, one diagnostic story. */

.hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(500px, .96fr);
  gap: clamp(30px, 3.6vw, 58px);
}

.hero-copy {
  padding-bottom: 0;
}

.hero h1 {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: clamp(44px, 4.45vw, 66px);
  line-height: .96;
}

.hero-title-accent {
  display: inline;
}

.hero-lead {
  max-width: 590px;
  margin-bottom: 28px;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
}

.hero-actions {
  flex-wrap: nowrap;
  gap: 20px;
}

.hero-actions .button-primary {
  min-height: 60px;
  padding-inline: 27px;
  background: linear-gradient(120deg, #416dff 0%, #4c9fff 48%, #62eadb 112%);
}

.hero-demo-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 3px;
  color: rgba(215, 226, 241, .7);
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms cubic-bezier(.2, 0, 0, 1), transform 180ms cubic-bezier(.2, 0, 0, 1);
}

.hero-demo-link::before {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(98, 232, 255, .58), rgba(98, 232, 255, 0));
  content: "";
  opacity: .58;
  transform: scaleX(.72);
  transform-origin: left;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(.2, 0, 0, 1);
}

.hero-demo-link::after {
  margin-left: 9px;
  content: "→";
  color: rgba(98, 232, 255, .76);
  font-size: 17px;
  transition: transform 180ms cubic-bezier(.2, 0, 0, 1);
}

.hero-demo-link:hover,
.hero-demo-link:focus-visible {
  color: #f4f8ff;
  transform: translateY(-1px);
}

.hero-demo-link:hover::before,
.hero-demo-link:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

.hero-demo-link:hover::after,
.hero-demo-link:focus-visible::after {
  transform: translateX(3px);
}

.hero-demo-link:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(98, 232, 255, .72);
  outline-offset: 5px;
}

.hero-visual[data-avatar-active="true"] {
  min-height: 650px;
}

.hero-avatar {
  inset: 10px -188px 8px 62px;
  border-radius: 46% 28% 38% 48% / 40% 34% 50% 48%;
  opacity: .74;
}

.hero-avatar-stage {
  --hero-avatar-blur: 0px;
  --hero-avatar-focused-blur: 2.4px;
  filter: blur(var(--hero-avatar-blur)) saturate(.86) brightness(.88) contrast(.98);
  transform: translate3d(14px, 0, 0) scale(1.02);
  transition: filter .82s cubic-bezier(.16, 1, .3, 1);
}

.hero[data-visual-focus="funnel"] .hero-avatar-stage {
  --hero-avatar-blur: var(--hero-avatar-focused-blur);
}

.hero-avatar::before {
  background:
    radial-gradient(circle at 74% 37%, transparent 0 17%, rgba(7, 11, 18, .12) 36%, rgba(7, 11, 18, .44) 70%, rgba(7, 11, 18, .72) 100%),
    linear-gradient(90deg, #070b12 0%, rgba(7, 11, 18, .98) 20%, rgba(7, 11, 18, .72) 46%, rgba(7, 11, 18, .18) 73%, transparent 92%),
    linear-gradient(0deg, #070b12 0%, rgba(7, 11, 18, .66) 24%, rgba(7, 11, 18, .12) 48%, transparent 64%);
}

.hero-avatar::after {
  opacity: .45;
}

.hero-visual[data-avatar-active="true"] .scene-kicker {
  z-index: 16;
  top: 8%;
  left: 1%;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: rgba(126, 230, 255, .76);
  font-size: 10px;
  letter-spacing: .14em;
  opacity: 0;
  transform: translate3d(-18px, 0, 0);
  transition: opacity .54s cubic-bezier(.16, 1, .3, 1), transform .72s cubic-bezier(.16, 1, .3, 1);
}

.hero[data-visual-focus="funnel"] .hero-visual[data-avatar-active="true"] .scene-kicker {
  opacity: .78;
  transform: translate3d(0, 0, 0);
}

.hero-visual[data-avatar-active="true"] .hero-funnel {
  --funnel-intro-delay: 1.6s;
  --funnel-intro-duration: .82s;
  top: 16%;
  right: 24%;
  bottom: 11%;
  left: -3%;
  opacity: 0;
  transform: translate3d(-72px, 18px, 0) scale(.965);
  transform-origin: 42% 54%;
  transition: opacity .72s cubic-bezier(.16, 1, .3, 1), transform .82s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform;
}

.hero-visual[data-avatar-active="true"] .hero-funnel[data-presence="visible"] {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

.hero-visual[data-avatar-active="true"] .hero-funnel::before {
  border-color: rgba(126, 208, 255, .12);
  background: linear-gradient(180deg, rgba(7, 18, 34, .9), rgba(5, 15, 26, .76));
  backdrop-filter: blur(10px);
}

.hero-visual[data-avatar-active="true"] .funnel-sources {
  justify-content: center;
}

.hero-visual[data-avatar-active="true"] .funnel-sources span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(193, 214, 238, .58);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .035em;
  opacity: .72;
  backdrop-filter: none;
}

.hero-visual[data-avatar-active="true"] .hero-funnel-stage {
  opacity: .82;
  transition: opacity 280ms cubic-bezier(.2, 0, 0, 1);
}

.hero-visual[data-avatar-active="true"] .hero-funnel-stage::before {
  border-color: rgba(157, 206, 255, .2);
  background:
    linear-gradient(105deg, rgba(27, 56, 112, .88), rgba(33, 81, 143, .64) 58%, rgba(41, 128, 151, .4)),
    rgba(7, 18, 35, .88);
}

.hero-visual[data-avatar-active="true"] .hero-funnel-stage::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
}

.hero-funnel[data-mode="flow"] .stage-leads,
.hero-funnel[data-mode="loss"] .stage-bookings,
.hero-funnel[data-mode="output"] .stage-payments,
.hero-funnel[data-mode="settled"] .hero-funnel-stage {
  opacity: 1;
}

.hero-visual[data-avatar-active="true"] .stage-payments::before {
  border-color: rgba(119, 255, 211, .38);
  background: linear-gradient(116deg, rgba(16, 76, 90, .94), rgba(39, 142, 128, .76));
}

.funnel-conversion {
  opacity: .16;
  transform: translateY(-50%) scale(.94);
  transition: opacity 260ms cubic-bezier(.2, 0, 0, 1), transform 300ms cubic-bezier(.2, 0, 0, 1);
}

.hero-funnel[data-mode="loss"] .conversion-one {
  opacity: .92;
  transform: translateY(-50%) scale(1);
}

.hero-funnel[data-mode="output"] .conversion-three {
  opacity: .78;
  transform: translateY(-50%) scale(1);
}

.hero-funnel[data-mode="settled"] .funnel-conversion {
  opacity: .26;
}

.hero-funnel[data-mode="settled"] .conversion-one {
  opacity: .55;
  transform: translateY(-50%) scale(1);
}

.hero-visual[data-avatar-active="true"] .hero-funnel-loss {
  top: 88.5%;
  left: 7%;
  width: 154px;
  padding: 13px 15px 14px;
  border-color: rgba(255, 109, 124, .62);
  background: linear-gradient(135deg, rgba(73, 12, 29, .97), rgba(29, 8, 19, .95));
  opacity: .38;
  transition: opacity 280ms cubic-bezier(.2, 0, 0, 1), transform 300ms cubic-bezier(.2, 0, 0, 1);
}

.hero-funnel-loss small {
  font-size: 8px;
}

.hero-funnel-loss strong {
  margin-top: 5px;
  font-size: 30px;
}

.hero-funnel-loss span {
  margin-top: 4px;
  font-size: 10px;
}

.hero-funnel[data-mode="loss"] .hero-funnel-loss,
.hero-funnel[data-mode="settled"] .hero-funnel-loss {
  opacity: 1;
}

.hero-visual[data-avatar-active="true"] .hero-funnel-output {
  border-color: rgba(101, 243, 189, .18);
  background: rgba(4, 25, 26, .76);
  opacity: .34;
  transition: opacity 280ms cubic-bezier(.2, 0, 0, 1), transform 300ms cubic-bezier(.2, 0, 0, 1);
}

.hero-funnel[data-mode="output"] .hero-funnel-output,
.hero-funnel[data-mode="settled"] .hero-funnel-output {
  opacity: .88;
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(460px, .92fr);
    gap: 28px;
  }

  .hero-avatar {
    inset: 14px -174px 8px 42px;
  }

  .hero-visual[data-avatar-active="true"] .hero-funnel {
    right: 20%;
    left: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual[data-avatar-active="true"] {
    min-height: 590px;
  }

  .hero-avatar {
    inset: 8px -92px 0 12%;
    opacity: .68;
  }

  .hero-visual[data-avatar-active="true"] .hero-funnel {
    top: 15%;
    right: 28%;
    bottom: 8%;
    left: 2%;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: 108px;
  }

  .hero .hero-copy::before {
    position: absolute;
    z-index: -1;
    inset: -18px -24px -24px -14px;
    background: linear-gradient(90deg, rgba(7, 11, 18, .97) 0%, rgba(7, 11, 18, .84) 51%, rgba(7, 11, 18, .36) 79%, transparent 100%);
    content: "";
    filter: blur(12px);
    pointer-events: none;
  }

  .hero .eyebrow {
    margin-bottom: 15px;
  }

  .hero h1 {
    max-width: 100%;
    margin-bottom: 19px;
    font-size: clamp(38px, 10.7vw, 48px);
    line-height: 1;
  }

  .hero-lead {
    margin-bottom: 22px;
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .hero-actions .button-primary {
    width: 100%;
    min-height: 56px;
  }

  .hero-demo-link {
    align-self: flex-start;
    min-height: 44px;
    padding-inline: 2px;
  }

  .hero-visual[data-avatar-active="true"] {
    min-height: 520px;
    margin-top: 2px;
  }

  .hero-avatar {
    top: -790px;
    right: -190px;
    bottom: auto;
    left: 34%;
    height: 1110px;
    opacity: .62;
  }

  .hero-avatar-stage {
    --hero-avatar-focused-blur: 1.6px;
    filter: blur(var(--hero-avatar-blur)) saturate(.78) brightness(.76) contrast(.96);
  }

  .hero-avatar::before {
    background:
      radial-gradient(circle at 73% 37%, transparent 0 16%, rgba(7, 11, 18, .12) 34%, rgba(7, 11, 18, .48) 70%, rgba(7, 11, 18, .76) 100%),
      linear-gradient(90deg, #070b12 0%, rgba(7, 11, 18, .98) 38%, rgba(7, 11, 18, .62) 70%, transparent 96%),
      linear-gradient(0deg, #070b12 0%, rgba(7, 11, 18, .76) 27%, transparent 52%),
      linear-gradient(180deg, rgba(7, 11, 18, .62), transparent 30%);
  }

  .hero-avatar-video {
    display: none !important;
  }

  .hero-visual[data-avatar-active="true"] .scene-kicker {
    top: 5%;
    left: 4%;
  }

  .hero-visual[data-avatar-active="true"] .hero-funnel {
    top: 15%;
    right: -1%;
    bottom: 0;
    left: -1%;
  }

  .hero-visual[data-avatar-active="true"] .funnel-sources span {
    font-size: 8px;
  }

  .funnel-conversion.conversion-two,
  .funnel-conversion.conversion-three {
    opacity: 0 !important;
  }

  .hero-visual[data-avatar-active="true"] .hero-funnel-loss {
    top: 88%;
    left: 3%;
    width: 128px;
    padding: 10px 11px 11px;
  }

  .hero-funnel-loss small {
    font-size: 7px;
  }

  .hero-funnel-loss strong {
    font-size: 25px;
  }

  .hero-funnel-loss span {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-avatar-stage {
    --hero-avatar-blur: var(--hero-avatar-focused-blur);
    transition: none;
  }

  .hero-visual[data-avatar-active="true"] .scene-kicker {
    opacity: .78;
    transform: none;
    transition: none;
  }

  .hero-visual[data-avatar-active="true"] .hero-funnel {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .hero-funnel .funnel-conversion {
    opacity: .28;
    transform: translateY(-50%);
  }

  .hero-funnel .conversion-one,
  .hero-funnel .hero-funnel-loss {
    opacity: 1;
  }

  .hero-funnel .hero-funnel-output {
    opacity: .88;
  }
}
