/* ============================
   HERO SCENE — Self-contained CSS
   Drop this + scene.js into WordPress
============================ */

/* Variables (include these if not already in your WP theme) */
:root {
    --blue: #1a5fb4;
    --blue-glow: rgba(26, 95, 180, 0.15);
    --text-grey: #5a5a6e;
    --radius: 12px;
}

/* ============================
   LOADING SCREEN
============================ */
#loader {
    position: fixed; inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 900; font-size: 28px;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--blue); margin-bottom: 40px;
    display: flex; align-items: center; gap: 14px;
}
.loader-logo::before {
    content: ''; display: block;
    width: 5px; height: 28px;
    background: var(--blue);
}
.loader-bar-track {
    width: 220px; height: 3px;
    background: rgba(0,0,0,0.08);
    border-radius: 4px; overflow: hidden;
}
.loader-bar-fill {
    height: 100%; width: 0%;
    background: var(--blue);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.loader-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; color: var(--text-grey);
    margin-top: 14px; letter-spacing: 2px;
}

/* ============================
   HERO SECTION
============================ */
.hero {
    position: relative; width: 100%; height: 100vh;
    display: flex; align-items: center;
    padding: 100px 6% 0; overflow: hidden; background: #e8ecf2;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.7) 30%,
        rgba(255, 255, 255, 0.15) 55%,
        rgba(255, 255, 255, 0.0) 70%);
    z-index: 2; pointer-events: none;
}
.hero::after {
    content: ''; position: absolute;
    bottom: 0; left: 0; width: 100%; height: 200px;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
    z-index: 3; pointer-events: none;
}

#viewport {
    position: absolute; inset: 0; z-index: 1;
    cursor: crosshair;
}
#viewport:active { cursor: grabbing; }

.hero-text {
    position: relative; z-index: 10;
    max-width: 700px; pointer-events: none;
}
.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; font-weight: 500;
    letter-spacing: 4px; text-transform: uppercase;
    color: var(--blue); margin-bottom: 24px;
    display: flex; align-items: center; gap: 12px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 0.6s forwards;
}
.hero-eyebrow::before {
    content: ''; display: block;
    width: 32px; height: 1px;
    background: var(--blue);
}
.hero-text h1 {
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 900; margin: 0 0 24px 0;
    line-height: 1.0;
    letter-spacing: -2px; color: var(--blue);
    opacity: 0; transform: translateY(30px);
    animation: fadeUp 0.8s ease 0.8s forwards;
}
.hero-text h1 .blue { color: var(--blue); }
.hero-text p {
    font-size: 1.05rem; margin: 0 0 40px 0;
    color: var(--text-grey); line-height: 1.7;
    font-weight: 400; max-width: 480px;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 1.0s forwards;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: rgba(26,95,180,0.08);
    border: 1px solid rgba(26,95,180,0.15);
    border-radius: 30px;
    font-size: 12px; font-weight: 600;
    color: var(--blue); letter-spacing: 1px;
    pointer-events: auto;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 1.2s forwards;
}
.hero-badge::before {
    content: '\2713'; display: inline-flex;
    align-items: center; justify-content: center;
    width: 20px; height: 20px;
    background: var(--blue); color: white;
    border-radius: 50%; font-size: 10px;
}
.hero-actions {
    display: flex; gap: 16px; align-items: center;
    pointer-events: auto;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.8s ease 1.4s forwards;
    margin-top: 16px;
}
.cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 32px;
    background: var(--blue); color: #ffffff;
    text-decoration: none; font-weight: 700;
    letter-spacing: 1.5px; font-size: 12px;
    text-transform: uppercase; border-radius: 30px;
    transition: all 0.3s; border: 2px solid var(--blue);
}
.cta-btn:hover { background: #134a8e; border-color: #134a8e; }
.cta-btn svg { width: 16px; height: 16px; }
.cta-secondary {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 32px;
    background: transparent; color: var(--blue);
    text-decoration: none; font-weight: 700;
    letter-spacing: 1.5px; font-size: 12px;
    text-transform: uppercase; border-radius: 30px;
    border: 2px solid rgba(26,95,180,0.2);
    transition: all 0.3s;
}
.cta-secondary:hover {
    border-color: var(--blue);
    background: rgba(26,95,180,0.05);
}

/* Hero scroll indicator */
.scroll-hint {
    position: absolute; bottom: 40px;
    left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    animation: fadeUp 0.8s ease 1.5s forwards;
    opacity: 0;
}
.scroll-hint span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 3px;
    text-transform: uppercase; color: var(--text-grey);
}
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--blue), transparent);
    animation: scrollPulse 2s ease infinite;
}

