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

:root {
    /* Operations / observability palette */
    --bg:           #0a0e12;
    --bg-alt:       #0d1218;
    --surface:      #111820;
    --surface-hi:   #161f2a;
    --surface-card: #131b24;

    --border:       rgba(255,255,255,0.06);
    --border-hi:    rgba(244,104,0,0.25);
    --border-card:  rgba(255,255,255,0.08);

    /* Accents */
    --accent:       #f46800;          /* Grafana orange */
    --accent-dim:   rgba(244,104,0,0.12);
    --accent-glow:  rgba(244,104,0,0.06);
    --azure:        #0078d4;
    --azure-dim:    rgba(0,120,212,0.12);
    --ocp:          #ee0000;
    --green:        #73bf69;
    --green-dim:    rgba(115,191,105,0.12);
    --amber:        #ffb020;
    --red:          #e24d42;
    --violet:       #8b5cf6;

    /* Text */
    --text:         #e6edf3;
    --text-muted:   #8b9cb3;
    --text-dim:     #4a5d73;
    --terminal-fg:  #33ff99;

    /* Type */
    --font-display: 'Outfit', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --nav-h: 62px;
    --max-w: 1160px;
    --progress-h: 3px;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-hi); border-radius: 3px; }

/* ─── SCROLL PROGRESS (deployment pipeline) ─── */
.scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    height: var(--progress-h);
    background: var(--surface);
}
.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--azure), var(--accent), var(--green));
    transition: width .08s linear;
}
.scroll-stages {
    position: fixed; top: var(--progress-h); left: 0; right: 0; z-index: 299;
    display: flex; justify-content: space-between;
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}
body.scrolled-past-hero .scroll-stages { opacity: 1; }
.stage-label {
    font-family: var(--font-mono);
    font-size: .55rem; font-weight: 500;
    color: var(--text-dim);
    letter-spacing: .08em; text-transform: uppercase;
    transform: translateY(-100%);
    transition: color .2s;
}
.stage-label.active { color: var(--accent); }

/* ─── COMMAND PALETTE ─── */
.cmd-palette-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 18vh;
    opacity: 0; visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.cmd-palette-overlay.open { opacity: 1; visibility: visible; }
.cmd-palette {
    width: min(480px, 92vw);
    background: var(--surface-card);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    transform: translateY(-8px) scale(.98);
    transition: transform .2s;
}
.cmd-palette-overlay.open .cmd-palette { transform: translateY(0) scale(1); }
.cmd-palette-input-wrap {
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.cmd-prompt {
    font-family: var(--font-mono);
    font-size: .85rem; color: var(--accent);
    flex-shrink: 0;
}
.cmd-palette-input {
    flex: 1; background: none; border: none; outline: none;
    font-family: var(--font-mono);
    font-size: .85rem; color: var(--text);
}
.cmd-palette-input::placeholder { color: var(--text-dim); }
.cmd-palette-list { list-style: none; max-height: 280px; overflow-y: auto; }
.cmd-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .65rem 1rem;
    font-family: var(--font-mono);
    font-size: .78rem; color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.cmd-item:hover, .cmd-item.selected {
    background: var(--surface-hi);
    color: var(--text);
}
.cmd-item kbd {
    font-family: var(--font-mono);
    font-size: .65rem; color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px; padding: 1px 5px;
}
.cmd-palette-hint {
    padding: .5rem 1rem;
    font-family: var(--font-mono);
    font-size: .65rem; color: var(--text-dim);
    border-top: 1px solid var(--border);
    text-align: center;
}

/* ─── NAV ─── */
.navbar {
    position: fixed; top: var(--progress-h); left: 0; right: 0; z-index: 200;
    background: rgba(10,14,18,0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color .3s;
}
.navbar.scrolled { border-bottom-color: var(--border-hi); }

.nav-inner {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 2rem; height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    display: flex; align-items: center; gap: .75rem;
    text-decoration: none;
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 6px;
    background: var(--surface-hi);
    border: 1px solid var(--border-card);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: .65rem; font-weight: 500;
    color: var(--terminal-fg);
    flex-shrink: 0;
}
.brand-name {
    font-size: .9rem; font-weight: 500;
    color: var(--text); letter-spacing: -.01em;
}

.nav-links { display: flex; list-style: none; gap: 2rem; }
.nl {
    font-family: var(--font-mono);
    font-size: .75rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    letter-spacing: .02em;
    transition: color .2s;
    position: relative;
}
.nl::after {
    content: ''; position: absolute; bottom: -3px; left: 0;
    height: 1px; width: 0;
    background: var(--accent);
    transition: width .25s ease;
}
.nl:hover, .nl.active { color: var(--text); }
.nl:hover::after, .nl.active::after { width: 100%; }

.nav-aux { display: flex; align-items: center; gap: 1rem; }
.nav-status {
    font-family: var(--font-mono);
    font-size: .68rem; color: var(--text-dim);
    display: flex; align-items: center; gap: .4rem;
}
.nav-status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(115,191,105,.6);
}
.nav-swatch {
    font-family: var(--font-mono);
    font-size: .68rem; color: var(--text-dim);
    letter-spacing: .06em; text-decoration: none;
    transition: color .2s;
}
.nav-swatch:hover { color: var(--accent); }
.nav-swatch:hover .sw-val { opacity: 1; }
.sw-val { color: var(--accent); opacity: .8; font-variant-numeric: tabular-nums; }
#footerSwatch { font-variant-numeric: tabular-nums; }
.nav-kbd {
    font-family: var(--font-mono);
    font-size: .62rem; color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px; padding: 2px 6px;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.nav-kbd:hover { border-color: var(--border-hi); color: var(--text-muted); }
.nav-cta {
    font-family: var(--font-mono);
    font-size: .75rem; font-weight: 500;
    padding: .45rem 1rem; border-radius: 6px;
    background: var(--accent); color: #0a0e12;
    text-decoration: none; letter-spacing: .02em;
    transition: opacity .2s, transform .2s;
}
.nav-cta:hover { opacity: .88; transform: translateY(-1px); }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text-muted); }

