/* ============================================================
   kawalec.pl v6 — "Mission Control"
   ops-center panel wall: dark, data-dense, readable panels
   JetBrains Mono + Funnel Display + Mozilla Text
   ============================================================ */

:root {
    --bg: #0a0c10;
    --panel: #11141a;
    --panel-bar: #161a22;
    --line: #232936;
    --line-soft: rgba(255, 255, 255, 0.05);
    --text: #e8eaee;
    --dim: #8b93a3;
    --lime: #ddf160;
    --violet: #9f8be7;
    --ok: #7ee787;
    --warn: #fbbf24;
    --display: "Funnel Display", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --body: "Mozilla Text", Georgia, serif;
    --wrap: 1220px;
    --pad: clamp(20px, 4vw, 56px);
}

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

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(1000px 500px at 70% -10%, rgba(159, 139, 231, 0.06), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: #111; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.dim { color: var(--dim); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.accent { color: var(--lime); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.dot-ok { background: var(--ok); animation: pulse 2s ease-in-out infinite; }
.dot-ink { background: #111; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.blink { animation: pulse 1.2s steps(1) infinite; }

/* ---------- topbar ---------- */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 34px);
    padding: 12px clamp(16px, 3vw, 36px);
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 11.5px;
}

.topbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.topbar-brand img { height: 18px; width: auto; }

.topbar-clock { color: var(--lime); font-variant-numeric: tabular-nums; }
.topbar-status { color: var(--ok); }

.topbar-links { display: flex; gap: 18px; margin-left: auto; }
.topbar-links a { color: var(--dim); transition: color 0.2s ease; }
.topbar-links a:hover { color: var(--lime); }

.topbar-twin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid rgba(126, 231, 135, 0.4);
    border-radius: 4px;
    color: var(--ok);
    font-size: 11.5px;
    transition: background 0.2s ease, color 0.2s ease;
}

.topbar-twin:hover { background: var(--ok); color: #0c1a0e; }
.topbar-twin:hover .dot-ok { background: #0c1a0e; }

@media (max-width: 1060px) { .topbar-links, .topbar-status { display: none; } }
@media (max-width: 560px) { .topbar-clock { display: none; } }

/* ---------- panels ---------- */

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    display: block;
}

.panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    background: var(--panel-bar);
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 10.5px;
    letter-spacing: 0.1em;
}

.panel-body { padding: clamp(18px, 2.2vw, 30px); }

/* ---------- sections ---------- */

main { position: relative; z-index: 2; }

.sec { padding: clamp(70px, 10vh, 120px) 0; }
.sec-hero { padding-top: clamp(100px, 14vh, 150px); }

.sec-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(26px, 3.4vw, 44px);
    line-height: 1.1;
    margin-bottom: clamp(28px, 4vh, 44px);
}

.sec-no { color: var(--lime); font-size: 0.5em; vertical-align: middle; margin-right: 10px; }

/* ---------- hero wall ---------- */

.hero-wall {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.panel-hero { grid-column: span 8; grid-row: span 2; }
.panel-stat { grid-column: span 4; }
.panel-log { grid-column: span 7; }
.panel-stack { grid-column: span 5; }

.hero-id { color: var(--lime); margin-bottom: 18px; font-size: 11px; }

.hero-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(46px, 6.5vw, 96px);
    line-height: 0.96;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
}

.hero-sub { font-size: clamp(16px, 1.6vw, 19px); max-width: 50ch; color: var(--dim); }
.hero-sub strong { color: var(--lime); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stat-body { display: flex; flex-direction: column; gap: 8px; }

.stat-big {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(40px, 4vw, 64px);
    line-height: 1;
    color: var(--lime);
    font-variant-numeric: tabular-nums;
}

.spark { width: 100%; height: 36px; color: var(--violet); margin-top: 6px; opacity: 0.9; }

.log-feed {
    min-height: 120px;
    max-height: 150px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    color: var(--dim);
    font-size: 11px;
}

.log-feed li::before { content: "> "; color: var(--ok); }
.log-feed li:last-child { color: var(--text); }

.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.stack-tags span {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--dim);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.stack-tags span:hover { color: var(--lime); border-color: rgba(221, 241, 96, 0.5); }

@media (max-width: 980px) {
    .panel-hero, .panel-stat, .panel-log, .panel-stack { grid-column: span 12; }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 12px;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 15px 26px; font-size: 13px; }

.btn-solid { background: var(--lime); color: #111; }
.btn-solid:hover { background: #eaff7a; }

.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- dossier ---------- */

.dossier {
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: 16px;
    align-items: start;
}

.dossier-photo { padding: 14px; }
.dossier-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; filter: grayscale(25%); }
.dossier-photo figcaption { margin-top: 10px; color: var(--dim); font-size: 10.5px; }

.bio h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
    margin-bottom: 16px;
}

.bio p { margin-bottom: 14px; color: var(--dim); max-width: 70ch; }
.bio p:last-child { margin-bottom: 0; }
.bio strong { color: var(--text); font-weight: 500; }
.bio .accent { color: var(--lime); }

@media (max-width: 860px) { .dossier { grid-template-columns: 1fr; } .dossier-photo { max-width: 330px; } }

/* telemetry */

.telemetry { margin-top: 16px; }

.telemetry-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
}

