/* =====================================================================
   The Factory — GTM Website Styles v1.0
   Institutional tone: calm, precise, professional
   Palette: white (#fff), near-white (#f8f9fa), light-gray (#e9ecef),
            gray (#6c757d, #495057), dark (#212529), black (#000),
            accent (#0056d6), dark-accent (#0041a0)
   ===================================================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #212529;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #0056d6;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0041a0;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.375rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5 {
    line-height: 1.25;
    color: #000;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; font-weight: 600; margin-top: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

p { margin-bottom: 1rem; color: #495057; }

.hero-sub {
    font-size: 1.15rem;
    color: #6c757d;
    max-width: 680px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.section-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Breadcrumb */
.breadcrumb {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: #000;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.nav-links li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-links li a:hover {
    background: #f8f9fa;
    color: #000;
    text-decoration: none;
}

.cta-nav {
    background: #0056d6 !important;
    color: #fff !important;
    font-weight: 600;
    margin-left: 0.5rem;
}

.cta-nav:hover {
    background: #0041a0 !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #212529;
    padding: 0.5rem;
    line-height: 1;
}

/* Buttons */
.cta-primary, .cta-secondary {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.4;
}

.cta-primary {
    background: #0056d6;
    color: #fff;
}

.cta-primary:hover {
    background: #0041a0;
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,86,214,0.3);
}

.cta-secondary {
    background: transparent;
    color: #0056d6;
    border: 2px solid #0056d6;
}

