/* =============================================
   6. HERO SECTION - DASHBOARD / UI CONCEPT
   ============================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: #020617;
    perspective: 1500px;
}

/* Background Gradients & Noise */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* CLS Fix: Contain all animated children to prevent layout shifts */
    contain: strict;
    overflow: hidden;
}

/* Subtle data grid instead of floor grid */
/* Nebula atmosphere instead of grid */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 15% 60%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    filter: blur(40px);
    z-index: -1;
    animation: nebulaPulse 10s ease-in-out infinite alternate;
}

@keyframes nebulaPulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    /* CLS Fix: Prevent layout shifts from animated orbs */
    contain: strict;
    will-change: transform;
    pointer-events: none;
    /* CLS Fix: Force GPU layer promotion */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.orb-1 {
    top: -30%;
    right: -20%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    animation: floatOrb 20s infinite ease-in-out;
}

.orb-2 {
    bottom: -30%;
    left: -20%;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
    animation: floatOrb 25s infinite ease-in-out reverse;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* Layout */
.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 100%;
    padding: 0 2rem;
    /* CLS Fix: Prevent layout shifts causing scroll jumps */
    overflow-anchor: none;
}

.hero-text {
    flex: 1;
    max-width: 720px;
}

.hero-text h1 {
    /* CLS Fix: Reserve vertical space for title to prevent shift when font loads */
    min-height: 4.4rem;
    /* Approx height for 1 line on desktop */
}

.hero-visual {
    flex: 1.2;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* =============================================
   NEW HERO VISUAL: 3D DASHBOARD INTERFACE
   ============================================= */

.tech-dashboard-wrapper {
    perspective: 2000px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-dashboard-container {
    position: relative;
    width: 580px;
    height: 400px;
    /* Base rotation for 3D look */
    transform: rotateY(-20deg) rotateX(10deg);
    transform-style: preserve-3d;
    transition: transform 0.5s ease-out;
    animation: dashboardFloat 8s ease-in-out infinite;
}

/* Hover Effect: Levels out slightly to look at user */
.tech-dashboard-wrapper:hover .tech-dashboard-container {
    transform: rotateY(-10deg) rotateX(5deg);
}

@keyframes dashboardFloat {

    0%,
    100% {
        transform: rotateY(-20deg) rotateX(10deg) translateY(0);
    }

    50% {
        transform: rotateY(-20deg) rotateX(10deg) translateY(-20px);
    }
}

/* --- MAIN GLASS PANEL --- */
.glass-panel {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateZ(0);
    /* Base layer */
}

/* Header */
.panel-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.address-bar {
    flex: 1;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
}

/* Body */
.panel-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Live Graph Animation */
.live-graph {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-bar {
    flex: 1;
    background: linear-gradient(180deg, #38bdf8 0%, rgba(56, 189, 248, 0.2) 100%);
    height: var(--h);
    border-radius: 2px 2px 0 0;
    animation: barPulse 2s ease-in-out infinite;
}

.graph-bar:nth-child(2) {
    animation-delay: 0.2s;
}

.graph-bar:nth-child(3) {
    animation-delay: 0.4s;
}

.graph-bar:nth-child(4) {
    animation-delay: 0.1s;
}

@keyframes barPulse {

    0%,
    100% {
        opacity: 1;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.7;
        transform: scaleY(0.9);
    }
}

/* Server Status */
.server-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: blink 2s infinite;
}

.server-load-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.load-fill {
    width: 45%;
    height: 100%;
    background: #a855f7;
    animation: loadMove 3s ease-in-out infinite alternate;
}

@keyframes loadMove {
    0% {
        width: 40%;
    }

    100% {
        width: 70%;
    }
}

.server-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #64748b;
}

/* Log */
.activity-log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.log-item {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 5px;
}

.log-time {
    color: #64748b;
    font-family: monospace;
}

.log-text {
    color: #cbd5e1;
}

/* Sheen effect */
.panel-sheen {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg) translateZ(0);
    animation: sheen 6s cubic-bezier(0.19, 1, 0.22, 1) infinite;
    pointer-events: none;
    /* CLS Fix: Prevent layout shifts from sheen animation */
    contain: strict;
    will-change: left, transform;
}

@keyframes sheen {

    0%,
    80% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}


/* --- FLOATING WIDGETS --- */
.floater-widget {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 20;
    transform-style: preserve-3d;
}

/* Widget 1: Code */
.code-widget {
    top: -30px;
    right: -40px;
    width: 220px;
    padding: 15px;
    transform: translateZ(60px);
    /* Pops out significantly */
    animation: floatWidget1 6s ease-in-out infinite;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.code-content {
    font-family: 'Fira Code', 'Fira Code Fallback', 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #e2e8f0;
    min-height: 130px;
    /* CLS Fix: Prevents reflow/jumping during typing effect */
    display: block;
    contain: layout style;
}

.c-purple {
    color: #c084fc;
}

.c-blue {
    color: #38bdf8;
}

.c-yellow {
    color: #fcd34d;
}

.c-green {
    color: #4ade80;
}

.c-grey {
    color: #64748b;
}

.typing-cursor {
    display: inline-block;
    width: 6px;
    height: 14px;
    background: #38bdf8;
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
    /* CLS Fix: Strict containment to prevent any layout shifts */
    contain: strict;
    will-change: opacity;
    transform: translateZ(0);
    /* Fixed positioning within parent */
    position: relative;
}

/* Widget 2: Security */
.security-widget {
    bottom: -20px;
    left: -30px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateZ(40px);
    /* Pops out slightly less */
    animation: floatWidget2 7s ease-in-out infinite 1s;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8));
    border-color: rgba(16, 185, 129, 0.3);
}

