:root {
    --primary: #0f172a;
    /* Sophisticated Slate */
    --primary-light: #1e293b;
    --accent: #2563eb;
    /* Modern Pro Blue */
    --accent-glow: rgba(37, 99, 235, 0.15);
    --steel: #64748b;
    --steel-light: #f1f5f9;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-heavy: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --container-max: 1200px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Top Bar */
.top-bar {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    position: fixed;
    top: 0;
    width: 100%;
    transition: var(--transition);
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info {
    display: flex;
    gap: 1.5rem;
}

.top-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info span i {
    color: var(--accent);
}

/* Header */
.header {
    height: 100px;
    background: transparent;
    position: fixed;
    top: 35px;
    /* Offset for top-bar */
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

.header-scrolled {
    height: 75px;
    top: 0;
    box-shadow: var(--shadow-heavy);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

.header.nav-open {
    z-index: 2000;
    backdrop-filter: none !important;
}

.header-scrolled .nav-desktop .nav-list a {
    color: var(--primary) !important;
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.5px;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--accent);
}

.nav-desktop {
    display: block;
}

.mobile-nav-toggle {
    display: none; /* Hide by default on desktop */
}

.nav-mobile {
    display: none; /* Hide by default on desktop */
}

.mobile-nav-toggle.active i {
    color: var(--white) !important;
}

.nav-list a:hover::after {
    width: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--white);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 55px; /* Wide logo scaling */
    width: auto;
    display: block;
    transition: var(--transition);
    filter: brightness(0) invert(1); /* Turned white for dark hero */
}

.header-scrolled .logo img {
    filter: none; /* Original black for white header */
}

.badge {
    background: var(--accent);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--primary);
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.8)),
        url('assets/mechanical_hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Fixed background for premium feel */
    color: var(--white);
    padding: 100px 0;
    overflow: hidden;
    border-bottom: 2px solid var(--accent);
}

/* Blueprint Grid Overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-text-area {
    max-width: 800px;
}

.hero-status-tag {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
    letter-spacing: 2px;
    border-top: 1px solid rgba(0, 86, 179, 0.3);
    padding-top: 1rem;
    display: inline-block;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--white);
}

.hero-subheadline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--steel-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
    max-width: 700px;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2.5rem;
    max-width: 550px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 120px 0;
}

.section-alt {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-tag {
    display: inline-block;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.section-header.center {
    text-align: center;
    margin-bottom: 5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.highlight-list {
    margin-top: 2rem;
    list-style: none;
}

.highlight-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.contact-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.highlight-list li i {
    color: var(--accent);
}

.image-box {
    width: 100%;
    aspect-ratio: 1.2;
    background: var(--primary);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    border-bottom: 10px solid var(--accent);
}

.image-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.image-box::after {
    content: 'NACH-TECH';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-weight: 900;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.03);
}

/* Stats Bar */
.stats-bar {
    background: var(--primary-light);
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    text-align: center;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--steel);
    font-weight: 700;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-heavy);
    transform: translateY(-8px);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 2rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-container {
    background: var(--primary);
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.contact-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    background: var(--primary-light);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    color: var(--white);
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: flex-start;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.item-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.item-text {
    display: flex;
    flex-direction: column;
}

.item-text strong {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.item-text span {
    font-size: 1rem;
    font-weight: 600;
}

.cta-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

.cta-card div {
    max-width: 100%;
}

.cta-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.cta-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.cta-button-wrapper {
    margin-top: 1rem;
}

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    padding: 4rem 0;
    text-align: center;
    background: #000c1a;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .container-header {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .header {
        height: 70px; /* Slimmer header on mobile */
    }

    .container-header {
        padding: 0 1.5rem;
    }

    /* Mobile Navigation Toggle */
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 0.5rem;
        z-index: 20;
        position: relative;
        transition: var(--transition);
    }

    .header-scrolled .mobile-nav-toggle {
        color: var(--primary);
    }

    .mobile-nav-toggle.active,
    .mobile-nav-toggle.active i,
    .mobile-nav-toggle.active svg {
        color: var(--white) !important;
        stroke: var(--white) !important;
    }

    .mobile-nav-toggle.active {
        z-index: 20;
    }

    .nav-desktop {
        display: none;
    }

    .nav-mobile {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--primary);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-mobile.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .nav-link {
        font-size: 1.25rem; /* Slightly smaller for drawer */
        color: var(--white);
    }

    /* Logo scaling for mobile */
    .logo img {
        height: 48px; /* Slightly smaller for 375px screens */
    }

    /* Hero Section Refinements */
    .hero {
        background-attachment: scroll; /* Fixes zoom issues on mobile */
        background-position: 70% center; /* Centers the machinery more effectively on portrait */
        padding: 100px 0 60px; /* Adjusted padding */
    }

    .hero-title {
        font-size: 2rem; /* Reduced from 2.2rem for breathing room */
        line-height: 1.2;
        padding: 0 1rem; /* Horizontal padding to prevent hitting edges */
        letter-spacing: -0.5px;
    }

    .section {
        padding: 60px 0;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-card-wrapper {
        padding: 2.5rem 1.5rem; /* Reduced padding for mobile */
    }

    .contact-details {
        gap: 1.5rem; /* Reduced gap to avoid wrapping */
    }

    .contact-item {
        width: 100%;
    }

    .item-text span {
        font-size: 0.95rem; /* Slightly smaller to fit email/phone on 375px */
    }

    .cta-card {
        padding: 2rem 1.5rem; /* Reduced padding */
    }

    .cta-card div {
        max-width: 100%;
        margin-bottom: 0.5rem;
    }

    .cta-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .about-image {
        order: -1;
        height: 280px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card i {
        width: 48px !important;
        height: 48px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Force 1-column stack */
        gap: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 42px; /* Even smaller for very narrow phones */
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        padding: 0 1.5rem;
    }

    .badge-wrapper {
        display: none;
    }
}