/* ============================
   KEYFRAMES
============================ */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================
   DIGITAL TWIN TOOLTIP
============================ */
#tooltip {
    position: fixed; top: 0; left: 0;
    background: rgba(20, 20, 20, 0.95);
    color: #ffffff; padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--blue);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; pointer-events: none;
    opacity: 0; transition: opacity 0.15s ease;
    z-index: 2000;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    min-width: 200px;
    transform: translate(15px, 15px);
}
#tooltip .title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 800;
    margin-bottom: 10px; text-transform: uppercase;
    letter-spacing: 1.5px;
}
#tooltip .row {
    display: flex; justify-content: space-between;
    margin-bottom: 5px; gap: 20px;
}
#tooltip .label { color: #666; }
#tooltip .value { color: var(--blue); font-weight: 700; }
#tooltip .erp-status {
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 10px; padding-top: 10px;
}
#tooltip .live-dot {
    display: inline-block; width: 6px; height: 6px;
    background: #10b981; border-radius: 50%;
    margin-right: 6px; animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* ============================
   SPEECH BUBBLE
============================ */
#speech-bubble {
    position: absolute;
    background: rgba(255,255,255,0.92);
    color: #1a1a2e; padding: 10px 18px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600; font-size: 11px;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 15; white-space: nowrap;
    border: 1px solid var(--blue);
    opacity: 0; transition: opacity 0.4s ease;
    letter-spacing: 1px;
}
#speech-bubble.greeting {
    background: rgba(26, 95, 180, 0.12);
    border-color: var(--blue);
    color: var(--blue);
    font-size: 13px;
    padding: 12px 22px;
    animation: bubblePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes bubblePop {
    0% { transform: translate(-50%, -100%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}
#speech-bubble .wave { display: inline-block; animation: wave 1.5s ease infinite; transform-origin: 70% 70%; }
@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-8deg); }
    45% { transform: rotate(14deg); }
    60% { transform: rotate(-4deg); }
    75% { transform: rotate(10deg); }
}
#speech-bubble::after {
    content: ''; position: absolute;
    bottom: -6px; left: 50%; transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--blue) transparent transparent transparent;
}

/* ============================
   HERO RESPONSIVE
============================ */
@media (max-width: 768px) {
    .hero {
        height: 100svh;
        align-items: flex-start;
        padding: 100px 5% 0;
    }

    .hero::before {
        background: linear-gradient(to right,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.82) 42%,
            rgba(255, 255, 255, 0.36) 72%,
            rgba(255, 255, 255, 0.14) 100%);
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        letter-spacing: -1px;
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 24px;
        max-width: 100%;
        line-height: 1.6;
    }

    .hero-eyebrow {
        font-size: 10px;
        letter-spacing: 3px;
        margin-bottom: 16px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 8px 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .cta-btn,
    .cta-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 11px;
        text-align: center;
    }

    .scroll-hint {
        bottom: 20px;
    }

    .loader-logo {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .loader-bar-track {
        width: 160px;
    }

    #tooltip {
        display: none;
    }

    #speech-bubble {
        font-size: 9px;
        padding: 8px 14px;
        letter-spacing: 0.5px;
    }

    #speech-bubble.greeting {
        font-size: 11px;
        padding: 10px 18px;
    }
}

@media (max-width: 380px) {
    .hero {
        padding-top: 80px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .cta-btn,
    .cta-secondary {
        padding: 12px 20px;
        font-size: 10px;
    }
}
