/* =========================================================
   supplychain.watch — neubrutalism / industrial cargo yard
   Palette: #1a1e23 #263238 #2c3840 #eceff1 #78909c #546e7a
            #e53935 #1565c0 #fdd835 #43a047
   ========================================================= */

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

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #1a1e23;
    color: #eceff1;
    font-family: "Work Sans", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    position: relative;
    padding-bottom: 80px; /* room for dock-nav */
}

/* ---------- Yard surface (parallax background) ---------- */
.yard-surface {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100%;
    height: 130%;
    z-index: 0;
    pointer-events: none;
    background-color: #1a1e23;
    background-image:
        repeating-linear-gradient(
            90deg,
            #1a1e23 0px,
            #1a1e23 18px,
            #15191d 18px,
            #15191d 19px,
            #1a1e23 19px,
            #1a1e23 38px,
            #20262c 38px,
            #20262c 39px
        ),
        radial-gradient(ellipse at 20% 0%, rgba(21,101,192,0.10), transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(229,57,53,0.07), transparent 60%);
    will-change: transform;
}

.yard-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 6% 12%, rgba(253,216,53,0.05) 0 1px, transparent 2px),
        radial-gradient(circle at 92% 28%, rgba(67,160,71,0.05) 0 1px, transparent 2px),
        radial-gradient(circle at 35% 70%, rgba(229,57,53,0.04) 0 1px, transparent 2px);
    background-size: 120px 120px, 180px 180px, 220px 220px;
    opacity: 0.7;
}

/* ---------- Ambient overlays ---------- */
.ambient-beacon {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fdd835;
    box-shadow: 0 0 12px rgba(253,216,53,0.7);
    z-index: 60;
    animation: beacon-blink 2s ease-in-out infinite;
}

@keyframes beacon-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.ambient-timestamp {
    position: fixed;
    bottom: 78px;
    left: 14px;
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    line-height: 14px;
    color: #78909c;
    letter-spacing: 0.08em;
    z-index: 60;
    background-color: rgba(26,30,35,0.7);
    padding: 4px 8px;
    border: 1px solid #2c3840;
}

/* ---------- Header ---------- */
.dock-header {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 22px 28px 18px;
    border-bottom: 2px dashed #546e7a;
}

.header-stencil .stencil-mark,
.header-meta .meta-line {
    font-family: "Share Tech Mono", monospace;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.12em;
    color: #78909c;
    text-transform: uppercase;
    display: block;
}

.header-meta {
    text-align: right;
}

.brand-title {
    font-family: "Saira Stencil One", "Work Sans", sans-serif;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #eceff1;
    text-align: center;
}

.brand-tag {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    line-height: 14px;
    color: #fdd835;
    letter-spacing: 0.24em;
    text-align: center;
    margin-top: 4px;
}

/* ---------- Container yard / bento grid ---------- */
.container-yard {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 4px;
    padding: 16px;
    max-width: 1480px;
    margin: 0 auto;
}

/* block ratios — using CSS grid spans against a 4-col grid */
.block-2x1 { grid-column: span 2; grid-row: span 1; }
.block-1x1 { grid-column: span 1; grid-row: span 1; }
.block-1x2 { grid-column: span 1; grid-row: span 2; }

.chain-divider {
    grid-column: 1 / -1;
    grid-row: span 1;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: stretch;
    overflow: hidden;
    opacity: 0.85;
}
.chain-divider svg {
    width: 100%;
    height: 16px;
    display: block;
}

/* ---------- Block (container) base ---------- */
.block {
    position: relative;
    background-color: #263238;
    background-image: repeating-linear-gradient(
        90deg,
        #263238 0px,
        #263238 2px,
        #2c3840 2px,
        #2c3840 4px
    );
    border: 2px dashed #546e7a;
    border-left: 6px solid #78909c;
    padding: 18px 18px 18px 22px;
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease, border-left-width 400ms ease, border-left-color 200ms ease;
    /* arrival animation initial state */
    transform: translateX(110%);
    opacity: 0;
    cursor: pointer;
}

.block.arrived {
    transform: translateX(0);
    opacity: 1;
}

.block.thunk::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 0 0 12px rgba(255,255,255,0.7);
    animation: thunk-flash 320ms ease-out forwards;
}

