/* Kolory wzięte z logo i herbu */
:root {
  --graphite: #3f3f3f;
  --graphite-dark: #2e2e2e;
  --green: #7a9a5a;
  --green-dark: #5f7d44;
  --red: #d8302b;
  --gold: #e9b95c;
  --ink: #242424;
  --ink-soft: #555;
  --paper: #f7f5ef;
  --paper-alt: #ecebe2;
  --line: #d9d6ca;
  --radius: 10px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  margin: 0 0 .4rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.placeholder { color: #8a8676; font-style: italic; }

/* Przyciski */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { border-color: var(--green); color: #e8eddf; }
.btn-ghost:hover { background: var(--green); color: #fff; }

/* Nagłówek */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(46, 46, 46, .96);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--green);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand img { width: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #b9c7a8; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: #cfe0bd; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: #e6e6e6; text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--gold); }
.nav a.nav-cta { background: var(--green); color: #fff; padding: .45rem 1rem; border-radius: 999px; }
.nav a.nav-cta:hover { background: var(--green-dark); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: #fff; transition: transform .2s, opacity .2s; }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 75% 40%, rgba(122,154,90,.18), transparent 60%),
    var(--graphite);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 18px;
  border: 3px solid var(--green); pointer-events: none; opacity: .8;
}
.hero-inner {
  width: min(1120px, 100% - 96px);
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 3rem;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(5rem, 10vw, 8rem);
}
.hero .eyebrow { color: #b9c7a8; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 500; color: var(--green); }
.hero h1 span { color: #a9c48b; }
.lead { font-size: 1.2rem; max-width: 34rem; color: #e2e2e2; margin: 0 0 2rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-crest { justify-self: center; }
.hero-crest img { width: min(320px, 70vw); filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }

.hero-stripes { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: 8px; }
.hero-stripes span { flex: 1; }
.hero-stripes span:nth-child(1) { background: var(--red); }
.hero-stripes span:nth-child(2) { background: var(--green); }
.hero-stripes span:nth-child(3) { background: var(--graphite-dark); }

/* Sekcje */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--graphite); color: #eee; }
.section-dark .eyebrow { color: #b9c7a8; }
.section-dark h2 { color: #cfe0bd; }
.section-dark .placeholder { color: #aaa; }

.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }
.prose p:first-child { margin-top: 0; }

/* Karty działań */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.card p { margin: 0; color: var(--ink-soft); }
.card-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Aktualności */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
.news-item { border-top: 4px solid var(--red); background: #fff; padding: 1.5rem; border-radius: 0 0 var(--radius) var(--radius); }
.news-item:nth-child(2) { border-color: var(--green); }
.news-item:nth-child(3) { border-color: var(--gold); }
.news-item { display: flex; flex-direction: column; overflow: hidden; }
.news-item img { width: calc(100% + 3rem); max-width: none; margin: -1.5rem -1.5rem 1.2rem; aspect-ratio: 16 / 9; object-fit: cover; }
.news-item time { font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.news-item h3 { margin-top: .3rem; }
.news-item h3 a { color: inherit; text-decoration: none; }
.news-item h3 a:hover { color: var(--green-dark); }
.news-item p { margin: 0 0 1rem; color: var(--ink-soft); }
.read-more { margin-top: auto; font-weight: 600; text-decoration: none; }
.more-link { display: inline-block; margin-top: 1.8rem; font-weight: 600; text-decoration: none; }
.more-link:hover, .read-more:hover { text-decoration: underline; }
.empty { margin: 1.5rem 0 0; color: var(--ink-soft); font-style: italic; }
.section-dark .empty { color: #bbb; }

/* Podstrony */
.page-head { background: var(--graphite); color: #eee; padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); border-bottom: 6px solid var(--green); }
.page-head .eyebrow a { color: #b9c7a8; text-decoration: none; }
.page-head .eyebrow a:hover { color: var(--gold); }
.page-head h1 { margin: 0; color: #cfe0bd; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; }
.page-sub { margin: .6rem 0 0; color: #bbb; }
.narrow { max-width: 760px; }
.article-img { width: 100%; margin-bottom: 2rem; border-radius: var(--radius); }
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.pager a, .pager span { min-width: 2.5rem; padding: .45rem .8rem; border-radius: 8px; text-align: center; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: #fff; }
.pager span { background: var(--green); border-color: var(--green); color: #fff; }

/* Oś czasu */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--green); }
.timeline li { position: relative; padding: 0 0 1.8rem 1rem; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 9px); top: .35rem;
  width: 15px; height: 15px; border-radius: 50%; background: var(--gold); border: 3px solid var(--graphite);
}
.timeline .year { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--gold); }
.timeline p { margin: .2rem 0 0; }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.gallery a { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--paper-alt); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.04); }

/* Podgląd zdjęcia na pełnym ekranie */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 4rem 1rem; background: rgba(20, 20, 20, .93); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 9rem); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { margin-top: .8rem; color: #ddd; text-align: center; }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover, .lightbox button:focus-visible { background: var(--green); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* Dołącz */
.join { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.join p { margin: 0; max-width: 40rem; color: var(--ink-soft); }

/* Kontakt */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.contact-form { position: relative; display: grid; gap: 1rem; background: #fff; padding: 1.8rem; border-radius: var(--radius); border: 1px solid var(--line); }
.contact-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.contact-form input:not([type=checkbox]), .contact-form textarea {
  font: inherit; font-weight: 400; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.contact-form label.consent { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .88rem; color: var(--ink-soft); }
.consent input { width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--green); }
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--green-dark); }
.form-status.blad { color: var(--red); }
/* Pole-pułapka na boty – niewidoczne dla ludzi */
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Stopka */
.site-footer { background: var(--graphite-dark); color: #cfcfcf; padding: 2rem 0; border-top: 3px solid var(--green); }
.footer-inner { display: flex; align-items: center; gap: 1rem; }
.footer-inner p { margin: 0; flex: 1; }
.footer-inner a { color: #b9c7a8; text-decoration: none; }

/* Animacja pojawiania się */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsywność */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .news { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--graphite-dark); padding: .5rem 16px 1rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid #444; }
  .nav a.nav-cta { margin-top: .8rem; text-align: center; border: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .hero-inner { text-align: center; }
  .hero-crest { order: -1; }
  .hero-crest img { width: min(200px, 55vw); }
  .lead { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero::before { inset: 10px; }
  .hero-inner { width: min(1120px, 100% - 56px); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .join { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.1rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
