/**
 * OCTO Interactive Animations CSS
 * Styles for scroll reveals, custom cursor, and interactive effects
 */

/* ============================================
   1. SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Different reveal directions */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   2. CUSTOM CURSOR
   ============================================ */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
    opacity: 0.8;
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.custom-cursor.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: rgba(221, 172, 95, 0.5);
}

.custom-cursor-dot.cursor-hover {
    width: 8px;
    height: 8px;
    background: rgba(221, 172, 95, 0.8);
}

/* Hide custom cursor on mobile */
@media (max-width: 768px) {

    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}

/* ============================================
   3. SCROLL PROGRESS INDICATOR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--amber));
    z-index: 9998;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--gold);
}

/* ============================================
   4. FLOATING ANIMATION
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   5. CARD HOVER ENHANCEMENTS
   ============================================ */
.card,
.member-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    will-change: transform;
}

.card:hover,
.member-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(221, 172, 95, 0.2);
}

/* ============================================
   6. GALLERY ITEM ANIMATIONS
   ============================================ */
.gallery-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(221, 172, 95, 0.3);
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ============================================
   7. BUTTON MAGNETIC EFFECT
   ============================================ */
.cta,
.btn-primary,
.member-card button {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        background-color 0.3s ease,
        box-shadow 0.3s ease;
    will-change: transform;
}

.cta:hover,
.btn-primary:hover,
.member-card button:hover {
    box-shadow: 0 10px 30px rgba(221, 172, 95, 0.4);
}

/* ============================================
   8. SMOOTH SCROLLING
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* Disable smooth scroll for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal-element,
    .card,
    .member-card,
    .gallery-item {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   9. SECTION TRANSITIONS
   ============================================ */
section {
    transition: background-color 0.5s ease;
}

/* ============================================
   10. LINK ACTIVE STATE ANIMATION
   ============================================ */
.nav a {
    position: relative;
    transition: color 0.3s ease;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--gold);
}

.nav a:hover::before,
.nav a.active::before {
    width: 100%;
}

/* ============================================
   11. HERO PARALLAX ENHANCEMENT
   ============================================ */
.hero-slide {
    will-change: transform;
    transition: opacity 1.5s ease-in-out, transform 0.1s ease-out;
}

/* ============================================
   12. STAGGER ANIMATION
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-list li,
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* ============================================
   13. IMAGE LAZY LOAD FADE
   ============================================ */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded,
img:not([data-src]) {
    opacity: 1;
}

/* ============================================
   14. GLOW EFFECTS ON HOVER
   ============================================ */
.card-icon {
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
    text-shadow: 0 0 20px var(--gold),
        0 0 40px rgba(221, 172, 95, 0.5);
}

/* ============================================
   15. SECTION TITLE ANIMATION
   ============================================ */
.section-title h3 {
    transition: text-shadow 0.3s ease;
}

.section-title.revealed h3 {
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6),
        0 0 60px rgba(212, 175, 55, 0.3);
}

/* ============================================
   16. MODAL ENTRANCE ANIMATION
   ============================================ */
.modal.open .dialog {
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ============================================
   17. LIGHTBOX ANIMATIONS
   ============================================ */
.lightbox-modal.active .lightbox-content {
    animation: lightboxZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   18. RIPPLE EFFECT ON CLICK
   ============================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   19. TEXT GRADIENT ANIMATION
   ============================================ */
@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, var(--gold), var(--amber), var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   20. PERFORMANCE OPTIMIZATIONS
   ============================================ */
.card,
.member-card,
.gallery-item,
.hero-slide,
.reveal-element {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* ============================================
   21. MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {

    /* Disable parallax and complex animations on mobile */
    .hero-slide {
        transform: none !important;
    }

    .card,
    .member-card {
        transform: none !important;
    }

    /* Simplify hover effects for touch devices */
    .card:active,
    .member-card:active {
        transform: scale(0.98);
    }
}

/* ============================================
   22. LOADING SPINNER (Optional)
   ============================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(221, 172, 95, 0.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}