.mobile-menu {
    display: none; flex-direction: column;
    padding: .85rem 2rem 1rem; border-top: 1px solid var(--border); gap: 0;
}
.mobile-menu.open { display: flex; }
.ml {
    font-family: var(--font-mono);
    font-size: .85rem; color: var(--text-muted); text-decoration: none;
    padding: .6rem 0; border-bottom: 1px solid var(--border);
    transition: color .2s;
}
.ml:last-child { border-bottom: none; }
.ml:hover { color: var(--text); }


.btn-primary {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.4rem;
    background: var(--accent); color: #0a0e12;
    font-family: var(--font-mono);
    font-size: .8rem; font-weight: 600;
    text-decoration: none; border-radius: 6px;
    letter-spacing: .01em;
    transition: opacity .2s, transform .2s;
}
.btn-primary svg { width: 14px; height: 14px; }
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-outline {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .7rem 1.4rem;
    background: transparent; color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: .8rem; font-weight: 500;
    text-decoration: none; border-radius: 6px;
    border: 1px solid var(--border-card);
    letter-spacing: .01em;
    transition: border-color .2s, color .2s, transform .2s;
}
.btn-outline:hover { border-color: var(--border-hi); color: var(--text); transform: translateY(-1px); }
.btn-outline svg { width: 14px; height: 14px; }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Soften reveal on already-visible case-study body */
.case-page .reveal { transition-duration: .55s; }

/* No-JS / print: never leave proof-lane content invisible */
@media (scripting: none) {
    .reveal, .exp-item { opacity: 1; transform: none; }
}
@media print {
    .reveal, .exp-item { opacity: 1; transform: none; }
}

/* ─── VIEW TRANSITIONS (soft, optional) ─── */
@supports (view-transition-name: none) {
    html.vt-ready {
        view-transition-name: root;
    }
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: .28s;
        animation-timing-function: ease;
    }
    ::view-transition-old(root) {
        animation-name: vt-fade-out;
    }
    ::view-transition-new(root) {
        animation-name: vt-fade-in;
    }
    @keyframes vt-fade-out {
        to { opacity: 0; }
    }
    @keyframes vt-fade-in {
        from { opacity: 0; }
    }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .topo-line { animation: none; }
    .terminal-cursor { animation: none; opacity: 1; }
    .reveal, .exp-item {
        opacity: 1;
        transform: none;
    }
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
    }
}

