/* Bu-Ba Dev: motyw z logo (czerń, biel, niebieski gradient) */
:root {
  --bg: #04060b;
  --surface: #0b101a;
  --surface-2: #111827;
  --border: #1c2638;
  --text: #eef3ff;
  --muted: #9aa9c7;
  --blue-1: #00a3ff;
  --blue-2: #1e6bff;
  --grad: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  --danger: #ff5d73;
  --ok: #2fd18b;
  --header-h: 64px;
  --footer-h: 44px;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 120, 255, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--footer-h) + 8px);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-1); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.container { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.pre-line { white-space: pre-line; }
.mt-s { margin-top: .6rem; }
.mt-m { margin-top: 1.2rem; }
.mt-l { margin-top: 1.5rem; }
.fw-bold { font-weight: 700; }
.fs-lg { font-size: 1.2rem; }

/* Nagłówek: nieprzewijany */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50;
  background: rgba(4, 6, 11, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { height: 42px; width: auto; mix-blend-mode: lighten; }
.brand span b { color: var(--blue-1); font-weight: 700; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a, .nav button.linklike {
  color: var(--muted); padding: .5rem .9rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.linklike:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--blue-1); }
.nav form { margin: 0; }
.lang-switch { display: flex; gap: 2px; margin-left: .5rem; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.nav .lang-switch a { padding: .25rem .6rem; font-size: .78rem; letter-spacing: .06em; }
.nav .lang-switch a.active { background: var(--grad); color: #fff; box-shadow: none; }

/* Zakładki językowe w panelu */
.lang-tabs { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem 1.2rem; background: var(--surface); }
.tab-buttons { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tab-btn {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); border-radius: 8px;
  padding: .4rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
}
.tab-btn.active { color: #fff; background: var(--grad); border-color: transparent; }
.tab-btn.filled::after { content: " ●"; color: var(--ok); font-size: .7em; }
.tab-btn.active.filled::after { color: #fff; }
.tab-panel { display: grid; gap: 1.1rem; padding-top: .6rem; }
.lang-tabs.js .tab-panel:not(.active) { display: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: var(--text); margin: auto; position: relative; content: ""; transition: transform .2s; }
.nav-toggle span::before { position: absolute; top: -6px; left: 0; }
.nav-toggle span::after { position: absolute; top: 6px; left: 0; }

/* Stopka: nieprzewijana, niska */
.site-footer {
  position: fixed; inset: auto 0 0 0; height: var(--footer-h); z-index: 50;
  background: rgba(4, 6, 11, .94); border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--muted);
}
.site-footer .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 1rem; white-space: nowrap; }
.footer-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; color: var(--text);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(30, 107, 255, .35); }
.btn-ghost { border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--blue-1); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: .35rem .85rem; font-size: .85rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 3.5rem; }
.hero::before {
  content: ""; position: absolute; width: 900px; height: 900px; right: -300px; top: -380px;
  background: radial-gradient(circle, rgba(0, 140, 255, .28), transparent 60%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; position: relative; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-logo { display: flex; justify-content: center; }
/* Czarny prostokąt (tło logo) w dotychczasowych wymiarach; logo w środku w naturalnych proporcjach. */
.hero-logo-box {
  width: min(420px, 100%); height: 1024px; background: #000;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  filter: drop-shadow(0 0 40px rgba(0, 140, 255, .35));
}
.hero-logo-box img { width: 100%; height: auto; object-fit: contain; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--blue-1); margin-bottom: 1rem; }

/* Sekcje i karty */
.section { padding: 3rem 0; }
.section-head { margin-bottom: 2rem; max-width: 46rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
a.card { color: inherit; display: block; }
a.card:hover, .card.hoverable:hover { border-color: var(--blue-1); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad); display: grid; place-items: center;
  font-weight: 800; margin-bottom: 1rem; color: #fff;
}
.card ul { padding-left: 1.1rem; margin: .5rem 0 0; color: var(--muted); }
.steps { counter-reset: step; }
.step { position: relative; padding-top: 3.2rem; }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; top: 1.2rem; left: 1.5rem;
  width: 32px; height: 32px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800;
}
.big-num { font-size: 2.2rem; font-weight: 800; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--grad); display: grid; place-items: center;
  font-weight: 800; font-size: 1.3rem; margin-bottom: 1rem;
}

a.card.author-card { display: flex; flex-direction: column; }
.author-card .more { margin-top: auto; padding-top: .8rem; color: var(--blue-1); font-weight: 700; font-size: .92rem; }
.author-card:hover .more { text-decoration: underline; }
.chips-sm .chip { font-size: .78rem; padding: .2rem .7rem; }

/* Profil autora */
.profile-head { display: flex; align-items: center; gap: 1.5rem; margin: 1rem 0 2.5rem; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: .2rem; }
.profile-head .eyebrow { margin-bottom: .4rem; }
.avatar.avatar-lg { width: 96px; height: 96px; font-size: 2rem; margin: 0; flex-shrink: 0; box-shadow: var(--shadow); }
.profile-block { margin-bottom: 2.5rem; }
.profile-aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checklist li { position: relative; padding-left: 1.8rem; color: var(--muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; border-radius: 3px;
  background: var(--grad); box-shadow: 0 0 12px rgba(0, 163, 255, .45);
}
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--border); display: grid; gap: 1.6rem; }
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--bg);
}
.timeline h3 { margin: .15rem 0 .1rem; font-size: 1.05rem; }
.timeline p { margin: 0 0 .3rem; }
.timeline-period { font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--blue-1); text-transform: uppercase; }
.timeline-org { color: var(--text); font-weight: 600; font-size: .95rem; }
.link-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .7rem; }
.link-list li { display: grid; }
.link-list .muted { font-size: .82rem; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 .3rem; font-size: .85em; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip {
  padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: .88rem; font-weight: 600;
}
a.chip:hover { color: var(--text); border-color: var(--blue-1); text-decoration: none; }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.filter-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .4rem; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 6px; font-size: .75rem; font-weight: 700; background: rgba(0, 163, 255, .14); color: var(--blue-1); margin-right: .35rem; }
.badge.warn { background: rgba(255, 93, 115, .14); color: var(--danger); }
.badge.ok { background: rgba(47, 209, 139, .14); color: var(--ok); }