.telemetry-track::before {
    content: "";
    position: absolute;
    top: 26px;
    left: clamp(18px, 2.2vw, 30px);
    right: clamp(18px, 2.2vw, 30px);
    height: 1px;
    background: var(--line);
}

.telemetry-track li { position: relative; padding-top: 40px; font-size: 11.5px; }

.tl-dot {
    position: absolute;
    top: 22px;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 0 10px rgba(159, 139, 231, 0.7);
}

.tl-now .tl-dot { background: var(--lime); box-shadow: 0 0 10px rgba(221, 241, 96, 0.8); }

.tl-t { display: block; color: var(--dim); margin-bottom: 4px; }
.telemetry-track strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

@media (max-width: 760px) {
    .telemetry-track { grid-template-columns: repeat(2, 1fr); }
    .telemetry-track::before { display: none; }
}

/* ---------- SOP ---------- */

.sop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sop h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 10px;
}

.sop p { font-size: 14.5px; color: var(--dim); line-height: 1.65; }

@media (max-width: 720px) { .sop-grid { grid-template-columns: 1fr; } }

/* ---------- systems ---------- */

.systems { display: flex; flex-direction: column; gap: 0; padding: 0; }

.system {
    padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.2vw, 30px);
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.system:last-child { border-bottom: 0; }
.system:hover { background: rgba(255, 255, 255, 0.02); }

.system-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.system h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(18px, 2vw, 24px);
    transition: color 0.2s ease;
}

.system:hover h3 { color: var(--lime); }

.system p { font-size: 11.5px; margin-bottom: 12px; }

.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }

.bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--violet), var(--lime));
    border-radius: 2px;
}

/* ---------- missions ---------- */

.missions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mission { transition: transform 0.3s ease, border-color 0.3s ease; }
.mission:hover { transform: translateY(-5px); border-color: rgba(221, 241, 96, 0.5); }

.mission-img { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }

.mission-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mission:hover .mission-img img { transform: scale(1.04); }

.mission-foot { padding: 14px 16px 18px; }
.mission-foot .dim { display: block; margin-bottom: 8px; font-size: 10.5px; }

.mission-foot h3 {
    font-family: var(--display);
    font-weight: 450;
    font-size: 15.5px;
    line-height: 1.35;
    transition: color 0.25s ease;
}

.mission:hover .mission-foot h3 { color: var(--lime); }

@media (max-width: 1000px) { .missions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .missions-grid { grid-template-columns: 1fr; } }

.archive { margin-top: 16px; }

.archive-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--text);
}

.archive-list li:last-child { border-bottom: 0; }
.archive-list li > .dim:first-child { display: inline-block; min-width: 76px; }

/* ---------- comms ---------- */

.comms { max-width: 860px; margin: 0 auto; }

.comms-body { text-align: center; padding: clamp(30px, 4.4vw, 60px); }

.comms-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(32px, 4.6vw, 62px);
    line-height: 1.02;
    margin-bottom: 16px;
}

.comms-sub { color: var(--dim); max-width: 54ch; margin: 0 auto 36px; }

.comms-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.comms-mail { color: var(--dim); font-size: 15px; }
.comms-mail .accent { border-bottom: 1px solid rgba(221, 241, 96, 0.4); }

/* footer */

.footer { margin-top: clamp(60px, 9vh, 100px); }

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding: 20px 0 44px;
    color: var(--dim);
    font-size: 11px;
}

.footer-left { display: inline-flex; align-items: center; gap: 12px; }
.footer-logo { height: 16px; width: auto; }
.footer-links { display: inline-flex; gap: 18px; }
.footer-links a:hover { color: var(--lime); }

/* ---------- modes ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .dot-ok, .blink { animation: none; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
