:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --border: #2a2a3a;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

/* Hamburger Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 201;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.cta-button:hover {
    background: white;
    color: var(--bg-primary);
}

.cta-button.primary {
    background: var(--accent);
    border-color: var(--accent);
}

.cta-button.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: white;
}

.cta-button.large {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://clisystems.com/img/bg-masthead.jpg') center center / cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 120px 24px 80px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Doors Section */
.doors {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.doors-header {
    text-align: center;
    margin-bottom: 60px;
}

.doors-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.doors-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.doors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.door-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    transition: all 0.3s;
}

.door-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.door-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--bg-secondary);
}

.door-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expertise-image {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
}

.expertise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-logo {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    opacity: 1;
    transition: transform 0.2s, opacity 0.2s;
}

.client-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Logos Section */
.logos {
    padding: 80px 0;
    background: #f5f5f7;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.logos-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #1a1a25;
    margin-bottom: 40px;
    font-weight: 500;
    text-align:center;
}

.logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 64px;
    flex-wrap: wrap;
}

.door-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.door-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.door-features {
    list-style: none;
    text-align: left;
    max-width: 280px;
    margin: 0 auto 32px;
}

.door-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 10px;
}

.door-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 600;
}

/* Expertise Section */
.expertise {
    padding: 100px 0;
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.expertise-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s;
}

.expertise-card:hover {
    border-color: var(--accent);
}

.expertise-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.expertise-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.expertise-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Results Section */
.results {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.result-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.result-card .metric {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 8px;
}

.result-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto 32px;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Hero (short variant for subpages) */
.hero-short {
    min-height: 60vh;
}

/* OEM Model / Comparison */
.oem-model {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.comparison-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
}

.comparison-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.comparison-highlight {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-tertiary) 100%);
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.comparison-list li::before {
    position: absolute;
    left: 0;
    font-weight: 600;
}

.comparison-traditional li::before {
    content: '—';
    color: var(--text-muted);
}

.comparison-turnkey li::before {
    content: '✓';
    color: var(--accent);
}

/* OEM Process Timeline */
.oem-process {
    padding: 100px 0;
    background: var(--bg-primary);
}

.process-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.process-step {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-number {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.process-content {
    flex: 1;
    padding-top: 8px;
}

.process-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.process-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.process-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.process-details h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.process-details ul {
    list-style: none;
}

.process-details li {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.process-details li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* OEM Industries */
.oem-industries {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.industry-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    transition: border-color 0.3s;
}

.industry-card:hover {
    border-color: var(--accent);
}

.industry-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.industry-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* OEM Case Studies */
.oem-case-studies {
    padding: 100px 0;
    background: var(--bg-primary);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.case-study-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
}

.case-study-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.case-study-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.case-study-situation,
.case-study-outcome {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.case-study-metric {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.case-study-metric .metric {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}

.case-studies-cta {
    text-align: center;
}

/* OEM CTA / Project Form */
.oem-cta {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.project-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group-full {
    max-width: 800px;
    margin: 0 auto 24px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
}

.form-submit {
    text-align: center;
    margin-top: 8px;
}

/* Consulting Capabilities */
.consulting-capabilities {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.capability-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.capability-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    transition: border-color 0.3s;
}

.capability-card:hover {
    border-color: var(--accent);
}

.capability-problem h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.problem-statement {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    font-style: italic;
}

.capability-solution h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 12px;
}

.capability-solution p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Free Code Review CTA */
.consulting-code-review {
    padding: 80px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.code-review-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.code-review-inner h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.code-review-inner > p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.code-review-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.code-review-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.code-review-text > p {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.code-review-text .code-review-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* Engagement Models */
.consulting-engagement {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.engagement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.engagement-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    transition: border-color 0.3s;
}

.engagement-card:hover {
    border-color: var(--accent);
}

.engagement-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.engagement-card > p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.engagement-details {
    list-style: none;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.engagement-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.engagement-details li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 600;
}

/* Consulting Case Studies */
.consulting-case-studies {
    padding: 100px 0;
    background: var(--bg-primary);
}

/* Mobile */
@media (max-width: 968px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 24px 40px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 200;
        box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    }

    .nav.open {
        transform: translateX(0);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        font-size: 1.0625rem;
    }

    .nav .cta-button {
        margin-top: 24px;
        text-align: center;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
    }

    .mobile-overlay.active {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-short {
        min-height: 50vh;
    }

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

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

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

    .capability-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .case-studies-grid {
        grid-template-columns: 1fr;
    }

    .process-details {
        grid-template-columns: 1fr;
    }

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

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }

    .logos-grid {
        gap: 40px;
    }

    .client-logo {
        height: 50px;
        max-width: 160px;
    }
}

@media (max-width: 640px) {
    .process-step {
        gap: 20px;
    }

    .process-number {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
    }

    .process-timeline::before {
        left: 19px;
    }

    .process-content h3 {
        font-size: 1.25rem;
    }

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

    .hero h1 {
        font-size: 2rem;
    }

    .logos {
        padding: 40px 0;
    }

    .logos-grid {
        gap: 32px;
    }

    .client-logo {
        height: 44px;
        max-width: 140px;
    }
}
