/* ============================================
   EFFECTS INVENTORY
   Every effect here is self-contained and reused
   across components via class name or data-effect.
   Components never define their own animation code.
   ============================================ */

/* ---- BUTTON: magnetic pull (hover lifts + shadow grows) ---- */
.btn-magnetic {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  box-shadow: 0 10px 24px rgba(41, 16, 109, 0.2);
}
.btn-magnetic:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 18px 36px rgba(41, 16, 109, 0.3);
}

/* ---- BUTTON: ripple (click coordinates handled by effects.js) ---- */
.btn-ripple {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  background: var(--color-accent);
  color: white;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.btn-ripple .ripple-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(3); opacity: 0; }
}

/* ---- HOVER: card tilt (follows cursor, handled by effects.js) ---- */
.card-tilt {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.card-tilt:hover {
  box-shadow: 0 24px 50px rgba(41, 16, 109, 0.16);
}

/* ---- HOVER: image zoom ---- */
.image-zoom-hover {
  overflow: hidden;
  border-radius: var(--radius-md);
}
.image-zoom-hover img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
  width: 100%;
}
.image-zoom-hover:hover img {
  transform: scale(1.08);
}

/* ---- SCROLL REVEAL: fade up ---- */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---- SCROLL REVEAL: scale in ---- */
.reveal-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-scale-in.in-view {
  opacity: 1;
  transform: scale(1);
}

/* ---- TRANSITION: underline sweep (links/nav) ---- */
.underline-sweep {
  position: relative;
  text-decoration: none;
  color: inherit;
}
.underline-sweep::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--color-accent);
  transition: width 0.3s ease;
}
.underline-sweep:hover::after {
  width: 100%;
}

/* ---- TOGGLE: radio morph (styled radio buttons with sliding indicator) ---- */
.toggle-radio-morph {
  display: inline-flex;
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  padding: 4px;
  position: relative;
  gap: 4px;
}
.toggle-radio-morph input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-radio-morph label {
  position: relative;
  z-index: 2;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.35s ease;
}
.toggle-radio-morph input:checked + label {
  color: var(--color-bg);
}
.toggle-radio-morph .toggle-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--color-primary);
  border-radius: 999px;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 1;
}
.toggle-radio-morph input:nth-of-type(2):checked ~ .toggle-indicator {
  transform: translateX(100%);
}

/* ---- Reduced motion respect, applies to every effect above ---- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
