:root {
  --bg: #f3f0e4;
  --surface: #fffdf8;
  --text: #10262b;
  --accent: #0a9c86;
  --accent2: #9a6a2a;
  --link: #076b5d;
  --muted: #4c605d;
  --rule: #d5cbb6;
  --heading: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --body: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 3.8vw, 4.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, .94rem + .18vw, 1.125rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
.page { display: block; }
main, section, article, nav, .wrap, .split-text, .hero-text { min-width: 0; }
main { grid-column: 2; }
.wrap { width: 100%; max-width: 90rem; margin-inline: auto; padding-inline: var(--gutter); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .22em; overflow-wrap: anywhere; transition: color .18s ease, background-color .18s ease; }
a:hover { color: var(--text); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 5px; }
::selection { background: #b8e4d6; color: var(--text); }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading); font-weight: 400; line-height: 1.15; text-wrap: balance; overflow-wrap: normal; hyphens: auto; }
h1 { font-size: clamp(2.2rem, 3.6vw, 4rem); letter-spacing: -.045em; margin: 0 0 1.6rem; }
h2 { font-size: clamp(1.75rem, 2.5vw, 2.65rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.4rem, 1.8vw, 1.9rem); }
h4, h5, h6 { font-size: 1.25rem; }
p { margin: 0 0 1.3em; }
ul, ol { padding-left: 1.4rem; }
li { padding-left: .15rem; }
li::marker { color: var(--link); }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; object-fit: cover; }
figcaption, small { font-size: .85rem; color: var(--muted); }
strong, b { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2rem; }
blockquote { margin: 2rem 0; padding: 1rem 1.5rem; border-left: 3px solid var(--accent2); font-family: var(--heading); font-size: 1.3rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
th { background: #e6eadf; }
pre { overflow: auto; padding: 1rem; background: var(--surface); }
code { overflow-wrap: anywhere; font-size: .9em; }
button, input, select, textarea { font: inherit; max-width: 100%; }
input, select, textarea { border: 1px solid var(--muted); padding: .65rem; background: var(--surface); color: var(--text); }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100; padding: .75rem 1rem; background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header {
  border-bottom: 1px solid #bfb49c;
  background-color: #eae7d8;
  background-image: repeating-radial-gradient(ellipse at -35% 85%, transparent 0 24px, #9a6a2a17 25px 26px, transparent 27px 42px);
}
.header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 3rem; align-items: center; padding-block: 1.5rem 1rem; }
.header-inner::before { content: 'POMORZE ZACHODNIE / ATLAS TERENOWY'; grid-column: 1 / -1; font-size: .75rem; font-weight: 650; letter-spacing: .14em; color: var(--muted); }
.brand { font-family: var(--heading); font-size: 2.6rem; line-height: 1.1; letter-spacing: -.05em; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-nav { margin: 0; }
.site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem 1.5rem; list-style: none; margin: 0; padding: 0; counter-reset: map-index; }
.site-nav li { padding: 0; counter-increment: map-index; }
.site-nav a { display: flex; align-items: baseline; gap: .45rem; padding: .5rem 0; font-size: .875rem; line-height: 1.45; color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a::before { content: counter(map-index, decimal-leading-zero); font-size: .75rem; color: #76501f; font-variant-numeric: tabular-nums; }
.site-nav a:hover, .site-nav a[aria-current='page'], .page-home .site-nav a[href='index.html'] { color: var(--link); border-color: var(--link); }
.header-inner::after { content: 'LEGENDA KRAJOBRAZU\A ≈  Wody i doliny rzeczne\A ≋  Warstwice i rzeźba terenu\A ○  Obszary chronione'; grid-column: 1 / -1; white-space: normal; padding-top: .7rem; border-top: 1px solid var(--rule); font-size: .75rem; word-spacing: .15em; color: #435751; }
.hero { padding-top: clamp(2rem, 4.5vw, 5rem); background-image: repeating-radial-gradient(ellipse at 110% 5%, transparent 0 36px, #9a6a2a0b 37px 38px, transparent 39px 54px); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 3rem; }
.hero-text { max-width: 54rem; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin-bottom: 1.5rem; }
.eyebrow::before { content: ''; display: inline-block; width: 1.5rem; height: 2px; vertical-align: middle; background: var(--accent); margin-right: .7rem; }
.lead { font-size: clamp(1.05rem, 1rem + .23vw, 1.24rem); line-height: 1.8; color: #344d4b; }
.hero-actions { margin-top: 1.75rem; }
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: .9rem 1.2rem; border: 1px solid var(--link); font-size: .875rem; font-weight: 600; line-height: 1.5; text-decoration: none; }
.btn::after { content: '↗'; font-size: 1.25rem; }
.btn-primary { background: var(--link); color: var(--surface); }
.btn-primary:hover { color: var(--surface); background: var(--text); }
.hero-media, .article-figure { position: relative; padding: .55rem; border: 1px solid var(--rule); background: var(--surface); }
.hero-media img { width: 100%; aspect-ratio: .95; object-fit: cover; }
.hero-media::after { content: ''; position: absolute; right: 1.4rem; bottom: 1.4rem; width: 5rem; height: .45rem; border: 1px solid var(--surface); background: repeating-linear-gradient(90deg, var(--surface) 0 20%, var(--text) 20% 40%); }
.section { padding-block: clamp(3rem, 5vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section-title { margin: 0 0 1.3rem; }
.section-intro { max-width: 65ch; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2rem; margin-block: 2.5rem; counter-reset: chapter; }
.card { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem 0 2rem; border-top: 2px solid var(--accent2); counter-increment: chapter; }
.card::before { content: counter(chapter, decimal-leading-zero) ' /'; color: #76501f; font-size: .8rem; letter-spacing: .1em; margin-bottom: 1rem; }
.card-title { margin: 0 0 1rem; }
.card-text { font-size: .95rem; color: var(--muted); }
.card-link { margin-top: auto; font-size: .85rem; font-weight: 650; }
.card-link::after { content: ' ↗'; }
.section-feature { background: #e5ebe1; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 2rem; }
.split-text p { font-size: .95rem; }
.split-media { padding: .45rem; border: 1px solid #a9b9ab; background: var(--surface); transform: rotate(2deg); }
.split-media img { width: 100%; aspect-ratio: 1.4; object-fit: cover; }
.fact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.fact { padding: 1.25rem; border-top: 2px solid var(--accent); background: var(--surface); }
.fact strong { display: block; font-family: var(--heading); font-size: 2rem; }
.section-partners { background: #ede9dc; }
.section-partners .section-title { margin-bottom: .65rem; }
.partner-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2rem; padding: 0; margin: 1.5rem 0 0; list-style: none; background: transparent; counter-reset: partner; }
.partner { min-width: 0; position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1rem 0; border-top: 1px solid var(--rule); counter-increment: partner; }
.partner::before { content: counter(partner, decimal-leading-zero); position: absolute; top: 1.1rem; left: 0; color: #76501f; font-size: .75rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.partner-link { display: block; overflow-wrap: anywhere; word-break: normal; font-size: .875rem; line-height: 1.4; text-decoration: none; }
.partner-link:hover { text-decoration: underline; }
.partner-phrase { order: -1; padding-left: 1.85rem; margin: 0; font-family: var(--heading); font-size: 1.125rem; line-height: 1.3; }
.partner-desc { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.article { padding-block: clamp(2rem, 4vw, 4rem) 5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem .7rem; font-size: .75rem; color: var(--muted); margin-bottom: 2.75rem; }
.page-header { padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); margin-bottom: 2rem; }
.page-header h1 { max-width: 22ch; }
.article-figure { margin-bottom: 3rem; }
.article-figure img { width: 100%; aspect-ratio: 1.8; object-fit: cover; }
.prose { max-width: 70ch; overflow-wrap: anywhere; }
.wrap.prose { max-width: calc(70ch + var(--gutter) * 2); }
.article .prose { margin-inline: auto; }
.prose h2 { margin: 2.4rem 0 1.2rem; font-size: clamp(1.6rem, 2.2vw, 2.2rem); }
.prose h2::before { content: ''; display: block; width: 1.75rem; height: 2px; background: var(--accent2); margin-bottom: 1rem; }
.prose p { margin-bottom: 1.5rem; }
.prose li { margin-bottom: .6rem; }
.note { padding: 1.4rem 1.6rem; margin: 2rem 0; background: #e1ece2; border-left: 3px solid var(--accent); font-size: .95rem; }
.note p:last-child { margin-bottom: 0; }
.site-footer { grid-column: 2; border-top: 1px solid var(--rule); padding-block: 2.5rem; background: var(--surface); }
.footer-inner { display: grid; gap: 1rem; }
.footer-note { max-width: 62ch; font-size: .8rem; color: var(--muted); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 0; margin: 0; list-style: none; }
.footer-nav li { padding: 0; }
.footer-nav a { font-size: .78rem; }
@media (min-width: 1450px) {
  .hero h1 { max-width: 21ch; }
  .hero-media img { aspect-ratio: 1; }
}
@media (max-width: 1150px) {
  .partner-list, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { gap: 2rem; }
  .hero h1 { font-size: 2.6rem; }
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 30rem; transform: none; }
  .split-media img { aspect-ratio: 1.5; }
}
@media (max-width: 760px) {
  .page { display: block; }
  .site-header { position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid #bfb49c; }
  .header-inner { grid-template-columns: 1fr; gap: .6rem; padding: 1.25rem var(--gutter); }
  .header-inner::before { margin-bottom: .85rem; font-size: .75rem; }
  .brand { max-width: none; font-size: clamp(2.4rem, 7vw, 3.5rem); }
  .brand::after { margin-top: 1rem; width: 2.5rem; }
  .site-nav { margin: 1rem 0 0; }
  .site-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
  .site-nav a { font-size: .8rem; gap: .45rem; min-height: 44px; }
  .header-inner::after { margin-top: 1.25rem; padding-top: .75rem; font-size: .75rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  h1, .hero h1 { font-size: clamp(1.75rem, 7.2vw, 2.4rem); }
  .hero-media img, .article-figure img { aspect-ratio: 1.5; }
  .breadcrumb { margin-bottom: 1.75rem; }
  .page-header h1 { max-width: none; }
}
@media (max-width: 520px) {
  .partner-list, .card-grid, .fact-list { grid-template-columns: minmax(0, 1fr); }
  .card-grid { margin-block: 2rem; }
  .card { padding-block: 1.2rem 1.6rem; }
  .partner { padding: .7rem 0; gap: .2rem; }
  .partner::before { top: .8rem; }
  .partner:nth-child(5n + 1) { border-top: 2px solid var(--accent2); }
  .partner-phrase { font-size: 1rem; }
  .partner-desc { font-size: .8125rem; line-height: 1.4; }
  .partner-link { line-height: 1.35; }
  .btn { width: 100%; }
  .site-nav a::before { display: none; }
  .section { padding-block: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .page { display: block; background: white; color: black; }
  .site-header, .skip-link, .hero-actions, .site-footer { display: none; }
  .wrap { padding-inline: 0; }
  .section, .article { padding-block: 1rem; }
  .partner-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card, figure, .partner { break-inside: avoid; }
}
.page-sub main { background: var(--surface); }
.page-sub .article { background-image: repeating-radial-gradient(ellipse at 100% 0, transparent 0 35px, #9a6a2a08 36px 37px, transparent 38px 58px); background-size: 100% 32rem; background-repeat: no-repeat; }
