/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scroll Progress ===== */
#scrollProgress {
    will-change: width;
}

/* ===== Glass Panel ===== */
.glass-panel {
    background: rgba(11, 16, 32, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(7, 17, 31, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #22D3EE);
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
}

/* ===== CTA Buttons ===== */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-primary {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.cta-primary:hover {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-outline {
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3B82F6;
    background: transparent;
}

.cta-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3B82F6;
    transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero-overlay {
    background: linear-gradient(180deg, rgba(7, 17, 31, 0.3) 0%, rgba(7, 17, 31, 0.7) 50%, rgba(7, 17, 31, 0.95) 100%);
}

.floating-card {
    position: absolute;
    animation: floatCard 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.85;
}

.card-1 { top: 12%; right: 8%; animation-delay: 0s; }
.card-2 { top: 35%; right: 22%; animation-delay: -1.5s; }
.card-3 { top: 55%; right: 5%; animation-delay: -3s; }
.card-4 { top: 75%; right: 18%; animation-delay: -4.5s; }

@media (max-width: 1024px) {
    .card-1, .card-2, .card-3, .card-4 {
        display: none;
    }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-12px) rotate(1deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94A3B8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.trust-chip:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

/* ===== Section Common ===== */
.section-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #3B82F6;
    margin-bottom: 1rem;
    padding: 0.375rem 1rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 9999px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .section-title { font-size: 2.75rem; }
}

@media (min-width: 1024px) {
    .section-title { font-size: 3.25rem; }
}

.section-subtitle {
    font-size: 1rem;
    color: #94A3B8;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

@media (min-width: 640px) {
    .section-subtitle { font-size: 1.125rem; }
}

.section-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

/* ===== Feature Cards ===== */
.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), transparent, rgba(34, 211, 238, 0.1));
    -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.4s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.08);
}

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

.icon-box {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.4s ease;
}

.feature-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #F8FAFC;
    margin-bottom: 0.5rem;
}

.feature-card-desc {
    font-size: 0.8125rem;
    color: #94A3B8;
    line-height: 1.6;
}

/* ===== Solution Section ===== */
.solution-icon {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #10B981;
    transition: all 0.4s ease;
}

.solution-step:hover .solution-icon {
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.solution-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    animation: pulseArrow 2s ease-in-out infinite;
}

@keyframes pulseArrow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== Workflow Steps ===== */
.workflow-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    transition: all 0.4s ease;
    position: relative;
}

.workflow-step:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.step-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(59, 130, 246, 0.4);
    margin-bottom: 0.75rem;
}

.step-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.workflow-step:hover .step-icon {
    transform: scale(1.08);
}

/* ===== Architecture Blocks ===== */
.arch-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.4s ease;
}

.arch-block:hover {
    border-color: rgba(34, 211, 238, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.arch-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

/* ===== Tech Cards ===== */
.tech-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tech-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.tech-card:hover .tech-icon {
    transform: scale(1.1);
}

/* ===== Module Cards ===== */
.module-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.module-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
}

/* ===== Metric & Benefit Cards ===== */
.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
}

.metric-card:hover {
    border-color: rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.benefit-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.4s ease;
}

.benefit-card:hover {
    border-color: rgba(16, 185, 129, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Use Case Cards ===== */
.usecase-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.4s ease;
}

.usecase-card:hover {
    border-color: rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Showcase Cards ===== */
.showcase-card {
    transition: all 0.4s ease;
}

.showcase-card:hover {
    transform: translateY(-4px);
}

/* ===== Demo Tags ===== */
.demo-tag {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

/* ===== FAQ ===== */
.faq-trigger {
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.open .faq-content {
    max-height: 300px;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-item.open {
    border-color: rgba(59, 130, 246, 0.15);
}

/* ===== Animation Classes ===== */
.anim-el {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-el.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Hero Reveal Animation ===== */
.hero-reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.2s; }
.hero-reveal:nth-child(2) { animation-delay: 0.4s; }
.hero-reveal:nth-child(3) { animation-delay: 0.55s; }
.hero-reveal:nth-child(4) { animation-delay: 0.7s; }
.hero-reveal:nth-child(5) { animation-delay: 0.85s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-reveal {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .anim-el {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .floating-card {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}