/* ================= SYSTEM VARIABLES ================= */
:root {
    --brand-red: #E3000F;
    --brand-red-dark: #A3000B;
    --bg-pure: #FFFFFF;
    --bg-off: #F4F4F5;
    --bg-dark: #09090B;
    --text-main: #09090B;
    --text-muted: #71717A;
    --border-hw: #E4E4E7;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.2s ease-out;
}

/* ================= RESET & BASICS ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-pure);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.text-red { color: var(--brand-red); }
.text-white { color: var(--bg-pure); }
.text-gray { color: #A1A1AA; }

/* ================= TYPOGRAPHY ================= */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }

.hero-desc, .hw-card p, .section-desc {
    text-align: justify;
    text-justify: inter-word;
}

.sys-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-solid { background-color: var(--brand-red); color: var(--bg-pure); }
.btn-solid:hover { background-color: var(--bg-dark); }
.btn-outline { border: 1px solid var(--text-main); background: transparent; color: var(--text-main); }
.btn-outline:hover { background-color: var(--text-main); color: var(--bg-pure); }

/* ================= NAVIGATION ================= */
.system-bar { background-color: var(--bg-dark); color: var(--bg-pure); padding: 8px 0; border-bottom: 2px solid var(--brand-red); }
.sys-flex { display: flex; justify-content: space-between; align-items: center; }
.status-dot { display: inline-block; width: 6px; height: 6px; background-color: #10B981; border-radius: 50%; box-shadow: 0 0 8px #10B981; }

.hardware-nav { padding: 20px 0; border-bottom: 1px solid var(--border-hw); position: sticky; top: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); z-index: 100; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.brand-logo { height: 50px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; }
.nav-links a:hover { color: var(--brand-red); }
.nav-links .mobile-contact { display: none; }
.desktop-contact { display: inline-flex; }

/* ================= HERO ================= */
.schematic-bg { background-image: radial-gradient(var(--border-hw) 1px, transparent 1px); background-size: 24px 24px; }
.hero { padding: 80px 0; border-bottom: 1px solid var(--border-hw); }
.hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center; }
.tech-badge { border: 1px solid var(--brand-red); color: var(--brand-red); font-family: var(--font-mono); font-size: 0.7rem; padding: 4px 12px; margin-bottom: 20px; display: inline-block; }
.hero-title { font-size: 4.8rem; text-transform: uppercase; margin-bottom: 20px; }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin-bottom: 40px; }

.hero-data-panel { border: 1px solid var(--border-hw); background: var(--bg-pure); padding: 30px; box-shadow: 10px 10px 0px var(--bg-off); }
.data-box { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed var(--border-hw); }
.data-box:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.data-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 5px; }
.data-value { font-size: 2.5rem; font-weight: 800; color: var(--text-main); line-height: 1; }
.unit { font-size: 1rem; color: var(--text-muted); margin-left: 4px; }

/* ================= SOLUTIONS (Hardware Grid) ================= */
.capabilities-section { padding: 100px 0; border-bottom: 1px solid var(--border-hw); }
.section-header { margin-bottom: 60px; }
.section-heading { font-size: 3rem; margin-top: 10px; }

.hardware-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    border-top: 1px solid var(--border-hw);
    border-left: 1px solid var(--border-hw);
}

.hw-card { 
    padding: 50px 40px; 
    border-right: 1px solid var(--border-hw); 
    border-bottom: 1px solid var(--border-hw);
    background: var(--bg-pure); 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: var(--transition); 
}

.hw-card:hover { background-color: var(--bg-off); }
.active-card { background-color: var(--bg-dark); color: var(--bg-pure); }
.active-card:hover { background-color: #000; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.card-id { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; }
.hw-icon { height: 50px; width: 50px; object-fit: contain; }

.hw-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.hw-card p { font-size: 0.95rem; color: var(--text-muted); }

/* ================= ACADEMY LAYOUT PROFESSIONAL FIX ================= */
.academy-section { padding: 100px 0; border-bottom: 1px solid var(--border-hw); }

.academy-box { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Exact 50-50 split */
    border: 1px solid var(--border-hw); 
    background: var(--bg-pure); 
    overflow: hidden;
    align-items: stretch; /* Content and Image will have same height */
}

.academy-info { 
    padding: 60px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; /* Vertically centers text against the image */
    border-right: 1px solid var(--border-hw);
}

.academy-info h2 { margin-top: 8px; margin-bottom: 15px; }

.tech-list { margin: 25px 0; }
.tech-list li { 
    font-family: var(--font-mono); 
    font-size: 0.85rem; 
    margin-bottom: 12px; 
    display: flex; 
    align-items: center;
    color: var(--text-main);
}

/* Image Column Alignment */
.academy-visual { 
    padding: 0 !important; /* Removes inner padding to let image touch borders */
    margin: 0 !important;
    display: flex;
}

.academy-frame { 
    width: 100%; 
    height: 100%; 
    position: relative; 
    background: #000;
}

.academy-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Professional cropping without distortion */
    object-position: center;
    display: block;
}

.hardware-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-hw);
}

.img-overlay { 
    position: absolute; 
    top: 20px; 
    left: 20px; 
    background: var(--brand-red); 
    padding: 6px 15px; 
    z-index: 5; 
}

