/* --- Services Hero: The Digital Forge --- */
:root {
    --forge-bg: radial-gradient(circle at 10% 20%, #0f172a 0%, #020617 100%);
    --forge-primary: #38bdf8;
    /* Sky Blue */
    --forge-accent: #6366f1;
    /* Indigo */
    --glass-panel: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.hero-services {
    position: relative;
    min-height: 100vh;
    background: var(--forge-bg);
    overflow: hidden;
    padding: 160px 20px 100px;
    display: flex;
    align-items: center;
}

.hero-svc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
}

/* --- Left: Content --- */
.hero-svc-content {
    z-index: 10;
    max-width: 650px;
}

.svc-eyebrow {
    color: var(--forge-primary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.svc-eyebrow::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--forge-primary);
}

.hero-svc-h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-svc-p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 90%;
}

.svc-btn-group {
    display: flex;
    gap: 20px;
}

.btn-forge {
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-forge-primary {
    background: var(--forge-primary);
    color: #0f172a;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.btn-forge-primary:hover {
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-forge-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-forge-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* --- Right: The Tech Galaxy (Logos Animation) --- */
.hero-svc-visual {
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.galaxy-container {
    position: relative;
    width: 600px;
    height: 600px;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(60deg) rotateZ(-20deg) scale(0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Central Sun (The Solution) */
.galaxy-sun {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #fff, var(--forge-primary));
    border-radius: 50%;
    box-shadow: 0 0 60px var(--forge-primary), 0 0 100px rgba(56, 189, 248, 0.4);
    z-index: 50;
    transform: rotateX(-60deg) rotateZ(20deg);
    /* Counter-rotate to face front */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--forge-primary);
}

.galaxy-sun::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    animation: sunSpin 20s linear infinite;
}

/* Orbits */
.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform-style: preserve-3d;
}

.orbit-Inner {
    width: 250px;
    height: 250px;
    animation: orbitSpin 15s linear infinite;
    border-color: rgba(99, 102, 241, 0.2);
}

.orbit-Middle {
    width: 400px;
    height: 400px;
    animation: orbitSpin 25s linear infinite reverse;
    border-color: rgba(56, 189, 248, 0.2);
}

.orbit-Outer {
    width: 550px;
    height: 550px;
    animation: orbitSpin 40s linear infinite;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tech Planets */
.tech-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: planetBillboard 15s linear infinite reverse;
}

/* Positioning and Billboarding Logic */

/* Inner Ring Planets */
.orbit-Inner .pos-react {
    transform: rotate(0deg) translateX(125px) rotate(0deg);
}

.orbit-Inner .pos-node {
    transform: rotate(120deg) translateX(125px) rotate(-120deg);
}

.orbit-Inner .pos-html {
    transform: rotate(240deg) translateX(125px) rotate(-240deg);
}

/* Middle Ring Planets */
.orbit-Middle .pos-aws {
    transform: rotate(45deg) translateX(200px) rotate(-45deg);
}

.orbit-Middle .pos-python {
    transform: rotate(165deg) translateX(200px) rotate(-165deg);
}

.orbit-Middle .pos-docker {
    transform: rotate(285deg) translateX(200px) rotate(-285deg);
}

/* Outer Ring Planets */
.orbit-Outer .pos-cloud {
    transform: rotate(0deg) translateX(275px) rotate(0deg);
}

.orbit-Outer .pos-db {
    transform: rotate(180deg) translateX(275px) rotate(-180deg);
}

.planet-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}

.planet-icon {
    width: 50px;
    height: 50px;
    margin: -25px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    /* Counter-Rotate to face screen constantly */
    animation: counterSpin 15s linear infinite reverse;
}

/* Animation durations match orbit speeds */
.orbit-Inner .planet-icon {
    animation-duration: 15s;
}

.orbit-Middle .planet-icon {
    animation-duration: 25s;
    animation-direction: normal;
}

/* Reverse of orbit */
.orbit-Outer .planet-icon {
    animation-duration: 40s;
}


/* Keyframes */
@keyframes orbitSpin {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

@keyframes sunSpin {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

@keyframes counterSpin {

    /* Counteract Orbit Z spin AND Container X/Z tilt */
    /* Container: P(1000) X(60) Z(-20) */
    /* We need final visual to be flat. */
    /* Strict math is hard in CSS only, but simple counter-rotation helps readability */
    0% {
        transform: rotateZ(360deg) rotateX(-60deg) rotateZ(20deg);
    }

    100% {
        transform: rotateZ(0deg) rotateX(-60deg) rotateZ(20deg);
    }
}

/* Reverse for Middle Ring */
@keyframes counterSpinReverse {
    0% {
        transform: rotateZ(0deg) rotateX(-60deg) rotateZ(20deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(-60deg) rotateZ(20deg);
    }
}

.orbit-Middle .planet-icon {
    animation-name: counterSpinReverse;
}

/* Colors */
.icon-react {
    color: #61DAFB;
}

.icon-node {
    color: #68A063;
}

.icon-html {
    color: #E34F26;
}

.icon-aws {
    color: #FF9900;
}

.icon-python {
    color: #3776AB;
}

.icon-docker {
    color: #2496ED;
}

.icon-cloud {
    color: #fff;
}

.icon-db {
    color: #4DB33D;
}

/* Mobile */
@media (max-width: 1024px) {
    .galaxy-container {
        transform: perspective(1000px) rotateX(60deg) rotateZ(-20deg) scale(0.6);
    }

    .hero-svc-visual {
        height: 450px;
    }
}

@media (max-width: 900px) {
    .hero-svc-grid {
        grid-template-columns: 1fr;
        position: relative;
    }

    /* Move Visual Behind Content */
    .hero-svc-visual {
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
        z-index: 1;
        /* Below content (10) */
        opacity: 0.25;
        /* Subtle background effect */
        pointer-events: none;
        /* Allow clicks pass through to text */
        overflow: hidden;
    }

    .galaxy-container {
        transform: perspective(1000px) rotateX(60deg) rotateZ(-20deg) scale(0.5);
    }

    .hero-svc-content {
        position: relative;
        z-index: 10;
        text-align: center;
        padding-top: 40px;
    }

    .svc-btn-group {
        justify-content: center;
    }

    .svc-eyebrow {
        justify-content: center;
    }
}