/* ============================================
   ConcurrEngine - Industrial Brutalist Design
   Palette: #2a2a2e #00e676 #e8e8e8 #3d3d42 #cc2936 #555555 #ffd000
   Fonts: Bebas Neue, Work Sans, Red Hat Mono
   ============================================ */

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

:root {
    --concrete: #2a2a2e;
    --steel: #3d3d42;
    --safety-yellow: #ffd000;
    --industrial-red: #cc2936;
    --indicator-green: #00e676;
    --text: #e8e8e8;
    --rivet: #555555;
    --void: #1c1c20;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--concrete);
    padding-bottom: 48px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Floor (Section) Base --- */
.floor {
    position: relative;
    min-height: 80vh;
    padding: 88px 40px 72px;
    border-top: 8px solid var(--rivet);
    background: var(--concrete);
}

.floor-yellow {
    border-top: 8px solid var(--safety-yellow);
    border-image: repeating-linear-gradient(
        45deg,
        var(--safety-yellow),
        var(--safety-yellow) 10px,
        var(--concrete) 10px,
        var(--concrete) 20px
    ) 8;
}

.floor-red {
    border-top: 8px solid var(--industrial-red);
    border-image: repeating-linear-gradient(
        45deg,
        var(--industrial-red),
        var(--industrial-red) 10px,
        var(--concrete) 10px,
        var(--concrete) 20px
    ) 8;
}

/* --- Floor Label (Stamped) --- */
.floor-label {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.75rem;
    color: var(--safety-yellow);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    z-index: 2;
    background: var(--concrete);
    padding: 4px 8px;
}

.floor-label.stamp {
    transform: rotate(-2deg);
    border: 2px double var(--safety-yellow);
    padding: 5px 12px;
    box-shadow: 0 0 6px rgba(255, 208, 0, 0.3);
    background: var(--concrete);
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--concrete);
    border-top: none;
    overflow: hidden;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(85, 85, 85, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(85, 85, 85, 0.12) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

.hero-serial {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.7rem;
    color: var(--rivet);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 2;
}

.hero-content {
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.75rem;
    color: var(--indicator-green);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 6px 14px;
    border: 1px solid var(--rivet);
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.25);
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--safety-yellow);
    line-height: 0.95;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-family: 'Red Hat Mono', monospace;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 18px;
    opacity: 0.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.75rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.65;
}

.hero-meta-divider {
    color: var(--safety-yellow);
}

/* --- Status Dots Marquee (Hero) --- */
.status-marquee-hero {
    margin-top: 56px;
    width: 100%;
    max-width: 720px;
    overflow: hidden;
    padding: 14px 0;
    border-top: 1px solid var(--rivet);
    border-bottom: 1px solid var(--rivet);
    position: relative;
    z-index: 1;
}

.status-dots {
    display: flex;
    gap: 12px;
    animation: scrollDots 14s linear infinite;
    width: max-content;
    padding: 0 20px;
}

@keyframes scrollDots {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hero-hazard {
    position: absolute;
    bottom: 48px;
    left: 0;
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(
        45deg,
        var(--safety-yellow),
        var(--safety-yellow) 10px,
        var(--concrete) 10px,
        var(--concrete) 20px
    );
    z-index: 1;
}

/* --- Dots --- */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green {
    background: var(--indicator-green);
}

.dot-red {
    background: var(--industrial-red);
}

.dot-yellow {
    background: var(--safety-yellow);
}

.dot-pulse {
    animation: dotPulse 2.2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 4px currentColor; }
    50% { box-shadow: 0 0 14px currentColor, 0 0 22px currentColor; }
}

.dot-green.dot-pulse {
    color: var(--indicator-green);
}

.dot-red.dot-pulse {
    color: var(--industrial-red);
}

.dot-yellow.dot-pulse {
    color: var(--safety-yellow);
}

/* --- Riveted Panel --- */
.riveted-panel {
    position: relative;
    background: var(--steel);
    padding: 56px 44px;
    max-width: 1180px;
    margin: 0 auto;
    border: 1px solid #4a4a50;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 30px rgba(0, 0, 0, 0.4);
}

.rivet {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #777, var(--rivet) 70%);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.6);
}

.rivet-tl { top: 10px; left: 10px; }
.rivet-tr { top: 10px; right: 10px; }
.rivet-bl { bottom: 10px; left: 10px; }
.rivet-br { bottom: 10px; right: 10px; }

/* --- Section Tag and Lead --- */
.section-tag {
    display: inline-block;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.7rem;
    color: var(--safety-yellow);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    padding: 4px 10px;
    border-left: 3px solid var(--safety-yellow);
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.25);
}

.section-lead {
    color: var(--text);
    opacity: 0.78;
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 760px;
    margin-bottom: 40px;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--safety-yellow);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1;
}

/* --- Feature Grid (Architecture) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--concrete);
    padding: 28px 24px 22px;
    border-left: 3px solid var(--safety-yellow);
    border-top: 1px solid #3a3a3e;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--indicator-green);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.feature-header h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.55rem;
    font-weight: 400;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.feature-card p {
    color: var(--text);
    opacity: 0.85;
    font-size: 0.925rem;
    line-height: 1.65;
}

.feature-meta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--rivet);
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.7rem;
    color: var(--rivet);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* --- Benchmark Table --- */
