/* ============================================
   HERO.CSS - Hero Section & Navigation
   Digital George 2026
   ============================================ */

.hero {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--dark-1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    padding: 2rem;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 400px) minmax(500px, 700px) minmax(280px, 400px);
    gap: 3rem;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LEFT: TITLE
   ============================================ */

.hero-left {
    animation: slideInLeft 1s ease-out;
    min-width: 0; /* zabrání přetékání z gridu */
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
}

.hero-title {
    /*
     * Klíčový fix: vw škáluje podle viewportu, ale hero-left má jen ~28%
     * šířky viewportu → koeficient musí být přibližně 28% z vw = ~2.5vw
     * clamp: min pro malé displeje, preferovaná, max pro velké
     * "ARE YOU READY?" (14 znaků) je nejdelší ze všech jazyků → to je měřítko
     */
    font-size: clamp(1.4rem, 2.5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0;
    letter-spacing: -2px;
    color: white;
    min-height: 1.2em;
    white-space: pre-line;     /* NIKDY nezalomit */
    overflow: visible;        /* pojistka: radši oříznout než přetéct do videa */
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 0.9em;
    background: var(--cyan);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 10px var(--cyan);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ============================================
   CENTER: VIDEO & ROTATING TEXT
   ============================================ */

.hero-center {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1280 / 762;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    background: var(--dark-1);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

#heroVideo.loaded {
    opacity: 1;
}

.video-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.2), transparent);
    pointer-events: none;
    opacity: 0.5;
    z-index: -1;
}

.hero-rotating-text {
    text-align: center;
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-rotating-text p {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.3;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 1;
    transition: opacity 0.6s ease;
    filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.4));
}

.hero-rotating-text strong {
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   RIGHT: TERMINAL BADGE + NAVIGATION
   ============================================ */

.hero-right {
    animation: slideInRight 1s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
}

.terminal-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid var(--cyan);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    animation: terminalGlow 3s ease-in-out infinite;
}

@keyframes terminalGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
        border-color: var(--cyan);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 245, 255, 0.6);
        border-color: var(--purple);
    }
}

.terminal-badge .arrow {
    color: var(--cyan);
    font-size: 1.2rem;
    font-weight: 900;
}

.terminal-badge .terminal-text {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.terminal-subtext {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.terminal-subtext strong {
    color: var(--cyan);
    font-weight: 700;
}

.terminal-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-item i {
    color: var(--cyan);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: var(--cyan);
    color: white;
    transform: translateX(5px);
}

.nav-item:hover i {
    transform: scale(1.1);
}

/* ============================================
   RESPONSIVE - LARGE DISPLAYS
   ============================================ */

@media (min-width: 1600px) {
    .hero-container {
        max-width: 1500px;
        gap: 3.5rem;
    }

    /* Na velkých displejích je sloupec širší → font může být větší */
    .hero-title {
        font-size: clamp(2.5rem, 3vw, 4.5rem);
    }
}

@media (min-width: 1920px) {
    .hero-container {
        max-width: 1600px;
        gap: 4rem;
    }

    .hero-title {
        font-size: clamp(3rem, 3.2vw, 5rem);
    }
}

/* ============================================
   RESPONSIVE - TABLET (≤1200px)
   2 sloupce: left + center / right přes celou šířku
   ============================================ */

@media (max-width: 1200px) {
    .hero-container {
        grid-template-columns: 1fr 1.4fr;
        gap: 2rem;
        max-width: 1100px;
    }

    .hero-right {
        grid-column: 1 / -1;
    }

    /*
     * Na 2-sloupcovém layoutu je hero-left ~42% viewportu
     * → font musí být ještě menší než 2.5vw
     */
    .hero-title {
        font-size: clamp(1.4rem, 2.2vw, 2.8rem);
        white-space: pre-line;
    }

    .terminal-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-item {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 180px;
    }
}

/* ============================================
   RESPONSIVE - NARROW TABLET / VELKÝ MOBIL (≤900px)
   Přepínáme na jednosloupec — každý element na plnou šířku
   ============================================ */

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .hero-left {
        text-align: center;
    }

    /*
     * Jednosloupec = plná šířka viewportu
     * Font může být větší, ale "ARE YOU READY?" musí stále vejít
     * ~14 znaků × ~0.6em per char při 7vw ≈ 98% šířky → ok
     */
    .hero-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
        white-space: pre-line;
    }

    .video-wrapper {
        border-radius: 16px;
    }

    .hero-rotating-text {
        min-height: 80px;
    }

    .hero-rotating-text p {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .terminal-badge {
        flex-wrap: wrap;
        font-size: 0.9rem;
    }

    .terminal-nav {
        flex-direction: column;
    }

    .nav-item {
        flex: 1 1 auto;
    }
}

/* ============================================
   RESPONSIVE - MOBIL (≤480px)
   Velmi úzký displej: povolíme zalomení
   ============================================ */

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 0;
    }

    /*
     * Pod 480px "ARE YOU READY?" s nowrap by způsobil horizontální scroll
     * → povolíme zalomení a zmenšíme font
     */
    .hero-title {
        font-size: clamp(1.6rem, 9vw, 2.5rem);
        white-space: normal;
        letter-spacing: -1px;
    }

    .hero-rotating-text p {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    .terminal-badge {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}