/* ─────────────────────────────────────────────────────────────
   NIE DLA CHLEWNI — Glina, gm. Wola Krzysztoporska
   Kierunek: papier urzędowy + plakat protestacyjny.
   Paleta wyprowadzona z nazwy wsi (glina) i z logo inicjatywy.
   ───────────────────────────────────────────────────────────── */

:root {
  /* kolor */
  --paper:      #F7F3EC;
  --paper-2:    #EFE8DC;
  --paper-3:    #E4DACA;
  --ink:        #1A1714;
  --ink-2:      #453E36;
  --ink-3:      #6E655A;
  --clay:       #A85B36;
  --clay-dark:  #7C3F23;
  --red:        #D62828;
  --red-dark:   #8A1416;
  --green:      #3D5A3A;
  --line:       #D2C6B2;

  /* typografia */
  --font-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui: 'Archivo', system-ui, -apple-system, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 2.6vw, 2rem);
  --text-2xl: clamp(2rem, 4.5vw, 3rem);
  --text-hero: clamp(2.75rem, 9vw, 6.5rem);

  /* przestrzeń */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s6: 1.5rem;  --s8: 2rem;    --s12: 3rem;   --s16: 4rem;
  --s24: 6rem;   --s32: 8rem;

  --wrap: 1180px;
  --measure: 68ch;
  --radius: 2px;
}

* { 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(--font-body);
  font-size: var(--text-base);
  line-height: 1.62;
  font-variant-numeric: tabular-nums lining-nums;
}

img { max-width: 100%; display: block; }

a { color: var(--clay-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s6); }
.measure { max-width: var(--measure); }

section { padding: clamp(var(--s16), 7vw, var(--s32)) 0; }
section + section { border-top: 1px solid var(--line); }

/* ── eyebrow / etykieta sekcji ───────────────────────────── */
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 var(--s3);
  display: flex; align-items: center; gap: var(--s3);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--clay); flex: none;
}

.section-title { font-size: var(--text-xl); margin-bottom: var(--s4); }
.lead { font-size: var(--text-lg); line-height: 1.5; color: var(--ink-2); }

/* ── PASEK ALARMOWY ──────────────────────────────────────── */
.alert-bar {
  background: var(--red-dark);
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--s2) 0;
}
.alert-bar .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); align-items: baseline; }
.alert-bar strong { font-weight: 800; }
.alert-bar a { color: #fff; }

/* ── NAWIGACJA ───────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6); padding: var(--s3) var(--s6);
  max-width: var(--wrap); margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.nav-logo img { height: 34px; width: auto; }
.nav-links {
  display: flex; gap: var(--s6); list-style: none; margin: 0; padding: 0;
  font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 600;
}
.nav-links a { color: var(--ink-2); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--red); border-bottom-color: var(--red); }
.nav-toggle { display: none; }

/* ── HERO ────────────────────────────────────────────────── */
.hero { padding: clamp(var(--s16), 8vw, var(--s24)) 0 clamp(var(--s12), 6vw, var(--s24)); border-top: 0; }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(var(--s8), 5vw, var(--s16)); align-items: center;
}
.hero h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero h1 .line-red { color: var(--red); display: block; }
.hero h1 .line-ink { display: block; }
.hero-sub {
  margin-top: var(--s6); font-size: var(--text-lg); line-height: 1.5;
  max-width: 52ch; color: var(--ink-2);
}
.hero-mark img { width: min(100%, 340px); height: auto; display: block; margin-inline: auto; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s8); }
.btn {
  font-family: var(--font-ui); font-weight: 700; font-size: var(--text-sm);
  padding: 0.8em 1.5em; border-radius: var(--radius); text-decoration: none;
  border: 2px solid var(--ink); display: inline-flex; align-items: center; gap: 0.5em;
  transition: transform 0.12s ease, background 0.16s ease, color 0.16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ── LICZNIK / STAT ──────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: var(--s12);
}
.stat { background: var(--paper); padding: var(--s6); }
.stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1;
  letter-spacing: -0.03em; color: var(--red);
}
.stat-lab {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3);
  margin-top: var(--s2);
}

/* ── DWIE KOLUMNY: wiemy / nie wiemy ─────────────────────── */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s6), 4vw, var(--s12)); }
.card {
  background: #fff; border: 1px solid var(--line);
  padding: clamp(var(--s6), 3vw, var(--s8));
}
.card h3 { font-size: var(--text-lg); margin-bottom: var(--s4); }
.card ul { margin: 0; padding-left: 1.2em; }
.card li { margin-bottom: var(--s3); }
.card li::marker { color: var(--clay); }
.card--warn { border-left: 4px solid var(--red); }
.card--ok { border-left: 4px solid var(--green); }

/* ── CYTAT / § ───────────────────────────────────────────── */
blockquote.law {
  margin: var(--s8) 0; padding: var(--s6) var(--s8);
  background: var(--paper-2); border-left: 4px solid var(--ink);
  font-size: var(--text-base);
}
blockquote.law p { margin: 0 0 var(--s3); }
blockquote.law p:last-child { margin-bottom: 0; }
blockquote.law cite {
  display: block; margin-top: var(--s4); font-style: normal;
  font-family: var(--font-ui); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3);
}

