:root {
    --black: #050505;
    --off-black: #111111;
    --blue: #0038b8;
    /* Israel Flag Blue */
    --neon-blue: #2952ff;
    --red: #cc0000;
    --neon-red: #ff3333;
    --gray: #666666;
    --light-gray: #f2f2f2;
    --white: #ffffff;
    --border: #e0e0e0;
    --grid-line: rgba(0, 0, 0, 0.03);
    /* Subtle technical grid */

    --font-serif: "Times New Roman", Times, serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: "Courier New", Courier, monospace;

    --max-width: 1140px;
    --card-shadow: 0 4px 0px rgba(0, 0, 0, 0);
    /* Flat, technical feel initially */
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    /* Technical Grid Background */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;

    color: var(--black);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Utilities */
.mono {
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

.serif {
    font-family: var(--font-serif);
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 11px;
}

/* Wrapper */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation - Tech Lab Style */
header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
}

.logo-block {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--black);
}

.logo-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex !important;
    gap: 24px;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--off-black);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(41, 82, 255, 0.3);
    /* Subtle neon glow */
}


/* Hero - High Impact & Technical */
.hero {
    padding: 120px 0 100px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Corner markers for hero */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--gray);
    opacity: 0.3;
}

.hero::before {
    top: 24px;
    left: 24px;
    border-right: 0;
    border-bottom: 0;
}

.hero::after {
    bottom: 24px;
    right: 24px;
    border-left: 0;
    border-top: 0;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--blue);
    background: #f0f4ff;
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 4px;
    /* Tech badge look */
    border: 1px solid #dbe4ff;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(41, 82, 255, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(41, 82, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(41, 82, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(41, 82, 255, 0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Scroll Reveal Classes (Awwwards/* Scroll Flow: Initial Hidden State */
.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll Flow: Visible State */
.scroll-hidden.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Stagger Delays (Managed by CSS for performance) */
.hero h1.is-visible {
    transition-delay: 0.1s;
}

.hero-stats.is-visible {
    transition-delay: 0.3s;
}

.bento-card:nth-child(1).is-visible {
    transition-delay: 0.1s;
}

.bento-card:nth-child(2).is-visible {
    transition-delay: 0.2s;
}

.bento-card:nth-child(3).is-visible {
    transition-delay: 0.3s;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 92px;
    line-height: 0.95;
    font-weight: 400;
    letter-spacing: -3px;
    color: var(--black);
    margin-bottom: 30px;
    max-width: 950px;
}

.hero h1 span {
    font-style: italic;
    color: var(--gray);
}

.hero p {
    font-size: 24px;
    line-height: 1.5;
    color: var(--off-black);
    margin-bottom: 40px;
    max-width: 800px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 80px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
    margin-top: 60px;
    display: inline-grid;
}

.stat-item {
    position: relative;
}

/* Divider lines between stats */
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border);
}

.stat-item h4 {
    font-family: var(--font-sans);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.stat-item p {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
}


/* Asymmetric Grid - Data Vanguard Style */
.bento-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    padding: 80px 0;
}

.bento-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 40px;
    position: relative;
    /* transition: all 0.1s ease; Removed long transition for snappy tilt */
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    overflow: hidden;
    /* For corner effects */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Corner Accents on Card Hover - The "Viewfinder" effect */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    transition: border-color 0.3s;
    pointer-events: none;
    z-index: 2;
}

.bento-card:hover::before {
    border-color: var(--black);
}

/* Hover Lift */
.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 42px;
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 16px;
    position: relative;
    z-index: 3;
}

.card-desc {
    font-size: 16px;
    color: var(--gray);
    max-width: 400px;
    line-height: 1.6;
    position: relative;
    z-index: 3;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--black);
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

/* Card Variants */
.card-primary {
    grid-row: span 2;
    background: linear-gradient(135deg, #fff 0%, #f7f9ff 100%);
}

.card-blue .uppercase {
    color: var(--neon-blue);
}

.card-red .uppercase {
    color: var(--neon-red);
}

/* Technical Footer */
footer {
    border-top: 1px solid var(--black);
    padding: 60px 0;
    background: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.legal {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray);
    line-height: 1.8;
}

/* Fade Cross-Dissolve Animation for Hero Text */
#typewriter-text {
    display: inline-block;
    transition: opacity 0.4s ease;
    opacity: 1;
}

#typewriter-text.fade-out {
    opacity: 0;
}

/* Mobile */
@media (max-width: 768px) {

    /* Navigation Stacking */
    nav {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 11px;
    }

    /* Hero Mobile Sizing */
    .hero {
        padding: 60px 0 40px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero p {
        font-size: 18px !important;
    }

    /* Stats Stacking */
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stat-item::after {
        display: none;
    }

    /* Bento Grid Stacking */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    /* Capabilities Grid Stacking */
    .capability-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cap-card {
        padding: 24px;
    }
}

/* Capabilities Page Styles (carried over and refined) */
.capability-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding-bottom: 80px;
}

.cap-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 40px;
    position: relative;
    transition: transform 0.3s;
}

.cap-card:hover {
    transform: translateY(-4px);
    border-color: var(--black);
    box-shadow: var(--hover-shadow);
}

