/* Żywa Mapa - styl "stary atlas". Mobile-first: duże litery, wysoki kontrast. */
@font-face { font-family: "Pagella"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/pagella-regular.woff2") format("woff2"); }
@font-face { font-family: "Pagella"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/pagella-bold.woff2") format("woff2"); }
@font-face { font-family: "Pagella"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/pagella-italic.woff2") format("woff2"); }

:root {
  --papier: #F4E9CC;
  --papier-2: #EBDDB6;
  --karta: #FBF4E2;
  --atrament: #2B1D12;
  --atrament-2: #5A4530;
  --czerwien: #9E1E1A;
  --czerwien-ciemna: #7A1512;
  --morze: #BECFC4;
  --lad: #EEE0BC;
  --linia: rgba(43, 29, 18, .22);
  --cien: 0 10px 28px -18px rgba(43, 29, 18, .55);
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--papier); color: var(--atrament);
  font: 400 19px/1.6 "Pagella", "TeX Gyre Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  background-image: radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.45), transparent 60%);
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--czerwien); text-underline-offset: 3px; }
a:hover { color: var(--czerwien-ciemna); }
:focus-visible { outline: 3px solid var(--czerwien); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(38px, 10vw, 66px); letter-spacing: -.01em; }
h2 { font-size: clamp(29px, 6.6vw, 42px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.waski { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--atrament); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* nagłówek */
.naglowek { border-bottom: 2px solid var(--atrament); background: var(--papier); }
.naglowek .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding-top: 12px; padding-bottom: 10px; }
.marka { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--atrament); }
.marka img { width: 44px; height: 44px; }
.marka span { font-weight: 700; font-size: 25px; letter-spacing: .06em; white-space: nowrap; }
.marka b { color: var(--czerwien); font-weight: 700; }
.menu { display: flex; gap: 2px 0; margin-left: -9px !important; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.menu a { display: inline-block; padding: 8px 9px; min-height: 44px; line-height: 28px; font-size: 19px; color: var(--atrament); text-decoration: none; border-radius: 10px; }
.menu a:hover { background: var(--papier-2); }
.menu a[aria-current="page"] { color: var(--czerwien); text-decoration: underline; text-decoration-thickness: 2px; }

/* przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 22px; border-radius: 12px;
  font-family: inherit; font-weight: 700; font-size: 19px; line-height: 1.2; text-decoration: none; cursor: pointer; border: 2px solid var(--atrament); background: var(--karta); color: var(--atrament); }
.btn:hover { background: #fff; color: var(--atrament); }
.btn-gl { background: var(--czerwien); border-color: var(--czerwien-ciemna); color: #fff; }
.btn-gl:hover { background: var(--czerwien-ciemna); color: #fff; }
.btn svg { width: 26px; height: 26px; flex: none; }
.przyciski { display: flex; flex-wrap: wrap; gap: 12px; }

/* sekcje */
.sekcja { padding: 40px 0; }
.sekcja + .sekcja { border-top: 1px solid var(--linia); }
.ozdobnik { display: block; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--czerwien); font-weight: 700; margin-bottom: 8px; }
.lead { font-size: clamp(20px, 4.6vw, 24px); color: var(--atrament-2); max-width: 36ch; }
.maly { font-size: 16px; color: var(--atrament-2); }

/* hero */
.hero { padding: 34px 0 30px; }
.hero-siatka { display: grid; gap: 28px; }
.hero h1 { margin-bottom: 14px; }
.hero-znak { display: none; }
.hero h1 em { font-style: italic; color: var(--czerwien); font-weight: 700; }

/* filmy */
.film { margin: 0; background: var(--karta); border: 1px solid var(--linia); border-radius: var(--r); box-shadow: var(--cien); overflow: hidden; display: flex; flex-direction: column; }
.film-ekran { position: relative; aspect-ratio: 9 / 16; background: var(--atrament); }
.film--poziom .film-ekran { aspect-ratio: 16 / 9; }
.film-ekran > button, .film-ekran > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; }
.film-ekran > button { cursor: pointer; background: var(--atrament); }
.film-ekran img { width: 100%; height: 100%; object-fit: cover; }
.graj { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--czerwien); border: 3px solid #fff; box-shadow: 0 6px 22px rgba(0,0,0,.45); display: grid; place-items: center; transition: transform .15s ease; }
.graj::before { content: ""; margin-left: 7px; border-style: solid; border-width: 17px 0 17px 28px; border-color: transparent transparent transparent #fff; }
.film-ekran > button:hover .graj, .film-ekran > button:focus-visible .graj { transform: scale(1.08); }
.film-opis { padding: 16px 18px 18px; }
.film-opis h3 { font-size: 21px; margin-bottom: 8px; }
.film-opis p { font-size: 17px; color: var(--atrament-2); margin-bottom: 10px; }
.film-opis a { font-size: 17px; font-weight: 700; }
.siatka-filmow { display: grid; gap: 22px; grid-template-columns: 1fr; }
.uwaga-yt { font-size: 15px; color: var(--atrament-2); margin-top: 14px; }

.wyrozniony { display: grid; gap: 22px; align-items: center; }
.wyrozniony .film { max-width: 400px; width: 100%; margin: 0 auto; }
.wyrozniony > div { order: -1; }

/* mapa */
.mapa { background: var(--karta); border: 2px solid var(--atrament); border-radius: var(--r); box-shadow: var(--cien); padding: 14px; }
.mapa-glowa { display: flex; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 10px; min-height: 2.4em; }
.mapa-rok { font-size: clamp(46px, 13vw, 76px); font-weight: 700; color: var(--czerwien); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.mapa-tytul { font-size: clamp(22px, 5.4vw, 30px); font-weight: 700; line-height: 1.2; }
.mapa-plotno { position: relative; border: 1px solid var(--atrament); border-radius: 8px; overflow: hidden; background: var(--morze); }
.mapa-plotno svg { width: 100%; height: auto; touch-action: pan-y; }
.mapa-plotno .ladowanie { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--atrament-2); }
.mapa-ster { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; align-items: center; margin-top: 14px; }
.mapa-ster button { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--atrament); background: var(--papier); color: var(--atrament); font-family: inherit; font-weight: 700; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.mapa-ster button:hover { background: #fff; }
.mapa-ster button:disabled { opacity: .35; cursor: default; }
.mapa-ster svg { width: 26px; height: 26px; }
input[type=range].suwak { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.suwak::-webkit-slider-runnable-track { height: 8px; background: var(--atrament); border-radius: 4px; }
.suwak::-moz-range-track { height: 8px; background: var(--atrament); border-radius: 4px; }
.suwak::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -13px; border-radius: 50%; background: var(--czerwien); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--atrament); }
.suwak::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--czerwien); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--atrament); }
.mapa-lata { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mapa-lata button { flex: none; scroll-snap-align: center; min-width: 62px; min-height: 48px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--linia); background: var(--papier); color: var(--atrament); font-family: inherit; font-weight: 700; font-size: 19px; line-height: 1; cursor: pointer; }
.mapa-lata button[aria-pressed="true"] { background: var(--czerwien); border-color: var(--czerwien-ciemna); color: #fff; }
.mapa-graj { margin-top: 6px; }
.mapa-opis { font-size: 20px; margin: 16px 0 10px; min-height: 6.4em; }
.mapa-legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 16px; color: var(--atrament-2); margin: 0; padding: 12px 0 0; border-top: 1px solid var(--linia); list-style: none; }
.mapa-legenda li { display: flex; align-items: center; gap: 8px; }
.mapa-legenda i { display: inline-block; width: 30px; height: 14px; flex: none; }
.lg-panstwo { background: rgba(158, 30, 26, .55); border: 2px solid var(--czerwien-ciemna); }
.lg-dzis { border-top: 3px dashed var(--atrament); height: 0 !important; }
.lg-dawniej { border-top: 3px dotted var(--czerwien); height: 0 !important; }
.mapa-zrodla { font-size: 14px; color: var(--atrament-2); margin: 8px 0 0; }
.mapa svg .kraj { fill: var(--lad); stroke: rgba(43,29,18,.38); stroke-width: .8; stroke-linejoin: round; }
.mapa svg .panstwo { fill: rgba(158, 30, 26, .5); stroke: var(--czerwien-ciemna); stroke-width: 2.6; stroke-linejoin: round; }
.mapa svg .panstwo2 { fill: rgba(158, 30, 26, .6); stroke: var(--czerwien-ciemna); stroke-width: 2; }
.mapa svg .duch { fill: none; stroke: var(--czerwien); stroke-width: 2.4; stroke-dasharray: 2 6; stroke-linecap: round; opacity: .9; }
.mapa svg .dzis { fill: none; stroke: var(--atrament); stroke-width: 2.2; stroke-dasharray: 9 6; }
.mapa svg .wejscie { animation: wejscie .45s ease; }
@keyframes wejscie { from { opacity: 0; } to { opacity: 1; } }
.mapa svg text { font-family: "Pagella", Palatino, Georgia, serif; paint-order: stroke; stroke: var(--karta); stroke-linejoin: round; fill: var(--atrament); }
.mapa svg .miasto circle { fill: var(--atrament); stroke: var(--karta); }
.mapa svg .napis { font-weight: 700; letter-spacing: .14em; fill: var(--atrament-2); }
.mapa svg .napis-maly { font-weight: 700; fill: var(--czerwien-ciemna); }

