:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #013a87;
    --secondary-color: #a29bfe;
    --dark-card: #161616;
    --font-main: 'Space Grotesk', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 90px; /* Adjusted for balanced visibility */
    width: auto;
    display: block;
}

@media (max-width: 480px) {
    .logo-img {
        height: 70px; /* Adjusted for mobile */
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    opacity: 1; /* Ensure visible by default, let JS handle hiding if needed */
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--accent-color);
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: #fff;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--accent-color),
        0 0 40px var(--accent-color);
}

.btn-primary i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--text-color);
}

/* Hero Section */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 0; /* Added top padding to create space below fixed nav */
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--accent-color);
    position: relative;
}

.highlight::after {
    content: 'Digital';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    width: 0%;
    overflow: hidden;
    animation: fillText 3s linear infinite alternate;
    white-space: nowrap;
}

@keyframes fillText {
    0% { width: 0%; opacity: 0.5; }
    100% { width: 100%; opacity: 1; }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 3D Cube Animation */
.cube-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 10;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 20s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
    backdrop-filter: blur(5px);
}

.face.front  { transform: rotateY(0deg) translateZ(100px); }
.face.back   { transform: rotateY(180deg) translateZ(100px); }
.face.right  { transform: rotateY(90deg) translateZ(100px); }
.face.left   { transform: rotateY(-90deg) translateZ(100px); }
.face.top    { transform: rotateX(90deg) translateZ(100px); }
.face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes spin {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* 3D Pyramid Animation */
.pyramid-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 10;
}

.pyramid {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spin 20s infinite linear;
}

.pyramid .side {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 200px solid rgba(108, 92, 231, 0.2);
    transform-origin: 50% 100%;
}

.pyramid .side.one { transform: rotateY(0deg) rotateX(30deg); border-bottom-color: rgba(108, 92, 231, 0.4); }
.pyramid .side.two { transform: rotateY(90deg) rotateX(30deg); border-bottom-color: rgba(108, 92, 231, 0.3); }
.pyramid .side.three { transform: rotateY(180deg) rotateX(30deg); border-bottom-color: rgba(108, 92, 231, 0.4); }
.pyramid .side.four { transform: rotateY(-90deg) rotateX(30deg); border-bottom-color: rgba(108, 92, 231, 0.3); }

/* 3D Rings Animation */
.rings-container {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid var(--accent-color);
    border-bottom: 4px solid #ff00cc;
    border-radius: 50%;
    animation: rotateRing 8s linear infinite;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

.ring-1 { transform: rotateX(60deg) rotateY(0deg); animation-duration: 6s; }
.ring-2 { transform: rotateX(-60deg) rotateY(60deg); animation-duration: 8s; border-top-color: #00c6ff; border-bottom-color: #0072ff; }
.ring-3 { transform: rotateX(0deg) rotateY(-60deg); animation-duration: 10s; border-top-color: #11998e; border-bottom-color: #38ef7d; }

@keyframes rotateRing {
    0% { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(0deg); }
    100% { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotateZ(360deg); }
}

/* Update animations to use custom properties for rings */
.ring-1 { --rx: 60deg; --ry: 0deg; }
.ring-2 { --rx: -60deg; --ry: 60deg; }
.ring-3 { --rx: 0deg; --ry: -60deg; }


/* Animated Orbs */
.orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #ff00cc 0%, transparent 70%);
    right: 10%;
    top: 20%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -40px); }
    100% { transform: translate(0, 0); }
}

/* Section Common */
section {
    padding: 6rem 5%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 2.5rem;
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: #fff;
    box-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--accent-color),
        0 0 40px var(--accent-color),
        0 0 80px var(--accent-color);
}

.service-card .icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .icon {
    animation: iconFloat 2s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: #aaa;
    font-size: 0.95rem;
}

/* Work Gallery */
.work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

.work-image {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.work-item:hover .glass-icon {
    transform: scale(1.1) rotate(10deg);
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.work-item:hover .work-image {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.work-item:hover .work-info {
    transform: translateY(0);
    opacity: 1;
}

/* Contact */
.contact-wrapper {
    display: flex;
    gap: 4rem;
    background: var(--dark-card);
    padding: 4rem;
    border-radius: 20px;
    align-items: flex-start;
}

.contact-text {
    flex: 1;
}

.contact-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
}

.contact-details li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-details i {
    color: var(--accent-color);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    padding: 4rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
    text-align: center;
}

footer .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.socials {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.socials a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.socials a:hover {
    color: var(--accent-color);
}

/* Responsive Design */

/* Tablet & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    section {
        padding: 4rem 5%;
    }
}

/* Tablets & Large Phones (max-width: 768px) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    header .container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px; /* Account for fixed nav */
        gap: 2rem;
    }
    
    .hero-content {
        width: 100%;
    }

    .hero-btns {
        justify-content: center;
    }
    
    .hero-visual {
        width: 100%;
        height: 300px;
        margin-bottom: 2rem;
    }
    
    /* Contact Section Mobile Layout - Split into cards like Contact Page */
    .contact-wrapper {
        flex-direction: column;
        padding: 0;
        background: transparent;
        border: none;
        gap: 2rem;
    }

    .contact-text, .contact-form {
        background: var(--dark-card);
        padding: 2rem;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        gap: 2rem;
    }

    .nav-links.active {
        display: flex;
    }

    /* Grid Collapsing */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-story {
        flex-direction: column;
    }

    /* Process Steps Vertical Stack */
    .process-steps {
        flex-direction: column;
        gap: 3rem;
    }

    .process-steps::before {
        display: none; /* Hide connecting line on mobile */
    }

    .step-card {
        width: 100%;
    }
}

/* Desktop Menu Override to prevent hiding bugs */
@media (min-width: 769px) {
    .nav-links {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .services-grid, .work-gallery, .values-grid, .stats-grid {
        grid-template-columns: 1fr; /* Force single column */
    }

    .contact-info-card, .contact-text, .contact-form {
        padding: 1.5rem;
    }

    /* Scale down 3D animations */
    .cube-container, .pyramid-container, .rings-container {
        transform: scale(0.7);
    }
}