.cap-number {
    font-family: var(--font-mono);
    /* Switched to mono for tech feel */
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 14px;
    letter-spacing: 1px;
}

.cap-title {
    font-family: var(--font-serif);
    font-size: 32px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.cap-desc {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.cap-meta {
    font-size: 11px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--black);
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    /* More square for tech feel */
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    border: 1px solid var(--border);
    margin-right: 10px;
}

.pill.red {
    background: #fff0f0;
    color: var(--red);
    border-color: #ffcccc;
}

.pill.blue {
    background: #f0f4ff;
    color: var(--blue);
    border-color: #ccccff;
}

/* Technical Contact Form - Data Vanguard */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 60px;
}

.contact-form-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 40px;
    border: 1px solid var(--border);
    position: relative;
}

/* Tech corners for the form container */
.contact-form-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--blue);
    border-left: 2px solid var(--blue);
}

.form-group {
    margin-bottom: 32px;
    position: relative;
}

/* Labels: Small, Mono, Absolute or Standard */
.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Inputs: Transparent with specific border */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--black);
    transition: all 0.3s ease;
    border-radius: 0;
    /* Strict square */
    -webkit-appearance: none;
    appearance: none;
    /* Remove default browser styling */
}

.form-select {
    background-image: linear-gradient(45deg, transparent 50%, var(--black) 50%), linear-gradient(135deg, var(--black) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Focus States: Neon Glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    background-color: rgba(41, 82, 255, 0.02);
    box-shadow: 0 0 15px rgba(41, 82, 255, 0.1);
}

/* Button: Tech Styled */
.btn-tech {
    width: 100%;
    padding: 20px;
    background: var(--off-black);
    color: var(--white);
    border: 1px solid var(--black);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Infinite Marquee - Data Vanguard */
.marquee-container {
    background: var(--black);
    color: var(--white);
    padding: 12px 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.marquee-content {
    display: flex;
    align-items: center;
    width: max-content;
    will-change: transform;
    animation: scroll 40s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-content span {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    margin: 0 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-tech:hover {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(41, 82, 255, 0.4);
    transform: translateY(-2px);
}

/* LAB SPECIFIC STYLES */
.lab-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--blue);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lab-progress-container {
    margin-top: 40px;
    width: 100%;
}

.lab-progress-container.small {
    margin-top: auto;
    padding-top: 20px;
}

.lab-progress-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 8px;
}

.lab-progress-bar {
    height: 4px;
    background: #e0e0e0;
    position: relative;
    width: 100%;
}

.lab-progress-bar .fill {
    height: 100%;
    background: var(--blue);
    width: 0%;
}

.lab-progress-bar .fill.red {
    background: var(--red);
}

.lab-progress-bar .marker {
    width: 2px;
    height: 10px;
    background: var(--black);
    position: absolute;
    top: -3px;
    transform: translateX(-50%);
}

.lab-status {
    font-size: 10px;
    color: var(--black);
    margin-top: 8px;
    display: block;
    text-align: right;
}

.bento-row-span-2 {
    grid-row: span 2;
}

.bento-col-span-2 {
    grid-column: span 2;
}

/* Mobile fix for column span */
@media (max-width: 768px) {
    .bento-col-span-2 {
        grid-column: span 1;
    }
}

/* Tablet Refinements (minor adjustments only) */
@media (max-width: 968px) {
    .container {
        padding: 0 20px;
    }

    /* Slightly smaller hero for tablets */
    .hero h1 {
        font-size: 72px;
    }

    .hero p {
        font-size: 20px !important;
    }

    /* Grid Stacking */
    .bento-grid {
        grid-template-columns: 1fr;
        padding: 40px 0;
        gap: 24px;
    }

    .bento-card {
        min-height: auto;
        /* Allow auto height */
        padding: 30px;
    }

    .card-primary {
        grid-row: auto;
    }

    .card-title {
        font-size: 32px;
    }

    /* Contact Form Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-top: 40px;
    }

    .contact-form-container {
        padding: 24px;
    }

    /* Footer Stacking */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: left;
    }

    .footer-grid>div:last-child {
        text-align: left !important;
    }

    /* Capabilities Grid */
    .capability-grid {
        grid-template-columns: 1fr;
    }
}

/* 
   --------------------------------------------------------------
   MOBILE SPECIFIC OVERRIDES (Small Phones < 480px)
   This block must be at the very end to override tablet styles.
   --------------------------------------------------------------
*/
@media (max-width: 768px) {

    /* Force container width control */
    .container {
        padding: 0 16px;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Hero Text Sizing - Drastically reduced for mobile */
    .hero h1 {
        font-size: 36px !important;
        /* Force override */
        line-height: 1.1;
        word-wrap: break-word;
        /* Break long words like ENGINEERING */
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .hero p {
        font-size: 16px !important;
        /* Force override */
        margin-bottom: 30px;
    }

    /* Card Sizing */
    .cap-card {
        padding: 20px !important;
    }

    .cap-title {
        font-size: 24px !important;
        /* Smaller card titles */
    }

    .cap-desc {
        font-size: 14px !important;
    }

    /* Adjust grid gap */
    .capability-grid {
        gap: 16px;
    }

    /* Ensure pills don't break layout */
    .pill {
        font-size: 9px;
        padding: 3px 8px;
    }
}