/* ==========================================================================
   REKUSOUND — rekusound.gig.eu
   Main stylesheet. Mobile-first. No build step.

   Colours are taken from the previous version of the site and the REKUSOUND
   logo; Saira (headings) echoes the squarish logo wordmark. Edit the tokens below and the whole site follows.
   ========================================================================== */

/* ---------- Fonts (self-hosted variable fonts, OFL licence, see assets/fonts/README.md) ---------- */
@font-face {
  font-family: "Saira";
  src: url("../fonts/saira-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Saira";
  src: url("../fonts/saira-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours (previous site + logo) */
  --c-sand: #E9E8DD;       /* header background, logo background */
  --c-petrol: #2A4A49;     /* logo wordmark / dark wave — links, accents (9.7:1 on white) */
  --c-forest: #4E7F3E;     /* logo green */
  --c-green: #4E785C;      /* logo green: title underline, icons, menu marks (5.0:1 on white) */
  --c-green-text: #3E6B4A; /* darker logo green for text (6.2:1 on white, 5.0:1 on sand) */
  --c-teal: #007F7F;       /* footer background; old #009999 darkened for 4.8:1 with white text */
  --c-teal-light: #E3F1EF; /* tinted backgrounds */
  --c-ink: #26232A;        /* headings */
  --c-text: #555555;       /* body text (7.5:1 on white) */
  --c-text-muted: #6F6D70; /* secondary text (5.1:1 on white) */
  --c-line: #E2E2DA;       /* hairlines */
  --c-white: #FFFFFF;

  /* Typography */
  --font-display: "Saira", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-300: 0.9375rem;
  --fs-400: 1.125rem;
  --fs-500: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-600: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-700: clamp(2rem, 1.5rem + 2vw, 2.8125rem);
  --fs-hero: clamp(2.25rem, 1.5rem + 3.2vw, 3.5rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --radius-s: 4px;
  --radius-m: 10px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 1100px) {
  :root { --header-h: 96px; }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--c-petrol); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-green-text); text-decoration-thickness: 2px; }
strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--c-petrol);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--c-petrol);
  color: var(--c-white);
  font-weight: 600;
  border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--c-white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--c-sand);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 6px 18px -10px rgba(0, 0, 0, 0.25); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}
.brand { display: inline-flex; flex-shrink: 0; border-radius: 2px; }
.brand img { height: 52px; width: auto; }
@media (min-width: 1100px) { .brand img { height: 74px; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid rgba(42, 74, 73, 0.25);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--c-petrol);
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
  content: "";
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 5px; }
.nav-toggle__bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* Mobile navigation panel */
.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  padding: 1rem var(--gutter) 2.5rem;
  overflow-y: auto;
  background: var(--c-sand);
  border-top: 1px solid rgba(42, 74, 73, 0.12);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s;
}
/* Without JS the menu is always visible (the toggle is hidden then) */
.no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; padding: 0 0 1rem; border: 0; flex-basis: 100%; }
.no-js .nav-toggle { display: none; }
.no-js .site-header { height: auto; position: relative; }
.no-js .site-header__inner { flex-wrap: wrap; padding-block: 1rem; }

.nav-list { list-style: none; display: grid; }
.nav-list a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(42, 74, 73, 0.12);
  font: 500 1.5rem/1.2 var(--font-display);
  color: var(--c-petrol);
  text-decoration: none;
}
.nav-list a[aria-current] { color: var(--c-green-text); }
.nav-list a[aria-current]::before {
  content: "";
  display: inline-block;
  width: 1.25rem; height: 3px;
  margin-right: 0.6rem;
  vertical-align: middle;
  background: var(--c-green);
}

body.nav-open { overflow: hidden; }

/* Desktop navigation */
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav {
    position: static;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
    flex-basis: auto;
  }
  .nav-list { display: flex; gap: clamp(1.25rem, 2.2vw, 2.25rem); }
  .nav-list a {
    position: relative;
    padding: 0.5rem 0;
    border: 0;
    font: 600 1.0625rem/1.2 var(--font-body);
    color: var(--c-petrol);
    white-space: nowrap;
  }
  .nav-list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--c-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-out);
  }
  .nav-list a:hover { color: var(--c-petrol); }
  .nav-list a:hover::after, .nav-list a[aria-current]::after { transform: scaleX(1); }
  .nav-list a[aria-current] { color: var(--c-petrol); }
  .nav-list a[aria-current]::before { display: none; }
}

