/* Fundacja Pro Arte Futura · szkic strony
   Układ: jedna długa strona z pasami na całą szerokość (burgund / papier / kamień), kolumna 1160 px.
   Motyw przewodni: romański łuk z naprzemiennych kamieni (jak w nawie bazyliki w Vézelay).
   Litery: łacińska kapitała (Marcellus) + geometryczny krój w duchu Futury (Jost). */

:root {
  --paper: #FAF8F7;
  --paper-2: #F3EFEE;
  --ink: #1E191B;
  --muted: #675C61;
  --line: #E3DCDA;
  --accent: #6E1B33;
  --accent-hover: #521426;
  --on-accent: #FAF8F7;
  --band: #5C1529;
  --band-deep: #47101F;
  --band-line: #7C3046;
  --on-band: #F7EFEA;
  --on-band-muted: #E3CAD0;
  --stone-1: #EADFCF;
  --stone-2: #DCCDB7;
  --rose: #C07A8C;
  --band-stone: #EFE8DF;
  --footer-bg: #1E191B;
  --footer-ink: #ECE4E1;
  --footer-muted: #ABA0A4;
  --todo-bg: #FBE27A;
  --todo-ink: #352A00;

  --f-display: "Marcellus", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-sans: "Jost", "Futura", "Century Gothic", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --t-xs: .8125rem;
  --t-s: .9375rem;
  --t-base: 1.0625rem;
  --t-l: 1.1875rem;
  --t-h3: 1.4375rem;
  --t-h2: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem);
  --t-h1: clamp(2.5rem, 1.5rem + 4.4vw, 4.6rem);

  --wrap: 1160px;
  --gutter-l: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
  --section-y: clamp(48px, 6vw, 88px);
  --header-h: 72px;
  --radius: 14px;       /* zaokrąglenie ramek zdjęć */
  --radius-sm: 10px;    /* mniejsze kafelki mozaiki na telefonie */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151012;
    --paper-2: #1C1619;
    --ink: #EFE8E5;
    --muted: #B1A4A9;
    --line: #33292D;
    --accent: #E39CB0;
    --accent-hover: #F0BCCB;
    --on-accent: #1A1013;
    --band: #3F0E1C;
    --band-deep: #2E0A14;
    --band-line: #5E2234;
    --on-band: #F7EFEA;
    --on-band-muted: #D9BCC4;
    --stone-1: #E3D7C4;
    --stone-2: #CBBBA3;
    --rose: #B06A7D;
    --band-stone: #1E181A;
    --footer-bg: #0D0A0B;
    --footer-ink: #ECE4E1;
    --footer-muted: #9C9095;
    --todo-bg: #6B5A12;
    --todo-ink: #FFF3C4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151012;
  --paper-2: #1C1619;
  --ink: #EFE8E5;
  --muted: #B1A4A9;
  --line: #33292D;
  --accent: #E39CB0;
  --accent-hover: #F0BCCB;
  --on-accent: #1A1013;
  --band: #3F0E1C;
  --band-deep: #2E0A14;
  --band-line: #5E2234;
  --on-band: #F7EFEA;
  --on-band-muted: #D9BCC4;
  --stone-1: #E3D7C4;
  --stone-2: #CBBBA3;
  --rose: #B06A7D;
  --band-stone: #1E181A;
  --footer-bg: #0D0A0B;
  --footer-ink: #ECE4E1;
  --footer-muted: #9C9095;
  --todo-bg: #6B5A12;
  --todo-ink: #FFF3C4;
  color-scheme: dark;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
address { font-style: normal; }

