/*
Theme Name: Zajednica nasleđa Vrdnika
Theme URI: https://zajednicanasledja.rs
Author: Zajednica nasleđa Vrdnika
Author URI: https://zajednicanasledja.rs
Description: Participativni digitalni muzej i živa arhiva nasleđa Vrdnika. Hibridna tema: klasični PHP šabloni za muzejske prikaze i blok-obrasci za slobodno uređivanje stranica. Dvojezična (srpski/engleski), pristupačna po WCAG 2.1 AA, sa Dublin Core metapodacima, moderiranim prikupljanjem sećanja i samostalnom listom pretplatnika.
Version: 2.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zajednica-nasledja-vrdnika
Tags: custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready, block-patterns, editor-style, wide-blocks
*/

/* =========================================================
   1. TOKENS
   Contrast ratios verified against paper (#f3eee2) and ink
   (#0b0a0d). Every category colour clears 4.5:1 on paper and
   supports white text at 4.5:1 or better. See docs/pristupacnost.md.
   ========================================================= */

:root {
  /* Ground — the original palette, unchanged */
  --paper: #f3eee2;
  --paper-lift: #fbf8f0;
  --paper-sunk: #e7e0cf;
  --ink: #0b0a0d;
  --ink-soft: #35323a;
  --ink-mute: #5a5661;
  --white: #ffffff;

  /* Brand triad — purple, yellow, black. Nothing else. */
  --purple: #6f38c5;        /* 5.95:1 on paper · white on it 6.89:1 */
  --purple-bright: #a86bff; /* 5.84:1 on ink — dark surfaces only */
  --purple-dark: #261039;
  --yellow: #ffd21c;        /* surface only · ink on yellow 13.62:1 */

  /* Accent defaults. Cards and chips fill with --cat-color and write in
     --cat-on; --cat-text is the same accent used as text on the paper
     ground, which yellow can never be. */
  --cat-color: #6f38c5;
  --cat-on: #ffffff;
  --cat-text: #6f38c5;

  /* Semantic */
  --accent: var(--purple);
  --line: rgba(11, 10, 13, 0.16);
  --line-strong: rgba(11, 10, 13, 0.38);
  --focus: #6f38c5;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.7rem + 3vw, 4.6rem);

  /* Space */
  --gutter: clamp(20px, 4vw, 64px);
  --block: clamp(56px, 8vw, 120px);
  --radius: 0px;
  --shadow: 0 18px 44px -28px rgba(11, 10, 13, 0.55);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 800;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--yellow); color: var(--ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Screen-reader utilities */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

.skip-link {
  position: fixed;
  left: 14px; top: 14px;
  z-index: 999;
  padding: 12px 18px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 750;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.wrap {
  width: min(100% - (var(--gutter) * 2), 1320px);
  margin-inline: auto;
}
.wrap-narrow { width: min(100% - (var(--gutter) * 2), 760px); margin-inline: auto; }

.section { padding-block: var(--block); }

/* =========================================================
   3. TYPE PRIMITIVES
   ========================================================= */

.kicker {
  margin: 0 0 14px;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 26px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow span { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow span + span::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--line-strong);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section-heading { max-width: 68ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-heading p:last-child { color: var(--ink-soft); margin-bottom: 0; }

blockquote {
  margin: 2em 0;
  padding-left: clamp(18px, 3vw, 32px);
  border-left: 4px solid var(--yellow);
  font-family: var(--font-serif);
  font-size: var(--step-2);
  line-height: 1.32;
  font-style: italic;
}

.note {
  font-size: var(--step--1);
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* =========================================================
   4. BUTTONS & LINKS
   ========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover,
.button:focus-visible { background: var(--purple); border-color: var(--purple); color: var(--white); }

.button-ghost { background: transparent; color: var(--ink); }
.button-ghost:hover, .button-ghost:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.button-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.button-yellow:hover, .button-yellow:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--yellow); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 3px;
}
.text-link:hover, .text-link:focus-visible { border-bottom-color: var(--purple); }

/* =========================================================
   5. HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--white);
  border-bottom: 5px solid var(--yellow);
}

.site-header__inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand__mark {
  flex: none;
  width: 46px; height: 46px;
  background: var(--yellow);
  display: grid;
  place-items: end center;
  overflow: hidden;
}
.brand__mark::before {
  content: "";
  width: 27px; height: 27px;
  border-radius: 50% 50% 0 0;
  background: var(--purple-deep);
}
.brand__mark span { display: block; width: 100%; height: 7px; background: var(--purple); border-top: 3px solid var(--ink); }
.brand__text strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.brand__text small {
  display: block;
  margin-top: 3px;
  color: #cbb2f5;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  padding: 11px 14px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.site-nav ul { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--yellow); border-bottom-color: var(--yellow); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { border-bottom-color: var(--purple-bright); }

.nav-cta {
  padding: 12px 18px;
  background: var(--purple);
  color: var(--white) !important;
  border-bottom: none !important;
  font-weight: 700;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--yellow); color: var(--ink) !important; }

.lang-switch { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; }
.lang-switch a { text-decoration: none; opacity: 0.62; }
.lang-switch a[aria-current="true"] { opacity: 1; color: var(--yellow); font-weight: 700; }
.lang-switch span[aria-hidden] { opacity: 0.35; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px var(--gutter) 26px;
    background: var(--ink);
    border-bottom: 5px solid var(--yellow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .site-nav ul a { display: block; padding: 15px 0; font-size: 1rem; }
  .nav-cta { margin-top: 18px; text-align: center; justify-content: center; display: block; }
  .lang-switch { margin-top: 16px; }
}

/* =========================================================
   6. HERO
   ========================================================= */

.hero { padding-block: clamp(48px, 7vw, 104px) clamp(40px, 6vw, 88px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { font-size: var(--step-4); letter-spacing: -0.038em; }
.hero h1 em { font-style: normal; color: var(--purple); }
.hero__lead { margin: 26px 0 34px; font-size: var(--step-1); line-height: 1.42; color: var(--ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

.hero__collage { position: relative; min-height: clamp(320px, 42vw, 520px); }
.hero__stripes {
  position: absolute; inset: auto 0 0 0; height: 58%;
  background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 13px);
  opacity: 0.09;
}
.hero__img { position: absolute; overflow: hidden; background: var(--paper-sunk); box-shadow: var(--shadow); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.32) contrast(1.06) sepia(0.12); }
.hero__img--main { inset: 0 18% 16% 0; }
.hero__img--sub { width: 46%; aspect-ratio: 4 / 5; right: 0; bottom: 0; border: 6px solid var(--paper); }
.hero__label {
  position: absolute; left: 0; bottom: 0;
  padding: 12px 16px;
  background: var(--yellow);
  color: var(--ink);
}
.hero__label strong { display: block; font-size: 0.8rem; letter-spacing: 0.11em; text-transform: uppercase; }
.hero__label span { display: block; margin-top: 2px; font-size: 0.68rem; letter-spacing: 0.08em; color: var(--ink-soft); }
.hero__years {
  position: absolute; right: 0; top: -14px;
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.4vw, 0.86rem);
  letter-spacing: 0.2em;
  color: var(--ink-mute);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__collage { min-height: 340px; }
}

/* =========================================================
   7. STATS
   ========================================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.stat { padding: clamp(22px, 3vw, 34px) clamp(16px, 2vw, 28px); border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat strong { display: block; font-size: var(--step-2); font-weight: 800; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 6px; font-size: var(--step--1); color: var(--ink-mute); letter-spacing: 0.05em; }

/* =========================================================
   8. CARDS — STORIES
   ========================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 30vw, 340px), 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 34px);
  background: var(--cat-color);
  color: var(--cat-on);
  border: 2px solid var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.story-card:hover,
.story-card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow); }
.story-card__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.78;
}
.story-card__cat { font-weight: 700; opacity: 1; }
.story-card h3 { font-size: var(--step-1); margin-bottom: 12px; color: inherit; }
.story-card h3 a { text-decoration: none; color: inherit; }
.story-card h3 a::after { content: ""; position: absolute; inset: 0; }
.story-card p { margin: 0 0 22px; color: inherit; font-size: 0.96rem; }
.story-card__more {
  margin-top: auto;
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
  font-size: var(--step--1); font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: inherit;
}

.story-card--wide { grid-column: 1 / -1; }

/* Category chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: var(--cat-color);
  color: var(--cat-on);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
}
.chip:hover, .chip:focus-visible { background: var(--ink); color: var(--yellow); }

/* =========================================================
   9. PLACES
   ========================================================= */

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 27vw, 320px), 1fr));
  gap: clamp(16px, 2vw, 26px);
}
.place-card { position: relative; background: var(--paper-lift); border: 2px solid var(--ink); display: flex; flex-direction: column; }
.place-card__media { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; background: var(--paper-sunk); }
.place-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.28) contrast(1.05); transition: transform 400ms ease, filter 400ms ease; }
.place-card:hover .place-card__media img { transform: scale(1.05); filter: grayscale(0) contrast(1.02); }
.place-card__num {
  position: absolute; left: 0; bottom: 0;
  padding: 7px 12px;
  background: var(--ink); color: var(--yellow);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
}
.place-card__body { padding: 20px clamp(18px, 2vw, 24px) 24px; display: flex; flex-direction: column; flex: 1; }
.place-card__cat { margin: 0 0 8px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cat-text); }
.place-card h3 { font-size: var(--step-0); margin-bottom: 8px; }
.place-card h3 a { text-decoration: none; }
.place-card h3 a::after { content: ""; position: absolute; inset: 0; }
.place-card p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Empty frame — used wherever an image has no confirmed rights */
.frame-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  aspect-ratio: 4 / 3.4;
  background:
    repeating-linear-gradient(45deg, var(--paper-sunk) 0 10px, var(--paper-lift) 10px 20px);
  border-bottom: 2px solid var(--ink);
  text-align: center;
  padding: 20px;
}
.frame-empty span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-mute); }