.thumb {
  aspect-ratio: 16 / 9; border-radius: 10px; margin-bottom: 1rem; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(0, 163, 255, .35), transparent 55%), var(--surface-2);
  border: 1px solid var(--border); font-weight: 800; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem;
}
.thumb .play { width: 52px; height: 52px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 1.2rem; padding-left: 4px; }

.video-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; box-shadow: var(--shadow); }
.video-wrap video { width: 100%; display: block; max-height: 70vh; background: #000; }

.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Formularze */
.form { display: grid; gap: 1.1rem; max-width: 760px; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date],
.field input[type=number], .field input[type=tel], .field select, .field textarea, .field input[type=file] {
  width: 100%; padding: .7rem .9rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font: inherit;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue-1); outline-offset: 1px; border-color: transparent; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.field .error { color: var(--danger); font-size: .85rem; margin-top: .25rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { margin-top: .35rem; accent-color: var(--blue-2); }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1.2rem; border: 1px solid var(--ok); background: rgba(47, 209, 139, .1); }
.flash.error { border-color: var(--danger); background: rgba(255, 93, 115, .1); }

/* Panel admina */
.admin-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-nav a { padding: .4rem .9rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.admin-nav a.active, .admin-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface); }
.table tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.table form { margin: 0; display: inline; }
.stat { font-size: 2.2rem; font-weight: 800; }
.login-box { max-width: 420px; margin: 3rem auto; }
.page-title { padding-top: 2.5rem; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: var(--muted); font-size: .92rem; margin-bottom: 1.2rem; }
.layout-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }

/* Animacje */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsywność */
@media (max-width: 900px) {
  .hero-grid, .layout-2 { grid-template-columns: 1fr; }
  .profile-aside { position: static; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-logo { order: -1; }
  .hero-logo-box { width: 260px; height: 340px; padding: 1rem; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(4, 6, 11, .98); border-bottom: 1px solid var(--border); padding: .6rem 1rem 1rem;
    transform: translateY(-120%); visibility: hidden; transition: transform .25s, visibility .25s;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a, .nav button.linklike { padding: .8rem 1rem; text-align: left; width: 100%; }
  .lang-switch { margin: .6rem 0 0; align-self: flex-start; }
  .nav .lang-switch a { width: auto; padding: .4rem .9rem; }
  .grid-2, .grid-3, .row-2 { grid-template-columns: 1fr; }
  .footer-company .long { display: none; }
  .hero { padding-top: 2.5rem; }
}
@media (max-width: 420px) {
  .footer-links a:nth-child(n+3) { display: none; }
}