.kalendarium { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.kalendarium li { background: var(--karta); border-left: 5px solid var(--czerwien); border-radius: 8px; padding: 14px 16px; }
.kalendarium b { display: block; font-size: 22px; }
.kalendarium b span { color: var(--czerwien); margin-right: 8px; }

/* obserwuj */
.obserwuj { display: grid; gap: 12px; grid-template-columns: 1fr; max-width: 560px; }
.obserwuj .btn { justify-content: flex-start; width: 100%; font-size: 20px; min-height: 64px; }
.obserwuj .wkrotce { opacity: .65; border-style: dashed; cursor: default; }
.obserwuj .wkrotce small { margin-left: auto; font-size: 15px; font-weight: 400; }

/* tekst (o kanale, polityka) */
.tekst h2 { font-size: clamp(25px, 5.6vw, 32px); margin-top: 1.4em; }
.tekst ul { padding-left: 1.2em; }
.tekst li { margin-bottom: .45em; }
.do-uzupelnienia { background: #FFE58A; color: #3a2a00; padding: 0 4px; border-radius: 3px; font-weight: 700; }
.ramka { background: var(--karta); border: 1px solid var(--linia); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--cien); }

/* stopka */
.stopka { margin-top: 30px; border-top: 2px solid var(--atrament); background: var(--papier-2); padding: 28px 0 40px; font-size: 16px; color: var(--atrament-2); }
.stopka .wrap { display: grid; gap: 18px; }
.stopka nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.stopka nav a { color: var(--atrament); font-size: 18px; padding: 6px 0; }
.stopka p { margin: 0; }

@media (min-width: 700px) {
  body { font-size: 20px; }
  .siatka-filmow { grid-template-columns: repeat(2, 1fr); }
  .obserwuj { grid-template-columns: 1fr 1fr; max-width: none; }
  .mapa { padding: 20px; }
}
@media (min-width: 980px) {
  .sekcja { padding: 56px 0; }
  .hero { padding: 56px 0 44px; }
  .hero-siatka { grid-template-columns: 1.25fr 1fr; align-items: center; }
  .hero-znak { display: block; width: 340px; height: auto; justify-self: center; transform: rotate(-4deg); filter: drop-shadow(0 14px 22px rgba(43,29,18,.25)); }
  .wyrozniony { grid-template-columns: 380px 1fr; gap: 44px; }
  .wyrozniony .film { margin: 0; }
  .wyrozniony > div { order: 0; }
  .siatka-filmow { grid-template-columns: repeat(3, 1fr); }
  .mapa-uklad { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 28px;
    grid-template-areas: "plotno glowa" "plotno opis" "ster opis" "lata legenda" "graj zrodla"; grid-template-rows: auto 1fr auto auto auto; }
  .mapa-glowa { grid-area: glowa; flex-direction: column; align-items: flex-start; }
  .mapa-plotno { grid-area: plotno; }
  .mapa-ster { grid-area: ster; }
  .mapa-lata { grid-area: lata; }
  .mapa-graj { grid-area: graj; justify-self: start; }
  .mapa-opis { grid-area: opis; margin-top: 0; }
  .mapa-legenda { grid-area: legenda; align-self: start; }
  .mapa-zrodla { grid-area: zrodla; }
}
