/* =========================================
   HERO SECTION - FINAL (Model Resized)
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;800&family=Michroma&family=Orbitron:wght@800&display=swap');

/* =========================================
   BASE STYLES
========================================= */

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    background-color: #000;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../src/blue-texture.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
}

/* =========================================
   HERO SECTION
========================================= */

.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    pointer-events: none;
}

/* =========================================
   BRAND & HEADLINE
========================================= */

.brand-header {
    margin-bottom: 1.5rem;
    opacity: 1;
    pointer-events: auto;
}

.brand-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #4b8ef1;
    text-transform: uppercase;
}

.main-headline {
    margin: 0;
    line-height: 1.0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    opacity: 1;
    pointer-events: auto;
}

.outline-text {
    font-family: 'Michroma', sans-serif;
    font-size: 3.5rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
    letter-spacing: -1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.solid-text {
    font-family: 'Michroma', sans-serif;
    font-size: 3.5rem;
    color: #ffffff;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.service-description {
    position: fixed;
    left: 5vw;
    bottom: calc(20vh + 240px);
    width: 320px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e2e8f0;
    text-align: left;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999;
    pointer-events: auto;
}

/* =========================================
   3D MODEL CANVAS - ANTI-PIXELATION
========================================= */

#aiModelCanvas {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    width: 50vw !important;
    height: 50vw !important;
    max-width: 650px;
    max-height: 650px;
    z-index: 2;
    pointer-events: none;
    
    /* CRITICAL: Anti-pixelation properties */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: transform;
    
    /* Prevent canvas stretching blur */
    image-rendering: -webkit-optimize-contrast;
}

/* =========================================
   EXPANDING CARD
========================================= */

.expanding-card {
    position: absolute;
    z-index: 20;
    bottom: 10vh;
    left: 5vw;
    width: 320px;
    height: 220px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.expanding-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #333);
}

.expanding-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, #333, transparent);
}

.preview-content {
    padding: 30px;
    width: 100%;
}

.mini-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mini-headline {
    font-family: 'Michroma', sans-serif;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #1e40af, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
}

.card-content {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.card-content h2 {
    font-size: 4rem;
    font-family: 'Times New Roman', serif;
    margin-bottom: 20px;
    color: #000;
}

.card-content p {
    max-width: 600px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444;
}

.close-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 2rem;
    color: #000;
    cursor: pointer;
    z-index: 50;
}

.next-section {
    min-height: 100vh;
    background-color: #000;
    position: relative;
    z-index: 5;
}

/* =========================================
   SCROLLING BACKGROUND TEXT
========================================= */

.scrolling-text-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 50%, black 60%);
    mask-image: linear-gradient(to right, transparent 50%, black 60%);
}

.scrolling-text {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: marquee 35s linear infinite;
    font-family: 'Gill Sans Extrabold', sans-serif;
    font-style: italic;
    color: gray;
    font-weight: 700;
    font-size: 2.2rem;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* =========================================
   MEDIA QUERIES - TABLET
========================================= */

@media (max-width: 992px) {
    .main-headline {
        flex-direction: column;
        gap: 0;
    }
    
    .outline-text,
    .solid-text {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 15vh;
    }
    
    .main-headline {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .outline-text,
    .solid-text {
        font-size: 2.5rem;
    }
    
    .service-description {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: 2rem;
        text-align: center;
        max-width: 90%;
        width: 90%;
    }
    
    #aiModelCanvas {
        width: 70vw !important;
        height: 70vw !important;
        top: 50%;
    }
    
    .expanding-card {
        width: 100%;
        height: 120px;
        bottom: 0;
        left: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
}

/* =========================================
   MEDIA QUERIES - MOBILE
========================================= */

@media (max-width: 576px) {
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        overscroll-behavior-y: none;
    }
    
    .hero-section {
        padding-top: 100px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: hidden;
        transform: translateZ(0);
        will-change: transform;
    }
    
    #aiModelCanvas {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) translateZ(0) !important;
        width: 80vw !important;
        height: 80vw !important;
        max-width: 350px;
        z-index: 2;
        pointer-events: none;
        will-change: transform, opacity;
        transition: opacity 0.4s ease;
    }
    
    .main-headline {
        position: absolute;
        top: 65px;
        left: 50%;
        transform: translateX(-50%) translateZ(0);
        width: 95%;
        z-index: 10;
    }
    
    .outline-text,
    .solid-text {
        font-size: 2.1rem !important;
        line-height: 1.1;
        text-align: center;
        white-space: normal;
        letter-spacing: 0.5px;
    }
    
    .service-description {
        position: fixed !important;
        left: 50% !important;
        bottom: 180px !important;
        transform: translateX(-50%) translateZ(0) !important;
        width: 88% !important;
        text-align: center !important;
        font-size: 0.92rem;
        z-index: 10;
        transition: opacity 0.4s ease;
        text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }
    
    .expanding-card {
        position: fixed !important;
        bottom: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) translateZ(0) !important;
        width: 94% !important;
        height: 125px;
        border-radius: 24px 24px 0 0;
        z-index: 100;
        background: rgba(12, 12, 12, 1);
        will-change: width, height, transform, top, left, border-radius;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transition: opacity 0.4s ease !important;
    }
    
    .expanding-card.expanded {
        border-radius: 0 !important;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    
    .expanding-card.expanded ~ .hero-content .service-description,
    .expanding-card.expanded ~ #aiModelCanvas {
        opacity: 0;
        pointer-events: none;
    }
    
    .scrolling-text-container {
        height: 55px;
        opacity: 0.25;
    }
    
    .scrolling-text {
        font-size: 1.3rem;
        will-change: transform;
        animation: marquee 45s linear infinite;
    }
}
