/* ========================================================
   HOME PAGE ENTERPRISE STYLES (THE DIGITAL GALAXY)
   ========================================================
   A complete restructuring for Phase 7 matching the highly 
   interactive, 3D, authority-driven blueprint.
*/

:root {
    --home-bg-gradient: linear-gradient(135deg, #020308 0%, #050814 50%, #080A1A 100%);
    --cyan-glow: #00F0FF;
    --violet-deep: #6A00FF;
    --pink-neon: #FF0055;
}

body.home-page {
    background: var(--home-bg-gradient);
    color: #ffffff;
    font-family: 'Inter', 'Poppins', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* WebGL Background Constraints */
.webgl-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

/* --- 1. THE DIGITAL GALAXY (HERO) --- */
.galaxy-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* Floating 3D Social Icons in Hero */
.floating-socials {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.float-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
    animation: slowOrbit 20s linear infinite;
    opacity: 0.6;
}

.fi-1 {
    top: 15%;
    left: 10%;
    animation-duration: 25s;
    animation-direction: reverse;
    width: 50px;
    height: 50px;
}

.fi-2 {
    top: 70%;
    left: 15%;
    animation-duration: 30s;
    width: 45px;
    height: 45px;
}

.fi-3 {
    top: 25%;
    right: 12%;
    animation-duration: 22s;
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 20px rgba(106, 0, 255, 0.6));
}

.fi-4 {
    top: 60%;
    right: 8%;
    animation-duration: 28s;
    animation-direction: reverse;
}

.fi-5 {
    top: 85%;
    left: 50%;
    transform: translateX(-50%);
    animation: floatVertical 6s ease-in-out infinite;
}

@keyframes slowOrbit {
    0% {
        transform: rotate(0deg) translateX(30px) rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) translateX(30px) rotate(-180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) translateX(30px) rotate(-360deg) scale(1);
    }
}

