/* ============================================
   ZIYO INTERNATIONAL - MICRO-INTERACTIONS
   Advanced UI polish and subtle animations
   Version: 2.0 | January 2026
   ============================================ */

/* ============================================
   1. BUTTON MICRO-INTERACTIONS
   ============================================ */

/* Button Press Effect */
.btn-ziyo {
  position: relative;
  transform-style: preserve-3d;
}

.btn-ziyo:active {
  transform: translateY(2px) scale(0.98);
}

/* Button Icon Animation */
.btn-ziyo i,
.btn-ziyo svg {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-ziyo:hover i,
.btn-ziyo:hover svg {
  transform: translateX(4px);
}

/* Button Shine Sweep */
.btn-shine {
  overflow: hidden;
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-shine:hover::before {
  left: 100%;
}

/* Button Border Animation */
.btn-border-animate {
  position: relative;
  background: transparent;
  overflow: hidden;
}

.btn-border-animate::before,
.btn-border-animate::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--copper-gradient);
  transition: transform 0.4s ease;
}

.btn-border-animate::before {
  top: 0;
  left: 0;
  transform: translateX(-100%);
}

.btn-border-animate::after {
  bottom: 0;
  right: 0;
  transform: translateX(100%);
}

.btn-border-animate:hover::before,
.btn-border-animate:hover::after {
  transform: translateX(0);
}

/* ============================================
   2. CARD MICRO-INTERACTIONS
   ============================================ */

/* Card Hover Glow */
.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--copper-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-glow:hover::before {
  opacity: 1;
}

/* Card Content Slide */
.card-content-slide {
  overflow: hidden;
}

.card-content-slide .card-title {
  transition: transform 0.3s ease;
}

.card-content-slide:hover .card-title {
  transform: translateY(-5px);
}

/* Card Image Zoom */
.card-image-zoom {
  overflow: hidden;
}

.card-image-zoom img,
.card-image-zoom .card-bg {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-image-zoom:hover img,
.card-image-zoom:hover .card-bg {
  transform: scale(1.08);
}

/* ============================================
   3. LINK MICRO-INTERACTIONS
   ============================================ */

/* Link Underline Slide */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Link Color Transition */
.link-color-shift {
  background: linear-gradient(90deg, var(--text-secondary) 50%, var(--copper-gold) 50%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background-position 0.3s ease;
}

.link-color-shift:hover {
  background-position: -100% 0%;
}

/* ============================================
   4. INPUT MICRO-INTERACTIONS
   ============================================ */

/* Input Focus Animation */
.input-focus-line {
  position: relative;
}

.input-focus-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--copper-gradient);
  transition: all 0.3s ease;
}

.input-focus-line:focus-within::after {
  left: 0;
  width: 100%;
}

/* Input Label Float */
.input-float-label {
  position: relative;
}

.input-float-label label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
  background: var(--dark-card);
  padding: 0 4px;
}

.input-float-label input:focus ~ label,
.input-float-label input:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 0.75rem;
  color: var(--copper-gold);
}

/* ============================================
   5. ICON MICRO-INTERACTIONS
   ============================================ */

/* Icon Bounce */
.icon-bounce {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-bounce:hover {
  transform: translateY(-3px);
}

/* Icon Rotate */
.icon-rotate {
  transition: transform 0.4s ease;
}

.icon-rotate:hover {
  transform: rotate(15deg);
}

/* Icon Scale Pulse */
.icon-pulse {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Icon Color Fill */
.icon-fill {
  position: relative;
}

.icon-fill::before {
  content: attr(data-icon);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--copper-gold);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.3s ease;
}

.icon-fill:hover::before {
  clip-path: inset(0 0 0 0);
}

/* ============================================
   6. NAVIGATION MICRO-INTERACTIONS
   ============================================ */

/* Nav Item Indicator */
.nav-indicator {
  position: relative;
}

.nav-indicator::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--copper-gold);
  border-radius: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-indicator:hover::before,
.nav-indicator.active::before {
  transform: translateX(-50%) scale(1);
}

/* Mobile Menu Animation */
.menu-icon-animate {
  width: 24px;
  height: 18px;
  position: relative;
  cursor: pointer;
}

.menu-icon-animate span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.menu-icon-animate span:nth-child(1) { top: 0; }
.menu-icon-animate span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-icon-animate span:nth-child(3) { bottom: 0; }

.menu-icon-animate.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-icon-animate.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.menu-icon-animate.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* ============================================
   7. LOADING MICRO-INTERACTIONS
   ============================================ */

/* Skeleton Shimmer */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    var(--dark-card) 25%,
    var(--dark-tertiary) 50%,
    var(--dark-card) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Progress Bar Animation */
.progress-animate {
  position: relative;
  overflow: hidden;
}

.progress-animate::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: progressShine 2s infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================
   8. SCROLL MICRO-INTERACTIONS
   ============================================ */

/* Parallax Text */
.parallax-text {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Scroll Reveal Stagger */
[data-scroll-stagger] > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-scroll-stagger].visible > *:nth-child(1) { transition-delay: 0.1s; }
[data-scroll-stagger].visible > *:nth-child(2) { transition-delay: 0.2s; }
[data-scroll-stagger].visible > *:nth-child(3) { transition-delay: 0.3s; }
[data-scroll-stagger].visible > *:nth-child(4) { transition-delay: 0.4s; }
[data-scroll-stagger].visible > *:nth-child(5) { transition-delay: 0.5s; }
[data-scroll-stagger].visible > *:nth-child(6) { transition-delay: 0.6s; }

[data-scroll-stagger].visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   9. TOOLTIP MICRO-INTERACTIONS
   ============================================ */

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 8px 12px;
  background: var(--dark-tertiary);
  color: var(--text-primary);
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--dark-tertiary);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   10. NOTIFICATION MICRO-INTERACTIONS
   ============================================ */

/* Badge Pulse */
.badge-pulse {
  position: relative;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: inherit;
  animation: badgePulse 2s ease-out infinite;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Toast Slide In */
.toast-slide {
  animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   11. IMAGE MICRO-INTERACTIONS
   ============================================ */

/* Image Reveal */
.image-reveal-wrapper {
  position: relative;
  overflow: hidden;
}

.image-reveal-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark-primary);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.image-reveal-wrapper.revealed::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* Image Tint on Hover */
.image-tint {
  position: relative;
  overflow: hidden;
}

.image-tint::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(184, 115, 51, 0.3) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.image-tint:hover::after {
  opacity: 1;
}

/* ============================================
   12. TEXT MICRO-INTERACTIONS
   ============================================ */

/* Text Highlight */
.text-highlight {
  background: linear-gradient(
    to right,
    var(--copper-gold) 0%,
    var(--copper-gold) 100%
  );
  background-size: 0% 30%;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s ease;
}

.text-highlight:hover {
  background-size: 100% 30%;
}

/* Text Split Hover */
.text-split {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.text-split span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-split:hover span {
  transform: translateY(-100%);
}

.text-split::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-split:hover::after {
  top: 0;
}

/* ============================================
   13. REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .btn-shine::before,
  .icon-pulse,
  .skeleton-shimmer,
  .progress-animate::after,
  .badge-pulse::after {
    animation: none;
  }

  .card-glow::before,
  .link-underline::after,
  .nav-indicator::before,
  [data-tooltip]::before,
  [data-tooltip]::after {
    transition: none;
  }
}