/* Map placeholder card */
.place-card--map { background: var(--ink); color: var(--paper); }
.place-card--map .place-card__cat { color: var(--yellow); }
.place-card--map p { color: rgba(243, 238, 226, 0.74); }
.map-graphic { position: relative; aspect-ratio: 4 / 3.4; display: grid; place-items: center; overflow: hidden; }
.map-graphic::before,
.map-graphic::after {
  content: ""; position: absolute; background: rgba(255, 210, 28, 0.5);
}
.map-graphic::before { width: 140%; height: 2px; transform: rotate(-24deg); }
.map-graphic::after { width: 2px; height: 140%; transform: rotate(-14deg); }
.map-graphic strong {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.34em;
  color: var(--yellow);
}
.map-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--purple-bright); }
.map-dot:nth-of-type(1) { left: 26%; top: 32%; }
.map-dot:nth-of-type(2) { right: 22%; top: 52%; }
.map-dot:nth-of-type(3) { left: 40%; bottom: 22%; }

/* =========================================================
   10. FEATURE BLOCKS
   ========================================================= */

.feature { padding-block: var(--block); border-top: 3px solid var(--ink); }
.feature--dark { background: var(--ink); color: var(--paper); border-top-color: var(--yellow); }
.feature--dark .kicker { color: rgba(243, 238, 226, 0.6); }
.feature--dark p { color: rgba(243, 238, 226, 0.8); }
.feature--dark blockquote { border-left-color: var(--purple-bright); }
.feature--dark .note { border-top-color: rgba(243, 238, 226, 0.25); color: rgba(243, 238, 226, 0.62); }