@keyframes thunk-flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* category colors (left border) */
.cat-red    { border-left-color: #e53935; }
.cat-blue   { border-left-color: #1565c0; }
.cat-yellow { border-left-color: #fdd835; }
.cat-green  { border-left-color: #43a047; }

.cat-red:hover    { border-left-color: #ff5a52; }
.cat-blue:hover   { border-left-color: #2585e0; }
.cat-yellow:hover { border-left-color: #ffe75c; }
.cat-green:hover  { border-left-color: #66c46a; }

/* expanded block */
.block.expanded {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    z-index: 4;
    border-left-width: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55);
    background-color: #2c3840;
}
.block.expanded .block-title {
    font-size: 56px;
    line-height: 64px;
}

/* stencil corner markings */
.stencil-corner {
    position: absolute;
    font-family: "Share Tech Mono", monospace;
    font-size: 10px;
    line-height: 14px;
    color: #eceff1;
    letter-spacing: 0.1em;
    opacity: 0.32;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
}
.stencil-corner.top-left    { top: 6px;   left: 12px; }
.stencil-corner.top-right   { top: 6px;   right: 12px; }
.stencil-corner.bottom-left { bottom: 6px; left: 12px; }
.stencil-corner.bottom-right{ bottom: 6px; right: 12px; }

/* block headers */
.block-header {
    margin-top: 14px;
    margin-bottom: 12px;
}
.block-cat {
    display: inline-block;
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    line-height: 14px;
    letter-spacing: 0.22em;
    color: #fdd835;
    text-transform: uppercase;
    background-color: rgba(253,216,53,0.08);
    padding: 2px 6px;
    border: 1px solid rgba(253,216,53,0.35);
    margin-bottom: 8px;
}
.cat-red    .block-cat { color: #ff7872; border-color: rgba(229,57,53,0.45); background-color: rgba(229,57,53,0.10); }
.cat-blue   .block-cat { color: #6ab2f0; border-color: rgba(21,101,192,0.45); background-color: rgba(21,101,192,0.10); }
.cat-green  .block-cat { color: #7cd180; border-color: rgba(67,160,71,0.45); background-color: rgba(67,160,71,0.10); }

.block-title {
    font-family: "Saira Stencil One", "Work Sans", sans-serif;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #eceff1;
    transition: font-size 400ms ease, line-height 400ms ease;
}
.block-2x1 .block-title { font-size: 36px; line-height: 44px; }
.block-1x2 .block-title { font-size: 26px; line-height: 32px; }

/* block bodies */
.block-body {
    color: #eceff1;
    font-size: 15px;
    line-height: 24px;
}
.block-body p { margin-bottom: 10px; }
.block-body strong { color: #fdd835; font-weight: 600; }

.block-body .byline,
.block-body .ledger-note,
.block-body .byline-foot {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    line-height: 16px;
    color: #78909c;
    letter-spacing: 0.08em;
    margin-top: 10px;
    text-transform: uppercase;
}

/* data lines */
.data-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dashed rgba(120,144,156,0.25);
    padding: 4px 0;
    font-family: "Share Tech Mono", monospace;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 0.04em;
}
.data-key { color: #78909c; text-transform: uppercase; }
.data-val { color: #eceff1; }
.status-green { color: #43a047; }
.status-amber { color: #fdd835; }
.status-red   { color: #e53935; }

.trend-up   { color: #43a047; font-style: normal; font-size: 11px; margin-left: 4px; }
.trend-down { color: #e53935; font-style: normal; font-size: 11px; margin-left: 4px; }

/* load bars */
.load-bar {
    margin-top: 8px;
    margin-bottom: 6px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}
.load-bar-label,
.load-bar-value {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    color: #78909c;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.load-bar-track {
    height: 8px;
    background-color: rgba(120,144,156,0.15);
    border: 1px solid rgba(120,144,156,0.35);
    overflow: hidden;
    position: relative;
}
.load-bar-fill {
    height: 100%;
    width: 0;
    background-color: #fdd835;
    border-radius: 0;
    transition: width 900ms ease-out;
}
.cat-red    .load-bar-fill { background-color: #e53935; }
.cat-blue   .load-bar-fill { background-color: #1565c0; }
.cat-yellow .load-bar-fill { background-color: #fdd835; }
.cat-green  .load-bar-fill { background-color: #43a047; }

/* mini-bar variant */
.mini-bar {
    height: 4px;
    background-color: rgba(120,144,156,0.15);
    border-radius: 0;
    margin: 2px 0 6px 0;
    overflow: hidden;
}
.mini-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    transition: width 900ms ease-out;
}

/* counter */
.counter-display {
    font-family: "Anton", "Saira Stencil One", sans-serif;
    font-size: 48px;
    line-height: 56px;
    color: #fdd835;
    letter-spacing: 0.04em;
    margin: 6px 0 4px;
}
.counter-sub {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    color: #78909c;
    letter-spacing: 0.08em;
    line-height: 16px;
    text-transform: uppercase;
}

/* Anton callouts */
.callout-body { display: flex; flex-direction: column; align-items: flex-start; }
.callout-anton {
    font-family: "Anton", "Saira Stencil One", sans-serif;
    font-size: 64px;
    line-height: 60px;
    letter-spacing: 0.02em;
    color: #eceff1;
    text-transform: uppercase;
    margin: 0;
}
.callout-accent { color: #43a047; }
.callout-prose {
    margin-top: 14px;
    font-size: 14px;
    line-height: 22px;
    color: #eceff1;
}

/* seizure list */
.seizure-line {
    font-family: "Share Tech Mono", monospace;
    font-size: 12px;
    line-height: 18px;
    color: #eceff1;
    border-bottom: 1px dashed rgba(120,144,156,0.25);
    padding: 5px 0;
    letter-spacing: 0.03em;
}
.seizure-port {
    display: inline-block;
    background-color: #1565c0;
    color: #eceff1;
    padding: 1px 6px;
    margin-right: 6px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

/* archive list */
.archive-list { list-style: none; }
.archive-list li {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(120,144,156,0.25);
    font-size: 13px;
    line-height: 18px;
}
.arc-date {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    color: #fdd835;
    letter-spacing: 0.06em;
}
.arc-title {
    color: #eceff1;
    font-family: "Work Sans", sans-serif;
}

/* dispatch (newsletter) form */
.dispatch-form {
    margin-top: 10px;
}
.dispatch-label {
    display: block;
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    color: #78909c;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.dispatch-row {
    display: flex;
    gap: 0;
    border: 2px solid #546e7a;
}
.dispatch-input {
    flex: 1;
    background-color: #1a1e23;
    color: #eceff1;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    font-family: "Share Tech Mono", monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
}
.dispatch-input::placeholder { color: #546e7a; }
.dispatch-btn {
    background-color: #fdd835;
    color: #1a1e23;
    border: 0;
    padding: 10px 16px;
    font-family: "Saira Stencil One", sans-serif;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
}
.dispatch-btn:hover {
    background-color: #ffe75c;
    transform: translateY(-1px);
}
.dispatch-status {
    margin-top: 8px;
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    color: #43a047;
    letter-spacing: 0.06em;
    min-height: 16px;
}

/* ---------- Bottom dock navigation ---------- */
.dock-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: #263238;
    border-top: 2px solid #1a1e23;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 16px;
    transform: translateY(100%);
    transition: transform 600ms ease-out;
    background-image: repeating-linear-gradient(
        90deg,
        #263238 0px,
        #263238 2px,
        #2c3840 2px,
        #2c3840 4px
    );
    overflow-x: auto;
    white-space: nowrap;
}
.dock-nav.docked {
    transform: translateY(0);
}
.dock-link {
    font-family: "Saira Stencil One", "Work Sans", sans-serif;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: #eceff1;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 14px;
    position: relative;
    transition: color 200ms ease;
    flex-shrink: 0;
}
.dock-link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 3px;
    background-color: #fdd835;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms ease;
}
.dock-link.active::after,
.dock-link:hover::after {
    transform: scaleX(1);
}
.dock-link:hover { color: #fdd835; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .container-yard { grid-template-columns: repeat(2, 1fr); }
    .block-2x1 { grid-column: span 2; }
    .block-1x2 { grid-column: span 1; grid-row: span 2; }
    .block-1x1 { grid-column: span 1; }
    .block-2x1 .block-title { font-size: 30px; line-height: 36px; }
    .callout-anton { font-size: 52px; line-height: 50px; }
}

@media (max-width: 640px) {
    .dock-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .header-stencil, .header-meta { display: none; }
    .container-yard {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .block-2x1, .block-1x2, .block-1x1 {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 200px;
    }
    .block-title { font-size: 24px !important; line-height: 30px !important; }
    .block-2x1 .block-title { font-size: 28px !important; line-height: 34px !important; }
    .counter-display { font-size: 36px; line-height: 42px; }
    .callout-anton { font-size: 44px; line-height: 44px; }
    .dock-link { font-size: 12px; padding: 8px 10px; }
    .ambient-timestamp { display: none; }
}
