/* Self-hosted fonts — no third-party request, so the page also works offline
   once cached. Instrument Serif for display, Inter (variable) for everything else. */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #f1ece3;
  --ink: #1e1c19;
  --ink-soft: #4a453e;
  --muted: #766f65;
  --line: #e2dbd0;
  --line-strong: #cfc5b6;

  --a: #9a3f2c;      /* terakota — priorytet A */
  --bplus: #a9711f;  /* ochra — priorytet B+ */
  --b: #3a6480;      /* błękit Wisły — priorytet B */
  --c: #7c766c;      /* szarość — priorytet C */
  --green: #3d6350;

  --shadow: 0 1px 2px rgba(30, 28, 25, .04), 0 6px 20px -12px rgba(30, 28, 25, .18);
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16150f;
    --surface: #1e1d17;
    --surface-2: #262419;
    --ink: #ece7dc;
    --ink-soft: #cdc6b8;
    --muted: #9a9285;
    --line: #33312a;
    --line-strong: #48453b;

    --a: #e2846b;
    --bplus: #dfae55;
    --b: #7fb2d1;
    --c: #a29a8c;
    --green: #7fb094;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 128px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 340px at 15% -10%, rgba(169, 113, 31, .13), transparent 65%),
    radial-gradient(760px 320px at 88% 0%, rgba(58, 100, 128, .12), transparent 65%);
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  max-width: 20ch;
}

.hero h1 em { font-style: normal; color: var(--a); }

.hero__lead {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero__meta li {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__inner::-webkit-scrollbar { display: none; }

.nav a {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}

.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-active { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ---------- Route strip ---------- */

.route {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  margin: 40px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.route__stop {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  position: relative;
}
.route__stop:last-child { border-right: 0; }

.route__stop--edge { background: var(--surface-2); }

.route__name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.route__name .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--a);
  flex: 0 0 auto;
}
.route__stop--edge .route__name .dot { background: var(--muted); }

.route__leg {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections ---------- */

section { padding: 60px 0 8px; scroll-margin-top: 8px; }

.sec__head { margin-bottom: 8px; }

.sec__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}

h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sec__intro {
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 0 0 6px;
}

/* ---------- Legend ---------- */

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.legend li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}

.legend strong { display: block; color: var(--ink); margin-bottom: 3px; font-size: 15px; }

/* ---------- Callout ---------- */

.callout {
  margin: 28px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--a);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.callout--warn { border-left-color: var(--bplus); }
.callout--verdict { border-left-color: var(--green); }

.callout h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.callout p, .callout li { color: var(--ink-soft); }
.callout > :last-child { margin-bottom: 0; }
.callout ol, .callout ul { margin: 0; padding-left: 20px; }
.callout li { margin-bottom: 10px; }
.callout li:last-child { margin-bottom: 0; }

/* ---------- Filter bar ---------- */

.filter {
  position: sticky;
  top: 53px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  margin-top: 32px;
  background: var(--paper);
  margin-bottom: 4px;
}

.filter__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.filter button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 7px 15px;
  transition: all .15s;
}

.filter button:hover { border-color: var(--ink-soft); color: var(--ink); }

.filter button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter__count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Miękkie zejście tła — karty nie „prześwitują” pod przyklejonym paskiem. */
.filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
  background: linear-gradient(var(--paper), transparent);
  pointer-events: none;
}

/* ---------- Attraction cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--prio, var(--line-strong));
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(30, 28, 25, .05), 0 16px 32px -18px rgba(30, 28, 25, .34);
}

.card[data-prio="A"]  { --prio: var(--a); }
.card[data-prio="B+"] { --prio: var(--bplus); }
.card[data-prio="B"]  { --prio: var(--b); }
.card[data-prio="C"]  { --prio: var(--c); }

.card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.badge {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 6px;
  padding: 3px 8px;
  color: #fff;
  background: var(--prio, var(--muted));
  flex: 0 0 auto;
}

@media (prefers-color-scheme: dark) {
  .badge { color: #16150f; }
}

.time {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -.005em;
}

.card p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

.card p:last-child { margin-bottom: 0; }
.card[hidden], .cards[hidden], h3[hidden] { display: none; }

/* ---------- Chip źródła — goły URL w nawiasie z Markdowna ---------- */

.chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--b);
  background: color-mix(in srgb, var(--b) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--b) 22%, transparent);
  border-radius: 6px;
  padding: 1px 7px;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: 1px;
  transition: background .15s, border-color .15s;
}

.chip:hover { background: color-mix(in srgb, var(--b) 18%, transparent); border-color: var(--b); }

/* ---------- Tabele bez priorytetów ---------- */

.tablewrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* ---------- Trips (Baranów / Krzyżtopór) ---------- */

.trips { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

.trip {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.trip h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 1.55rem;
  margin: 0 0 4px;
  line-height: 1.2;
}

.trip .trip__tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--bplus);
  margin: 0 0 12px;
}

.trip p { font-size: 15px; color: var(--ink-soft); margin: 0 0 12px; }
.trip p:last-child { margin-bottom: 0; }
.trip a { color: var(--b); }

/* ---------- Plain prose blocks ---------- */

.prose p { color: var(--ink-soft); max-width: 70ch; }
.prose ul { color: var(--ink-soft); padding-left: 20px; max-width: 74ch; }
.prose li { margin-bottom: 10px; }
.prose a { color: var(--b); text-underline-offset: 3px; }
.prose strong { color: var(--ink); }

/* ---------- Checklist ---------- */

.checklist {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 16px 56px;
  position: relative;
  color: var(--ink-soft);
  font-size: 15px;
  box-shadow: var(--shadow);
}

.checklist li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Stay / nocleg ---------- */

.stay { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }

.stay__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.stay__card--pick { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow); }

.stay__card h4 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; }
.stay__card .stay__tag { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin: 0 0 10px; }
.stay__card--alt .stay__tag { color: var(--b); }
.stay__card--no .stay__tag { color: var(--muted); }
.stay__card p, .stay__card li { font-size: 14.5px; color: var(--ink-soft); }
.stay__card ul { padding-left: 18px; margin: 0; }
.stay__card li { margin-bottom: 10px; }
.stay__card li:last-child { margin-bottom: 0; }
.stay__card a { color: var(--b); }
.stay__card > :last-child { margin-bottom: 0; }

/* ---------- Shortlist ---------- */

.shortlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 26px; }

.shortlist__item {
  border-top: 3px solid var(--prio, var(--a));
  background: var(--surface);
  border-radius: 0 0 12px 12px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}

.shortlist__item h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 10px;
}

.shortlist__item ul { margin: 0; padding-left: 18px; }
.shortlist__item li { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 7px; }

/* ---------- Footer ---------- */

footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 36px 0 60px;
  color: var(--muted);
  font-size: 13.5px;
}

footer p { max-width: 74ch; margin: 0 0 10px; }
footer strong { color: var(--ink-soft); }

/* ---------- Back to top ---------- */

.totop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.totop.is-shown { opacity: 1; pointer-events: auto; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 32px; }
  .cards { grid-template-columns: 1fr; }
  .filter { top: 51px; }
}

@media print {
  .nav, .filter, .totop { display: none; }
  body { background: #fff; font-size: 11pt; }
  .card, .callout, .stay__card, .checklist li { break-inside: avoid; box-shadow: none; }
}