.feature__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(22px, 3vw, 42px);
  margin-block: clamp(28px, 4vw, 48px);
}
.feature__grid article { border-top: 3px solid currentColor; padding-top: 18px; }
.feature__grid span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  opacity: 0.6;
}
.feature__grid h3 { font-size: var(--step-1); }
.feature__grid p { margin: 0; font-size: 0.96rem; }

/* =========================================================
   11. TIMELINE
   ========================================================= */

.timeline-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(24px, 4vw, 60px); align-items: end; margin-bottom: clamp(30px, 4vw, 50px); }
.timeline-head p:last-child { color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .timeline-head { grid-template-columns: 1fr; } }

.timeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(228px, 1fr);
  gap: 0;
  overflow-x: auto;
  padding-bottom: 22px;
  scroll-snap-type: x proximity;
  border-top: 3px solid var(--ink);
}
.timeline::-webkit-scrollbar { height: 8px; }
.timeline::-webkit-scrollbar-thumb { background: var(--line-strong); }

.timeline__item {
  scroll-snap-align: start;
  padding: 26px clamp(16px, 2vw, 26px) 8px;
  border-right: 1px solid var(--line);
}
.timeline__item:last-child { border-right: none; }
.timeline__dot { display: block; width: 13px; height: 13px; margin: -33px 0 22px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); }
.timeline__year { display: block; font-family: var(--font-mono); font-size: var(--step-1); font-weight: 700; letter-spacing: 0.02em; color: var(--purple); }
.timeline__item h3 { font-size: var(--step-0); margin: 10px 0 8px; }
.timeline__item p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Vertical timeline inside a single story */
.story-timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--ink); }
.story-timeline li { position: relative; padding: 0 0 26px 26px; }
.story-timeline li::before {
  content: ""; position: absolute; left: -9px; top: 7px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--ink);
}
.story-timeline strong { display: block; font-family: var(--font-mono); font-size: 0.92rem; letter-spacing: 0.06em; color: var(--purple); }
.story-timeline span { display: block; margin-top: 4px; color: var(--ink-soft); }