/* ==========================================================================
   Hero (homepage): photo, title, sound pulse, wavy bottom edge
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  /* photo proportions (2688 × 1536), at least 540 px, at most one screen */
  height: max(540px, min(57.15vw, calc(100svh - var(--header-h) + 80px)));
  overflow: hidden;
  isolation: isolate;
  background: #3a4442;
  color: var(--c-white);
}
.hero__img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
/* Darken the left side for text contrast */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(20, 28, 30, 0.62) 0%, rgba(20, 28, 30, 0.38) 40%, rgba(20, 28, 30, 0) 70%);
}
/* Sound pulse over the emitter painted in the middle of the photo */
.hero__pulse {
  position: absolute;
  left: 50%; top: 50%;
  z-index: -1;
  width: clamp(120px, 16vw, 240px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
}
.hero__pulse span {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(160, 235, 220, 0.75);
  border-radius: 50%;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__pulse span { animation: pulse 4.5s var(--ease-out) infinite; }
  .hero__pulse span:nth-child(2) { animation-delay: 1.5s; }
  .hero__pulse span:nth-child(3) { animation-delay: 3s; }
}
@keyframes pulse {
  0% { transform: scale(0.35); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}
.hero__content { padding-block: 3rem 6rem; }
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero__tagline {
  margin: 1rem 0 2.25rem;
  max-width: 29em;
  font-size: var(--fs-500);
  line-height: 1.45;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.hero__wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(40px, 7vw, 100px);
}
.hero__wave .w1 { fill: rgba(255, 255, 255, 0.28); }
.hero__wave .w2 { fill: rgba(255, 255, 255, 0.45); }
.hero__wave .w3 { fill: var(--c-white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.75rem clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  border: 1px solid var(--c-white);
  border-radius: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font: 400 1.0625rem/1.2 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 22px; height: 22px; flex-shrink: 0; fill: currentColor; transition: transform 0.3s var(--ease-out); }
.btn:hover { background: var(--c-sand); border-color: var(--c-sand); color: var(--c-ink); text-decoration: none; }
.btn:hover svg { transform: translateX(4px); }
.btn--dark { background: var(--c-petrol); border-color: var(--c-petrol); color: var(--c-white); }
.btn--dark:hover { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-white); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-y); }
.section--tight-top { padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.lead-text { font-size: var(--fs-400); }

/* Project facts + funder logo (homepage, O projekcie) */
.facts-band {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-block: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-block: 1px solid var(--c-line);
}
.facts { display: grid; gap: 0.6rem 1.5rem; margin: 0; }
.facts dt { font-weight: 700; color: var(--c-ink); }
.facts dd { margin: 0 0 0.6rem; }
/* NFOŚiGW mark with its obligatory caption. Clear space = width of the signet
   (≈ 24 % of the logo width) on every side; minimum digital width 120 px. */
.funder-mark { justify-self: center; display: grid; justify-items: center; gap: 1rem; width: 280px; max-width: 80%; margin: 0; text-align: center; }
.funder-mark a { display: block; }
.funder-mark img { width: 100%; }
.funder-mark figcaption { font-size: 0.875rem; line-height: 1.45; color: var(--c-text); }
@media (min-width: 640px) {
  .facts { grid-template-columns: max-content 1fr; }
  .facts dd { margin: 0; }
}
@media (min-width: 900px) {
  .facts-band { grid-template-columns: 1fr 300px; gap: 5rem; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-head { padding-top: clamp(2.5rem, 2rem + 4vw, 6rem); }
.page-head__title {
  display: inline-block;
  padding-bottom: clamp(1.25rem, 2vw, 2rem);
  font-size: var(--fs-700);
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  background: linear-gradient(var(--c-green), var(--c-green)) left bottom / 100% 3px no-repeat;
  min-width: min(100%, 11rem);
}
.page-head + .section { padding-top: clamp(2rem, 1.5rem + 2.5vw, 4rem); }

/* Subtitle with a line icon on the right, hairline below */
.intro {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--c-line);
}
.intro__title { font-size: var(--fs-600); font-weight: 600; max-width: 24em; }
.intro__icon { display: none; width: 120px; height: 120px; color: var(--c-green); }
.intro__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 768px) {
  .intro { grid-template-columns: 1fr auto; gap: 3rem; }
  .intro__icon { display: block; margin-right: clamp(0rem, 6vw, 6rem); }
}

.prose { max-width: 50rem; }
.prose--wide { max-width: none; }
.prose h2 { font-size: var(--fs-600); font-weight: 600; margin: 2.75rem 0 1rem; }
.prose h3 { font-size: var(--fs-500); margin: 2rem 0 0.75rem; }
.prose h4 { font: 700 var(--fs-400)/1.4 var(--font-body); margin: 1.5rem 0 0.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--c-green-text); }

.funder { display: grid; justify-items: center; gap: 2rem; margin-top: clamp(2rem, 4vw, 3rem); text-align: center; }
.funder img { width: 380px; max-width: 85%; }
.funder p { margin: 0; }
.funder__agreement { text-transform: uppercase; letter-spacing: 0.03em; font-size: var(--fs-300); }

/* Project stages (Struktura projektu) */
.stages {
  list-style: none;
  counter-reset: stage;
  display: grid;
  gap: 1rem;
  margin-block: clamp(2rem, 4vw, 3rem);
}
.stage {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
}
.stage__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 6px;
  border: 2px solid #555;
  border-radius: 7px;
  background: var(--c-white);
  font: 300 2.5rem/1 var(--font-display);
  color: var(--c-green-text);
}
/* the second "page" under the number, like the old icons */
.stage__num::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -8px;
  height: 10px;
  border: 2px solid #555;
  border-top: 0;
  border-radius: 0 0 7px 7px;
}
.stage__label { margin: 0; }
.stage__label strong { color: var(--c-ink); }
@media (min-width: 900px) {
  .stages { grid-template-columns: repeat(5, 1fr); gap: 1.75rem; }
  .stage { grid-template-columns: 1fr; align-content: start; justify-items: center; text-align: center; padding: 0; }
  .stage__num { width: 72px; height: 72px; font-size: 2.875rem; margin-bottom: 1.25rem; }
  .stage__label { font-size: var(--fs-300); }
}
.divider { border: 0; border-top: 1px solid var(--c-line); margin: clamp(2rem, 4vw, 3rem) 0; }

