/* Shared Explore CYN + Get In Touch CTA pair */

.cta-pair {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .cta-pair {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    gap: 1rem 1.25rem;
  }
}

.cta-pair__wrap {
  display: flex;
  justify-content: center;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
  will-change: transform;
}

@media (min-width: 640px) {
  .cta-pair__wrap {
    flex: 0 0 auto;
  }
}

/* —— Button base —— */
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.5rem;
  line-height: 1.2;
  isolation: isolate;
  vertical-align: middle;
  --cta-x: 50%;
  --cta-y: 50%;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.35, 0.64, 1),
    box-shadow 0.45s ease,
    filter 0.4s ease,
    border-color 0.35s ease;
}

.btn-cta__label,
.btn-cta__icon {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.btn-cta__label {
  display: inline-flex;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.btn-cta__shine {
  position: absolute;
  inset: -40%;
  z-index: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(255, 255, 255, 0.22) 60deg,
    transparent 120deg,
    rgba(255, 255, 255, 0.12) 200deg,
    transparent 280deg
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* —— Explore CYN —— */
.btn-cta--explore {
  overflow: hidden;
}

.btn-cta--explore::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--cta-x) var(--cta-y),
    rgba(255, 255, 255, 0.38) 0%,
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.btn-cta--explore:hover,
.btn-cta--explore:focus-visible {
  transform: translateY(-4px) translateZ(0) scale(1.02);
  filter: saturate(1.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -2px 0 rgba(0, 0, 0, 0.08) inset,
    0 0 32px -4px rgba(91, 191, 191, 0.55),
    0 26px 48px -16px rgba(91, 191, 191, 0.72);
}

.btn-cta--explore:hover::before,
.btn-cta--explore:focus-visible::before,
.btn-cta--explore:hover .btn-cta__shine,
.btn-cta--explore:focus-visible .btn-cta__shine {
  opacity: 1;
}

.btn-cta--explore:hover .btn-cta__shine,
.btn-cta--explore:focus-visible .btn-cta__shine {
  animation: cta-shine-spin 4s linear infinite;
}

@keyframes cta-shine-spin {
  to { transform: rotate(360deg); }
}

.btn-cta--explore:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.12s;
}

.btn-cta__icon--orbit {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  display: grid;
  place-items: center;
  align-self: center;
}

.btn-cta__orbit-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: none;
}

.btn-cta__compass {
  width: 1rem;
  height: 1rem;
  display: block;
  transform-origin: center center;
  transition: filter 0.35s ease;
}

.btn-cta--explore:hover .btn-cta__orbit-ring,
.btn-cta--explore:focus-visible .btn-cta__orbit-ring {
  opacity: 1;
  transform: scale(1);
  animation: cta-orbit-ring 2.8s linear infinite;
}

.btn-cta--explore:hover .btn-cta__icon--orbit,
.btn-cta--explore:focus-visible .btn-cta__icon--orbit {
  animation: cta-icon-float 3.2s ease-in-out infinite;
}

.btn-cta--explore:hover .btn-cta__compass,
.btn-cta--explore:focus-visible .btn-cta__compass {
  animation: cta-compass-orbit 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.75));
}

@keyframes cta-orbit-ring {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes cta-compass-orbit {
  from { transform: rotate(0deg) translateX(3px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(3px) rotate(-360deg); }
}

@keyframes cta-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* —— Get In Touch —— */
.btn-cta--contact {
  overflow: hidden;
}

.btn-cta--contact:hover,
.btn-cta--contact:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(91, 191, 191, 0.35);
  background: rgba(14, 42, 56, 0.04);
  box-shadow:
    0 0 0 1px rgba(91, 191, 191, 0.12),
    0 16px 36px -18px rgba(91, 191, 191, 0.35);
}

.btn-cta--contact:hover .btn-cta__label,
.btn-cta--contact:focus-visible .btn-cta__label {
  transform: translateX(3px);
}

.btn-cta--contact:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.1s;
}

.btn-cta--contact:active .btn-cta__arrow {
  transform: translateX(8px) scaleX(1.15);
}

.btn-cta__icon--arrow {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  display: grid;
  place-items: center;
  align-self: center;
  overflow: visible;
}

.btn-cta__arrow {
  width: 1rem;
  height: 1rem;
  display: block;
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.btn-cta__arrow-trail {
  position: absolute;
  right: 50%;
  top: 50%;
  height: 2px;
  width: 0;
  margin-top: -1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(91, 191, 191, 0.15), rgba(91, 191, 191, 0.55));
  opacity: 0;
  transform-origin: right center;
  pointer-events: none;
}

.btn-cta--contact:hover .btn-cta__arrow-trail,
.btn-cta--contact:focus-visible .btn-cta__arrow-trail {
  width: 1.1rem;
  opacity: 1;
  transform: translateX(-2px);
  transition:
    width 0.5s cubic-bezier(0.34, 1.35, 0.64, 1),
    opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.btn-cta--contact:hover .btn-cta__arrow,
.btn-cta--contact:focus-visible .btn-cta__arrow {
  transform: translateX(7px) scaleX(1.35);
  filter: drop-shadow(4px 0 8px rgba(91, 191, 191, 0.45));
}

/* Cancel generic btn hover transforms when using btn-cta */
a.btn-primary.btn-cta:hover,
a.btn-primary.btn-cta:focus-visible {
  transform: translateY(-4px) translateZ(0) scale(1.02);
}

a.btn-ghost.btn-cta:hover,
a.btn-ghost.btn-cta:focus-visible {
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .cta-pair__wrap {
    transition: none;
  }

  .btn-cta--explore:hover .btn-cta__icon--orbit,
  .btn-cta--explore:focus-visible .btn-cta__icon--orbit,
  .btn-cta--explore:hover .btn-cta__compass,
  .btn-cta--explore:focus-visible .btn-cta__compass,
  .btn-cta--explore:hover .btn-cta__orbit-ring,
  .btn-cta--explore:focus-visible .btn-cta__orbit-ring,
  .btn-cta--explore:hover .btn-cta__shine {
    animation: none;
  }

  .btn-cta--contact:hover .btn-cta__arrow,
  .btn-cta--contact:focus-visible .btn-cta__arrow {
    transform: translateX(3px);
  }
}