/* =========================================================
   12. FILTERS / BROWSE
   ========================================================= */

.filters {
  border: 2px solid var(--ink);
  background: var(--paper-lift);
  padding: clamp(20px, 2.6vw, 30px);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.filters__row { display: flex; flex-wrap: wrap; gap: 22px 30px; align-items: flex-end; }
.filters__group { display: flex; flex-direction: column; gap: 9px; min-width: 190px; flex: 1 1 190px; }
.filters__group > span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-mute); }
.filters select, .filters input[type="search"] {
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-size: 0.94rem;
}
.filters__actions { display: flex; gap: 12px; align-items: center; }
.filters__count { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; color: var(--ink-mute); }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip-row a {
  padding: 8px 15px;
  border: 2px solid var(--cat-color);
  color: var(--cat-text);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
}
.chip-row a[aria-current="true"],
.chip-row a:hover, .chip-row a:focus-visible { background: var(--cat-color); color: var(--cat-on); }

/* =========================================================
   13. CATEGORY GRID
   ========================================================= */

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(250px, 28vw, 330px), 1fr)); gap: clamp(14px, 1.8vw, 22px); }
.cat-card {
  position: relative;
  display: flex; gap: 16px;
  padding: 22px clamp(18px, 2vw, 26px);
  background: var(--paper-lift);
  border: 2px solid var(--ink);
  border-left-width: 9px;
  border-left-color: var(--cat-color);
}
.cat-card span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--ink-mute); padding-top: 4px; }
.cat-card h3 { font-size: var(--step-0); margin-bottom: 6px; }
.cat-card h3 a { text-decoration: none; }
.cat-card h3 a::after { content: ""; position: absolute; inset: 0; }
.cat-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.cat-card__count { display: block; margin-top: 9px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--cat-text); }

/* =========================================================
   14. SINGLE STORY
   ========================================================= */

