/* --- css/index.css --- */

/* Hero Layout */
.hero {
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at center, #2a2a2a 0%, var(--dark-bg) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 100%;
}

/* --- Left Side: Content --- */
.hero-content {
    z-index: 2;
    padding-right: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content .highlight {
    color: var(--primary);
    background: linear-gradient(90deg, #2196F3, #00BCD4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content .tagline {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    max-width: 500px;
}

/* --- Right Side: Visual Area --- */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* The Container - Static Center Point */
.orbit-container {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
}

/* The Items - Moving in Orbit */
.orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    transform-style: preserve-3d;
    animation: orbit-move 16s infinite linear;
}

/* Icon Card - Facing the Viewer */
.icon-card {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 4rem;
    animation: counter-face 16s infinite linear;
}

.icon-card span {
    font-size: 1rem;
    margin-top: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    white-space: nowrap;
}

/* --- Positioning via Delays --- */
.item-1 { animation-delay: 0s; }
.item-1 .icon-card { animation-delay: 0s; }

.item-2 { animation-delay: -4s; }
.item-2 .icon-card { animation-delay: -4s; }

.item-3 { animation-delay: -8s; }
.item-3 .icon-card { animation-delay: -8s; }

.item-4 { animation-delay: -12s; }
.item-4 .icon-card { animation-delay: -12s; }


/* --- Keyframes --- */

@keyframes orbit-move {
    /* FRONT (Active) */
    0% {
        transform: rotateY(0deg) translateZ(300px) scale(1.8);
        opacity: 1;
        z-index: 10;
        filter: drop-shadow(0 0 25px rgba(33, 150, 243, 0.6));
    }
    /* RIGHT */
    25% {
        transform: rotateY(90deg) translateZ(300px) scale(0.6);
        opacity: 0.5; 
        z-index: 5;
        filter: none;
    }
    /* BACK */
    49% { opacity: 0; z-index: 0; }
    50% {
        transform: rotateY(180deg) translateZ(300px) scale(0.4);
        opacity: 0; 
        z-index: 0;
    }
    51% { opacity: 0; }
    /* LEFT */
    75% {
        transform: rotateY(270deg) translateZ(300px) scale(0.6);
        opacity: 0.5; 
        z-index: 5;
        filter: none;
    }
    /* FRONT Loop */
    100% {
        transform: rotateY(360deg) translateZ(300px) scale(1.8);
        opacity: 1;
        z-index: 10;
        filter: drop-shadow(0 0 25px rgba(33, 150, 243, 0.6));
    }
}

@keyframes counter-face {
    0% { transform: rotateY(0deg); filter: drop-shadow(0 0 20px var(--primary)); }
    25% { transform: rotateY(-60deg); filter: none; }
    50% { transform: rotateY(-180deg); filter: none; }
    75% { transform: rotateY(-300deg); filter: none; }
    100% { transform: rotateY(-360deg); filter: drop-shadow(0 0 20px var(--primary)); }
}

/* Hover Pauses Everything */
.orbit-container:hover .orbit-item,
.orbit-container:hover .icon-card {
    animation-play-state: paused;
}

/* --- MOBILE LAYOUT FIX --- */
@media (max-width: 768px) {
    /* Stack elements vertically */
    .hero { 
        height: auto; 
        min-height: 100vh;
        padding: 100px 0 50px 0; 
    }
    
    .hero-container { 
        display: flex;        /* Force Flexbox */
        flex-direction: column; /* Stack vertically */
        text-align: center; 
        gap: 40px;
    }
    
    .hero-content { 
        padding-right: 0; 
        margin-bottom: 20px; 
        order: 1; /* Content first */
    }
    
    .hero-content h1 { 
        font-size: 2.5rem; /* Smaller font for mobile */
    }
    
    .hero-content .tagline {
        margin: 0 auto 30px auto; /* Center align tagline */
    }
    
    /* Buttons centered */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0;
    }
    
    /* Visual Area adjustments */
    .hero-visual { 
        height: 350px; 
        perspective: 600px; 
        order: 2; /* Visual second */
        width: 100%;
        overflow: hidden; /* Prevent overflow scrolling */
    }
    
    .orbit-container { 
        width: 150px; 
        height: 150px; 
    }
    
    .icon-card { 
        font-size: 3rem; 
    }
    
    /* Mobile-Specific Animation (Tighter Orbit) */
    @keyframes orbit-move {
        0% { transform: rotateY(0deg) translateZ(160px) scale(1.4); opacity: 1; z-index: 10; }
        25% { transform: rotateY(90deg) translateZ(160px) scale(0.6); opacity: 0.5; z-index: 5; }
        50% { transform: rotateY(180deg) translateZ(160px) scale(0.4); opacity: 0; z-index: 0; }
        75% { transform: rotateY(270deg) translateZ(160px) scale(0.6); opacity: 0.5; z-index: 5; }
        100% { transform: rotateY(360deg) translateZ(160px) scale(1.4); opacity: 1; z-index: 10; }
    }
}