:root {
    /* Palette - Dataholics Adaptation for SINFRO */
    --bg-commander: #0B0E14;
    /* Deep, almost black, slight cool tone for "Cold" industry */
    --bg-module: #151A23;
    /* Distinct module background */
    --bg-module-hover: #1E2532;

    --text-titanium: #E2E8F0;
    /* High legibility white/grey */
    --text-dim: #94A3B8;
    /* Secondary text */

    /* SINFRO Accents */
    --signal-blue: #3b82f6;
    /* Replaces Amber as the main "Active/Cool" signal */
    --signal-orange: #f97316;
    /* Reserved for critical/heat alerts */

    --glow-blue: rgba(59, 130, 246, 0.15);
    --glow-blue-strong: rgba(59, 130, 246, 0.3);

    --font-main: 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    /* For technical precision */

    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-commander);
    color: var(--text-titanium);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-accent {
    color: var(--signal-blue);
}

.text-dim {
    color: var(--text-dim);
}

/* Layout - The "Cockpit" Container */
.console-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header / Navigation Console */
header {
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-titanium);
    border-bottom-color: var(--signal-blue);
    text-shadow: 0 0 8px var(--glow-blue);
}

/* Buttons - Outline Style */
.btn-console {
    background: transparent;
    border: 1px solid var(--signal-blue);
    color: var(--signal-blue);
    padding: 0.6rem 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    /* Slightly squarer for tech feel */
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-console:hover {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px var(--glow-blue);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    position: relative;
}

.hero::before {
    /* Tech Grid Background */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

/* New Layout Classes */
.hero-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: flex-start;
}

.hero-content {
    margin-top: 1.5rem;
}

.visual-data-wrapper {
    position: relative;
}

.mission-section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mission-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contact-section {
    padding: 6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.sys-prefix {
    font-family: var(--font-mono);
    color: var(--signal-blue);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, white, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modules / Cards */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.module-card {
    background-color: var(--bg-module);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Atmospheric Glow on Hover */
.module-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-4px);
    background-color: var(--bg-module-hover);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow-blue);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.module-icon {
    color: var(--signal-blue);
    opacity: 0.8;
}

.module-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.1em;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--signal-blue);
    background: rgba(59, 130, 246, 0.08);
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--signal-blue);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--signal-blue);
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
}

.stat-item p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form & Contact Console */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.console-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: var(--font-main);
    font-size: 0.95rem;
    /* Better for mobile */
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}

.console-input:focus {
    border-color: var(--signal-blue);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
}

.form-status.error {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
    display: block;
}

/* Footer */
.footer-console {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MEDIA QUERIES FOR RESPONSIVENESS --- */

/* Tablet & Mobile (Max width 768px) */
/* Tablet & Mobile (Max width 768px) */
@media (max-width: 768px) {

    /* Layout Adjustments */
    .console-container {
        padding: 0 1rem;
    }

    /* Navigation - Stacked Layout */
    header {
        height: auto;
        padding: 10px 0;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
        align-items: flex-start;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Scrollable Links Bar */
    .nav-links {
        display: flex;
        width: 100%;
        overflow-x: auto;
        gap: 1.5rem;
        padding-bottom: 8px;
        /* Space for scrollbar or touch area */
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
    }

    .nav-link {
        font-size: 0.8rem;
        white-space: nowrap;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link.active {
        background: rgba(59, 130, 246, 0.1);
        border-color: var(--signal-blue);
    }

    .logo-text-group {
        display: flex;
        /* Keep text visible if possible, or adjust based on width */
    }

    /* CTA Button on Mobile */
    .nav-cta {
        display: none;
        /* Hide primary CTA in header to de-clutter, users can scroll or use bottom CTA */
    }

    /* Hero */
    .hero {
        padding-top: 140px;
        /* More space for stacked header */
        padding-bottom: 40px;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: space-between;
        /* Better distribution */
    }

    .stat-item {
        min-width: 30%;
        /* Ensure 3 items fit or wrap nicely */
    }

    /* Modules */
    .module-grid {
        grid-template-columns: 1fr;
    }

    /* Mission */
    .mission-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact-section {
        padding: 4rem 0;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Ensure inputs don't zoom */
    .console-input {
        font-size: 16px;
    }
}

/* Small Mobile (Max width 480px) */
@media (max-width: 480px) {
    .logo-text-group {
        /* Optional: Hide text only on VERY small screens if logo + text breaks layout */
        /* display: none; */
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        min-width: 45%;
        /* 2 items per row */
    }
}