.reading-bar { position: fixed; inset: 0 auto auto 0; height: 4px; width: 0; background: var(--purple); z-index: 90; transition: width 90ms linear; }

.story-head { padding-block: clamp(38px, 5vw, 76px) clamp(24px, 3vw, 40px); }
.story-head__meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 24px; }
.story-head h1 { font-size: var(--step-3); max-width: 22ch; }
.story-head .lead { margin-top: 22px; }
.story-facts {
  display: flex; flex-wrap: wrap; gap: 12px 34px;
  margin-top: 30px; padding-top: 20px;
  border-top: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute);
}
.story-facts b { color: var(--ink); font-weight: 700; }

.story-figure { margin: 0 0 clamp(30px, 4vw, 52px); }
.story-figure img { width: 100%; }
/* Caption aligns to the reading measure, not the full-bleed image. */
.story-figure figcaption { width: min(100%, 760px); margin-inline: auto; }
.story-figure figcaption,
.museum-caption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.museum-caption dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 10px 0 0; font-family: var(--font-sans); font-size: 0.78rem; }
.museum-caption dt { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.museum-caption dd { margin: 0; }

.prose { font-size: 1.06rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--step-2); margin-top: 1.9em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--purple); text-decoration-thickness: 2px; }
.prose img { margin-block: 1.6em; }

.sources { margin-top: clamp(36px, 5vw, 60px); padding-top: 24px; border-top: 3px solid var(--ink); }
.sources h2 { font-size: var(--step-1); }
.sources ol { padding-left: 1.2em; font-size: 0.94rem; color: var(--ink-soft); }
.sources li + li { margin-top: 8px; }

.audio-block { margin-top: clamp(32px, 4vw, 52px); padding: clamp(22px, 3vw, 32px); background: var(--ink); color: var(--paper); }
.audio-block h2 { font-size: var(--step-1); color: var(--yellow); }
.audio-block audio { width: 100%; margin-block: 18px; }
.audio-block .transcript summary { cursor: pointer; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }
.audio-block .transcript div { margin-top: 16px; font-size: 0.95rem; color: rgba(243,238,226,0.84); max-height: 420px; overflow-y: auto; }

.story-cta {
  margin-top: clamp(38px, 5vw, 60px);
  padding: clamp(26px, 3.4vw, 42px);
  background: var(--yellow);
  color: var(--ink);
}
.story-cta h2 { font-size: var(--step-2); max-width: 22ch; }
.story-cta p { max-width: 58ch; }

.related { border-top: 3px solid var(--ink); }

/* =========================================================
   15. FORMS
   ========================================================= */

.form-shell {
  background: var(--paper-lift);
  border: 3px solid var(--ink);
  padding: clamp(24px, 3.4vw, 40px);
}
.form-shell__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 26px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.form-shell__head span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.form-shell__head strong { font-size: var(--step-1); }

.field { display: block; margin-bottom: 22px; }
.field > span { display: block; margin-bottom: 8px; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.03em; }
.field .hint { display: block; margin-top: 6px; font-weight: 400; font-size: 0.8rem; color: var(--ink-mute); letter-spacing: 0; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid var(--ink);
  background: var(--white);
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 150px; }
.field .req { color: var(--cat-ljudi); }

.consent { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 22px; padding: 18px; border: 2px dashed var(--ink); background: var(--paper); }
.consent input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--purple); }
.consent span { font-size: 0.9rem; line-height: 1.5; }

.form-note { margin: 16px 0 0; font-size: 0.84rem; color: var(--ink-mute); }

.form-message { padding: 18px 20px; margin-bottom: 24px; border-left: 7px solid var(--purple); background: var(--paper-sunk); font-size: 0.95rem; }
.form-message--ok { border-left-color: var(--cat-banja); }
.form-message--error { border-left-color: var(--cat-ljudi); }
.form-errors { margin: 0; padding-left: 1.2em; }

.honeypot { position: absolute !important; left: -9999px; }

