/* ========================================
   ANIMATION SYSTEM
   Cosmic animations & effects
   ======================================== */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes float {

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

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

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--gold);
    }

    50% {
        box-shadow: 0 0 40px var(--gold), 0 0 60px var(--gold);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes lightRayPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ========================================
   LIGHT RAYS
   ======================================== */

.light-ray {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            var(--gold),
            transparent);
    opacity: 0.3;
    animation: lightRayPulse 3s ease-in-out infinite;
    pointer-events: none;
}

.light-ray-1 {
    left: 10%;
    animation-delay: 0s;
}

.light-ray-2 {
    left: 30%;
    animation-delay: 0.5s;
}

.light-ray-3 {
    left: 50%;
    animation-delay: 1s;
}

.light-ray-4 {
    left: 70%;
    animation-delay: 1.5s;
}

.light-ray-5 {
    left: 90%;
    animation-delay: 2s;
}

.light-rays-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: var(--z-particles);
}

/* ========================================
   HOVER EFFECTS
   ======================================== */

.magnetic-hover {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

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

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

.glow-hover {
    transition: all 0.3s ease;
}

.glow-hover:hover {
    box-shadow: 0 0 20px var(--gold),
        0 0 40px var(--gold),
        inset 0 0 20px rgba(184, 134, 11, 0.2);
    border-color: var(--gold-light);
}

/* ========================================
   SECTION ANIMATIONS
   ======================================== */

.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   WAVE DIVIDER
   ======================================== */

.wave-divider {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave-divider path {
    fill: var(--gold);
    opacity: 0.3;
}

/* ========================================
   HERO ANIMATIONS
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: var(--z-content);
    animation: fadeIn 1s ease-out;
}

.hero-title {
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: slideInUp 1s ease-out 0.4s both;
}

.hero-cta {
    animation: slideInUp 1s ease-out 0.6s both;
}

/* ========================================
   PRODUCT CARDS
   ======================================== */

.product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(184, 134, 11, 0.2),
            transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translate(-12px, -12px);
    box-shadow: 12px 12px 0 var(--gold);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: var(--border-thick) solid var(--black);
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* ========================================
   TIMELINE ANIMATION
   ======================================== */

.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0);
}

/* ========================================
   TEAM MEMBER CARDS
   ======================================== */

.team-member {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

.team-member:hover .team-image {
    filter: grayscale(0%);
}

.team-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
    border: var(--border-thick) solid var(--gold);
}

.team-info {
    padding: var(--space-lg);
    background-color: var(--black);
    border: var(--border-thick) solid var(--white);
    border-top: none;
}

/* ========================================
   ACCORDION ANIMATION
   ======================================== */

.accordion-item {
    border: var(--border-thick) solid var(--white);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.accordion-header {
    padding: var(--space-lg);
    background-color: var(--black);
    color: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: var(--gold);
    color: var(--black);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        padding 0.4s ease;
    padding: 0 var(--space-lg);
    background-color: var(--white);
    color: var(--black);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: var(--space-lg);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* ========================================
   BLOG CARD ANIMATIONS
   ======================================== */

.blog-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
}

.blog-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-thumbnail {
    transform: scale(1.1);
}

.blog-meta {
    display: flex;
    gap: var(--space-md);
    color: var(--gold);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Galaxy Loader Animation */
.galaxy-loader {
    position: relative;
    width: 150px;
    height: 150px;
}

.galaxy-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
}

.galaxy-ring-1 {
    width: 120px;
    height: 120px;
    border-top-color: var(--gold);
    border-right-color: var(--gold);
    animation: galaxySpin 2s linear infinite;
    opacity: 0.8;
}

.galaxy-ring-2 {
    width: 90px;
    height: 90px;
    border-bottom-color: #FFD700;
    border-left-color: #FFD700;
    animation: galaxySpin 1.5s linear infinite reverse;
    opacity: 0.6;
}

.galaxy-ring-3 {
    width: 60px;
    height: 60px;
    border-top-color: #FFA500;
    animation: galaxySpin 1s linear infinite;
    opacity: 0.4;
}

.galaxy-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFF 0%, var(--gold) 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold);
    animation: pulse 2s ease-in-out infinite;
}

.galaxy-stars span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #FFF;
    border-radius: 50%;
    box-shadow: 0 0 5px #FFF;
    animation: starFloat 3s ease-in-out infinite;
}

.galaxy-stars span:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.galaxy-stars span:nth-child(2) {
    top: 70%;
    left: 20%;
    animation-delay: 0.5s;
}

.galaxy-stars span:nth-child(3) {
    top: 80%;
    left: 70%;
    animation-delay: 1s;
}

.galaxy-stars span:nth-child(4) {
    top: 30%;
    left: 80%;
    animation-delay: 1.5s;
}

.galaxy-stars span:nth-child(5) {
    top: 50%;
    left: 10%;
    animation-delay: 2s;
}

.galaxy-stars span:nth-child(6) {
    top: 10%;
    left: 60%;
    animation-delay: 2.5s;
}

@keyframes galaxySpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes starFloat {

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

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

/* ========================================
   UTILITY ANIMATIONS
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}