.security-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
}

.security-info {
    display: flex;
    flex-direction: column;
}

.sec-title {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
}

.sec-status {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

/* Floating Animations */
@keyframes floatWidget1 {

    0%,
    100% {
        transform: translateZ(60px) translateY(0);
    }

    50% {
        transform: translateZ(60px) translateY(-15px);
    }
}

@keyframes floatWidget2 {

    0%,
    100% {
        transform: translateZ(40px) translateY(0);
    }

    50% {
        transform: translateZ(40px) translateY(12px);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Decor Lines (Connections) */
.connection-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
    z-index: -1;
}

.line-1 {
    width: 200px;
    height: 1px;
    top: 50%;
    right: -100px;
    transform: rotate(-15deg) translateZ(-20px);
}

/* Typography & Titles (Unchanged mainly, just color tweaks if needed) */
.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-top: 10px;
    margin-bottom: 1.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight-violet {
    color: #a855f7;
    -webkit-text-fill-color: #a855f7;
    text-shadow: 0 0 40px rgba(168, 85, 247, 0.4);
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 100%;
}

.overline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    min-width: 300px;
    /* CLS Prev: Reserve space for text */
}

.terminal-prompt {
    color: #f59e0b;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    /* CLS Fix: Reserve space and prevent layout shifts */
    min-height: 52px;
    contain: layout style;
}

.btn-view-solutions {
    height: 52px;
    padding: 0 2.5rem;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.btn-view-solutions:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
    background: linear-gradient(90deg, #818cf8, #a78bfa);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-view-solutions svg {
    transition: transform 0.3s ease;
}

.btn-view-solutions:hover svg {
    transform: translateX(3px);
    /* Unified Icon Hover */
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
        gap: 2rem;
    }

    .hero-text {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-visual {
        min-height: 400px;
        width: 100%;
        transform: scale(0.85);
        /* Shrink slightly */
    }

    .tech-dashboard-container {
        transform: rotateY(0deg) rotateX(10deg);
        /* Less dramatic rotation on mobile */
    }

    .cta-group {
        justify-content: center;
    }

    .subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .overline {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    /* CLS Fix: Hide or minimize glow orbs on mobile to prevent layout shifts */
    .glow-orb {
        opacity: 0.3;
        /* Reduce visual impact */
        filter: blur(80px);
        /* More blur = less precise positioning needed */
        animation: none !important;
        /* Disable animations that cause shifts */
        transform: translateZ(0) !important;
        /* Force GPU layer */
    }

    .orb-1 {
        width: 600px;
        height: 600px;
        top: -40%;
        right: -30%;
    }

    .orb-2 {
        width: 500px;
        height: 500px;
        bottom: -40%;
        left: -30%;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        /* CLS Fix: Reserve space for mobile title */
        min-height: 6rem;
    }

    /* CLS Fix: Ensure hero-bg is fully contained on mobile */
    .hero-bg {
        contain: strict;
        overflow: hidden;
        position: absolute;
    }

    .tech-dashboard-container {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4/3;
    }

    .floater-widget {
        transform: none !important;
        /* Disable complex 3d on small mobile */
        position: absolute;
    }

    .code-widget {
        top: -10px;
        right: -10px;
        width: 180px;
        font-size: 0.7rem;
    }

    .security-widget {
        bottom: -10px;
        left: -10px;
        padding: 8px 12px;
    }

    /* CLS Fix: Reserve space for CTA on mobile */
    .cta-group {
        min-height: 52px;
        min-width: 180px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}