/* 21st @ddoemonn/press-depth — static HTML adapt (phone CTAs only) */

:root {
  --press-depth: 4px;
  --press-radius: 9px;
  --press-plate: #a8a29e;
  --press-spring: cubic-bezier(0.34, 1.25, 0.64, 1);
}

a.cta-press-depth {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  align-items: flex-start;
  padding: 0 0 var(--press-depth);
  margin: 0;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  border-radius: var(--press-radius);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.cta-press-depth__plate {
  position: absolute;
  inset-inline: 0;
  top: var(--press-depth);
  bottom: 0;
  border-radius: var(--press-radius);
  background: var(--press-plate);
  pointer-events: none;
}

.cta-press-depth__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--press-radius);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--cta-bg-grad);
  color: var(--cta-fg);
  border: 1px solid var(--cta-border);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(28, 25, 23, 0.06);
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
  animation: cta-press-depth-loop 1.8s var(--press-spring) infinite;
  will-change: transform;
}

.cta-press-depth__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inherit;
  pointer-events: none;
  opacity: 1;
  animation: cta-press-depth-shine 1.8s var(--press-spring) infinite;
}

.cta-press-depth:hover .cta-press-depth__face {
  background: var(--cta-hover);
  color: var(--cta-fg);
  border-color: #fff;
}

.cta-press-depth:focus-visible .cta-press-depth__face {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.cta-press-depth:hover .cta-press-depth__face,
.cta-press-depth:focus-visible .cta-press-depth__face {
  animation-play-state: paused;
}

.cta-press-depth:hover .cta-press-depth__face::after,
.cta-press-depth:focus-visible .cta-press-depth__face::after {
  animation-play-state: paused;
}

.cta-press-depth:active .cta-press-depth__face {
  animation: none;
  transform: translate3d(0, var(--press-depth), 0);
  transition: transform 160ms var(--press-spring);
}

.cta-press-depth:active .cta-press-depth__face::after {
  animation: none;
  opacity: 0;
  transition: opacity 160ms var(--press-spring);
}

@keyframes cta-press-depth-loop {
  0%,
  45%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  12% {
    transform: translate3d(0, var(--press-depth), 0);
  }

  20% {
    transform: translate3d(0, 0, 0);
  }

  28% {
    transform: translate3d(0, var(--press-depth), 0);
  }

  36% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cta-press-depth-shine {
  0%,
  45%,
  100% {
    opacity: 1;
  }

  12%,
  28% {
    opacity: 0;
  }

  20%,
  36% {
    opacity: 1;
  }
}

/* Footer — glass pill, same press mechanic */
[data-motion-footer] a.cta-press-depth {
  border-radius: 999px;
}

[data-motion-footer] a.cta-press-depth .cta-press-depth__plate {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

[data-motion-footer] a.cta-press-depth .cta-press-depth__face {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  color: #f2f2f2;
}

[data-motion-footer] a.cta-press-depth .cta-press-depth__face::after {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

[data-motion-footer] a.cta-press-depth:hover .cta-press-depth__face {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .cta-press-depth__face,
  .cta-press-depth__face::after {
    animation: none !important;
  }
}
