/* ==========================================================================
   GO MATRIX SERVICE - NEO-BRUTALIST RECEIPT DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-page: #f2f2ef;
    --bg-card: #ffffff;
    --text-main: #0a0a0a;
    --text-muted: #555555;
    --border-color: #000000;
    --border-width: 3px;
    --shadow-offset: 8px;
    --shadow-deep: 14px 14px 0px rgba(0, 0, 0, 0.18);
    --shadow-card: 10px 10px 0px #000000;
    --font-mono: 'Courier Prime', 'JetBrains Mono', Courier, monospace;
    --font-code: 'JetBrains Mono', monospace;
    --accent-red: #ff3b30;
    --accent-green: #00875a;
    --accent-yellow: #ffcc00;
}

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

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

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 0);
    background-size: 24px 24px;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   TELEMETRY TOPBAR
   -------------------------------------------------------------------------- */
.topbar {
    background: #000000;
    color: #ffffff;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid #000000;
}

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

.sys-badge {
    background: #00e676;
    color: #000000;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.telemetry {
    font-family: var(--font-code);
    text-transform: uppercase;
}

.ver {
    color: #aaaaaa;
}

/* --------------------------------------------------------------------------
   LAYOUT CONTAINER
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --------------------------------------------------------------------------
   HEADER & RECEIPT BANNER
   -------------------------------------------------------------------------- */
.site-header {
    margin-top: 40px;
    margin-bottom: 60px;
}

.header-card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-card);
    position: relative;
    padding: 50px 40px;
}