.cta-secondary:hover {
    background: #0056d6;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.sample-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Sections */
section {
    padding: 5rem 0;
}

.hero {
    background: #f8f9fa;
    text-align: center;
    padding: 6rem 0;
    border-bottom: 1px solid #e9ecef;
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 1rem;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

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

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.75rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.card h3 { margin-bottom: 0.5rem; }
.card h3 a { color: #000; }
.card h3 a:hover { color: #0056d6; }
.card p { color: #495057; font-size: 0.9375rem; margin-bottom: 0.5rem; }

/* Product Cards */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1.25rem;
}

.product-features li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: #495057;
}

.product-features li::before {
    content: "\2014";
    margin-right: 0.5rem;
    color: #6c757d;
}

/* Benefit Cards */
.benefit-card {
    text-align: center;
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

/* Pain Cards */
.pain-card h4 {
    color: #0056d6;
    margin-bottom: 0.5rem;
}

/* Value Cards */
.value-card {
    text-align: center;
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Diff Cards */
.diff-card h4 {
    margin-bottom: 0.5rem;
}

/* Preview Box */
.preview-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.preview-box.full {
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.preview-content h3 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.preview-content h3:first-child {
    margin-top: 0;
}

.preview-content p {
    margin-bottom: 0.5rem;
}

.preview-content ul, .preview-content ol {
    margin-bottom: 1rem;
}

/* Signal Card (within previews) */
.signal-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Mission Box */
.mission-box {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
}

.mission-box p {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Principles Grid */
.principles-grid {
    max-width: 800px;
    margin: 0 auto;
}

.principle-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.principle-item:last-child {
    margin-bottom: 0;
}

.principle-num {
    font-size: 2rem;
    font-weight: 800;
    color: #e9ecef;
    line-height: 1;
    min-width: 3rem;
}

.principle-item h4 {
    margin-bottom: 0.375rem;
}

/* Message Box */
.message-box {
    background: #f8f9fa;
    border-left: 4px solid #0056d6;
    padding: 2rem;
    border-radius: 0 10px 10px 0;
    max-width: 750px;
    margin: 0 auto;
}

.message-box p {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.message-box p:last-child {
    margin-bottom: 0;
}

.message-attribution {
    margin-top: 1rem;
    font-style: italic;
    color: #6c757d;
    font-size: 0.9375rem;
}

/* Pipeline Diagram */
.pipeline-flow, .foreman-pipeline, .stage-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.pipeline-step {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    min-width: 140px;
    flex: 0 1 auto;
}

.pipeline-step h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.pipeline-step p {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: 0;
}

.step-num {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #0056d6;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: #6c757d;
}

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

.pricing-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: #0056d6;
    border-width: 2px;
    position: relative;
}

.pricing-card.featured::before {
    content: "RECOMMENDED";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0056d6;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.price-subtitle {
    font-size: 0.8125rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.price-tier {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    display: block;
}

.price-period {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6c757d;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
    text-align: left;
    flex: 1;
}

.price-features li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
}

.price-features li:last-child {
    border-bottom: none;
}

.price-features li::before {
    content: "\2713";
    color: #0056d6;
    margin-right: 0.5rem;
    font-weight: 700;
}

/* Comparison Table */
.table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #000;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

td:first-child {
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8f9fa;
}

/* Score Table (within dossier) */
.score-table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.score-table th {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.score-table td {
    padding: 0.5rem 0.75rem;
}

.total-row td {
    background: #f8f9fa;
    font-weight: 600;
    border-top: 2px solid #e9ecef;
}

/* Contact / Demo Form Sections */
.contact-section, .demo-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-detail {
    margin-bottom: 1.75rem;
}

.contact-detail h4 {
    font-size: 0.8125rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
}

.contact-detail p {
    margin-bottom: 0.25rem;
}

/* Demo Step List */
.demo-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.demo-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0056d6;
    color: #fff;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.demo-step h4 {
    margin-bottom: 0.25rem;
}

.demo-step p {
    font-size: 0.9375rem;
    margin: 0;
}

.demo-note {
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #212529;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0056d6;
    box-shadow: 0 0 0 3px rgba(0,86,214,0.1);
}

.form-group textarea {
    resize: vertical;
}

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

.form-note {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-top: 0.75rem;
}

.required {
    color: #dc3545;
}

/* Confirmation */
.demo-confirmation {
    text-align: center;
    padding: 2rem;
}

.confirmation-icon {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

/* ROI Calculators */
.roi-card {
    display: flex;
    flex-direction: column;
}

.roi-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.roi-card label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    margin-top: 0.75rem;
}

.roi-card label:first-of-type {
    margin-top: 0;
}

.roi-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
}

.roi-input:focus {
    outline: none;
    border-color: #0056d6;
    box-shadow: 0 0 0 3px rgba(0,86,214,0.1);
}

.roi-input:disabled {
    background: #f8f9fa;
    color: #6c757d;
}

.roi-result-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.roi-result-box p {
    font-size: 0.875rem;
    margin: 0;
}

.roi-baseline {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.5rem !important;
    font-family: monospace;
}

/* FAQ */
.faq .card h4 {
    color: #0056d6;
    margin-bottom: 0.5rem;
}

.faq .card p {
    font-size: 0.9375rem;
}

/* Legal Pages */
.legal-text {
    max-width: 750px;
    margin: 0 auto;
}

.legal-text h2 {
    margin-top: 2.5rem;
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-text p {
    margin-bottom: 0.75rem;
}

.legal-text ul {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

footer p {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 1.25rem;
}

.footer-nav a {
    font-size: 0.8125rem;
    color: #495057;
    font-weight: 500;
}

.footer-nav a:hover {
    color: #000;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.cta-section h2 {
    margin-top: 0;
}

.cta-section p {
    color: #6c757d;
    max-width: 550px;
    margin: 0 auto 1.5rem;
}

/* Add-Ons Section */
.add-ons .card h3 {
    color: #0056d6;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.125rem; }

    .hero-sub { font-size: 1rem; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        padding: 0.75rem;
        gap: 0.25rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 0.625rem 0.75rem;
    }

    .nav-toggle {
        display: block;
    }

    .grid-2, .grid-3, .grid-4, .contact-grid, .demo-content, .form-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 1rem;
    }

    section {
        padding: 2.5rem 0;
    }

    .pipeline-flow, .foreman-pipeline, .stage-flow {
        flex-direction: column;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    .sample-links {
        flex-direction: column;
        align-items: center;
    }

    .cta-primary, .cta-secondary {
        display: block;
        width: 100%;
    }

    .principle-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .principle-num {
        font-size: 1.5rem;
    }

    .message-box {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .card {
        padding: 1.25rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }
}
