@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #020617;
    /* Obsidian */
    --bg-card: rgba(15, 23, 42, 0.4);
    --accent: #6366f1;
    /* Electric Indigo */
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-light: #818cf8;
    --primary: #3B82F6;
    /* Cyberspace Blue */
    --text-primary: #f1f5f9;
    /* Arctic White */
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Mouse tracking variables */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Grid overlay refined */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

.grid-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(2, 6, 23, 0), var(--bg-deep) 90%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-sm {
    max-width: 800px;
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Mouse Glow Effect */
.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(34, 211, 238, 0.06),
            transparent 40%);
    z-index: 0;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(34, 211, 238, 0.4);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    right: 2rem;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 1rem 0;
}

.container-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-deep);
}

.btn-primary:hover {
    background-color: #67E8F9;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

.btn-secondary {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background-color: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.1), transparent 40%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--accent);
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 500px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-container:hover .hero-img {
    transform: scale(1.05);
}

/* Sections */
section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 1.5rem;
}

.card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    z-index: 1;
}

/* Bento Patterns */
.card-large {
    grid-column: span 2;
    grid-row: span 2;
}

.card-wide {
    grid-column: span 2;
}

.card-tall {
    grid-row: span 2;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--accent);
}

.card h3 {
    margin-bottom: 1.25rem;
}

.card p {
    color: var(--text-muted);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    padding: 0;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 1.5rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Footer */
.footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 1.5rem;
}

.footer-links a,
.footer-contact p {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-contact i {
    vertical-align: middle;
    margin-right: 0.5rem;
    width: 18px;
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(200px, auto);
    }

    .card-large,
    .card-wide,
    .card-tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    section {
        padding: 5rem 0;
    }
}