/* Contact */
.contact { display: grid; gap: 3rem; align-items: start; }
.contact-list { list-style: none; display: grid; gap: 1.5rem; }
.contact-list li { display: grid; grid-template-columns: 34px 1fr; gap: 1.25rem; align-items: start; }
.contact-list svg { width: 32px; height: 32px; margin-top: 0.1rem; fill: none; stroke: var(--c-green); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.contact-list h2, .contact-list h3 { font: 600 1.375rem/1.4 var(--font-body); color: var(--c-ink); margin: 0; }
.contact-list p { margin: 0.15rem 0 0; }
.contact-list a { color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-line); }
.contact-list a:hover { color: var(--c-green-text); border-bottom-color: currentColor; }
.contact__photo figcaption { margin-top: 0.75rem; text-align: center; font-size: var(--fs-300); color: var(--c-text-muted); }
@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .contact-list { padding: 1.5rem 0 0 2rem; }
}

/* News, events and publications (Upowszechnienie) */
.news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin: 0; font-size: var(--fs-300); color: var(--c-text-muted); }
.news-item__type {
  display: inline-block;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--c-teal-light);
  color: var(--c-petrol);
}
.news-item__type--event { background: #EEF6E6; color: #2F5E15; }
.news-item__type--publication { background: var(--c-sand); color: var(--c-ink); }
.news-item__type--article { background: #E8EEF6; color: #263E5E; }
.news-item__body { max-width: 66ch; padding-top: 0.5rem; }
.news-item__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.25rem 0 0; }
.news-item__links a { font-weight: 600; }
.news-item__toggle {
  justify-self: start;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--c-petrol);
  font: 600 1rem/1.4 var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.news-item__toggle:hover { color: var(--c-green-text); }
.news-empty {
  padding: 1.5rem 1.75rem;
  border: 1px dashed #CFCFC4;
  border-radius: var(--radius-m);
  background: #FAFAF6;
  color: var(--c-text-muted);
}
.news-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.news-filter button {
  min-height: 40px;
  padding: 0.4rem 1.1rem;
  border: 1px solid #CFCFC4;
  border-radius: 999px;
  background: var(--c-white);
  color: var(--c-petrol);
  font: 600 0.9375rem/1 var(--font-body);
  cursor: pointer;
}
.news-filter button:hover { border-color: var(--c-petrol); }
.news-filter button[aria-pressed="true"] { background: var(--c-petrol); border-color: var(--c-petrol); color: var(--c-white); }
/* Cards (list of entries) */
.post-grid { list-style: none; display: grid; gap: 1.75rem; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  background: var(--c-white);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}
.post-card--link:hover { border-color: #CFCFC4; box-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.35); transform: translateY(-2px); }
.post-card__media { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--c-sand); border-bottom: 1px solid var(--c-line); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 0.5s var(--ease-out); }
.post-card--link:hover .post-card__media img { transform: scale(1.03); }
.post-card__body { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; padding: 1.25rem 1.4rem 1.4rem; }
.post-card__title { font-size: 1.3125rem; line-height: 1.25; }
.post-card__title a { color: var(--c-ink); text-decoration: none; }
/* the whole card is clickable through the title link */
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card__title a:hover { color: var(--c-ink); }
.post-card__title a:focus-visible { outline: none; }
.post-card--link:focus-within { outline: 3px solid var(--c-petrol); outline-offset: 2px; }
.post-card__excerpt { margin: 0; font-size: 1rem; color: var(--c-text); }
.post-card__more { margin-top: auto; padding-top: 0.5rem; font-weight: 600; color: var(--c-petrol); }
.post-card__more::after { content: " →"; }
.post-card .news-item__links, .post-card .news-item__toggle { position: relative; z-index: 2; }

/* Single entry page (upowszechnienie/<slug>.html) */
.breadcrumb { margin-bottom: 1.5rem; font-size: var(--fs-300); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--c-text-muted); }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb [aria-current] { color: var(--c-ink); }
.post-head .news-item__meta { margin-bottom: 1rem; }
.post-head .page-head__title { display: block; max-width: 22em; }
.post-lead { max-width: 46rem; margin: 1.5rem 0 0; font-size: var(--fs-500); line-height: 1.5; color: var(--c-ink); }
.post-layout { display: grid; gap: 2.5rem; }
.post-main { min-width: 0; }
.post-figure { margin: 0 0 2.5rem; }
.post-figure a { display: block; position: relative; border: 1px solid var(--c-line); border-radius: var(--radius-m); overflow: hidden; background: var(--c-white); cursor: zoom-in; }
.post-figure a::after {
  content: "Powiększ";
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(38, 35, 42, 0.78);
  color: var(--c-white);
  font: 600 0.8125rem/1.2 var(--font-body);
}
.post-figure img { width: 100%; }
.post-figure figcaption { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.5; color: var(--c-text-muted); }
.post-figure figcaption strong { color: var(--c-ink); }
.post-body.prose { max-width: 44rem; }
.post-body h2 { font-size: var(--fs-600); margin: 2.5rem 0 0.9rem; }
.post-body h3 { font-size: var(--fs-500); margin: 1.75rem 0 0.5rem; }
.post-body > :first-child { margin-top: 0; }
.post-body ol.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1.1rem; }
.post-body ol.steps > li { position: relative; padding-left: 3.25rem; margin: 0; }
.post-body ol.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 2px solid var(--c-green); border-radius: 50%;
  font: 600 1.0625rem/1 var(--font-display); color: var(--c-green-text);
}
.post-body ol.steps h3 { margin: 0.3rem 0 0.25rem; font-size: 1.1875rem; }
.post-body ol.steps p { margin: 0 0 0.4rem; }
.post-body ol.steps ul { margin: 0.25rem 0 0; }
.post-section-title { font-size: 1.1875rem; margin: 2.5rem 0 0; }
.post-sources { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--c-line); font-size: 0.9375rem; color: var(--c-text-muted); }
.post-sources h2 { font-size: 1.0625rem; margin: 0 0 0.5rem; }
.post-sources ul { padding-left: 1.25rem; margin: 0; }