/* Akapity wyrównane do obu krawędzi (justowanie) z dzieleniem wyrazów, żeby nie robiły się dziury między słowami */
.lead,
.section-lead,
.prose > p,
.burg-copy > p:not(.eyebrow):not(.address),
.area > p,
.themes p,
.project > p:not(.tag):not(.meta),
.partners p,
.support-copy > p:not(.eyebrow),
.footer-legal > p:not(.copyright) {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: calc(var(--wrap) + 80px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.section { padding-block: var(--section-y); }
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.section-tint { background: var(--paper-2); }

/* Łagodne „wzgórza” zamiast prostych krawędzi między kolorami.
   Sekcja z klasą .wave wypuszcza w górę falę we własnym kolorze, która zachodzi na poprzednią sekcję.
   .wave-2 to inny kształt wzgórza, .wave-flip odbija falę w poziomie. */
.section, .quote-band, .site-footer { --self-bg: var(--paper); }
.section-tint { --self-bg: var(--paper-2); }
.band-stone { --self-bg: var(--band-stone); }
.band-wine { --self-bg: var(--band); }
.site-footer { --self-bg: var(--footer-bg); }
.wave { position: relative; --wave-h: clamp(22px, 3.5vw, 48px); }
.wave::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--wave-h) * -1 + 1px);
  height: var(--wave-h);
  background: var(--self-bg);
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V44C200 16 430 2 690 20C930 37 1160 64 1440 30V80Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V44C200 16 430 2 690 20C930 37 1160 64 1440 30V80Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.wave-2::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V58C260 58 420 6 760 8C1040 10 1260 46 1440 52V80Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V58C260 58 420 6 760 8C1040 10 1260 46 1440 52V80Z'/%3E%3C/svg%3E");
}
.wave-flip::before { transform: scaleX(-1); }
/* Dwie sekcje z tym samym jasnym tłem pod rząd: bez podwójnego odstępu */
.section:not(.section-tint):not(.band-wine):not(.band-stone) + .section:not(.section-tint):not(.band-wine):not(.band-stone) { padding-top: 0; }

.eyebrow {
  font-family: var(--f-sans);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
/* Nagłówek i opis sekcji na pełną szerokość treści, równo ze zdjęciami pod spodem */
.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-lead { font-size: var(--t-l); color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 14px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--f-sans);
  font-size: var(--t-s);
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-small { min-height: 40px; padding: 0 18px; }
.btn-light { background: var(--on-band); border-color: var(--on-band); color: var(--band); }
.btn-light:hover { background: transparent; color: var(--on-band); border-color: var(--on-band); }
.btn-ghost { background: transparent; border-color: var(--on-band-muted); color: var(--on-band); }
.btn-ghost:hover { background: var(--on-band); border-color: var(--on-band); color: var(--band); }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.m-j, .m-a { fill: var(--accent); }
.m-b { fill: var(--rose); }
.brand-kicker {
  display: block;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}
.brand-name { display: block; margin-top: 5px; line-height: 1.05; white-space: nowrap; }
.pa { font-family: var(--f-display); letter-spacing: .08em; text-transform: uppercase; }
.fu { font-family: var(--f-sans); font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.brand-name .pa { font-size: 1.25rem; }
.brand-name .fu { font-size: 1rem; }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  padding-block: 6px;
  border-bottom: 1.5px solid transparent;
  color: var(--ink);
  font-size: var(--t-s);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); border-color: var(--accent); }

/* Przełącznik języków: PL · FR · EN */
.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang-switch a {
  padding: 6px 7px;
  border-bottom: 1.5px solid transparent;
  color: var(--muted);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }

/* ---------- Pas burgundowy (hero, wsparcie) ---------- */
.band-wine { background: var(--band); color: var(--on-band); }
.band-wine .eyebrow { color: var(--on-band-muted); }
.band-wine a:not(.btn) { color: var(--on-band); }
.band-wine :focus-visible { outline-color: var(--on-band); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 104px);
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: var(--t-h1); letter-spacing: -.005em; }
.lead { font-size: var(--t-l); color: var(--on-band-muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

.hero-figure { margin: 0; min-width: 0; }
.portal { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; }
.portal .opening { fill: url(#glow); }
.glow-top { stop-color: var(--on-band); }
.glow-bottom { stop-color: var(--stone-1); }
.portal .jamb { fill: var(--stone-2); }
.portal .impost { fill: var(--stone-1); }
.portal .v { stroke: var(--band); stroke-width: 3; stroke-linejoin: round; }
.portal .v-a { fill: var(--stone-1); }
.portal .v-b { fill: var(--rose); }
.portal text { fill: var(--band); }
.t-pa { font-family: var(--f-display); font-size: 34px; letter-spacing: .1em; }
.t-fu { font-family: var(--f-sans); font-size: 25px; font-weight: 500; letter-spacing: .38em; }
.t-year { font-family: var(--f-display); font-size: 20px; letter-spacing: .3em; }
.t-rule { stroke: var(--band); stroke-width: 1.5; }
.hero-figure figcaption { margin-top: 14px; text-align: center; font-size: var(--t-s); color: var(--on-band-muted); }

@media (prefers-reduced-motion: no-preference) {
  .portal .v {
    transform-box: fill-box;
    transform-origin: center;
    animation: settle .8s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i) * 60ms + 120ms);
  }
  @keyframes settle { from { opacity: .15; transform: translateY(-18px); } }
}

/* ---------- O fundacji ---------- */
/* Dwie równe kolumny: po lewej tytuł i zdjęcie, po prawej tekst.
   Zdjęcie rozciąga się tak, żeby obie kolumny kończyły się na tej samej wysokości. */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 6vw, 88px);
  align-items: stretch;
}
.about-head { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.about-photo { flex: 1 1 auto; display: flex; flex-direction: column; margin: 18px 0 0; min-height: 0; }
.about-photo img {
  display: block;
  flex: 1 1 0;
  min-height: 240px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--stone-2);
}
.about-photo figcaption { margin-top: 10px; font-size: var(--t-xs); letter-spacing: .06em; color: var(--muted); }
.prose { display: grid; align-content: start; gap: 1em; min-width: 0; }
.prose > p { font-size: var(--t-l); }
.prose > p:first-child { font-size: clamp(1.1875rem, 1rem + .5vw, 1.375rem); line-height: 1.6; }

/* ---------- Obszary działania ---------- */
.areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: 12px;
}
.area { display: grid; align-content: start; gap: 10px; padding-block: 28px 32px; border-top: 1px solid var(--line); min-width: 0; }
.area h3 { color: var(--accent); }
.area ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 7px; }
.area li { position: relative; padding-left: 18px; font-size: var(--t-s); line-height: 1.5; color: var(--muted); }
.area li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 6px;
  height: 6px;
  background: var(--rose);
  transform: rotate(45deg);
}

/* ---------- Burgundia ---------- */
.band-stone { background: var(--band-stone); }
.burg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.burg-copy { display: grid; gap: 16px; }
.address { font-size: var(--t-s); color: var(--muted); margin-top: 8px; }
.address .label {
  display: block;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}
/* Zdjęcie zamku w kadrze zwieńczonym łukiem, jak okno w romańskim murze */
.castle-photo { margin: 0; min-width: 0; }
.castle-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 50% 50% var(--radius) var(--radius) / 40% 40% var(--radius) var(--radius);
  background: var(--stone-2);
}

/* Panorama z drona na górze sekcji o zamku */
.panorama {
  position: relative;
  margin: 0 0 clamp(48px, 6vw, 72px);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--stone-2);
}
.panorama img {
  display: block;
  width: 100%;
  height: clamp(240px, 40vw, 560px);
  object-fit: cover;
  object-position: 50% 55%;
}
.panorama figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 64px clamp(20px, 3vw, 32px) 20px;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0), rgb(0 0 0 / .5));
  color: var(--on-band);
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  letter-spacing: .04em;
}

.themes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 72px);
}
.themes article { display: grid; align-content: start; gap: 10px; min-width: 0; }
.themes img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--stone-2);
}
.themes h3 { font-size: 1.3125rem; }
.themes p { color: var(--muted); }
.credit { margin-top: 32px; font-size: var(--t-xs); letter-spacing: .06em; color: var(--muted); }

/* ---------- Okolica: mozaika zdjęć ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 18vw, 240px);
  gap: 8px;
}
.mosaic figure { margin: 0; min-width: 0; overflow: hidden; border-radius: var(--radius); background: var(--stone-2); }
.mosaic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mosaic figure:hover img { transform: scale(1.03); }
.mosaic .m-big { grid-column: span 2; grid-row: span 2; }

/* ---------- Bazylika w Vézelay: duże zdjęcie nawy i dwa mniejsze obok ---------- */
.basilica {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, clamp(180px, 19vw, 270px));
  gap: 8px;
}
.basilica figure { position: relative; margin: 0; min-width: 0; overflow: hidden; border-radius: var(--radius); background: var(--stone-2); }
.basilica .b-main { grid-row: span 2; }
.basilica img { display: block; width: 100%; height: 100%; object-fit: cover; }
.basilica figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 16px 12px;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0), rgb(0 0 0 / .5));
  color: var(--on-band);
  font-size: var(--t-s);
  letter-spacing: .04em;
}
.credit a { color: inherit; }

