/* ============================================================
   Platforma budowli ochronnych podwójnego zastosowania
   Kierunek: nowoczesny techniczny — mapy, dane, precyzja inżynierska
   Type: IBM Plex Sans (UI) + IBM Plex Mono (dane, etykiety)
   ============================================================ */

:root {
  --bg: oklch(96.5% 0.004 130);
  --surface: #ffffff;
  --surface-2: oklch(94.5% 0.006 130);
  --ink: oklch(22% 0.015 250);
  --ink-2: oklch(45% 0.015 250);
  --ink-3: oklch(62% 0.012 250);
  --line: oklch(88% 0.008 130);
  --line-strong: oklch(78% 0.01 250);

  --accent: oklch(50% 0.115 252);          /* techniczny błękit */
  --accent-strong: oklch(40% 0.115 252);
  --accent-soft: oklch(94% 0.025 252);
  --green: oklch(50% 0.115 152);           /* odzysk zieleni */
  --green-soft: oklch(94% 0.03 152);
  --amber: oklch(62% 0.13 70);
  --amber-soft: oklch(95% 0.04 80);
  --red: oklch(52% 0.15 25);
  --red-soft: oklch(94% 0.03 25);

  --font-ui: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --r: 3px;
  --r-lg: 6px;
  --shadow-1: 0 1px 2px rgba(15, 25, 35, 0.06), 0 4px 14px rgba(15, 25, 35, 0.06);
  --shadow-2: 0 4px 10px rgba(15, 25, 35, 0.10), 0 16px 40px rgba(15, 25, 35, 0.14);
  --nav-h: 58px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---------- typografia pomocnicza ---------- */
.mono { font-family: var(--font-mono); }
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker.green { color: var(--green); }
.muted { color: var(--ink-2); }
.small { font-size: 13.5px; }

/* ---------- layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.page { min-height: calc(100vh - var(--nav-h)); }
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tight { padding: 48px 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 600;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: stretch;
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  width: 100%;
  display: flex; align-items: center; gap: 28px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em; white-space: nowrap;
}
.nav-logo .sygnet {
  width: 26px; height: 26px; flex: none;
  background: var(--ink);
  display: grid; place-items: center;
  border-radius: var(--r);
}
.nav-logo .sygnet span {
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-bottom: 11px solid #fff;
  display: block;
}
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-link {
  text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--ink-2); padding: 7px 12px; border-radius: var(--r);
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--ink); background: var(--surface-2); border-color: var(--line); }
.nav-link.cta {
  background: var(--ink); color: #fff; margin-left: 8px;
}
.nav-link.cta:hover { background: var(--accent-strong); }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14.5px; font-weight: 600;
  padding: 11px 20px; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-strong); }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.quiet { background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.lg { padding: 14px 26px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.danger { background: var(--red-soft); color: var(--red); }

/* ---------- karty / panele ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card.pad { padding: 24px; }
.card.hover { transition: border-color 0.15s, box-shadow 0.15s; }
.card.hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }

/* ---------- badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3.5px 9px; border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2);
  white-space: nowrap;
}
.badge.blue { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.badge.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.badge.amber { background: var(--amber-soft); border-color: transparent; color: oklch(48% 0.12 70); }
.badge.red { background: var(--red-soft); border-color: transparent; color: var(--red); }
.badge.fill { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- statystyki ---------- */
.stat-num {
  font-family: var(--font-mono);
  font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ---------- formularze ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea {
  font-family: var(--font-ui); font-size: 14.5px;
  padding: 10px 12px; border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.textarea { resize: vertical; min-height: 96px; }
.checkrow {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--ink-2); cursor: pointer; line-height: 1.45;
}
.checkrow input { margin-top: 2px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }

.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-card {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 12px 14px; cursor: pointer; background: var(--surface);
  transition: border-color 0.12s, background 0.12s;
}
.radio-card:hover { border-color: var(--ink-3); }
.radio-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { accent-color: var(--accent); }

/* fake turnstile */
.turnstile {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface-2); padding: 12px 14px;
  cursor: pointer; user-select: none;
}
.turnstile .box {
  width: 22px; height: 22px; border-radius: 3px; flex: none;
  border: 2px solid var(--ink-3); background: #fff;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.turnstile.ok .box { background: var(--green); border-color: var(--green); color: #fff; font-size: 14px; }

/* ---------- tabele ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { font-family: var(--font-mono); }

/* ---------- paski rozkładu ---------- */
.distbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.distbar > div { height: 100%; }
.distbar .buy { background: var(--accent); }
.distbar .rent { background: oklch(65% 0.09 252); }
.distbar .support { background: var(--green); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend .dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15, 22, 30, 0.45);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn 0.18s ease;
}
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  animation: slideUp 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 980; background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: var(--r-lg);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-2);
  animation: slideUp 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex; gap: 10px; align-items: center;
}

/* ---------- mapy ---------- */
.maplibregl-map { font-family: var(--font-ui); }
.marker-concept, .marker-proposal {
  cursor: pointer; display: grid; place-items: center;
}
.marker-concept .pin {
  width: 0; height: 0;
  border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-bottom: 18px solid var(--accent);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  transition: transform 0.12s;
}
.marker-proposal .pin {
  width: 15px; height: 15px; border-radius: 99px;
  background: #fff; border: 3px solid var(--green);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s;
}
.marker-concept:hover .pin, .marker-proposal:hover .pin { transform: scale(1.2); }

/* placeholdery obrazów */
.ph {
  background: repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, oklch(92% 0.005 130) 10px 20px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  display: grid; place-items: center;
  color: var(--ink-3); font-family: var(--font-mono); font-size: 12px;
  text-align: center; padding: 16px;
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0; margin-top: 0; }
.footer .cols { display: flex; gap: 48px; flex-wrap: wrap; justify-content: space-between; }
.footer a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- scrollbars (panel boczny) ---------- */
.scroll-y { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* ---------- responsywność ---------- */
@media (max-width: 900px) {
  .nav-links .hide-m { display: none; }
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
}