.benchmark-table {
    width: 100%;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.875rem;
    background: var(--concrete);
    border: 1px solid var(--rivet);
}

.bench-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rivet);
    align-items: center;
    transition: background 0.2s;
}

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

.bench-row:hover:not(.bench-header) {
    background: rgba(255, 208, 0, 0.04);
}

.bench-header {
    color: var(--safety-yellow);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    border-bottom: 2px solid var(--safety-yellow);
    background: rgba(0, 0, 0, 0.3);
}

.bench-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bench-value {
    color: var(--indicator-green);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.bench-footnote {
    margin-top: 18px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.75rem;
    color: var(--rivet);
    letter-spacing: 0.05em;
}

/* --- Operations Grid --- */
.ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.ops-card {
    text-align: left;
    padding: 32px 26px 28px;
    background: var(--concrete);
    border-bottom: 4px solid var(--safety-yellow);
    border-top: 1px solid #3a3a3e;
    position: relative;
    transition: transform 0.25s ease, border-bottom-color 0.25s ease;
}

.ops-card:hover {
    transform: translateY(-2px);
    border-bottom-color: var(--indicator-green);
}

.ops-icon {
    margin-bottom: 18px;
    display: inline-block;
    padding: 8px;
    border: 1px solid var(--rivet);
    background: rgba(0, 0, 0, 0.25);
}

.ops-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.85rem;
    font-weight: 400;
    color: var(--safety-yellow);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.ops-card p {
    color: var(--text);
    opacity: 0.85;
    font-size: 0.925rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

.ops-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px dashed var(--rivet);
    padding-top: 14px;
}

.ops-list li {
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.75;
    padding: 4px 0;
    letter-spacing: 0.03em;
}

/* --- Code Block --- */
.code-block {
    background: var(--concrete);
    margin-bottom: 24px;
    border: 1px solid var(--rivet);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--void);
    border-bottom: 1px solid var(--rivet);
}

.code-filename {
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.82rem;
    color: var(--safety-yellow);
    text-transform: none;
}

.code-tag {
    margin-left: auto;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.7rem;
    color: var(--rivet);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.code-block pre {
    padding: 22px 18px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text);
    white-space: pre;
}

/* --- Status Grid --- */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 48px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: var(--concrete);
    border-left: 3px solid var(--rivet);
    transition: border-color 0.2s ease;
}

.status-item:hover {
    border-left-color: var(--safety-yellow);
}

.status-label {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.status-value {
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.status-online {
    color: var(--indicator-green);
}

.status-standby {
    color: var(--safety-yellow);
}

/* --- CTA Block --- */
.cta-block {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 40px;
    border: 2px solid var(--safety-yellow);
    color: var(--safety-yellow);
    background: transparent;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    cursor: pointer;
    position: relative;
}

.cta-button::before {
    content: '>>';
    margin-right: 10px;
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.9rem;
    vertical-align: 2px;
}

.cta-button:hover {
    background: var(--safety-yellow);
    color: var(--concrete);
    transform: translateY(-1px);
}

.cta-secondary {
    border-color: var(--rivet);
    color: var(--text);
}

.cta-secondary:hover {
    background: var(--rivet);
    color: var(--text);
}

.cta-pulse {
    animation: ctaPulse 0.6s ease;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.96); }
}

/* --- Footer Stamp --- */
.footer-stamp {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px dashed var(--rivet);
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.72rem;
    color: var(--rivet);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-stamp-id {
    color: var(--safety-yellow);
}

/* --- Control Readout Bar (Fixed Bottom) --- */
.control-readout {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #111114;
    border-top: 2px solid var(--indicator-green);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.control-readout::before {
    content: 'SCADA';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--indicator-green);
    color: var(--void);
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    padding: 0 14px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.readout-track {
    display: flex;
    white-space: nowrap;
    animation: scrollReadout 36s linear infinite;
    padding-left: 80px;
}

.readout-content {
    font-family: 'Red Hat Mono', monospace;
    font-size: 0.875rem;
    color: var(--indicator-green);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

@keyframes scrollReadout {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .floor {
        padding: 76px 20px 48px;
    }

    .riveted-panel {
        padding: 40px 22px;
    }

    .feature-grid,
    .ops-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .bench-row {
        grid-template-columns: 1.4fr 1fr;
        gap: 8px;
    }

    .bench-header .bench-cell:nth-child(3),
    .bench-row .bench-cell:nth-child(3) {
        display: none;
    }

    .cta-block {
        flex-direction: column;
    }

    .cta-button {
        text-align: center;
    }

    .hero-serial {
        font-size: 0.6rem;
    }

    .control-readout::before {
        font-size: 0.6rem;
        padding: 0 8px;
    }

    .readout-track {
        padding-left: 56px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
    }

    .hero-meta {
        font-size: 0.65rem;
        gap: 8px;
    }

    .section-heading {
        font-size: 2.5rem;
    }

    .section-lead {
        font-size: 0.95rem;
    }
}
