@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --bg-hover: #1a1a1a;
    --border: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --accent-dim: rgba(255, 255, 255, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
    touch-action: pan-y;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

* {
    max-width: 100%;
}

/* Navigation */

.navbar {
    position: fixed;
    top: 10px;
    left: 7%;
    right: 7%;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    top: 10px;
    left: 25%;
    right: 25%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(24px);
    border-radius: 40px;
    box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.3) 0px 2px 8px 0px;
}

.nav-container {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.3s ease;
}

.navbar.scrolled .nav-container {
    padding: 16px 30px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar.scrolled .nav-logo {
    font-size: 16px;
}

.nav-logo svg {
    stroke: var(--text-primary);
    transition: all 0.3s ease;
}

.navbar.scrolled .nav-logo svg {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.btn-primary {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

/* Hero Section */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 80px;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    /* Fallback gradient for low-end devices */
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at bottom, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                var(--bg-primary);
}

.lightrays-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
    /* Performance: Use will-change sparingly */
    will-change: opacity;
}

/* Low-end device optimization: reduce animations */

@media (prefers-reduced-motion: reduce) {
    .lightrays-background {
        display: none;
    }
    .text-hover-wrapper {
        display: none;
    }
}

#lightrays-container {
    width: 100%;
    height: 100%;
}

.lightrays-background canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 1;
}

.text-hover-wrapper {
    height: 250px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.flipwords-wrapper {
    min-height: 120px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-badge svg {
    stroke: var(--text-secondary);
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -3px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
}

.btn-hero {
    padding: 16px 32px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.btn-hero:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 16px 32px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
}

.hero-stats {
    display: flex;
    gap: 64px;
    justify-content: center;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Section */

.features {
    padding: 120px 32px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.features-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 60px;
    justify-content: space-between;
}

.features-text {
    flex: 1;
    max-width: 500px;
}

.section-header {
    text-align: left;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.2);
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.feature-item svg {
    stroke: var(--text-secondary);
    flex-shrink: 0;
}

.feature-item span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

#features-cards {
    position: relative;
    min-height: 600px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smooth scroll behavior */

html {
    scroll-behavior: smooth;
}

/* Scroll animations */

.scroll-fade-in {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* All sections */

section {
    min-height: 100vh;
    position: relative;
}

/* Hero Section */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Features Section */

.features-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Technology Section */

.technology-section {
    padding: 120px 32px;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

/* CTA Section */

.cta-section {
    padding: 80px 32px;
    min-height: 40vh;
    background: 
        radial-gradient(circle at 50% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 70%),
        var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Footer */

.footer {
    padding: 80px 32px 40px;
    background: var(--bg-primary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-logo svg {
    stroke: var(--accent);
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.footer-links {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-bottom: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 13px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

/* Responsive */

@media (max-width: 1200px) {
    .navbar {
        left: 12%;
        right: 12%;
    }
    
    .navbar.scrolled {
        left: 20%;
        right: 20%;
    }
}

@media (max-width: 768px) {
    .navbar {
        left: 5%;
        right: 5%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(24px);
        border-radius: 40px;
        box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.3) 0px 2px 8px 0px;
    }
    
    .navbar.scrolled {
        left: 5%;
        right: 5%;
    }
    
    .nav-container {
        padding: 16px 20px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-link {
        display: none;
    }
    
    .hero {
        padding: 100px 20px 60px;
        /* Disable parallax on mobile */
        transform: none !important;
    }
    
    .text-hover-wrapper {
        height: 180px !important;
    }
    
    /* Mobile performance: Disable heavy effects */
    .lightrays-background {
        opacity: 0.2 !important;
    }
    
    /* Reduce animation complexity on mobile */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
    
    .hero-title {
        font-size: 40px;
        letter-spacing: -2px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .flipwords-wrapper {
        min-height: 80px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .features {
        padding: 60px 20px;
        overflow: visible;
    }
    
    .features-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    #features-cards {
        transform: scale(0.5);
        margin: -80px auto -100px;
        order: 2;
        overflow: visible !important;
        min-height: 400px;
        display: block !important;
    }
    
    #features-cards > div {
        flex-direction: column !important;
        gap: 20px !important;
        margin-left: 0 !important;
        align-items: center !important;
    }
    
    #features-cards > div > div:first-child {
        order: 1;
        max-width: 100%;
        text-align: center;
    }
    
    #features-cards > div > div:last-child {
        order: 2;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Technology Section Mobile */
    .technology-section {
        padding: 60px 20px !important;
    }
    
    #technology-content > div {
        padding: 0 20px !important;
    }
    
    #technology-content h2 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    
    #technology-content p {
        font-size: 16px !important;
    }
    
    .cta-section {
        padding: 60px 20px;
    }
    
    .cta-content h2 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .footer {
        padding: 60px 20px 32px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

/* Mobile Responsive Fixes */

@media (max-width: 768px) {
    /* Hero section */
    .hero-content {
        padding: 20px;
    }
    
    .text-hover-wrapper {
        height: 120px !important;
        margin-bottom: 20px;
    }
    
    .text-hover-wrapper svg {
        transform: scale(0.5);
    }
    
    .flipwords-wrapper {
        font-size: 24px !important;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Features section */
    .features-content {
        flex-direction: column !important;
        padding: 20px;
        gap: 30px;
    }
    
    .features-text {
        max-width: 100% !important;
        text-align: center;
    }
    
    #features-cards {
        flex: none !important;
        width: 100% !important;
        min-height: 400px !important;
        transform: scale(0.7);
    }
    
    .section-header h2 {
        font-size: 32px !important;
    }
    
    /* Technology section */
    .technology-section {
        padding: 40px 20px;
    }
    
    #technology-content > div {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    /* Navbar */
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-link {
        display: none;
    }
}
