/* onas.css - SPATIAL UI, TECH TUNNEL & PREMIUM INTERACTIONS */

/* HERO ENTRANCE */
.hero-wrapper { position: relative; overflow: hidden; clip-path: inset(0 0 0 0); }
.hero-bg-zoom {
    position: absolute; inset: 0;
    will-change: transform, opacity;
}
.hero-text-mask { clip-path: inset(100% 0 0 0); will-change: clip-path; }

/* UTILITY CLASSES */
.transform-style-3d { transform-style: preserve-3d; }
.stroke-text-white { color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.8); }

/* LEFT SIDE: RAW TELEMETRY & GRID */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 255, 163, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 163, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(1000px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    transform-style: preserve-3d;
}
@keyframes gridMove {
    0% { transform: perspective(1000px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(1000px) rotateX(60deg) translateY(50px) translateZ(-200px); }
}
.laser-scanner {
    position: absolute; left: 0; width: 100%; height: 2px;
    background: var(--neon); box-shadow: 0 0 20px 5px rgba(0,255,163,0.4);
    animation: scan 4s ease-in-out infinite alternate; z-index: 0; opacity: 0.5;
}
@keyframes scan {
    0% { top: 0%; } 100% { top: 100%; }
}

.telemetry-card {
    will-change: transform, opacity;
}
.data-stream-container div {
    transition: height 0.2s ease;
}

/* ==========================================
   RIGHT SIDE: SPATIAL UI CANVAS (TRUE 3D)
   ========================================== */
.right-mouse-glow {
    position: absolute; top: 0; left: 0;
    width: 800px; height: 800px; 
    background: radial-gradient(circle, rgba(168,85,247,0.3) 0%, rgba(59,130,246,0.15) 40%, rgba(0,0,0,0) 70%); 
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%); 
    will-change: transform;
    z-index: 0;
    mix-blend-mode: screen;
}

.spatial-ui-wrapper {
    position: relative; z-index: 10;
    will-change: transform, opacity;
    transform-style: preserve-3d;
}

.spatial-z-base { transform: translateZ(10px); will-change: transform; }
.spatial-z-text { transform: translateZ(40px); will-change: transform; }
.spatial-z-float { transform: translateZ(80px); will-change: transform; }

.figma-bounding-box {
    position: absolute; inset: -20px;
    border: 1px dashed rgba(168,85,247,0.4);
    border-radius: 12px; pointer-events: none;
}
.figma-corner {
    position: absolute; width: 6px; height: 6px;
    background: #050505; border: 1px solid #a855f7;
}
.fc-tl { top: -3px; left: -3px; }
.fc-tr { top: -3px; right: -3px; }
.fc-bl { bottom: -3px; left: -3px; }
.fc-br { bottom: -3px; right: -3px; }

.ui-swatch {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8); box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* ==========================================
   TECH TUNNEL SECTION
   ========================================== */
#tech-tunnel {
    background: radial-gradient(circle at center, #0a0a0a 0%, var(--void) 100%);
}
.tech-word {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    transform-style: preserve-3d;
    will-change: transform, opacity, filter, color, -webkit-text-stroke;
    text-shadow: 0 0 40px rgba(0,0,0,0.8);
}
.tunnel-desc {
    will-change: opacity, transform;
}

/* ==========================================
   WIREFRAME FLOW (HISTORY)
   ========================================== */
.history-card {
    will-change: transform, opacity;
}
.timeline-glow {
    will-change: top;
}
#wireframe-city-canvas {
    will-change: transform;
}

/* ==========================================
   PREMIUM CONVERSION SECTION (KINETIC TYPO)
   ========================================== */
.conversion-title {
    transform-style: preserve-3d;
    will-change: transform;
}
.c-char {
    display: inline-block;
    transform-style: preserve-3d;
    will-change: transform, opacity, color, text-shadow;
    pointer-events: none;
}

.conversion-orb {
    background: radial-gradient(circle at 30% 30%, rgba(0,255,163,0.8) 0%, rgba(168,85,247,0.8) 50%, rgba(59,130,246,0) 100%);
    will-change: transform;
    z-index: 0;
    animation: orbPulse 8s ease-in-out infinite alternate;
    filter: blur(120px);
}
@keyframes orbPulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.3) rotate(90deg); }
}

/* APPLE TEXT REVEAL & TEAM SEQUENCE */
.apple-text {
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 50%, #222222 50%, #222222 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    will-change: background-position, transform, opacity, filter;
}

.team-pin-wrapper { position: relative; height: 100vh; overflow: hidden; }
.team-card-absolute {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    will-change: transform, opacity, filter;
}
.team-ambient-glow {
    transition: background-color 1s ease;
    will-change: opacity, background-color, transform;
}

/* UTILS & CTA */
.word-wrap { display: inline-block; overflow: hidden; vertical-align: top; }
.char-wrap { display: inline-block; transform: translateY(100%); will-change: transform; }
.magnetic-wrap { position: relative; display: inline-block; }
.split-wrapper-container { will-change: transform, filter; transform-origin: bottom center; }