/* ---------- Ornament z wycinanki i cytat z Norwida ---------- */
.wycinanka { display: block; width: 200px; max-width: 100%; height: 40px; fill: var(--rose); }
.wycinanka-sm { width: 120px; height: 24px; margin-bottom: 6px; }

/* Pasy z cytatami: przejścia między sekcjami. Jasne (domyślnie) albo burgundowe (Norwid). */
.quote-band {
  display: grid;
  gap: clamp(18px, 2.5vw, 28px);
  padding-block: clamp(32px, 4vw, 56px);
  background: var(--paper);
}
.quote-band.band-wine { background: var(--band); padding-block: clamp(44px, 5.5vw, 76px); }
.quote-wrap { display: grid; justify-items: center; gap: 16px; text-align: center; }

/* Ornament z wycinanki na całą szerokość ekranu: rozeta pośrodku, gałązka powtarzana w obie strony */
.orn-line { display: flex; align-items: center; width: 100%; height: 40px; color: var(--rose); }
.band-wine .orn-line { color: var(--on-band-muted); }
.orn-center { flex: none; width: 40px; height: 40px; margin-inline: 4px; fill: currentColor; }
.orn-fill {
  flex: 1;
  height: 40px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 40'%3E%3Crect y='19.3' width='34' height='1.4'/%3E%3Cellipse cx='14' cy='15.4' rx='4.8' ry='2.2' transform='rotate(28 14 15.4)'/%3E%3Cellipse cx='14' cy='24.6' rx='4.8' ry='2.2' transform='rotate(-28 14 24.6)'/%3E%3Ccircle cx='29' cy='20' r='1.6'/%3E%3C/svg%3E") repeat-x right center / 34px 40px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 40'%3E%3Crect y='19.3' width='34' height='1.4'/%3E%3Cellipse cx='14' cy='15.4' rx='4.8' ry='2.2' transform='rotate(28 14 15.4)'/%3E%3Cellipse cx='14' cy='24.6' rx='4.8' ry='2.2' transform='rotate(-28 14 24.6)'/%3E%3Ccircle cx='29' cy='20' r='1.6'/%3E%3C/svg%3E") repeat-x right center / 34px 40px;
}
.orn-fill-r { transform: scaleX(-1); }
.quote { width: 100%; max-width: 900px; margin: 0; }
.quote p {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
}
.quote-band:not(.band-wine) .quote p { color: var(--accent); }
.quote-tr { max-width: 40em; color: var(--muted); font-style: italic; }
.quote-tr:empty { display: none; }
.quote-src { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.band-wine .quote-tr, .band-wine .quote-src { color: var(--on-band-muted); }

/* ---------- Strona polityki prywatności ---------- */
.legal { max-width: calc(820px + 80px); }
.legal h1 { font-size: var(--t-h2); margin: 12px 0 20px; }
.legal-lead { font-size: var(--t-l); color: var(--muted); margin-bottom: 8px; }
.legal h2 { font-size: 1.5rem; color: var(--accent); margin: 40px 0 12px; }
.legal h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.legal p { margin: 0 0 12px; text-align: justify; hyphens: auto; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal li::marker { color: var(--rose); }
.legal-page { padding-bottom: calc(var(--section-y) + 24px); }

/* ---------- Projekty ---------- */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.project {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.project .tag { font-size: var(--t-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.project > p:not(.tag):not(.meta) { color: var(--muted); }
.project .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Współpraca ---------- */
.partners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.partners article { display: grid; align-content: start; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.partners h3 { font-size: 1.3125rem; }
.partners p { color: var(--muted); }
.after-grid { margin-top: 40px; }

/* ---------- Wsparcie ---------- */
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.support-copy { display: grid; gap: 20px; }
/* Dopóki nie ma numeru konta (wersja publiczna bez ramki z przelewem), tekst zajmuje całą szerokość */
.support-grid:not(:has(.transfer)) { grid-template-columns: minmax(0, 1fr); }
.transfer { background: var(--band-deep); border: 1px solid var(--band-line); padding: clamp(24px, 3vw, 36px); min-width: 0; }
.transfer h3 { margin-bottom: 12px; }
.transfer dl { margin: 0; display: grid; }
.transfer dl > div { display: grid; gap: 4px; padding-block: 14px; border-top: 1px solid var(--band-line); }
.transfer dt { font-size: var(--t-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-band-muted); }
.transfer dd { margin: 0; overflow-wrap: anywhere; }
.num { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.with-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.copy {
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--f-sans);
  font-size: var(--t-xs);
  font-weight: 500;
  cursor: pointer;
  opacity: .85;
}
.copy:hover { opacity: 1; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
.contact-grid > div { display: grid; align-content: start; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.contact-grid h3 { font-size: 1.3125rem; }
.contact-grid address { color: var(--muted); }
.big { font-size: var(--t-l); overflow-wrap: anywhere; }
.contact-main .copy { color: var(--accent); }
.social { display: flex; gap: 20px; font-weight: 500; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding-block: 56px 40px; }
.site-footer a { color: var(--footer-ink); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 40px; }
.footer-brand { display: grid; gap: 10px; align-content: start; }
.footer-name .pa { font-size: 1.375rem; }
.footer-name .fu { font-size: 1.125rem; color: var(--rose); }
.footer-brand > p:not(.footer-name) { color: var(--footer-muted); }
.footer-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--t-s); }
.footer-legal { display: grid; gap: 10px; font-size: var(--t-xs); line-height: 1.6; color: var(--footer-muted); }
.copyright { margin-top: 8px; letter-spacing: .08em; }

/* ---------- Miejsca do uzupełnienia (tylko w szkicu) ---------- */
.show-todo .todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  box-shadow: 0 0 0 3px var(--todo-bg);
  border-radius: 2px;
}
.show-todo .todo-block { position: relative; outline: 2px dashed var(--todo-bg); outline-offset: 10px; }
.show-todo .todo-block::before {
  content: attr(data-todo);
  position: absolute;
  z-index: 2;
  left: -10px;
  top: -10px;
  transform: translateY(-50%);
  padding: 3px 10px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 1.5;
}
.draft-toggle {
  position: fixed;
  z-index: 50;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 500 var(--t-xs)/1.3 var(--f-sans);
  box-shadow: 0 6px 24px rgb(0 0 0 / .16);
  cursor: pointer;
}
.draft-toggle .dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--todo-bg); box-shadow: 0 0 0 1px var(--todo-ink); }
.draft-toggle .short { display: none; }

/* ---------- Szerokości ---------- */
/* Węższe ekrany: logo i „Wesprzyj” w pierwszym rzędzie, menu (przewijane) i języki w drugim */
@media (max-width: 1180px) {
  :root { --header-h: 112px; }
  .header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand cta" "nav lang";
    align-items: center;
    gap: 0 16px;
    padding-top: 12px;
  }
  .brand { grid-area: brand; justify-self: start; margin-right: 0; }
  .header-cta { grid-area: cta; }
  .main-nav {
    grid-area: nav;
    min-width: 0;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 6px 8px;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .lang-switch { grid-area: lang; }
}
@media (max-width: 1080px) {
  .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .areas, .projects, .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-main { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-grid, .about-grid, .burg-grid, .support-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .portal { max-width: 300px; }
  .castle-photo { max-width: 560px; }
  .about-photo img { flex: none; height: auto; min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  .areas, .projects, .partners, .contact-grid, .themes { grid-template-columns: minmax(0, 1fr); }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 140px; gap: 6px; }
  .mosaic figure { border-radius: var(--radius-sm); }
  .basilica { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 220px 150px; gap: 6px; }
  .basilica .b-main { grid-column: 1 / -1; grid-row: auto; }
  .basilica figure { border-radius: var(--radius-sm); }
  .basilica figcaption { padding: 28px 10px 8px; font-size: var(--t-xs); }
  .brand-name .pa { font-size: 1.0625rem; }
  .brand-name .fu { font-size: .875rem; }
  .draft-toggle .full { display: none; }
  .draft-toggle .short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
