/* ===================================
   M45 Manufacturing - Industrial Styles
   Professional Precision Engineering
   =================================== */

:root {
    --primary: #00a8e8;
    --primary-dark: #0077b6;
    --secondary: #e85d04;
    --accent: #faa307;
    --dark-bg: #0d1117;
    --darker-bg: #010409;
    --mid-bg: #161b22;
    --card-bg: rgba(22, 27, 34, 0.95);
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --text-muted: #57606a;
    --border-color: #21262d;
    --gradient-1: linear-gradient(135deg, #00a8e8 0%, #0077b6 100%);
    --gradient-2: linear-gradient(135deg, #e85d04 0%, #faa307 100%);
    --glow: 0 0 20px rgba(0, 168, 232, 0.15);
    --glow-strong: 0 0 30px rgba(0, 168, 232, 0.3);
    --metal-gradient: linear-gradient(135deg, #2d3748 0%, #1a202c 50%, #2d3748 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.hero-title,
.title-line,
.section-title,
.page-title,
.logo-text,
.logo-subtext {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===================================
   Industrial Background
   =================================== */

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        linear-gradient(180deg,
            var(--darker-bg) 0%,
            var(--dark-bg) 50%,
            var(--darker-bg) 100%
        );
}

#gridCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 168, 232, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(232, 93, 4, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(1, 4, 9, 0.95);
    border-bottom: 1px solid rgba(0, 168, 232, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.logo-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
}

.logo-subtext {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.title-line {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInLeft 0.8s ease;
    letter-spacing: -0.02em;
}

.title-line:nth-child(2) {
    animation: slideInRight 0.8s ease;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-primary);
    box-shadow: var(--glow);
}

.btn-primary:hover {
    box-shadow: var(--glow-strong);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: var(--glow);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    animation: float 3s ease-in-out infinite;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

/* ===================================
   Sections
   =================================== */

.section {
    padding: 8rem 2rem;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.section-intro {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.8;
}

/* ===================================
   Engineering Section
   =================================== */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.capability-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    padding: 3rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), var(--glow);
    background: rgba(22, 27, 34, 1);
}

.capability-card:hover::before {
    opacity: 0.03;
}

.capability-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.capability-icon svg {
    width: 100%;
    height: 100%;
}

.capability-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.capability-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===================================
   Industries Section
   =================================== */

.industries {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.industry-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.industry-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-2);
    transition: height 0.3s ease;
}

.industry-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(232, 93, 4, 0.15);
    background: rgba(22, 27, 34, 1);
}

.industry-card:hover::after {
    height: 100%;
}

.industry-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.industry-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.industry-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ===================================
   Machining Section
   =================================== */

.machines-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.machine-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--primary);
    border-radius: 8px;
    padding: 3rem;
    transition: all 0.3s ease;
    position: relative;
}

.machine-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: var(--gradient-1);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.machine-card:hover::before {
    opacity: 0.5;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), var(--glow);
    background: rgba(22, 27, 34, 1);
}

.machine-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 168, 232, 0.1);
    border: 1px solid var(--primary);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.machine-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.machine-card > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.machine-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.machine-features li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.machine-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===================================
   Contact Section
   =================================== */

.contact {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background: rgba(20, 20, 30, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--darker-bg);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .machines-container {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(10px);
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        border-top: 1px solid rgba(0, 212, 255, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding-top: 6rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }

    .capabilities-grid,
    .industries-grid {
        grid-template-columns: 1fr;
    }

    .machines-container {
        grid-template-columns: 1fr;
    }

    .machine-card {
        padding: 2rem;
    }
}
/* Additional styles for new pages */
