/* ================================
   AUTOMATIZACIÓN PAGE — Industrial Styles
   ================================ */

:root {
    --surface-1: #000000;
    --surface-hover: #050505;
}

/* ================================
   Hero — Command Center
   ================================ */

.auto-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000000;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    filter: brightness(1.0) contrast(1.05) saturate(0.95);
}

.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.05) 30%,
            rgba(0, 0, 0, 0.1) 60%,
            rgba(0, 0, 0, 0.65) 100%);
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.04) 2px,
            rgba(0, 0, 0, 0.04) 4px);
}

.scanline-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.04),
            transparent);
    z-index: 3;
    pointer-events: none;
    animation: scanline-move 4s linear infinite;
}

@keyframes scanline-move {
    0% {
        top: -3px;
    }

    100% {
        top: 100%;
    }
}

/* ================================
   1. Metrics Strip
   ================================ */

.auto-metrics-strip {
    background: #000000;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 3rem 0;
    position: relative;
}

.auto-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.auto-metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    padding: 0 2rem;
}

.auto-metric-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.05) 80%, transparent);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

.auto-metric-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.auto-metric-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ================================
   2. State of Manufacturing (Context)
   ================================ */

.auto-state {
    padding: var(--spacing-4xl) 0;
    background: radial-gradient(circle at center right, rgba(0, 240, 255, 0.03) 0%, transparent 60%), #000000;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.auto-state::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 0;
    pointer-events: none;
}

.auto-state-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.auto-state-content {
    min-width: 0;
}

.auto-state-content .section-title-pltr {
    margin-bottom: var(--spacing-md);
    padding-right: 1rem;
}

.auto-state-list li {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.auto-state-list li:last-child {
    border-bottom: none;
}

/* Glassmorphism HUD Card */
.auto-state-visual {
    background: rgba(10, 10, 15, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-lg) !important;
    padding: 3rem !important;
    position: relative;
    min-width: 0;
}

.auto-state-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

@media (max-width: 992px) {
    .auto-state-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
}

/* ================================
   3. Capabilities Cards (Bento Grid)
   ================================ */

.auto-capabilities {
    padding: var(--section-padding);
    background: #000000;
}

.auto-cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.auto-cap-card {
    background: var(--surface-1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* very subtle initial border */
    padding: 3rem;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Bento Asymmetry */
.auto-cap-card:nth-child(1) {
    grid-column: span 2;
}

.auto-cap-card:nth-child(4) {
    grid-column: span 2;
}

/* Premium Border Glow Layer */
.auto-cap-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    /* border thickness */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

/* Hover State */
.auto-cap-card:hover {
    transform: translateY(-4px);
    background: var(--surface-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.02);
}

.auto-cap-card:hover::before {
    opacity: 1;
}

.auto-cap-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.auto-cap-icon {
    width: 48px;
    height: 48px;
    color: #ffffff;
    margin-bottom: 2rem;
}

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

.auto-cap-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.auto-cap-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auto-cap-stats {
    display: flex;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auto-cap-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ================================
   3. Process Section (Vertical Stepper)
   ================================ */

.auto-process {
    padding: var(--section-padding);
    background: #000000;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.auto-process-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* The continuous back line */
.auto-process-grid::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 0;
}

.auto-process-step {
    padding: 2rem 0 2rem 5rem;
    position: relative;
    z-index: 1;
}

/* Hide horizontal connectors from old layout */
.auto-process-connector {
    display: none;
}

.auto-step-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 2rem;
    transition: all 0.4s ease;
}

/* Glowing Step Effect on Hover or Active */
.auto-process-step:hover .auto-step-number {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    background: var(--surface-hover);
}

.auto-process-step h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.auto-process-step p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auto-process-connector {
    margin-top: 4rem;
    width: 60px;
    display: flex;
    justify-content: center;
}

/* ================================
   4. Impact Section
   ================================ */

.auto-impact {
    padding: var(--section-padding);
    background: #000000;
}

.auto-impact-table {
    max-width: 900px;
    margin: 4rem auto 0;
    background: #000000;
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.impact-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.impact-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.impact-table-row:last-child {
    border-bottom: none;
}

.impact-table-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.impact-th,
.impact-td {
    padding: 1.25rem 2rem;
}

.impact-th {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.impact-td {
    font-size: 1.125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.metric-col {
    color: var(--text-secondary);
}

.before-col {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.after-col {
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 700;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.after-col.highlight {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* ================================
   5. CTA Section
   ================================ */

.auto-cta-section {
    padding: 8rem 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 60%), #000000;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.auto-cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.auto-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 1024px) {
    .auto-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auto-cap-grid {
        grid-template-columns: 1fr;
    }

    /* Reset span overrides so cards don't force implicit columns */
    .auto-cap-card:nth-child(1),
    .auto-cap-card:nth-child(4) {
        grid-column: span 1;
    }

    .auto-process-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auto-process-connector {
        display: none;
    }
}

@media (max-width: 768px) {
    .auto-metrics-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .impact-table-header,
    .impact-table-row {
        grid-template-columns: 1fr;
    }

    .impact-td {
        padding: 0.75rem 1.5rem;
    }

    .impact-th.before-col,
    .impact-th.after-col {
        display: none;
    }

    .impact-td.metric-col {
        font-weight: 700;
        color: #ffffff;
        padding-top: 1.5rem;
    }

    .impact-td.before-col,
    .impact-td.after-col {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .impact-td.before-col::before {
        content: "Sin EXIMIA";
        color: var(--text-tertiary);
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        margin-right: 0;
    }

    .impact-td.after-col::before {
        content: "Con EXIMIA";
        color: var(--text-tertiary);
        font-size: 0.75rem;
        letter-spacing: 0.05em;
        margin-right: 0;
    }

    .after-col {
        border-left: none;
        padding-bottom: 1.5rem;
    }

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

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

    /* Metrics strip */
    .auto-metric-item {
        padding: 0 1rem;
    }

    .auto-metric-value {
        font-size: 2.5rem;
    }

    /* Capability cards */
    .auto-cap-card {
        padding: 1.75rem;
    }

    .auto-cap-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }

    /* Reduce state section card inner padding */
    .auto-state {
        padding: 1.5rem;
    }

    /* Hero eyebrow on small screens */
    .hero-eyebrow {
        font-size: 0.65rem;
        white-space: normal;
        word-break: break-word;
    }

    /* Process steps */
    .auto-process-step {
        padding: 1.5rem 0 1.5rem 4rem;
    }
}