/* Trollsztyn.pl – portal miejski */

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --surface-2: #e9edf3;
  --ink: #14213d;
  --text: #2b3445;
  --muted: #667085;
  --border: #dde3ea;
  --blue: #1f5fd6;
  --blue-dark: #1747a6;
  --blue-light: #e8f0fd;
  --yellow: #ffc400;
  --red: #d62839;

  --f-head: "Plus Jakarta Sans", Arial, sans-serif;
  --f-body: "Inter", Arial, sans-serif;
  --f-title: "Plus Jakarta Sans", Arial, sans-serif;
  --f-num: "Plus Jakarta Sans", Arial, sans-serif;
  --f-letter: "Inter", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 2px;
  --gutter: 16px;
}

@media (min-width: 768px) { :root { --gutter: 24px; } }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
em, i, cite, q { font-style: normal; }
ul { padding: 0; list-style: none; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Pasek górny ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  min-height: 36px;
}

.topbar-weather { display: none; }

@media (min-width: 640px) { .topbar-weather { display: inline; } }

.topbar-links { display: flex; gap: 16px; margin-left: auto; }

.topbar-links a,
.topbar-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.topbar-links a:hover,
.topbar-links button:hover { color: var(--blue); }

/* ---------- Nagłówek ---------- */

.header { background: var(--bg); border-bottom: 1px solid var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.crest { width: 48px; flex: none; }

@media (min-width: 768px) { .crest { width: 58px; } }

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.brand-name span { color: var(--blue); }

.brand-sub {
  margin-top: 4px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(11px, 2.6vw, 13px);
  color: var(--muted);
}

.search {
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

@media (min-width: 900px) { .search { display: flex; } }

.search input {
  width: 240px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.search input:focus { outline: 0; }
.search:focus-within { border-color: var(--blue); }

.search button {
  display: grid;
  place-items: center;
  width: 42px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.search svg { width: 18px; }

.menu-toggle {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) { display: block; width: 20px; height: 2px; background: var(--ink); }

@media (min-width: 900px) { .menu-toggle { display: none; } }

/* Menu */

.nav { display: none; border-top: 1px solid var(--border); }
.nav.open { display: block; }

@media (min-width: 900px) { .nav { display: block; } }

.nav ul { display: flex; flex-direction: column; padding: 6px 0; }

@media (min-width: 900px) {
  .nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; }
}

.nav a,
.nav button {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink);
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav a, .nav button { padding: 14px 14px 11px; font-size: 14px; }
  .nav li:first-child a { padding-left: 0; }
}

.nav a:hover,
.nav a.active { border-bottom-color: var(--blue); color: var(--blue); }

.nav small {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.nav-off { color: var(--muted) !important; }
.nav-off:hover { border-bottom-color: var(--yellow) !important; }

/* ---------- Na żywo ---------- */

.live { background: var(--surface); border-bottom: 1px solid var(--border); }

.live-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
}

.live-label {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.live-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #fff;
  vertical-align: 1px;
  animation: blink 1.4s infinite;
}

@keyframes blink { 50% { opacity: .2; } }

.live-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  transition: opacity .3s;
}

.live-text.fade { opacity: 0; }

/* ---------- Treść ---------- */

.slogan {
  padding: 28px 0 8px;
  font-family: var(--f-title);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--ink);
}

.slogan .accent { color: var(--blue); }

.heading {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}

.layout {
  display: grid;
  gap: 32px;
  padding-top: 24px;
}

@media (min-width: 992px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}

