/* ==========================================================================
   1. Base & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    content: none !important;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    font-weight: 300;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    color: white;
}

/* iOS Safari viewport height fix */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* ==========================================================================
   2. Layout
   ========================================================================== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    margin-top: -2rem;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 1.5rem 2rem;
    z-index: 1000;
    font-weight: 400;
    letter-spacing: 2px;
    font-size: 1rem;
    mix-blend-mode: difference;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar span {
    font-size: 1.5rem;
    font-weight: 400;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
#hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 0 4rem 0;
    min-height: 100vh;
    position: relative;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    border-radius: 0;
    transition: all 0.4s ease;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
}

.cta-button:hover {
    background: white;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

/* ==========================================================================
   5. Services Section
   ========================================================================== */
#services {
    position: fixed;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    text-align: left;
    padding: 0;
    z-index: 5;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    margin: 0 auto;
    align-items: flex-start;
}

.service-item {
    max-width: 400px;
    position: relative;
    transform: translateX(0);
    transition: all 0.4s ease;
    text-align: left;
    display: flex;
    justify-content: flex-start;
}

.service-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

.service-number {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.4;
    text-align: center;
}

.service-item h3 {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    opacity: 0.7;
    position: relative;
    text-align: left;
    white-space: nowrap;
    max-width: none;
    margin: 0;
}

.service-item:hover {
    transform: translateX(10px);
}

.service-item:hover .service-number {
    opacity: 1;
    transform: translateX(-5px);
}

.service-item:hover h3 {
    opacity: 1;
    transform: translateX(5px);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
footer {
    background: #0a0a0a;
    padding: 1rem 5%;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
}

footer p {
    font-weight: 300;
    font-size: 0.8rem;
}

/* ==========================================================================
   8. Accessibility
   ========================================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ==========================================================================
   9. Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.service-item {
    animation: fadeInUp 0.6s ease backwards;
}

.service-item:nth-child(2) {
    animation-delay: 0.2s;
}

.service-item:nth-child(3) {
    animation-delay: 0.4s;
}

/* ==========================================================================
   10. Media Queries
   ========================================================================== */
/* Mobile */
@media (max-width: 768px) {
    /* Hide neural network on mobile */
    #neural-network {
        display: none;  /* Completely hide animation on mobile */
    }

    /* Keep services on the left side */
    #services {
        position: fixed;  /* Keep fixed position */
        left: 1.5rem;    /* Smaller margin on mobile */
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        max-width: 80%;  /* Limit width on mobile */
        padding: 0;
        background: rgba(10, 10, 10, 0.95);
        z-index: 10;
    }

    .services-container {
        gap: 2rem;
    }

    .service-content {
        padding: 0.8rem;
        background: none;
    }

    .service-item {
        width: auto;
    }

    .service-item h3 {
        font-size: 0.9rem;
        white-space: normal;  /* Allow text wrapping for long titles */
        line-height: 1.4;
        opacity: 0.9;
    }

    .service-number {
        font-size: 0.6rem;
        opacity: 0.6;
        margin-bottom: 0.2rem;
    }

    main {
        margin-top: 0;
        align-items: flex-start;  /* Align content to top on mobile */
        padding-top: 4rem;  /* Space for fixed header */
    }

    .top-bar {
        padding: 1rem 1.5rem;
        background: rgba(10, 10, 10, 0.98);  /* More solid background */
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .top-bar span {
        font-size: 1.2rem;
    }

    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.7rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Small screens */
@media (max-width: 380px) {
    main {
        padding-top: 3.5rem;
    }

    #services {
        left: 1rem;
        max-width: 85%;
    }

    .service-item h3 {
        font-size: 0.85rem;
    }

    .top-bar {
        padding: 0.8rem 1rem;
    }

    .top-bar span {
        font-size: 1.1rem;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    #services {
        position: fixed;
        left: 1.5rem;
        padding: 0;
    }

    .services-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   11. Print Styles
   ========================================================================== */
@media print {
    .cta-button {
        display: none !important;
    }
}

/* Add neural network styles */
#neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Update neural network for mobile */
@media (max-width: 768px) {
    #neural-network {
        opacity: 0.3;  /* Reduce opacity on mobile */
    }
}