:root {
    --bg: #0B2E3F;
    --bg-elevated: #0E3549;
    --line: rgba(255, 255, 255, 0.16);
    --line-soft: rgba(255, 255, 255, 0.06);
    --text: #E8F1F4;
    --text-muted: #7FA3B3;
    --accent: #FF8A3D;
    --accent-dim: rgba(255, 138, 61, 0.14);
    --teal: #4FD8C4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

.sans { font-family: 'IBM Plex Sans', sans-serif; }
a { color: inherit; text-decoration: none; }
.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(11, 46, 63, 0.92); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.brand { font-weight: 600; font-size: 13px; }
.brand .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-size: 11px; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { font-size: 11px; padding: 6px 12px; border: 1px solid var(--accent); color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); width: 32px; height: 32px; }

/* Doc header */
.doc {
    padding: 80px 0 0;
}

.doc-header {
    display: grid;
    grid-template-columns: 1fr 260px;
    border: 1px solid var(--line);
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.topo-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.doc-title {
    padding: 28px;
    border-right: 1px solid var(--line);
    position: relative;
    z-index: 1;
}

.doc-eyebrow { font-size: 10px; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px; }

h1 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 14px;
}

h1 .accent { color: var(--teal); }

.lead { font-size: 13px; line-height: 1.7; color: var(--text-muted); margin: 0 0 20px; max-width: 460px; font-family: 'IBM Plex Sans', sans-serif; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { font-size: 11px; font-family: 'IBM Plex Mono', monospace; padding: 10px 16px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); cursor: pointer; }
.btn-solid { background: var(--accent); color: #0B2E3F; font-weight: 700; }
.btn-solid:hover { background: #FFA15E; }
.btn-ghost { color: var(--text); border-color: var(--line); background: none; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.titleblock { display: flex; flex-direction: column; position: relative; z-index: 1; background: rgba(11, 46, 63, 0.55); }
.ridge-divider { width: 100%; height: 34px; display: block; opacity: 0.5; }
.tb-row { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 10px; }
.tb-row:last-child { border-bottom: none; }
.tb-row span:first-child { color: var(--text-muted); letter-spacing: 0.08em; }
.tb-row span:last-child { color: var(--teal); font-weight: 600; }

.badges-row {
    display: flex;
    border: 1px solid var(--line);
    border-top: none;
    margin-bottom: 40px;
}

.badges-row span {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 10px;
    color: var(--text-muted);
    border-right: 1px solid var(--line);
}

.badges-row span:last-child { border-right: none; }
.badges-row span::before { content: '// '; color: var(--teal); }

/* Strona 404 */
.error-panel {
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 460px;
    padding: 40px 24px;
}

.zakapior { width: 120px; height: auto; margin: 0 auto 20px; display: block; }

.error-content h1 { font-size: 26px; margin-bottom: 14px; }
.error-content .lead { margin: 0 auto 28px; }
.error-content .btn-row { justify-content: center; margin-bottom: 32px; }

.error-spec {
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    text-align: left;
}

/* Sections */
section { padding: 8px 0 36px; }

.section-num { font-size: 10px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 6px; }
h2 { font-family: 'IBM Plex Sans', sans-serif; font-size: 18px; font-weight: 600; margin: 0 0 4px; }
h2.big { font-size: 26px; }
.section-sub { color: var(--text-muted); font-size: 11px; margin: 0 0 16px; font-family: 'IBM Plex Sans', sans-serif; }

/* Featured services section */
section.featured {
    border: 1px solid var(--accent);
    background: var(--bg-elevated);
    padding: 28px 28px 32px;
    margin-bottom: 44px;
    position: relative;
}

section.featured::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--teal));
}

.spec-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.spec-card {
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 22px;
}

.spec-card-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 16px;
}

.spec-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text);
}

.spec-card p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 16px;
    font-family: 'IBM Plex Sans', sans-serif;
}

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

.spec-card-tags span {
    font-size: 10px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    color: var(--teal);
}

.spec-card-tags span::before { content: '// '; color: var(--text-muted); }

/* Datasheet table */
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin-bottom: 8px;
}

th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--bg-elevated);
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--text-muted);
    vertical-align: top;
}

td:last-child { border-right: none; }
tr:last-child td { border-bottom: none; }

td.name { color: var(--text); font-weight: 600; font-family: 'IBM Plex Sans', sans-serif; white-space: nowrap; }
td.tag { color: var(--teal); font-size: 11px; white-space: nowrap; }
td.status-active { color: var(--teal); }
td.status-progress { color: var(--accent); }

td a.card-link { color: var(--teal); display: inline-flex; align-items: center; gap: 4px; }

/* About as note block */
.note {
    border-left: 2px solid var(--accent);
    padding: 4px 0 4px 20px;
}

.note p { margin: 0 0 8px; font-size: 12px; line-height: 1.7; color: var(--text-muted); font-family: 'IBM Plex Sans', sans-serif; }
.note p:first-child { color: var(--text); }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--line);
}

.contact-info { padding: 24px; border-right: 1px solid var(--line); }
.contact-form-cell { padding: 24px; }

.email-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 10px 14px; border: 1px solid var(--line); margin-top: 12px; }

form { display: flex; flex-direction: column; gap: 10px; }
input, textarea, select { background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; color: var(--text); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
::placeholder { color: var(--text-muted); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237FA3B3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }

/* Formularz wyceny */
.quote-form { gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; font-family: 'IBM Plex Sans', sans-serif; }
.quote-form .btn-solid { align-self: flex-start; }

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

/* Honeypot — visually hidden from real visitors, still reachable by bots */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form result banners */
.alert {
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    background: var(--bg-elevated);
    padding: 12px 16px;
    font-size: 12px;
    margin-bottom: 20px;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--text);
}

.alert-danger { border-left-color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 28px 0 0; margin-top: 20px; position: relative; overflow: hidden; }
.footer-topo { width: 100%; height: 60px; display: block; opacity: 0.25; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 0 4px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 11px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 11px; color: var(--text-muted); }

@media (max-width: 780px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 8px 0;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 24px; width: 100%; }
    .nav-toggle { display: block; }
    .doc-header, .badges-row, .contact-grid, .spec-cards { grid-template-columns: 1fr; display: block; }
    .spec-cards .spec-card { margin-bottom: 12px; }
    .doc-title { border-right: none; border-bottom: 1px solid var(--line); }
    .badges-row span { border-right: none; border-bottom: 1px solid var(--line); }
    .contact-info { border-right: none; border-bottom: 1px solid var(--line); }
    table, thead, tbody, th, td, tr { display: block; }
    th { display: none; }
    td { border-right: none; }
    tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
    td.name::before { content: attr(data-label); display: block; font-size: 9px; color: var(--accent); margin-bottom: 4px; }
}