@keyframes floatVertical {

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

    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

.hero-title {
    font-weight: 800;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--cyan-glow);
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.hero-cta-group {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    perspective: 1000px;
}

.btn-3d-pulse {
    background: linear-gradient(135deg, var(--violet-deep), var(--cyan-glow));
    color: #fff;
    font-size: 1.1rem;
    padding: 18px 40px;
    border-radius: 40px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    border: none;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.btn-3d-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-3d-pulse:hover {
    transform: translateY(-8px) translateZ(20px) rotateX(10deg);
    box-shadow: 0 20px 40px rgba(106, 0, 255, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.btn-3d-pulse:hover::before {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* --- 2. TRUST & AUTHORITY STRIP --- */
.authority-strip {
    background: linear-gradient(90deg, transparent, rgba(10, 15, 30, 0.8), transparent);
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    padding: 40px 0;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.authority-metrics {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.auth-stat {
    text-align: center;
}

.auth-stat h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 20px var(--cyan-glow);
}

.auth-stat p {
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-top: 5px;
}

.partner-badges-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.partner-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.partner-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.pb-icon {
    font-size: 1.5rem;
}

.pb-content h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.pb-content p {
    margin: 0;
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 3. SERVICES CONSTELLATION ORBIT --- */
.constellation-section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.orbit-system {
    position: relative;
    width: 100%;
    height: 700px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.orbit-center {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #fff, var(--cyan-glow));
    border-radius: 50%;
    box-shadow: 0 0 60px var(--cyan-glow), inset 0 0 20px #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #000;
    z-index: 10;
    animation: pulseCore 4s infinite alternate;
}

@keyframes pulseCore {
    0% {
        transform: scale(1);
        box-shadow: 0 0 60px var(--cyan-glow);
    }

    100% {
        transform: scale(1.05);
        box-shadow: 0 0 100px var(--violet-deep);
    }
}

.orbit-ring {
    position: absolute;
    width: 600px;
    height: 600px;
    border: 1px dashed rgba(0, 240, 255, 0.2);
    border-radius: 50%;
    animation: spinRing 40s linear infinite;
}

.orbit-ring.reverse {
    width: 800px;
    height: 800px;
    border: 1px dotted rgba(106, 0, 255, 0.3);
    animation: spinRing 50s linear infinite reverse;
}

@keyframes spinRing {
    100% {
        transform: rotate(360deg);
    }
}

.planet-card {
    position: absolute;
    width: 200px;
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: counterSpin 40s linear infinite;
}

.orbit-ring.reverse .planet-card {
    animation: counterSpinReverse 50s linear infinite;
}

@keyframes counterSpin {
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes counterSpinReverse {
    100% {
        transform: rotate(360deg);
    }
}

.p1 {
    top: -100px;
    left: 50%;
    margin-left: -100px;
}

.p2 {
    bottom: -100px;
    left: 50%;
    margin-left: -100px;
}

.p3 {
    left: -100px;
    top: 50%;
    margin-top: -60px;
}

.p4 {
    right: -100px;
    top: 50%;
    margin-top: -60px;
}

.planet-card:hover {
    transform: scale(1.2) translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.3);
    border-color: var(--cyan-glow);
    z-index: 20;
}

.planet-card h4 {
    font-family: 'Exo 2', sans-serif;
    margin: 10px 0;
    color: var(--cyan-glow);
}

.planet-cta {
    display: none;
    font-size: 0.8rem;
    color: #fff;
    text-transform: uppercase;
    margin-top: 10px;
    background: var(--violet-deep);
    padding: 5px 10px;
    border-radius: 20px;
}

.planet-card:hover .planet-cta {
    display: inline-block;
}

/* --- 4. WHY DIGITAL SWIFTS (WIREFRAME DUBAI) --- */
.differentiation-section {
    padding: 120px 0;
    background: url('https://images.unsplash.com/photo-1546412414-e1885259563a?q=80&w=2560&auto=format&fit=crop') center/cover fixed;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.differentiation-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #050814 0%, rgba(5, 8, 20, 0.85) 50%, #050814 100%);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
    z-index: 2;
    margin-top: 60px;
}

.pillar-card {
    background: linear-gradient(180deg, rgba(20, 25, 40, 0.9), rgba(10, 15, 25, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--cyan-glow);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.pillar-card:nth-child(2) {
    border-top-color: var(--violet-deep);
    transform: translateY(-30px);
}

.pillar-card:nth-child(3) {
    border-top-color: var(--pink-neon);
}

.pillar-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.pillar-card:nth-child(2):hover {
    transform: translateY(-45px) scale(1.05);
}

.pillar-anim-container {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Pillar Animations Setup */
.bar-graph {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
}

.bar {
    width: 15px;
    background: var(--cyan-glow);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 10px var(--cyan-glow);
    animation: barRise 2s ease-out infinite alternate;
}

.bar:nth-child(1) {
    height: 20%;
    animation-delay: 0s;
}

.bar:nth-child(2) {
    height: 40%;
    animation-delay: 0.2s;
}

.bar:nth-child(3) {
    height: 70%;
    animation-delay: 0.4s;
}

.bar:nth-child(4) {
    height: 100%;
    animation-delay: 0.6s;
}

@keyframes barRise {
    0% {
        height: 10%;
    }
}

.rotating-cube {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 10s linear infinite;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(106, 0, 255, 0.4);
    border: 2px solid var(--violet-deep);
    box-shadow: inset 0 0 15px var(--violet-deep);
}

.front {
    transform: translateZ(30px);
}

.back {
    transform: translateZ(-30px) rotateY(180deg);
}

.right {
    transform: rotateY(90deg) translateZ(30px);
}

.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.top {
    transform: rotateX(90deg) translateZ(30px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0) rotateY(0);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.cpa-meter {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid rgba(255, 0, 85, 0.2);
    border-top-color: var(--pink-neon);
    animation: spinMeter 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- 5. INTERACTIVE CASE STUDY PREVIEW --- */
.home-portfolio {
    padding: 100px 0;
}

.portfolio-flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    perspective: 1500px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 400px;
    perspective: 1000px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-card-front {
    background: #111;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.front-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    text-align: left;
}

.front-title h3 {
    margin: 0;
    font-family: 'Exo 2', sans-serif;
    font-size: 1.5rem;
}

.flip-card-back {
    background: linear-gradient(135deg, #151a2b, var(--deep-black));
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-color: var(--cyan-glow);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

.mock-graph {
    width: 100%;
    height: 100px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    margin-bottom: 20px;
}

.mock-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, transparent 49%, var(--cyan-glow) 50%, transparent 51%);
    filter: drop-shadow(0 0 5px var(--cyan-glow));
}

/* --- 6. LIVE DIGITAL DASHBOARD --- */
.dashboard-mockup {
    margin: 100px auto;
    max-width: 1100px;
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 240, 255, 0.1);
    position: relative;
    z-index: 2;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.dash-logo {
    font-family: 'Orbitron';
    color: var(--cyan-glow);
    font-size: 1.2rem;
}

.dash-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00FFB2;
    font-size: 0.9rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #00FFB2;
    border-radius: 50%;
    box-shadow: 0 0 10px #00FFB2;
    animation: pulse 1s infinite;
}

.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dash-panel {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.revenue-chart {
    height: 250px;
    background: repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255, 255, 255, 0.05) 50px);
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.dash-bar {
    flex: 1;
    background: linear-gradient(to top, var(--violet-deep), var(--cyan-glow));
    border-radius: 4px 4px 0 0;
    animation: growBar 3s ease-out forwards;
    transform-origin: bottom;
    opacity: 0.8;
}

@keyframes growBar {
    0% {
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);
    }
}

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-val {
    color: var(--cyan-glow);
    font-family: 'Orbitron';
    font-size: 1.2rem;
}

/* --- 7. SEO CONTENT BLOCK --- */
.seo-content-matrix {
    padding: 100px 0;
    position: relative;
}

.matrix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.content-paragraph {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-left: 3px solid var(--violet-deep);
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
}

.content-paragraph:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--cyan-glow);
    transform: translateX(10px);
}

.kw-highlight {
    color: var(--cyan-glow);
    font-weight: 600;
    border-bottom: 1px dashed rgba(0, 240, 255, 0.4);
    cursor: help;
    position: relative;
}

/* --- 8. SOCIAL PROOF NETWORK --- */
.social-network-section {
    padding: 120px 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(106, 0, 255, 0.1) 0%, transparent 70%);
}

.network-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.glass-social-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    width: 200px;
    transition: transform 0.4s ease;
    text-decoration: none;
    color: #fff;
    display: block;
}

.glass-social-panel:hover {
    transform: translateY(-15px) rotate(3deg);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cyan-glow);
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.15);
}

.glass-social-panel img {
    width: 50px;
    margin-bottom: 15px;
}

/* --- 9. FINAL CTA (CONVERSION) --- */
.final-cta-section {
    padding: 150px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blackhole-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--deep-black) 30%, rgba(106, 0, 255, 0.2) 60%, transparent 80%);
    border-radius: 50%;
    z-index: 0;
    animation: compress 10s infinite alternate;
}

@keyframes compress {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 100px var(--violet-deep);
    }

    100% {
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 200px var(--cyan-glow);
    }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.massive-btn {
    font-size: 1.5rem;
    padding: 25px 60px;
    background: #fff;
    color: #000;
    border-radius: 60px;
    font-weight: 800;
    font-family: 'Exo 2';
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    margin-top: 40px;
    box-shadow: 0 0 40px #fff;
    transition: all 0.3s ease;
}

.massive-btn:hover {
    background: var(--cyan-glow);
    box-shadow: 0 0 80px var(--cyan-glow);
    transform: scale(1.05);
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .orbit-system {
        display: none;
    }

    /* Hide complex orbit on mobile */
    .pillars-grid {
        grid-template-columns: 1fr;
    }

    .matrix-grid {
        grid-template-columns: 1fr;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }
}