/* Reset and Base Styles */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #222;
    border-top-color: #00aaff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ensure content is above canvas */
header, section, footer {
    position: relative;
    z-index: 1;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #00aaff;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00aaff, #00ffff);
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #e5e5e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #00aaff;
}

.cta-button {
    background: #00aaff;
    color: #0a0a0a;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #0088cc;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #e5e5e5;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 6rem 2rem 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #00aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 .typing-text {
    display: inline-block;
    border-right: 3px solid #00aaff;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero p {
    font-size: 1.3rem;
    color: #999;
    margin-bottom: 2.5rem;
    max-width: 600px;
    animation: fadeInUp 1s ease forwards 0.5s;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease forwards 0.7s;
    opacity: 0;
}

.primary-btn {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.3);
}

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

.primary-btn:hover::before {
    width: 300px;
    height: 300px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 170, 255, 0.5);
}

.secondary-btn {
    background: transparent;
    color: #00aaff;
    padding: 1rem 2rem;
    border: 2px solid #00aaff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.secondary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00aaff, #0088cc);
    transition: left 0.3s ease;
    z-index: -1;
}

.secondary-btn:hover::before {
    left: 0;
}

.secondary-btn:hover {
    color: #ffffff;
    border-color: #00aaff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.3);
}

/* Services Section */
.services {
    background: #0f0f0f;
    padding: 5rem 2rem;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 3rem;
}

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

.service-card {
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
}

.service-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #00aaff, #00ffff, #00aaff);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 170, 255, 0.3);
    border-color: transparent;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.service-card p {
    color: #999;
    line-height: 1.6;
}

/* Technologies/Partners Section */
.technologies {
    background: #0a0a0a;
    padding: 5rem 2rem;
}

.partner-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-category {
    background: #0f0f0f;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #222;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.partner-category.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.partner-category h3 {
    font-size: 1.3rem;
    color: #00aaff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.partner-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
    position: relative;
}

.tech-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.tech-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, #00aaff, #00ffff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-item:hover::after {
    opacity: 1;
}

.tech-item:hover {
    border-color: transparent;
    transform: translateY(-8px) scale(1.05) rotateY(5deg);
    box-shadow: 0 12px 40px rgba(0, 170, 255, 0.3);
}

.tech-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-item:hover .tech-logo {
    filter: none;
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

.tech-name {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
    text-align: center;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: #0a0a0a;
    color: white;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.contact p {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.contact-method {
    text-align: center;
}

.contact-method h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.contact-method a {
    color: #00aaff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-method a:hover {
    color: #00ccff;
}

/* Footer */
footer {
    background: #050505;
    color: #666;
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #666;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #00aaff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .cta-button {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .contact-info {
        gap: 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }

    .tech-item {
        padding: 1rem;
    }

    .tech-logo {
        width: 40px;
        height: 40px;
    }
}