/* ── PISMA ───────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.doc {
  background: #fff; border: 1px solid var(--line);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s3);
}
.doc--hi { border: 2px solid var(--red); }
.doc-tag {
  font-family: var(--font-ui); font-size: 0.6875rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay);
}
.doc h3 { font-size: 1.0625rem; line-height: 1.25; }
.doc p { margin: 0; font-size: var(--text-sm); color: var(--ink-2); flex: 1; }
.doc-meta {
  font-family: var(--font-ui); font-size: var(--text-xs); color: var(--ink-3);
  padding-top: var(--s3); border-top: 1px solid var(--line);
}
.doc-dl { display: flex; gap: var(--s2); margin-top: var(--s2); }
.dl {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.04em; text-decoration: none; padding: 0.5em 0.9em;
  border: 1.5px solid var(--ink); color: var(--ink); border-radius: var(--radius);
}
.dl:hover { background: var(--ink); color: var(--paper); }
.dl--pdf { border-color: var(--red); color: var(--red); }
.dl--mini { padding: 0.15rem 0.45rem; font-size: 0.6875rem; }
.cell-note { display: block; margin-top: 0.4rem; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 400; color: var(--ink-3); line-height: 1.5; }
.cell-note a:not(.dl) { color: var(--clay-dark); }
.dl--pdf:hover { background: var(--red); color: #fff; }

/* ── KROKI ───────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: var(--s6); margin-top: var(--s8); }
.step { display: grid; grid-template-columns: 52px 1fr; gap: var(--s4); align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--paper); background: var(--ink); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%;
}
.step h4 { font-size: var(--text-base); margin-bottom: var(--s1); font-family: var(--font-ui); }
.step p { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }

/* ── TABELA ──────────────────────────────────────────────── */
.tbl-scroll { overflow-x: auto; margin-top: var(--s6); }
table.cmp { border-collapse: collapse; width: 100%; font-size: var(--text-sm); min-width: 620px; }
table.cmp th, table.cmp td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp th { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); border-bottom: 2px solid var(--ink); }
table.cmp tr:last-child td { border-bottom: 0; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--red); font-weight: 700; }

/* ── KONTAKT ─────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s6); }
.contact dl { margin: 0; font-size: var(--text-sm); }
.contact dt { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-top: var(--s4); }
.contact dd { margin: var(--s1) 0 0; }

/* ── BANER CTA ───────────────────────────────────────────── */
.band {
  background: var(--ink); color: var(--paper); border-top: 0;
}
.band h2 { font-size: var(--text-2xl); text-transform: uppercase; letter-spacing: -0.03em; }
.band p { color: var(--paper-3); max-width: 56ch; }
.band .btn-ghost { color: var(--paper); border-color: var(--paper); }
.band .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ── STOPKA ──────────────────────────────────────────────── */
footer {
  background: var(--paper-2); border-top: 1px solid var(--line);
  padding: var(--s12) 0 var(--s8); font-size: var(--text-sm);
}
footer .foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s8); }
footer h4 { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: var(--s3); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: var(--s2); }
footer img { height: 40px; width: auto; margin-bottom: var(--s4); }
.foot-note { margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--ink-3); }

/* ── źródła ──────────────────────────────────────────────── */
.sources { font-size: var(--text-xs); color: var(--ink-3); }
.sources li { margin-bottom: var(--s2); }

/* ── responsywność ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { order: 2; }
  .hero-mark img { width: min(62%, 210px); }
  .cols-2 { grid-template-columns: 1fr; }
  footer .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: var(--s2) var(--s6) var(--s6);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: var(--s4) 0; border: 0; }
  .nav-toggle {
    display: grid; place-items: center; width: 40px; height: 40px;
    background: transparent; border: 1.5px solid var(--ink); border-radius: var(--radius);
    cursor: pointer; font-size: 1.1rem;
  }
  .hero h1 { letter-spacing: -0.03em; }
}

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

@media print {
  .nav, .alert-bar, .cta-row, .band { display: none; }
  body { background: #fff; }
}

/* stopka — źródła czytane jako tekst, nie jako ściana czerwonych linków */
.foot-note a { color: var(--ink-2); text-decoration-color: var(--line); }
.foot-note a:hover { color: var(--red); text-decoration-color: currentColor; }

/* tabela porównawcza — na telefonie rozkłada się na karty */
@media (max-width: 720px) {
  .tbl-scroll { overflow: visible; }
  table.cmp { min-width: 0; border-collapse: separate; border-spacing: 0; }
  table.cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cmp tr {
    display: block; background: var(--paper);
    border: 1px solid var(--line); border-left: 3px solid var(--clay);
    padding: var(--s4); margin-bottom: var(--s4);
  }
  table.cmp td { display: block; border: 0; padding: 0 0 var(--s3); }
  table.cmp td:last-child { padding-bottom: 0; }
  table.cmp td::before {
    content: attr(data-label);
    display: block; margin-bottom: 2px;
    font-family: var(--font-ui); font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3);
  }
  table.cmp td:first-child::before { display: none; }
  table.cmp td:first-child { font-size: var(--text-base); }
}

/* objaśnienie skrótów i przypis pod liczbami */
abbr[title] {
  text-decoration: underline dotted var(--clay);
  text-underline-offset: 3px;
  cursor: help;
}
.stats-note {
  max-width: 62ch;
  margin: var(--s5) 0 0;
  padding-left: var(--s4);
  border-left: 3px solid var(--clay);
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--ink-2);
}
@media (max-width: 720px) {
  .stats-note { font-size: var(--text-sm); }
}
