/**
 * Micro-Interactions — hover effects, card treatments, cursor.
 * @since 3.3.0
 */

/* Smooth Link Underlines */
.ccec-link-underline { position: relative; text-decoration: none; }
.ccec-link-underline::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1.5px;
    background: currentColor; transform: scaleX(0); transform-origin: right;
    transition: transform 0.35s var(--ccec-ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.ccec-link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Border Beam */
@property --ccec-beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.ccec-border-beam { position: relative; }
.ccec-border-beam::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
    background: conic-gradient(from var(--ccec-beam, 0deg), transparent 0%, transparent 60%, var(--ccec-primary) 75%, var(--ccec-secondary-light) 88%, transparent 100%);
    -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;
    animation: ccec-beam-spin 3.5s linear infinite;
}
@keyframes ccec-beam-spin { to { --ccec-beam: 360deg; } }

/* Card Image Zoom */
.ccec-card-zoom { overflow: hidden; border-radius: inherit; }
.ccec-card-zoom img { transition: transform 0.5s var(--ccec-ease-expo, cubic-bezier(0.16, 1, 0.3, 1)), filter 0.5s; will-change: transform; }
.ccec-card-zoom:hover img { transform: scale(1.05); filter: brightness(1.08); }

/* Card Hover Lift */
.ccec-card-lift { transition: transform 0.4s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), box-shadow 0.4s ease; }
.ccec-card-lift:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--ccec-shadow-hover, 0 20px 40px -5px rgba(0,0,0,0.08)); }

/* Glassmorphism */
.ccec-glass {
    background: var(--ccec-glass-bg, rgba(255,255,255,0.08));
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ccec-glass-border, rgba(255,255,255,0.12));
}

/* Spring Button */
.ccec-btn-spring { transition: transform 0.3s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), box-shadow 0.3s ease; }
.ccec-btn-spring:hover { transform: translateY(-3px); }
.ccec-btn-spring:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }

/* CTA Shimmer */
.ccec-shimmer { position: relative; overflow: hidden; }
.ccec-shimmer::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: ccec-shimmer 4s ease-in-out infinite;
}
@keyframes ccec-shimmer { 0% { left: -100%; } 40% { left: 100%; } 100% { left: 100%; } }

/* Custom Cursor */
.ccec-cursor { pointer-events: none; position: fixed; top: 0; left: 0; z-index: 99999; mix-blend-mode: difference; }
.ccec-cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; border-radius: 50%; position: absolute; }
.ccec-cursor__ring {
    width: 36px; height: 36px; margin: -18px 0 0 -18px;
    border: 1.5px solid rgba(255,255,255,0.5); border-radius: 50%; position: absolute;
    transition: width 0.3s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), height 0.3s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), margin 0.3s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), border-color 0.3s;
}
.ccec-cursor__ring.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--ccec-primary); }
.ccec-cursor__ring.is-media { width: 80px; height: 80px; margin: -40px 0 0 -40px; border-color: rgba(255,255,255,0.2); }
.ccec-cursor__ring.is-click { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
@media (pointer: coarse) { .ccec-cursor { display: none !important; } }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ccec-border-beam::before, .ccec-shimmer::after { animation: none; }
    .ccec-card-lift:hover, .ccec-btn-spring:hover { transform: none; }
}
