/* Magic UI Interactive Hover Button — vanilla port */

.ihb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid var(--forest);
  background: var(--bg-card);
  color: var(--forest);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.2;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  min-height: 2.75rem;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ihb:hover {
  text-decoration: none;
  color: var(--forest);
}

.ihb:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

.ihb__default {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ihb__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--forest);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  transform-origin: center;
}

.ihb__text {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ihb__hover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ffffff;
  transform: translateX(3rem);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.ihb__arrow {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ihb--large {
  font-size: 1rem;
  padding: 0.7rem 1.75rem;
  min-height: 3rem;
}

@media (hover: hover) {
  .ihb:hover .ihb__dot {
    transform: scale(100.8);
  }

  .ihb:hover .ihb__text {
    transform: translateX(3rem);
    opacity: 0;
  }

  .ihb:hover .ihb__hover {
    transform: translateX(-0.35rem);
    opacity: 1;
  }
}

/* Dark mode */
html.dark .ihb {
  border-color: var(--sage);
  background: var(--bg-card);
  color: var(--text-heading);
}

html.dark .ihb:hover {
  color: var(--text-heading);
}

html.dark .ihb__dot {
  background: var(--sage);
}

html.dark .ihb__hover {
  color: var(--forest);
}

/* Full width on small screens (hero / final CTA) */
@media (max-width: 600px) {
  .hero__actions .ihb,
  .demo-cta__card .ihb,
  .final-cta .ihb {
    width: 100%;
  }
}