.img-overlay .sys-code { 
    color: white !important; 
    font-weight: 700; 
}

/* ================= FOOTER ================= */
.hardware-footer { background: var(--bg-dark); color: var(--bg-pure); padding: 80px 0 40px; }
.footer-layout { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 35px; width: auto; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-title { font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 25px; color: var(--text-muted); text-transform: uppercase; }
.links-col a { display: block; font-size: 0.9rem; margin-bottom: 12px; color: #A1A1AA; transition: 0.2s; }
.links-col a:hover { color: var(--bg-pure); border-left: 2px solid var(--brand-red); padding-left: 8px; }

/* ================= GLOBAL RESPONSIVE FIX ================= */
@media (max-width: 1024px) {
    /* Hero Section Fix */
    .hero-title { font-size: 3.5rem; line-height: 1; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-desc { margin: 0 auto 30px; }
    .hero-data-panel {
        order: 2; /* put panel below hero content on mobile */
        grid-template-columns: 1fr;
        display: grid;
        gap: 10px;
        max-width: 640px;
        margin: 0 auto 32px;
        text-align: center;
    }
    .data-box { padding: 22px 18px; border-bottom: 1px dashed var(--border-hw); }
    .data-box:last-child { border-bottom: none; }
    .data-value { font-size: 1.8rem; }
    
    /* Navigation Fix */
    .nav-links { display: none; } /* Mobile menu toggle panna pinadi use aagum */
    .nav-wrapper { justify-content: center; flex-direction: column; gap: 15px; }

    /* Hardware Grid Fix */
    .hardware-grid { grid-template-columns: 1fr; border-left: none; }
    .hw-card { padding: 40px 24px; border-right: none; }

    /* Academy Section Fix */
    .academy-box { grid-template-columns: 1fr; }
    .academy-info { border-right: none; border-bottom: 1px solid var(--border-hw); padding: 40px 20px; }
    .academy-visual { height: 300px; }

    /* Footer Fix */
    .footer-layout { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .brand-col { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .hero { padding: 60px 0; }
    .hero-title { font-size: 2.8rem; }
    .hero-desc { font-size: 1rem; max-width: none; }
    .hero-data-panel { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .data-box { text-align: center; }
    .data-value { font-size: 2rem; }
    
    .capabilities-section { padding: 80px 0; }
    .section-heading { font-size: 2.5rem; }
    .hw-card { padding: 30px 20px; }
    .hw-card h3 { font-size: 1.3rem; }
    .hw-card p { font-size: 0.9rem; }
    
    .academy-section { padding: 80px 0; }
    .academy-info { padding: 30px 16px; }
    .academy-info h2 { font-size: 2rem; margin-bottom: 20px; }
    .section-desc { font-size: 0.95rem; }
    .tech-list li { font-size: 0.8rem; margin-bottom: 10px; }
    
    .hardware-footer { padding: 60px 0 30px; }
    .footer-layout { gap: 40px; }
}

/* ================= NAVIGATION UPDATES ================= */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--bg-dark);
    transition: var(--transition);
}

.mobile-only { display: none; }
.desktop-only { display: block; }

/* ================= RESPONSIVE (THE BIG FIX) ================= */
@media (max-width: 1024px) {
    /* Layout logic: Menu-Btn(Left) | Logo(Right) */
    .nav-wrapper {
        flex-direction: row; /* Keep row but swap positions */
        justify-content: space-between;
        padding: 15px 24px;
    }

    .menu-toggle { display: flex; order: 2; } /* Right side */
    .logo-container { order: 1; } /* Left side */
    .desktop-only { display: none; }
    .mobile-only { display: block; margin-top: 20px; }
    .desktop-contact { display: none; }
    .nav-links .mobile-contact { display: inline-flex; }

    /* Show mobile stats box under capabilities on mobile */
    .hero-data-panel.desktop-only { display: none !important; }
    .hero-data-panel.mobile-only { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 20px; margin: 16px 12px; }

    /* The Dropdown Menu */
    .nav-links {
        position: fixed;
        left: -100%; /* Hidden by default */
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-pure);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 40px 0;
        display: flex; /* Override desktop display:none */
        z-index: 999;
    }

    .nav-links.active {
        left: 0; /* Slide in */
    }

    .nav-links li { margin: 20px 0; }
    .nav-links a { font-size: 1.2rem; }
    .nav-links .mobile-contact { margin: 20px 0; }

    /* Animated Hamburger to X */
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Hero & Content Fixes */
    .hero-title { font-size: 3rem; text-align: center; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-data-panel { grid-template-columns: repeat(3, 1fr); order: -1; }
    .data-value { font-size: 1.5rem; }

    .hardware-grid { grid-template-columns: 1fr; }
    .academy-box { grid-template-columns: 1fr; }
    .academy-visual { height: 300px; order: -1; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-data-panel { grid-template-columns: 1fr; gap: 10px; }
    .section-heading { font-size: 1.8rem; }
    .btn { padding: 12px 24px; font-size: 0.8rem; }
    .nav-links a { font-size: 1rem; }
    .nav-links li { margin: 15px 0; }
}