/* Shared tap-to-connect hero demo. Isolated under .ab-hi to protect host pages. */
.ab-hi {
  --hi-blue: #0878f9;
  --hi-cyan: #59d9ff;
  --hi-ink: #0b1220;
  --ab-hi-travel-x: 18rem;
  --ab-hi-travel-y: -8rem;
  position: relative;
  width: 100%;
  max-width: min(39rem, 100%);
  margin-inline: auto;
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ab-hi__ambient {
  display: none;
}

.ab-hi__stage {
  position: relative;
  z-index: 1;
  min-height: 32rem;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ab-hi__stage::before {
  display: none;
}

.ab-hi__phone {
  position: absolute;
  z-index: 3;
  top: 2.7rem;
  right: 4rem;
  width: 13.3rem;
  height: 27rem;
  filter: drop-shadow(0 34px 28px rgba(15, 23, 42, 0.25));
  transform: rotate(4deg);
}

.ab-hi__phone-frame {
  position: absolute;
  inset: 0;
  padding: 0.48rem;
  border-radius: 2.75rem;
  background: linear-gradient(145deg, #4e535c, #111318 40%, #080a0d 75%, #616872);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 0 0 3px #090b0e;
}

.ab-hi__phone-edge {
  position: absolute;
  top: 5.5rem;
  right: -0.18rem;
  width: 0.2rem;
  height: 4rem;
  border-radius: 0 3px 3px 0;
  background: #242830;
}

.ab-hi__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 2.3rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 72%, rgba(87, 221, 255, 0.9), transparent 26%),
    radial-gradient(circle at 26% 16%, rgba(22, 90, 240, 0.95), transparent 36%),
    linear-gradient(155deg, #061635, #0a3a9b 55%, #4dcee8);
}

.ab-hi__screen::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 48% -20% -20%;
  border-radius: 48% 48% 0 0;
  background: linear-gradient(150deg, rgba(2, 16, 48, 0.72), #02040a);
  transform: rotate(-12deg);
}

.ab-hi__island {
  position: absolute;
  z-index: 8;
  top: 0.68rem;
  left: 50%;
  width: 4.6rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #020304;
  transform: translateX(-50%);
}

.ab-hi__clock {
  position: absolute;
  z-index: 8;
  top: 0.95rem;
  left: 1rem;
  font-size: 0.48rem;
  font-weight: 700;
}

.ab-hi__idle {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  transition: opacity 300ms ease, transform 400ms ease;
}

.ab-hi__idle p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ab-hi__idle-orb {
  position: relative;
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 30px rgba(87, 221, 255, 0.2);
  backdrop-filter: blur(8px);
}

.ab-hi__idle-orb span {
  position: absolute;
  width: 45%;
  height: 45%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: abHiIdlePulse 2.4s ease-out infinite;
}

.ab-hi__idle-orb span:nth-child(2) { animation-delay: 0.8s; }
.ab-hi__idle-orb span:nth-child(3) { animation-delay: 1.6s; }

.ab-hi__notification {
  position: absolute;
  z-index: 7;
  top: 3.15rem;
  right: 0.72rem;
  left: 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-0.75rem) scale(0.96);
}

.ab-hi__notification img {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.42rem;
}

.ab-hi__notification span {
  min-width: 0;
  flex: 1;
}

.ab-hi__notification small,
.ab-hi__notification strong {
  display: block;
}

.ab-hi__notification small {
  margin-bottom: 0.1rem;
  font-size: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.ab-hi__notification strong {
  font-size: 0.56rem;
  white-space: nowrap;
}

.ab-hi__notification svg {
  width: 0.7rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.65;
}

.ab-hi__profile {
  position: absolute;
  z-index: 6;
  inset: 0;
  padding-top: 7.2rem;
  color: #101828;
  background: #f8fafc;
  text-align: center;
  opacity: 0;
  transform: translateY(1.5rem);
}

.ab-hi__profile-cover {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7.8rem;
  background:
    radial-gradient(circle at 78% 25%, rgba(90, 218, 255, 0.75), transparent 30%),
    linear-gradient(140deg, #0a224f, #0878f9 60%, #61d5e7);
}

.ab-hi__avatar {
  position: relative;
  z-index: 1;
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  margin: -2rem auto 0.55rem;
  border: 0.22rem solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #111827, #4b5563);
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.ab-hi__profile > strong,
.ab-hi__profile > span {
  position: relative;
  z-index: 1;
  display: block;
}

.ab-hi__profile > strong {
  font-size: 0.8rem;
}

.ab-hi__profile > span {
  margin-top: 0.18rem;
  color: #667085;
  font-size: 0.48rem;
}

.ab-hi__profile-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 1rem 0;
}

.ab-hi__profile-actions i {
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #e4e7ec;
  border-radius: 50%;
  background: #fff;
}

.ab-hi__save {
  position: relative;
  z-index: 1;
  width: calc(100% - 2rem);
  margin: 0 auto;
  padding: 0.65rem;
  border-radius: 999px;
  color: #fff;
  background: #101828;
  font-size: 0.52rem;
  font-weight: 800;
}

.ab-hi__card {
  position: absolute;
  z-index: 5;
  top: 8rem;
  left: 2.4rem;
  width: 15.5rem;
  aspect-ratio: 1.586;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.78rem;
  color: #eef2f7;
  background:
    repeating-linear-gradient(105deg, transparent 0 5px, rgba(255, 255, 255, 0.025) 6px),
    linear-gradient(145deg, #2d323b, #090b0e 62%, #181c22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 26px 44px rgba(15, 23, 42, 0.32);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transform: perspective(800px) rotate(-9deg) rotateY(9deg);
  transform-origin: 56% 52%;
  transition: box-shadow 220ms ease, transform 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

.ab-hi__card:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 50px rgba(15, 23, 42, 0.38);
  transform: perspective(800px) rotate(-7deg) rotateY(7deg) translateY(-4px);
}

.ab-hi__card:focus-visible {
  outline: 3px solid rgba(8, 120, 249, 0.35);
  outline-offset: 4px;
}

.ab-hi__card-shine {
  position: absolute;
  inset: -70% -35%;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.16) 50%, transparent 60%);
  transform: translateX(-45%);
  animation: abHiCardShine 5s ease-in-out infinite;
}

.ab-hi__card-brand {
  position: absolute;
  top: 1.25rem;
  left: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ab-hi__card-brand strong {
  font-size: 1.15rem;
  letter-spacing: -0.045em;
}

.ab-hi__card-mark,
.ab-hi__card-tap-icon {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ab-hi__card-mark {
  transform: rotate(90deg);
}

.ab-hi__card-mark i,
.ab-hi__card-tap-icon i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.ab-hi__card-mark i:nth-child(1),
.ab-hi__card-tap-icon i:nth-child(1) { height: 0.42rem; opacity: 0.45; }
.ab-hi__card-mark i:nth-child(2),
.ab-hi__card-tap-icon i:nth-child(2) { height: 0.7rem; opacity: 0.7; }
.ab-hi__card-mark i:nth-child(3),
.ab-hi__card-tap-icon i:nth-child(3) { height: 0.95rem; }

.ab-hi__card-label {
  position: absolute;
  right: 1.2rem;
  bottom: 1.05rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ab-hi__card-tap {
  position: absolute;
  bottom: 0.8rem;
  left: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ab-hi__signal {
  position: absolute;
  z-index: 4;
  top: -2.35rem;
  left: 50%;
  right: auto;
  width: 8rem;
  height: 8rem;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateX(-50%);
}

.ab-hi__signal i {
  position: absolute;
  width: 30%;
  height: 30%;
  border: 1px solid rgba(8, 120, 249, 0.65);
  border-radius: 50%;
}

.ab-hi__replay {
  position: absolute;
  z-index: 8;
  bottom: 1.25rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: #475467;
  background: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.ab-hi__replay svg {
  width: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ab-hi__legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  color: #98a2b3;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ab-hi__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ab-hi__legend span i {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0.22rem rgba(16, 185, 129, 0.1);
}

.ab-hi__legend .ab-hi__legend-line {
  width: 2.5rem;
  height: 1px;
  background: #d0d5dd;
}

/* Dedicated in-page feature placement used after the original heroes. */
.ab-hi-feature {
  padding: clamp(4.5rem, 8vw, 7.5rem) 1rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ab-hi-feature--nfc {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

.ab-hi-feature__inner {
  width: min(100%, 72rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(28rem, 1.25fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.ab-hi-feature__copy {
  max-width: 27rem;
}

.ab-hi-feature__eyebrow {
  margin: 0 0 0.8rem;
  color: #0878f9;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ab-hi-feature__copy h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

.ab-hi-feature__copy > p:not(.ab-hi-feature__eyebrow) {
  margin: 1.15rem 0 1.25rem;
  color: #667085;
  font-size: 1rem;
  line-height: 1.7;
}

.ab-hi-feature__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0066cc !important;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.ab-hi-feature__link span {
  transition: transform 180ms ease;
}

.ab-hi-feature__link:hover span {
  transform: translateX(3px);
}

.ab-hi-feature__demo .ab-hi {
  max-width: 42rem;
}

.ab-dot-split-visual .ab-hi,
.ab-tap-demo .ab-hi {
  max-width: min(35rem, 100%);
}

/* Interaction sequence */
.ab-hi.is-tapping .ab-hi__card {
  animation: abHiCardTap 4s linear forwards;
}

.ab-hi.is-tapping .ab-hi__signal {
  opacity: 1;
}

.ab-hi.is-tapping .ab-hi__signal i {
  animation: abHiSignal 1.5s ease-out 1.75s forwards;
}

.ab-hi.is-tapping .ab-hi__signal i:nth-child(2) { animation-delay: 1.9s; }
.ab-hi.is-tapping .ab-hi__signal i:nth-child(3) { animation-delay: 2.05s; }

.ab-hi.is-tapping .ab-hi__notification {
  animation: abHiNotify 3.5s ease 1.9s forwards;
}

.ab-hi.is-tapping .ab-hi__idle {
  opacity: 0;
  transform: scale(0.92);
  transition-delay: 1.95s;
}

.ab-hi.is-complete .ab-hi__profile {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 550ms cubic-bezier(0.22, 0.8, 0.25, 1);
}

.ab-hi.is-complete .ab-hi__notification {
  opacity: 0;
  transform: translateY(-0.4rem);
  transition: opacity 200ms ease, transform 200ms ease;
}

.ab-hi.is-complete .ab-hi__idle {
  opacity: 0;
}

@keyframes abHiCardTap {
  0% {
    transform: perspective(800px) translate3d(0, 0, 0) rotate(-9deg) rotateY(9deg) scale(1);
    animation-timing-function: cubic-bezier(0.45, 0, 0.18, 1);
  }
  48% {
    transform: perspective(800px) translate3d(var(--ab-hi-travel-x), var(--ab-hi-travel-y), 0) rotate(-0.25deg) rotateY(0deg) scale(0.89);
    animation-timing-function: linear;
  }
  60% {
    transform: perspective(800px) translate3d(var(--ab-hi-travel-x), var(--ab-hi-travel-y), 0) rotate(-0.25deg) rotateY(0deg) scale(0.89);
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  100% {
    transform: perspective(800px) translate3d(0, 0, 0) rotate(-9deg) rotateY(9deg) scale(1);
  }
}

@keyframes abHiSignal {
  0% { opacity: 0.9; transform: scale(0.25); }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes abHiNotify {
  0% { opacity: 0; transform: translateY(-0.75rem) scale(0.96); }
  18%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-0.3rem) scale(0.98); }
}

@keyframes abHiIdlePulse {
  0% { opacity: 0.75; transform: scale(0.4); }
  80%, 100% { opacity: 0; transform: scale(2.15); }
}

@keyframes abHiCardShine {
  0%, 35% { transform: translateX(-45%); }
  65%, 100% { transform: translateX(45%); }
}

.ab-hi__back {
  display: none;
}

.ab-hi[data-ab-hi-device="android"] .ab-hi__phone-frame {
  border-radius: 2.2rem;
  background: linear-gradient(145deg, #e8edf4, #8b95a6 42%, #6d7686);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 0 3px #9aa3b2;
}

.ab-hi[data-ab-hi-device="android"] .ab-hi__phone-edge,
.ab-hi[data-ab-hi-device="android"] .ab-hi__island,
.ab-hi[data-ab-hi-device="android"] .ab-hi__clock {
  display: none;
}

.ab-hi[data-ab-hi-device="android"] .ab-hi__screen {
  opacity: 0;
  transition: opacity 280ms ease;
}

.ab-hi[data-ab-hi-device="android"] .ab-hi__back {
  display: block;
  position: absolute;
  z-index: 4;
  inset: 0.48rem;
  overflow: hidden;
  border-radius: 1.8rem;
  background:
    linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.55) 34%, transparent 51%),
    linear-gradient(145deg, #f0f3f8, #aab3c4);
  transition: opacity 280ms ease;
}

.ab-hi[data-ab-hi-device="android"].is-complete .ab-hi__back {
  opacity: 0;
  pointer-events: none;
}

.ab-hi[data-ab-hi-device="android"].is-complete .ab-hi__screen {
  opacity: 1;
}

.ab-hi__camera {
  position: absolute;
  top: 1.05rem;
  left: 1.05rem;
  display: grid;
  grid-template-columns: repeat(2, 1.85rem);
  gap: 0.28rem;
}

.ab-hi__camera i {
  width: 1.85rem;
  height: 1.85rem;
  border: 0.26rem solid #3d4350;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #42629d 0 8%, #090b0f 25% 100%);
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.35);
}

.ab-hi__camera i:last-child {
  grid-column: 1;
}

.ab-hi__android-brand {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  color: rgba(16, 24, 40, 0.28);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  transform: translateX(-50%);
}

.ab-hi[data-ab-hi-device="android"] .ab-hi__signal {
  top: 2.6rem;
}
.ab-hi--nfc .ab-hi__stage {
  background: transparent;
}

.ab-hi--nfc .ab-hi__replay {
  color: #475467;
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 720px) {
  .ab-hi {
    max-width: 26rem;
  }

  .ab-hi__stage {
    min-height: 27rem;
  }

  .ab-hi__phone {
    top: 2.2rem;
    right: calc(50% - 7.5rem);
    width: 11rem;
    height: 22.4rem;
  }

  .ab-hi__card {
    top: 7rem;
    left: calc(50% - 11.5rem);
    width: 12rem;
  }

  .ab-hi__signal {
    top: -2rem;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .ab-hi__replay {
    bottom: 1rem;
    left: 1rem;
  }

  .ab-hi[data-ab-hi-device="android"] .ab-hi__signal {
    top: 2.1rem;
    right: auto;
  }

}

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

  .ab-hi-feature__copy {
    max-width: 38rem;
    margin-inline: auto;
    text-align: center;
  }

  .ab-hi-feature__demo {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-hi *,
  .ab-hi *::before,
  .ab-hi *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