/* Receipt ticket notches */
.receipt-notch {
    position: absolute;
    width: 26px;
    height: 26px;
    background: var(--bg-page);
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.notch-left {
    left: -16px;
}

.notch-right {
    right: -16px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-black {
    background: #000000;
    color: #ffffff;
}

.tag-outline {
    border: 2px solid #000000;
    color: #000000;
}

.project-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.project-tagline {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 860px;
    margin-bottom: 35px;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   BUTTONS (TACTILE BRUTALIST)
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border: var(--border-width) solid var(--border-color);
    cursor: pointer;
    box-shadow: 4px 4px 0px #000000;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000000;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000000;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #000000;
}

.btn-ghost {
    background: transparent;
    color: #000000;
}

/* --------------------------------------------------------------------------
   SECTIONS & SECTION HEADERS
   -------------------------------------------------------------------------- */
.section {
    margin-bottom: 70px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    border-bottom: 3px solid #000000;
    padding-bottom: 12px;
}

.section-num {
    font-size: 20px;
    font-weight: 800;
    background: #000000;
    color: #ffffff;
    padding: 2px 8px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   CARDS & GRIDS
   -------------------------------------------------------------------------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
}

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

.card {
    background: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-card);
    padding: 30px;
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #000000;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.chip {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border: 1px solid #000000;
    text-transform: uppercase;
}

.chip-danger {
    background: #ffebeb;
    color: #c00000;
}

.chip-success {
    background: #e6ffed;
    color: #007020;
}

.chip-info {
    background: #eef5ff;
    color: #004499;
}

/* --------------------------------------------------------------------------
   SPEC TABLES
   -------------------------------------------------------------------------- */
.spec-table {
    margin-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dotted #cccccc;
    font-size: 14px;
}

.spec-row span {
    color: var(--text-muted);
}

.spec-row strong {
    font-weight: 700;
    font-family: var(--font-code);
}

/* --------------------------------------------------------------------------
   ARCHITECTURE & FLOW DIAGRAM
   -------------------------------------------------------------------------- */
.section-lead {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 900px;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.step-card {
    background: #ffffff;
    border: var(--border-width) solid #000000;
    padding: 24px 20px;
    box-shadow: 6px 6px 0px #000000;
    display: flex;
    flex-direction: column;
}

.step-badge {
    background: #000000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    padding: 3px 8px;
    align-self: flex-start;
    margin-bottom: 12px;
}

.step-card h4 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 13px;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 16px;
}

.code-pill {
    background: #f0f0f0;
    border: 1px dashed #000000;
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    text-align: center;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.code-block {
    background: #111111;
    color: #00e676;
    padding: 16px;
    font-family: var(--font-code);
    font-size: 13px;
    border: 2px solid #000000;
    overflow-x: auto;
    margin-bottom: 10px;
}

.code-caption {
    font-size: 12px;
    color: var(--text-muted);
}

.cli-card {
    background: #ffffff;
}

.terminal-body {
    background: #111111;
    color: #f0f0f0;
    padding: 20px;
    border: 2px solid #000000;
    font-family: var(--font-code);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.term-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.term-prompt {
    color: #ffcc00;
    font-weight: 800;
}

.term-comment {
    color: #777777;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   INTERACTIVE WORKLOAD SIMULATOR
   -------------------------------------------------------------------------- */
.sim-card {
    padding: 35px;
}

.sim-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 30px;
    background: #fafafa;
    border: 2px dashed #000000;
    padding: 24px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
}

.control-val {
    background: #000000;
    color: #ffffff;
    padding: 1px 6px;
    font-family: var(--font-code);
    font-size: 12px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border: 2px solid #000000;
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #000000;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #000000;
    border: 2px solid #ffffff;
    cursor: pointer;
}

.control-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.sim-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.sim-stat-box {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 16px;
    text-align: center;
    box-shadow: 4px 4px 0px #000000;
}

.sim-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.sim-stat-num {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-code);
}

.highlight-box {
    background: #000000;
    color: #ffffff;
}

.highlight-box .sim-stat-label {
    color: #cccccc;
}

.worker-pool-view {
    border: 2px solid #000000;
    padding: 18px;
    background: #f7f7f7;
    margin-bottom: 30px;
}

.worker-pool-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.worker-counter {
    color: var(--accent-green);
    font-weight: 800;
}

.worker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.worker-node {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-code);
    transition: all 0.2s;
}

.node-active {
    background: #00e676;
    color: #000000;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
    transform: scale(1.08);
}

.btn-block {
    width: 100%;
}

.sim-actions {
    margin-bottom: 30px;
}

.sim-status {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.sim-results-box {
    border-top: 2px dashed #000000;
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
}

.res-time {
    font-family: var(--font-code);
}

.track-bar {
    width: 100%;
    height: 24px;
    background: #e6e6e6;
    border: 2px solid #000000;
    overflow: hidden;
    position: relative;
}

.fill-bar {
    height: 100%;
    width: 0%;
    transition: width 0.05s linear;
}

.bar-seq {
    background: #666666;
}

.bar-conc {
    background: #000000;
}

.speedup-ribbon {
    text-align: center;
    padding: 12px;
    background: #000000;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    display: none;
}

.speedup-ribbon.revealed {
    display: block;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   PLACEHOLDER CARDS
   -------------------------------------------------------------------------- */
.placeholder-card {
    text-align: center;
    padding: 50px 20px;
    background: #fcfcfc;
    border: 2px dashed #888888;
    color: #666666;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   RECEIPT CARD SHOWCASE
   -------------------------------------------------------------------------- */
.receipt-showcase-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
    align-items: start;
}

.receipt-card {
    background: #ffffff;
    border: 3px solid #000000;
    box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.16);
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.receipt-header {
    border-bottom: 3px solid #000000;
    padding-bottom: 16px;
    text-align: center;
}

.receipt-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.receipt-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.receipt-hero {
    text-align: center;
    padding: 10px 0;
}

.receipt-hero-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.receipt-hero-val {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
}

.receipt-hero-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.receipt-viz {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fafafa;
    border: 1px dashed #000000;
}

.receipt-bar-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.receipt-bar-label {
    width: 85px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: right;
}

.receipt-track {
    flex-grow: 1;
    height: 20px;
    background: #eeeeee;
    border: 1px solid #000000;
    position: relative;
}

.receipt-fill {
    height: 100%;
    background: #000000;
}

.receipt-time-text {
    font-size: 13px;
    font-weight: 800;
    width: 60px;
}

.receipt-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #cccccc;
    padding-bottom: 6px;
    font-size: 13px;
}

.receipt-row span {
    color: var(--text-muted);
}

.receipt-barcode {
    text-align: center;
    letter-spacing: 4px;
    font-size: 14px;
    color: #444444;
    padding-top: 8px;
    border-top: 1px dashed #cccccc;
}

.concurrency-mechanics {
    background: #ffffff;
}

.mechanics-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mechanics-list li {
    font-size: 14px;
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
}

.mechanics-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: #000000;
    font-size: 10px;
    top: 4px;
}

.mechanics-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.mechanics-list code {
    background: #f0f0f0;
    padding: 2px 6px;
    font-family: var(--font-code);
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   SITE FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 3px solid #000000;
    background: #ffffff;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 14px;
}

.footer-content .muted {
    color: #666666;
    font-size: 12px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    box-shadow: 2px 2px 0px #000000;
}

.copy-toast {
    display: none;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-green);
    letter-spacing: 1px;
}

.copy-toast.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }
    .header-card {
        padding: 40px 24px;
    }
    .project-title {
        font-size: 30px;
    }
    .project-tagline {
        font-size: 16px;
    }
    .flow-steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .topbar-inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    .project-title {
        font-size: 24px;
    }
    .header-card {
        padding: 30px 16px;
    }
    .receipt-notch {
        display: none;
    }
    .flow-steps {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .sim-controls-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .sim-stats-strip {
        grid-template-columns: 1fr 1fr;
    }
    .receipt-showcase-container {
        grid-template-columns: 1fr;
    }
    .receipt-card {
        padding: 24px 16px;
    }
    .receipt-hero-val {
        font-size: 42px;
    }
    .header-actions {
        flex-direction: column;
    }
    .header-actions .btn {
        width: 100%;
    }
}