/* Gallery: thumbnails open in the lightbox */
.gallery { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin: 1rem 0 0; padding: 0; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-s); background: var(--c-sand); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-out); }
.gallery a:hover img { transform: scale(1.04); }

/* Attachments */
.attachments { list-style: none; display: grid; gap: 0.6rem; margin: 1rem 0 0; padding: 0; }
.attachments a {
  display: grid; grid-template-columns: 40px 1fr; gap: 0.1rem 0.9rem; align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--c-line); border-radius: var(--radius-m);
  color: var(--c-ink); text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.attachments a:hover { border-color: var(--c-petrol); background: #FAFAF6; color: var(--c-ink); }
.attachments svg { grid-row: span 2; width: 32px; height: 32px; fill: none; stroke: var(--c-petrol); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.attachments strong { font-weight: 600; }
.attachments span { font-size: 0.875rem; color: var(--c-text-muted); }

/* Aside: share, funding note */
.post-aside { display: grid; gap: 1.75rem; align-content: start; }
.post-aside h2 { font-size: 1.0625rem; margin: 0 0 0.75rem; }
.share { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.share a, .share button {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 40px; padding: 0.4rem 0.9rem;
  border: 1px solid #CFCFC4; border-radius: 999px;
  background: var(--c-white); color: var(--c-petrol);
  font: 600 0.9375rem/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--c-petrol); color: var(--c-petrol); }
.share svg { width: 18px; height: 18px; fill: currentColor; }
.post-funding { display: grid; padding: 1.25rem; border: 1px solid var(--c-line); border-radius: var(--radius-m); background: #FAFAF6; font-size: 0.875rem; line-height: 1.5; }
.post-funding .funder-mark { justify-self: start; width: 220px; max-width: 100%; margin-bottom: 1rem; text-align: left; justify-items: start; }
.post-funding p { margin: 0; }
.post-back { margin-top: 2.5rem; }
.post-back a { font-weight: 600; }
@media (min-width: 1000px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 4rem; }
  .post-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* Lightbox (assets/js/lightbox.js) */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 18, 20, 0.95); color: var(--c-white); }
.lightbox::backdrop { background: rgba(15, 18, 20, 0.95); }
.lightbox__stage { display: grid; grid-template-rows: 1fr auto; height: 100%; padding: 4rem 1rem 1rem; }
.lightbox__img { place-self: center; max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; background: var(--c-white); }
.lightbox__caption { margin: 0.75rem auto 0; max-width: 60rem; text-align: center; font-size: 0.9375rem; color: #DDD; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: var(--c-white); cursor: pointer;
}
.lightbox__btn[hidden] { display: none; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__btn:focus-visible { outline-color: var(--c-white); }
.lightbox__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: 0.75rem; right: 0.75rem; }
.lightbox__prev { left: 0.75rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 0.75rem; top: 50%; translate: 0 -50%; }
.lightbox__open { position: absolute; top: 1.4rem; left: 1rem; color: #DDD; font-size: 0.875rem; }
.lightbox__open:hover { color: var(--c-white); }
body.lightbox-open { overflow: hidden; }

.section-title { font-size: var(--fs-600); font-weight: 600; margin: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }

/* "Content to be completed" banner */
.todo-banner {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  max-width: 44rem;
  border: 1.5px dashed var(--c-green);
  border-radius: var(--radius-m);
  background: #F3F9EC;
  color: var(--c-ink);
}
.todo-banner svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.todo-banner strong { display: block; }
.todo-banner span { display: block; font-size: var(--fs-300); }

/* Accessibility statement */
.statement dl { display: grid; gap: 0.25rem 1.5rem; margin: 0 0 1.5rem; }
.statement dt { font-weight: 700; color: var(--c-ink); }
.statement dd { margin: 0 0 0.75rem; }
@media (min-width: 768px) { .statement dl { grid-template-columns: max-content 1fr; } .statement dd { margin: 0; } }

/* 404 */
.not-found { padding-block: clamp(4rem, 10vw, 8rem); }
.not-found__code { font: 600 clamp(4rem, 3rem + 6vw, 8rem)/1 var(--font-display); color: var(--c-green); margin: 0 0 1rem; }
.not-found__text { margin-top: 1.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--c-teal);
  color: var(--c-white);
  text-align: center;
}
.site-footer__wave {
  position: absolute;
  left: 0; bottom: calc(100% - 1px);
  width: 100%;
  height: clamp(40px, 6vw, 90px);
}
.site-footer__wave path { fill: var(--c-teal); }
.site-footer a { color: var(--c-white); }
.site-footer a:hover { color: var(--c-white); }
.site-footer :focus-visible { outline-color: var(--c-white); }
.footer-main { display: grid; justify-items: center; gap: 5rem; padding-block: 3rem 2.25rem; }
.footer-funder a { display: inline-block; }
.footer-funder img { width: 320px; max-width: 80vw; margin-inline: auto; }
.footer-funder p { margin: 1.5rem 0 0; font-size: var(--fs-300); }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.5rem; }
.footer-nav a { display: inline-block; padding: 0.3rem 0; font-size: var(--fs-300); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom__copy { font-size: 1rem; }

/* ==========================================================================
   Scroll reveal (restrained, one style site-wide). Content stays visible
   without JS and with reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }
  /* stagger without inline styles (the CSP blocks style="…") */
  .js .stage.reveal:nth-child(2) { transition-delay: 90ms; }
  .js .stage.reveal:nth-child(3) { transition-delay: 180ms; }
  .js .stage.reveal:nth-child(4) { transition-delay: 270ms; }
  .js .stage.reveal:nth-child(5) { transition-delay: 360ms; }
  .js .stage.reveal:nth-child(n+6) { transition-delay: 450ms; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero__pulse { display: none; }
}

/* Print */
@media print {
  .site-header, .hero__pulse, .hero__wave, .site-footer__wave, .todo-banner, .nav-toggle { display: none !important; }
  .hero { height: auto; color: #000; background: none; }
  .hero__img, .hero::before { display: none; }
  .hero__title, .hero__tagline { color: #000; text-shadow: none; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
  .footer-funder img { filter: invert(1); }
}