.subscribe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.subscribe input[type="email"] { flex: 1 1 240px; padding: 14px 16px; border: 2px solid var(--ink); background: var(--white); }

/* =========================================================
   16. MEMORY SECTION
   ========================================================= */

.memory {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
  padding-block: var(--block);
  border-top: 3px solid var(--ink);
}
@media (max-width: 940px) { .memory { grid-template-columns: 1fr; } }
.memory blockquote { font-size: var(--step-1); }

/* =========================================================
   17. FOOTER
   ========================================================= */

.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(44px, 6vw, 80px) 32px; border-top: 6px solid var(--yellow); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(26px, 3.4vw, 48px); }
.site-footer h2 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--yellow); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 9px; }
.site-footer a { color: rgba(243, 238, 226, 0.82); text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--yellow); }
.site-footer p { color: rgba(243, 238, 226, 0.72); font-size: 0.9rem; }
.site-footer .brand__text small { color: #cbb2f5; }
.site-footer__bar {
  margin-top: clamp(34px, 4vw, 56px);
  padding-top: 22px;
  border-top: 1px solid rgba(243, 238, 226, 0.2);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 26px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(243, 238, 226, 0.6);
}

.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 20px; }
.partners img { max-height: 54px; width: auto; filter: grayscale(1) brightness(2.2); opacity: 0.85; }

/* =========================================================
   18. PAGINATION, SEARCH, 404
   ========================================================= */

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(34px, 4vw, 52px); }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 46px; padding-inline: 12px;
  border: 2px solid var(--ink); text-decoration: none; font-weight: 700;
}
.pagination .current, .pagination a:hover { background: var(--ink); color: var(--paper); }

.page-hero { padding-block: clamp(40px, 5vw, 76px) clamp(22px, 3vw, 36px); border-bottom: 3px solid var(--ink); }
.page-hero h1 { font-size: var(--step-3); }

.empty-state { padding: clamp(34px, 5vw, 60px); border: 3px dashed var(--ink); text-align: center; }
.empty-state h2 { font-size: var(--step-1); }

.search-form { display: flex; gap: 10px; }
.search-form input[type="search"] { flex: 1; padding: 13px 15px; border: 2px solid var(--ink); background: var(--white); }

/* =========================================================
   19. EDITOR / BLOCK SUPPORT
   ========================================================= */

.entry-content > .alignwide { width: min(100%, 1180px); margin-inline: auto; }
.entry-content > .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.wp-block-image figcaption { font-family: var(--font-serif); font-size: 0.9rem; color: var(--ink-soft); }
.wp-block-pullquote { border-block: 3px solid var(--ink); padding-block: 26px; }
.wp-block-separator { border: none; border-top: 3px solid var(--ink); max-width: 100%; }
.wp-block-button__link { border-radius: 0; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

/* Print — museum labels should print cleanly */
@media print {
  .site-header, .site-footer, .story-cta, .memory, .reading-bar, .filters, .pagination { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
}

/* =========================================================
   20. DARK-SURFACE OVERRIDES
   Inheriting the light-ground text colours onto the black
   sections dropped three elements below 4.5:1. Verified with
   axe-core after each change — see docs/pristupacnost.md.
   ========================================================= */

.feature--dark .section-heading p,
.feature--dark .section-heading p:last-child,
.feature--dark .lead {
  color: rgba(243, 238, 226, 0.86); /* 13.6:1 on ink */
}

.subscribe input[type="email"] {
  color: var(--ink);
  background: var(--white);
}
.subscribe input[type="email"]::placeholder {
  color: var(--ink-mute);
  opacity: 1;
}

/* Consent block sitting on a dark section */
.consent--dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(243, 238, 226, 0.45);
}
.consent--dark a {
  color: var(--yellow); /* 13.6:1 on ink */
  text-decoration-thickness: 2px;
}

/* Yellow is a background colour, never a text colour on paper. */
.site-footer a,
.site-footer p { color: rgba(243, 238, 226, 0.86); }
