body {
    background-color: #050505;
    color: #e5e2e1;
    overflow-x: hidden;
}

/* Direction-Aware Reveal System */
.reveal {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Classes added by JS based on scroll direction */
.reveal.scroll-down {
    transform: translateY(40px);
}

.reveal.scroll-up {
    transform: translateY(-40px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Background & Animation */
.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes flow {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

.data-pathway {
    stroke-dasharray: 10, 30;
    animation: flow 30s linear infinite;
}

.machined-edge {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid #222222;
}

/* Premium Nav Underline */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link.active-link::after {
    width: 100%;
}

/* Premium Button Glow */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn-premium:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #050505;
}
::-webkit-scrollbar-thumb {
    background: #222222;
}
::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-toggle:hover {
    opacity: 0.8;
}

.mobile-menu {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    z-index: 55;
    background: rgba(19, 19, 19, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(68, 71, 72, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}
.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}
.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
}
.mobile-menu .nav-link {
    display: block;
    width: fit-content;
}

@media (min-width: 768px) {
    .mobile-menu,
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* StrotraAI Healthcare Intelligence Flow */
.strotra-flow-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    overflow: hidden;
}

#strotra-flow-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.strotra-flow-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    height: 100%;
    min-height: inherit;
    padding: 1.25rem 0.75rem;
    gap: 0.25rem;
}

.strotra-flow-side {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 100%;
    gap: 0.35rem;
}

.strotra-flow-side-right {
    align-items: flex-end;
}

.strotra-flow-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: Geist, sans-serif;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    font-weight: 500;
    text-transform: uppercase;
    color: #c4c7c8;
    max-width: 100%;
}

.strotra-flow-side-right .strotra-flow-label {
    text-align: right;
}

.strotra-flow-dot {
    flex-shrink: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8e9192;
}

.strotra-flow-core-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 0.25rem;
}

.strotra-flow-core {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 1px solid #444748;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.strotra-flow-core-label {
    font-family: Geist, sans-serif;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-transform: uppercase;
    color: #e5e2e1;
    text-align: center;
}

@media (min-width: 768px) {
    .strotra-viz-panel {
        min-height: 280px;
    }
}

@media (max-width: 767px) {
    /* Mobile readability & alignment */
    #what-we-build .reveal,
    #research .reveal,
    #research .mb-12 {
        text-align: left;
    }

    #what-we-build .space-y-4 {
        width: 100%;
        text-align: left;
    }

    .strotra-unit {
        border: 1px solid #444748;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .strotra-text-panel {
        border: none;
        box-shadow: none;
        text-align: left;
        padding-bottom: 1.25rem;
    }

    .strotra-viz-panel {
        border: none;
        box-shadow: none;
        min-height: 200px;
        max-height: 220px;
        margin-top: 0;
    }

    .strotra-flow-stage {
        padding: 0.875rem 0.5rem;
    }

    .strotra-flow-label {
        font-size: 7px;
        gap: 0.25rem;
    }

    .strotra-flow-dot {
        width: 3px;
        height: 3px;
    }

    .strotra-flow-core {
        width: 55px;
        height: 55px;
    }

    .strotra-flow-core-label {
        font-size: 8px;
    }

    .strotra-flow-side {
        gap: 0.25rem;
    }
}