.cta-distortion-img {
    filter: url(#smudge-filter) brightness(0.3);
    transform: scale(1.1); will-change: filter;
}


/* ====== POCZĄTEK: WERSJA MOBILNA (MISTRZOWSKI UX / UI) ====== */
@media (max-width: 768px) {
    /* Utrzymanie stabilności całej strony mobilnej */
    body.menu-open { overflow: hidden; }
    .text-6xl, .text-7xl, .text-8xl, .text-9xl { font-size: clamp(2.5rem, 10vw, 3.5rem) !important; line-height: 1.1 !important; }
    .tech-word { font-size: 14vw !important; }
    .tunnel-desc { width: 90% !important; bottom: 2rem !important; }
    .history-card { padding: 1.5rem !important; width: calc(100% - 3rem) !important; left: 1.5rem !important; right: 1.5rem !important; transform: translateY(-50%) !important; }
    .history-card .text-\[5rem\] { font-size: 3.5rem !important; margin-bottom: 0.5rem !important; }
    .jan-ui, .bartek-ui { padding: 1.5rem !important; margin-top: -30px !important; width: 95% !important; margin-left: auto; margin-right: auto; }
    .conversion-title { font-size: 3.5rem !important; word-break: break-word; padding: 0 1rem; }
    #cta-section { padding: 6rem 1.5rem !important; }
	/* ==========================================
       POPRAWKI WIDOCZNOŚCI: TŁO 3D I OŚ CZASU
       ========================================== */
    /* 1. Ekstremalne podbicie jasności neonów i kontrastu w silniku 3D */
    #wireframe-city-canvas {
        filter: brightness(1.8) contrast(1.2) !important;
    }

    /* 2. Zrzucenie czarnej winiety, żeby nie dusiła animacji na małym ekranie */
    #history-sequence .z-10.absolute.inset-0 {
        background: radial-gradient(circle at center, transparent 40%, rgba(5,5,5,0.5) 100%) !important;
    }

    /* 3. Karta jako zaawansowane szkło - animacja przelatuje POD tekstem + karta niżej */
    /* 3. Mniejsze bloki i mocno przezroczyste, krystaliczne szkło */
    .history-card {
        /* Zmniejszenie bloku - większe marginesy po bokach i mniejszy padding */
        width: calc(100% - 4rem) !important; 
        left: 2rem !important; 
        right: 2rem !important;
        padding: 1.25rem !important;
        
        /* Odsłonięcie góry ekranu */
        top: 55% !important; 
        transform: translateY(-50%) !important;
        
        /* Ekstremalne szkło (mniej krycia, lżejszy blur) */
        background: rgba(5, 5, 8, 0.1) !important; 
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,255,255,0.02) !important;
        backdrop-filter: blur(6px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(6px) saturate(150%) !important;
    }

    /* Dopasowanie zawartości do mniejszego bloku na telefonach */
    .history-card .text-\[5rem\] { 
        font-size: 3rem !important; 
        margin-bottom: 0.25rem !important; 
    }
    .history-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    .history-card p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    /* ==========================================
       POPRAWKI ZESPOŁU: ZDJĘCIA I UKŁAD
       ========================================== */
    /* Naprawa znikających zdjęć - wymuszamy sztywną wysokość, by kontener nie zapadał się do 0 */
    .team-card-absolute .aspect-\[4\/5\] {
        height: 40vh !important; 
        aspect-ratio: auto !important;
        margin-top: 0 !important;
        flex-shrink: 0; /* Zapobiega zgniataniu zdjęcia */
    }

    /* Odsunięcie całego modułu (zdjęcie + tekst) od górnego nawigatora */
    .jan-wrapper > div, .bartek-wrapper > div {
        padding-top: 5rem !important; 
    }

    /* Karta z tekstem estetycznie "wjeżdża" na dół zdjęcia */
    .jan-ui, .bartek-ui {
        margin-top: -3rem !important;
        position: relative !important;
        z-index: 20 !important;
    }

    /* =========================================================================
       SEKCJA 01: DUAL CORE (SPLIT SECTION) - CAŁKOWITA PRZEBUDOWA MOBILE
       ========================================================================= */
    .split-section {
        height: auto !important;
        padding: 0 !important;
        display: block;
    }
    .split-wrapper-container {
        display: flex;
        flex-direction: column;
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
    }

    /* -------------------------------------------
       MODUŁ LEWY (UNIT 01: JAN / BACKEND)
       Stylizowany na moduły sprzętowe / terminal
       ------------------------------------------- */
    .split-wrapper-container > div:nth-child(2) {
        width: 100% !important;
        padding: 4rem 1.25rem !important;
        background: linear-gradient(180deg, #050505 0%, #080808 100%);
        border-bottom: 1px solid rgba(0, 255, 163, 0.15) !important;
        display: flex;
        flex-direction: column;
    }
    /* Wyłączenie zachowania gridu z desktopu */
    .cyber-grid { display: none; }
    .laser-scanner { display: none; }

    .split-wrapper-container > div:nth-child(2) .relative.z-10.w-full.max-w-lg {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100% !important;
        perspective: none !important;
    }

    /* Karty Telemetryczne - Wygląd sprzętowy */
    .left-step {
        position: relative !important; top: auto !important; left: auto !important; transform: none !important;
        width: 100% !important; opacity: 1 !important; visibility: visible !important;
    }
    .telemetry-card {
        background: rgba(10, 10, 10, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.04);
        border-radius: 16px;
        padding: 1.5rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
        position: relative;
    }
    /* Usunięcie lewego bordera, na rzecz poziomego paska LED u góry */
    .telemetry-card .border-l-2.border-neon { border-left: none; padding-left: 0; }
    .telemetry-card::before {
        content: '';
        display: block;
        width: 40px; height: 2px;
        background: var(--neon);
        margin-bottom: 1.5rem;
        box-shadow: 0 0 12px rgba(0,255,163,0.6);
        border-radius: 2px;
    }
    .left-step h2 {
        font-size: clamp(1.3rem, 6.5vw, 2.4rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 1rem !important;
        letter-spacing: -0.02em;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }


    /* -------------------------------------------
       MODUŁ PRAWY (UNIT 02: BARTEK / FRONTEND)
       Stylizowany na przestrzenny płaszcz (Glassmorphism 2.0)
       ------------------------------------------- */
    .right-side-interactive {
        width: 100% !important;
        padding: 4rem 1.25rem 5rem 1.25rem !important;
        background: #020202;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* Poświata charakterystyczna dla designu */
    .right-side-interactive::before {
        content: ''; position: absolute; top: -100px; right: -50%;
        width: 100%; height: 60%;
        background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 60%);
        pointer-events: none;
    }

    .right-side-interactive .relative.z-20.w-full.max-w-lg {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        max-width: 100% !important;
        perspective: none !important;
    }

    /* Usunięcie absurdalnego 3D na małym ekranie */
    .right-step {
        position: relative !important; top: auto !important; left: auto !important; transform: none !important;
        width: 100% !important; opacity: 1 !important; visibility: visible !important;
        text-align: left !important;
    }
    .right-step.text-center .flex-col.items-center { align-items: flex-start !important; }
    
    /* Karty interfejsu (Najwyższy poziom szkła) */
    .spatial-ui-wrapper {
        background: rgba(25, 25, 28, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-top: 1px solid rgba(168, 85, 247, 0.25);
        border-radius: 20px;
        padding: 2.25rem 1.5rem;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
        transform: none !important;
    }
    .spatial-anim, .spatial-z-base, .spatial-z-text, .spatial-z-float { transform: none !important; opacity: 1 !important; }
    .right-step h2 {
        font-size: clamp(2.4rem, 11vw, 3.2rem) !important;
        line-height: 1.05 !important;
        margin-bottom: 1.25rem !important;
        letter-spacing: -0.04em;
    }

    /* Wewnętrzna ramka Bounding Box - zamieniona w piękny detal zablokowany wewnątrz karty */
    .figma-bounding-box { 
        inset: 0; 
        border: 1px solid rgba(168,85,247,0.15); 
        border-radius: 20px; 
    }
    .figma-bounding-box span { 
        top: -10px; left: 1.5rem; 
        background: #020202; 
        padding: 0 10px; 
        border-radius: 4px; 
        border: 1px solid rgba(168,85,247,0.3);
        font-size: 0.6rem;
    }
    /* Usunięcie psujących layout kwadratów narożnych */
    .fc-tl, .fc-tr, .fc-bl, .fc-br { display: none; }

    /* Paleta kolorów (Avatar Stack na górze karty, by nie wylewać się za krawędź) */
    .spatial-ui-wrapper .absolute.-right-10.top-10 {
        position: relative !important; right: 0 !important; top: 0 !important;
        display: flex; flex-direction: row; align-items: center;
        margin-bottom: 2rem;
    }
    .ui-swatch { 
        width: 32px; height: 32px; 
        margin-left: -12px; 
        position: relative; 
        border-color: rgba(255,255,255,0.15);
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }
    .ui-swatch:first-child { margin-left: 0; z-index: 3; }
    .ui-swatch:nth-child(2) { z-index: 2; }
    .ui-swatch:last-child { z-index: 1; }

    /* -------------------------------------------
       ETYKIETY SYSTEMOWE (Tagi: UNIT_01 i UNIT_02)
       ------------------------------------------- */
    .absolute.top-8.left-8.text-\[10px\],
    .absolute.top-8.right-8.text-\[10px\] {
        position: relative !important; top: 0 !important; left: 0 !important; right: 0 !important;
        margin-bottom: 2rem; 
        display: inline-flex; align-items: center; align-self: flex-start;
        background: rgba(255,255,255,0.04); 
        padding: 8px 16px;
        border-radius: 30px; 
        border: 1px solid rgba(255,255,255,0.08);
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        backdrop-filter: blur(5px);
    }
	.team-title-container p { 
        font-size: 1.1rem !important; 
        padding: 0 1.5rem !important; 
        text-align: center; 
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
    }
}
/* ====== KONIEC: WERSJA MOBILNA ====== */