.art {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.art svg { width: 100%; height: auto; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.badge {
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--blue-light);
  color: var(--blue-dark);
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-red { background: var(--red); color: #fff; }

.story-lead .story-body { padding-top: 18px; }
.story-lead .meta { margin-bottom: 10px; }

.story-lead h3 {
  font-family: var(--f-title);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--ink);
}

.excerpt {
  margin: 14px 0 12px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
}

.story-grid {
  display: grid;
  gap: 28px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) { .story-grid { grid-template-columns: 1fr 1fr; } }

.story .meta { margin: 14px 0 8px; }

.story h3 {
  font-family: var(--f-title);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
}

.story p:last-child { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* Boczna kolumna */

.sidebar { display: grid; gap: 24px; align-content: start; }

.widget {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.widget-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.widget-title small { font-weight: 500; font-size: 12px; color: var(--muted); }
.widget-title span { margin-left: auto; font-family: var(--f-mono); font-weight: 500; font-size: 13px; color: var(--muted); }

.stats li {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.stats li:first-child { border-top: 0; padding-top: 0; }

.stat-num {
  font-family: var(--f-num);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--blue);
}

.stat-label { font-size: 14px; line-height: 1.4; }

.weather { background: var(--blue-light); border-color: transparent; }

.weather-now { display: grid; gap: 4px; margin-bottom: 14px; font-size: 14px; }

.weather-temp {
  font-family: var(--f-num);
  font-weight: 500;
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
}

.weather-list div { padding: 10px 0; border-top: 1px solid rgba(31, 95, 214, .2); }
.weather-list dt { font-family: var(--f-head); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dark); }
.weather-list dd { font-size: 14px; }

.departures { width: 100%; border-collapse: collapse; font-size: 14px; }

.departures th {
  padding: 0 0 8px;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  color: var(--muted);
}

.departures td { padding: 8px 8px 8px 0; border-top: 1px solid var(--border); }
.departures td:last-child { padding-right: 0; font-family: var(--f-mono); font-size: 13px; }

.line {
  display: inline-block;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: var(--f-num);
  font-weight: 600;
  text-align: center;
}

.line-bus { background: var(--blue); }
.late { color: var(--red); font-weight: 500; }

/* ---------- Wirtualny Urząd ---------- */

.band {
  margin-top: 56px;
  padding: 32px var(--gutter);
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  background: var(--surface);
}

@media (min-width: 768px) {
  .band { padding: 40px; margin-left: 0; margin-right: 0; border-radius: var(--radius); }
}

.band-head { margin-bottom: 24px; }
.band-head .heading { margin-bottom: 10px; }
.band-head p { color: var(--muted); }

.services {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) { .services { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .services { grid-template-columns: repeat(4, 1fr); } }

.service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(20, 33, 61, .08);
}

.service h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
}

.service-desc { font-size: 14px; color: var(--muted); }

fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
legend { margin-bottom: 6px; font-size: 14px; color: var(--muted); }

.radio { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.radio input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }

.field {
  display: grid;
  gap: 4px;
  width: 100%;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 15px;
}

.field input:focus,
.field select:focus,
.field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }

.field textarea { resize: vertical; }

.btn {
  margin-top: auto;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}

.btn:hover { background: var(--blue-dark); }

.result:empty { display: none; }

.result {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-left: 4px solid var(--yellow);
  background: #fff8db;
  font-size: 14px;
}

.slot {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 14px;
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
}

.slot strong {
  font-family: var(--f-num);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
}

/* Pismo */

.letter {
  max-width: 720px;
  margin: 28px auto 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 10px 30px -12px rgba(20, 33, 61, .25);
  font-family: var(--f-letter);
  font-size: 15.5px;
  line-height: 1.75;
}

.letter p + p { margin-top: 12px; }

.letter-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--f-body);
  font-size: 14px;
}

.letter-meta { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }

.letter-sign { margin-top: 28px !important; text-align: right; }
.letter q { font-weight: 600; }

/* ---------- Bloki ---------- */

.block { padding-top: 56px; }

.people {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) { .people { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .people { grid-template-columns: repeat(4, 1fr); } }

.person {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 22px;
}

.avatar-small { font-size: 13px; }

.person h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
}

.role {
  margin: 4px 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}

.person p:last-child { font-size: 15px; }

.places {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

@media (min-width: 640px) { .places { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .places { grid-template-columns: repeat(3, 1fr); } }

.place { padding: 22px; background: var(--bg); }

.was {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

.place h3 {
  margin: 2px 0 8px;
  font-family: var(--f-title);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}

.place p:last-child { font-size: 15px; }

.place-hot { background: #fff8db; }
.place-hot .was { text-decoration: none; color: #9a6b00; font-weight: 500; }

.events { display: grid; gap: 20px; }

@media (min-width: 768px) { .events { grid-template-columns: 1fr 1fr; } }

.event {
  display: flex;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.event-date {
  flex: none;
  display: grid;
  place-content: center;
  width: 84px;
  height: 84px;
  background: var(--blue);
  color: #fff;
  text-align: center;
  line-height: 1.1;
}

.event-date span { font-family: var(--f-head); font-weight: 600; font-size: 12px; text-transform: uppercase; opacity: .85; }
.event-date strong { font-family: var(--f-num); font-weight: 600; font-size: 18px; }

.event h3 {
  margin-bottom: 6px;
  font-family: var(--f-title);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
}

.event p { font-size: 15px; }

/* ---------- Stopka ---------- */

.footer {
  margin-top: 72px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
}

.footer-inner {
  display: grid;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 28px;
}

@media (min-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: 40px; } }

.footer-brand {
  margin-bottom: 8px;
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
}

.footer-brand span { color: var(--blue); }

.footer-note { color: var(--muted); }

.footer-links { display: grid; gap: 8px; }

.footer-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}

.footer-links button:hover { text-decoration: underline; }

.legal {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.legal strong { color: var(--text); }

.footer-copy {
  padding-top: 14px;
  padding-bottom: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Komunikat ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 14px 18px;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 30px -10px rgba(20, 33, 61, .5);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-label::before { animation: none; }
  .live-text { transition: none; }
}
