/* ============================================
   CSS VARIABLES (Default: Dark)
   ============================================ */
:root {
    --brand-color: #1478D8;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2d2d2d;
    --shadow: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #0a0a0a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 5%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--brand-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--brand-color);
    transform: rotate(180deg);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: var(--text-primary);
}

.mobile-menu-toggle {
    display: none;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

#techCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    line-height: 0.9;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

/* Added word spacing here */
.hero-subtitle .word {
    display: inline-block;
    opacity: 0;
    margin-right: 0.4rem;
    animation: fadeInUp 0.8s ease forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 3s forwards, bounce 2s ease-in-out 3s infinite;
}

@keyframes fadeIn {
    to { opacity: 0.5; }
}

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

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
}

/* ============================================
   SECTION BASE STYLES
   ============================================ */
.section {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 4rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.service-card {
    padding: 3rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.4s ease;
    background: var(--bg-primary);
}

.service-card:hover {
    border-color: var(--brand-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.service-number {
    font-size: 0.875rem;
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   PRODUCT SECTION
   ============================================ */
.product-showcase {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 5rem 4rem;
    margin-top: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.product-tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--brand-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download:hover {
    background: #0d5fb3;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(20, 120, 216, 0.3);
}

.btn-download svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    margin-top: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-value {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.contact-value a {
    color: var(--brand-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-value a:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.social-link:hover {
    border-color: var(--brand-color);
    background: var(--brand-color);
    color: white;
    transform: translateY(-3px);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 2000;
    }

    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
        background: var(--text-primary);
        transition: 0.3s;
    }

    /* Cascade/Mobile Menu Styles */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: 0.5s ease;
        box-shadow: -10px 0 30px var(--shadow);
        z-index: 1500;
    }

    nav.active {
        right: 0;
    }

    nav a {
        font-size: 1.2rem;
        opacity: 0;
        transform: translateX(20px);
    }

    nav.active a {
        opacity: 1;
        transform: translateX(0);
        transition: 0.4s ease forwards;
    }

    /* Sequential fade-in delay for menu items */
    nav.active a:nth-child(1) { transition-delay: 0.1s; }
    nav.active a:nth-child(2) { transition-delay: 0.2s; }
    nav.active a:nth-child(3) { transition-delay: 0.3s; }
    nav.active a:nth-child(4) { transition-delay: 0.4s; }
    nav.active .theme-toggle { transition-delay: 0.5s; opacity: 1; transform: translateX(0); }

    .hero {
        padding: 6rem 5% 3rem;
    }

    .section {
        padding: 5rem 5%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .product-showcase {
        padding: 3rem 2rem;
    }

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