/* ============================================================
   HERO-UPGRADE.CSS — Cinematic Hero & Cases Enhancements
   ============================================================ */

/* ── ANIMATED GRADIENT MESH BACKGROUND ────────────────────── */
.h2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 40% 50% at 60% 80%, rgba(241, 91, 181, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 10% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    animation: hero-mesh-drift 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes hero-mesh-drift {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.05) translate(-15px, 10px); }
    100% { transform: scale(1.02) translate(10px, -8px); }
}

/* ── HERO GRID LINES (subtle tech feel) ────────────────────── */
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ══════════════════════════════════════════════════════════
   HERO TERMINAL MOCKUP
   ══════════════════════════════════════════════════════════ */

/* Override the orbit grid to use terminal layout */
.orbit-hero .h2-hero-inner {
    grid-template-columns: 1fr 1fr !important;
    gap: 60px !important;
    align-items: center;
}

/* The terminal wrapper — MUST be position:relative for floating badges */
.hero-terminal {
    position: relative !important;
    width: 100%;
    max-width: 480px;
    z-index: 2;
    animation: float-gentle 6s ease-in-out infinite;
}

/* Glow behind terminal */
.hero-terminal-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(124, 58, 237, 0.30) 0%,
        rgba(6, 182, 212, 0.12) 40%,
        transparent 70%);
    filter: blur(50px);
    z-index: -1;
    animation: hero-glow-breathe 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes hero-glow-breathe {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* ── TERMINAL BAR (title bar with dots) ───────────────────── */
.hero-terminal-bar {
    display: flex !important;
    align-items: center;
    gap: 7px;
    padding: 13px 18px;
    background: rgba(30, 30, 50, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.term-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.term-title {
    margin-left: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

/* ── TERMINAL BODY ─────────────────────────────────────────── */
.hero-terminal-body {
    background: rgba(8, 8, 20, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: none !important;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 22px 20px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 2;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(124, 58, 237, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.term-line {
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
}

/* Staggered reveal animation for terminal lines */
.term-line:nth-child(1) { animation: term-type 0.6s ease-out 0.3s both; }
.term-line:nth-child(2) { animation: term-type 0.4s ease-out 1.0s both; }
.term-line:nth-child(3) { animation: term-type 0.4s ease-out 1.5s both; }
.term-line:nth-child(4) { animation: term-type 0.4s ease-out 2.0s both; }
.term-line:nth-child(5) { animation: term-type 0.4s ease-out 2.5s both; }
.term-line:nth-child(6) { animation: term-type 0.4s ease-out 3.2s both; }
.term-line:nth-child(7) { animation: term-type 0.3s ease-out 4.0s both; }

@keyframes term-type {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.term-prompt {
    color: #22c55e;
    font-weight: 700;
}

.term-cmd {
    color: #a78bfa;
    font-weight: 600;
}

.term-output {
    color: rgba(255, 255, 255, 0.65);
}

.term-fade {
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.75rem;
}

.term-success {
    color: #22c55e;
    font-weight: 600;
}

.term-cursor {
    color: #a78bfa;
    animation: cursor-blink 1s step-end infinite;
    font-weight: 300;
}

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

/* ══════════════════════════════════════════════════════════
   FLOATING SERVICE BADGES (around terminal)
   position:absolute relative to .hero-terminal
   ══════════════════════════════════════════════════════════ */
.hero-float-badge {
    position: absolute !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(15, 15, 30, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10;
    white-space: nowrap;
    animation: float-gentle 5s ease-in-out infinite;
    pointer-events: none;
}

.float-badge-1 {
    top: -16px;
    right: -30px;
    border-color: rgba(239, 68, 68, 0.3);
    animation-delay: 0s;
}

.float-badge-2 {
    bottom: 80px;
    left: -45px;
    border-color: rgba(6, 182, 212, 0.3);
    animation-delay: -1.2s;
}

.float-badge-3 {
    top: 45px;
    left: -40px;
    border-color: rgba(255, 107, 53, 0.3);
    animation-delay: -2.5s;
}

.float-badge-4 {
    bottom: -12px;
    right: 20px;
    border-color: rgba(59, 130, 246, 0.3);
    animation-delay: -3.8s;
}

/* ══════════════════════════════════════════════════════════
   HERO TEXT + BUTTON ALIGNMENT FIXES
   ══════════════════════════════════════════════════════════ */

.orbit-hero .h2-hero-text {
    text-align: left !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.orbit-hero .h2-hero-text h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    margin-bottom: 4px;
}

.orbit-hero .h3-typed-line {
    margin-bottom: 16px;
    white-space: nowrap !important;
    overflow: hidden;
    height: 1.3em;
    min-height: 1.3em;
    max-height: 1.3em;
}

.orbit-hero .h2-hero-text .subtitle {
    margin: 0 0 28px 0 !important;
    max-width: 480px;
}

/* Buttons row */
.orbit-hero .h2-hero-actions {
    display: flex !important;
    align-items: center;
    gap: 14px;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* Status badges row — directly under buttons */
.hero-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.hero-status-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.hero-status-badge .status-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse-dot-anim 2s infinite;
    flex-shrink: 0;
}

.hero-status-badge .status-dot.orange {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

/* ══════════════════════════════════════════════════════════
   UPGRADED CASES SECTION
   ══════════════════════════════════════════════════════════ */

.h2-cases-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.h2-case-card.case-featured {
    grid-column: 1 / 3;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 36px 32px;
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.06) 0%,
        rgba(6, 182, 212, 0.04) 100%);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.h2-case-card.case-featured:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 30px 60px rgba(124, 58, 237, 0.12);
}

.case-featured-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #a78bfa;
    text-transform: uppercase;
    width: fit-content;
}

.case-featured-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.case-featured-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.case-featured-stat:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.case-featured-stat .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.case-featured-stat .stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.h2-case-card .case-visual-strip {
    height: 4px;
    border-radius: 4px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.h2-case-card:nth-child(2) { transform: none; }
.h2-case-card:nth-child(2):hover { transform: translateY(-8px); }

.case-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.case-tech-pill {
    display: inline-flex;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.3px;
}

.h2-cases-footer {
    text-align: center;
    margin-top: 40px;
}

.h2-cases-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.h2-cases-footer a:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.15);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .orbit-hero .h2-hero-inner {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .hero-terminal {
        order: -1;
        max-width: 100%;
        margin: 0 auto;
    }

    .orbit-hero .h2-hero-text {
        text-align: center !important;
        align-items: center;
    }

    .orbit-hero .h2-hero-actions {
        justify-content: center !important;
    }

    .hero-status-bar {
        justify-content: center;
    }

    .h2-cases-grid {
        grid-template-columns: 1fr;
    }

    .h2-case-card.case-featured {
        grid-column: 1;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-float-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .float-badge-2,
    .float-badge-3 {
        display: none;
    }

    .hero-terminal-body {
        font-size: 0.72rem;
        padding: 16px;
    }

    .case-featured-stats {
        grid-template-columns: 1fr 1fr;
    }
}
