/* =========================================================
   SUROWCE PRZEMYSŁOWE — Industrial Editorial
   Paper-cream / ink editorial portal
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Paper-like surfaces */
  --bg:           #F2EEE2;
  --bg-paper:     #F8F4E9;
  --bg-elev:      #EAE3CF;
  --bg-deep:      #DCD3B8;
  --bg-dark:      #1B1A16;

  /* Ink */
  --ink:          #14130F;
  --ink-2:        #3A352B;
  --ink-muted:    #6B6557;
  --ink-faint:    #9E9786;

  /* Rules */
  --rule:         #C9BFA4;
  --rule-soft:    #DDD4BB;
  --rule-strong:  #14130F;

  /* Accents (industrial-chemistry derived) */
  --rust:         #B5391A;       /* tlenek miedzi / rdza */
  --rust-deep:    #7B2511;
  --rust-light:   #E8866C;
  --moss:         #2C5546;       /* patyna */
  --sulfur:       #D4A933;       /* siarka */
  --indigo:       #1F3A6B;       /* siarczan miedzi */

  /* Type */
  --display: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans:    "Instrument Sans", -apple-system, system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Spacing scale */
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(64px, 9vw, 140px);

  /* Layout */
  --maxw: 1440px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02", "kern";
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.075 0 0 0 0 0.06 0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.4'/></svg>");
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Selection */
::selection { background: var(--ink); color: var(--bg-paper); }

/* ---------- Utility ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust);
  display: inline-block;
}

.smallcaps {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--bg-dark);
  color: var(--bg-paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}
.topbar a { color: var(--bg-paper); opacity: .75; transition: opacity .2s; }
.topbar a:hover { opacity: 1; }
.topbar .ticker {
  display: flex;
  gap: 32px;
  overflow: hidden;
  white-space: nowrap;
}
.topbar .ticker span { opacity: .55; }
.topbar .ticker span b { color: var(--sulfur); font-weight: 500; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(120%) blur(8px);
}
.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}
.logo .mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -.01em;
}
.logo .mark::first-letter { color: var(--rust); }
.logo .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-left: 1px solid var(--rule);
  padding-left: 12px;
  line-height: 1.2;
}
.logo .meta b { color: var(--ink); font-weight: 500; display: block; }

.nav {
  display: flex;
  justify-content: center;
  gap: 36px;
  font-size: 14.5px;
}
.nav a {
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  transition: color .2s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--bg-paper); border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* Hamburger — domyślnie ukryty (desktop ma .nav), pokazywany w media query ≤1100px */
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.6px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
/* Animacja w "X" po otwarciu */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* Rozwijane menu mobilne — domyślnie ukryte na każdym widoku */
.mobile-menu { display: none; }
.mobile-menu .container { display: flex; flex-direction: column; }
.mobile-menu a {
  font-size: 16px;
  color: var(--ink-2);
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: color .2s var(--ease);
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu .mm-util {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.btn-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all .2s var(--ease);
  background: transparent;
  color: var(--ink);
}
.btn-pill:hover { background: var(--ink); color: var(--bg-paper); }
.btn-pill.solid { background: var(--ink); color: var(--bg-paper); }
.btn-pill.solid:hover { background: var(--rust); border-color: var(--rust); }

/* ---------- Hero (index) ---------- */
.hero {
  padding: clamp(60px, 8vw, 110px) 0 var(--section);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: end;
}
.hero-eyebrow {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.hero-eyebrow .pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--bg-paper);
}
.hero-eyebrow .pill.rust { border-color: var(--rust); color: var(--rust); }
.hero-title {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 124px);
  line-height: .94;
  letter-spacing: -.02em;
  margin: 0 0 28px;
  color: var(--ink);
  font-weight: 400;
}
.hero-title em {
  font-style: italic;
  color: var(--rust);
}
.hero-lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 38ch;
  margin: 0 0 36px;
}
.hero-meta {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.hero-meta b { color: var(--ink); font-weight: 500; }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding: 16px 26px 16px 30px;
  background: var(--ink);
  color: var(--bg-paper);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: all .3s var(--ease);
}
.hero-cta:hover { background: var(--rust); padding-right: 32px; }
.hero-cta .arrow {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-paper);
  color: var(--ink);
  display: grid; place-items: center;
  font-size: 12px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-elev);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.hero-visual .label {
  position: absolute;
  top: 18px; left: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg-paper);
  padding: 5px 10px;
  border: 1px solid var(--rule);
  z-index: 3;
}
.hero-visual .credit {
  position: absolute;
  bottom: 18px; right: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-faint);
  z-index: 3;
}
.hero-visual .corner-mark {
  position: absolute;
  bottom: 18px; left: 18px;
  font-family: var(--display);
  font-style: italic;
  font-size: 84px;
  line-height: 1;
  color: var(--ink);
  opacity: .85;
  z-index: 3;
}

/* Placeholder patterns — generative visuals */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
}
.ph::after {
  content: "[ ILUSTRACJA ]";
  position: absolute;
  bottom: 8px; right: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--ink-faint);
  pointer-events: none;
  opacity: .55;
}

/* Pattern: chemical / hex grid */
.ph-hex {
  background-color: var(--bg-elev);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 15px, var(--bg-elev) 16px),
    repeating-conic-gradient(from 0deg at 50% 50%, var(--rule) 0deg 60deg, transparent 60deg 120deg);
  background-size: 60px 60px;
}
/* Pattern: granular (ścierniwa) */
.ph-grain {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 20%, var(--ink-2) 1.5px, transparent 2px),
    radial-gradient(circle at 75% 30%, var(--ink-muted) 2px, transparent 2.5px),
    radial-gradient(circle at 40% 70%, var(--ink-2) 1px, transparent 1.5px),
    radial-gradient(circle at 85% 80%, var(--ink-faint) 2.5px, transparent 3px),
    radial-gradient(circle at 25% 90%, var(--ink-2) 1.2px, transparent 1.7px),
    radial-gradient(circle at 60% 15%, var(--ink-faint) 1px, transparent 1.5px),
    radial-gradient(circle at 90% 50%, var(--ink-2) 1.8px, transparent 2.3px),
    radial-gradient(circle at 10% 55%, var(--ink-muted) 1.4px, transparent 1.9px),
    radial-gradient(circle at 50% 50%, var(--ink-2) 2.2px, transparent 2.7px),
    radial-gradient(circle at 30% 40%, var(--ink-faint) 1.6px, transparent 2.1px);
  background-size: 200px 200px;
}
/* Pattern: ripples (water) */
.ph-ripple {
  background-color: var(--bg-elev);
  background-image:
    repeating-radial-gradient(circle at 30% 40%, transparent 0 14px, var(--rule) 14px 15px),
    repeating-radial-gradient(circle at 75% 65%, transparent 0 10px, var(--rule-soft) 10px 11px);
}
/* Pattern: ice crystals (de-icing) */
.ph-ice {
  background-color: var(--bg-paper);
  background-image:
    linear-gradient(60deg, transparent 49%, var(--rule) 49%, var(--rule) 51%, transparent 51%),
    linear-gradient(-60deg, transparent 49%, var(--rule) 49%, var(--rule) 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, var(--rule) 49%, var(--rule) 51%, transparent 51%);
  background-size: 50px 86px;
}
/* Pattern: polymer waves (tworzywa) */
.ph-poly {
  background-color: var(--bg-elev);
  background-image:
    repeating-linear-gradient(45deg, transparent 0 18px, var(--rule-soft) 18px 19px),
    radial-gradient(ellipse at 50% 50%, var(--bg-paper) 0%, transparent 70%);
}
/* Pattern: bubbles (winiarstwo) */
.ph-bubble {
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(circle at 25% 30%, var(--rule) 8px, transparent 9px),
    radial-gradient(circle at 70% 60%, var(--rule) 12px, transparent 13px),
    radial-gradient(circle at 45% 80%, var(--rule-soft) 6px, transparent 7px),
    radial-gradient(circle at 80% 25%, var(--rule-soft) 4px, transparent 5px),
    radial-gradient(circle at 15% 75%, var(--rule) 10px, transparent 11px);
  background-size: 180px 180px;
}
/* Pattern: pellet/grain cylinders */
.ph-pellet {
  background-color: var(--bg-elev);
  background-image:
    repeating-linear-gradient(90deg, var(--bg-deep) 0 16px, var(--bg-elev) 16px 22px, var(--bg-paper) 22px 26px, var(--bg-elev) 26px 36px);
}
/* Pattern: cover hero — molecular */
.ph-cover {
  background-color: var(--bg-elev);
  background-image:
    linear-gradient(135deg, var(--rust) 0%, transparent 35%),
    radial-gradient(circle at 70% 30%, var(--moss) 0 80px, transparent 80px),
    radial-gradient(circle at 30% 70%, var(--sulfur) 0 60px, transparent 60px),
    repeating-linear-gradient(0deg, transparent 0 38px, var(--rule-soft) 38px 39px),
    repeating-linear-gradient(90deg, transparent 0 38px, var(--rule-soft) 38px 39px);
  background-blend-mode: multiply, multiply, multiply, normal, normal;
}

/* ---------- Section header ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 48px;
}
.section-head .index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 400;
}
.section-head h2 em { font-style: italic; color: var(--rust); }
.section-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
}

/* ---------- Category cards — periodic table style ---------- */
.cat-section { padding: 0 0 var(--section); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--rule);
  padding: 24px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all .35s var(--ease);
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .45s var(--ease);
  z-index: 0;
}
.cat-card > * { position: relative; z-index: 1; }
.cat-card:hover { color: var(--bg-paper); border-color: var(--ink); }
.cat-card:hover::before { transform: translateY(0); }
.cat-card:hover .cat-symbol { color: var(--rust-light); }
.cat-card:hover .cat-meta { color: var(--bg-deep); }

.cat-card .cat-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
}
.cat-card .cat-symbol {
  font-family: var(--display);
  font-size: clamp(56px, 6vw, 88px);
  line-height: .85;
  letter-spacing: -.02em;
  color: var(--ink);
  font-style: italic;
  transition: color .3s var(--ease);
  margin: 8px 0;
  overflow-wrap: break-word;   /* zabezpieczenie: długie słowo zawinie, nie zostanie obcięte */
  hyphens: auto;
}
.cat-card .cat-name {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -.01em;
}
.cat-card .cat-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* card width spans */
.cat-card:nth-child(1) { grid-column: span 4; }   /* Ścierniwa */
.cat-card:nth-child(2) { grid-column: span 4; }   /* Chemia */
.cat-card:nth-child(3) { grid-column: span 4; }   /* Odśnieżanie */
.cat-card:nth-child(4) { grid-column: span 3; }   /* Tworzywa */
.cat-card:nth-child(5) { grid-column: span 3; }   /* Winiarstwo */
.cat-card:nth-child(6) { grid-column: span 3; }   /* Pellet */
.cat-card:nth-child(7) { grid-column: span 3; }   /* Uzdatnianie */

.cat-card .cat-mini-ph {
  position: absolute;
  inset: 0;
  opacity: .25;
  transition: opacity .35s var(--ease);
  z-index: 0;
}
.cat-card:hover .cat-mini-ph { opacity: .08; }

/* ---------- Featured publications ---------- */
.featured { padding: 0 0 var(--section); }
.featured-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
.feat-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.feat-card .ph,
.feat-card .placeholder-image {
  aspect-ratio: 4/3;
  border: 1px solid var(--rule);
}
.feat-card .feat-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.feat-card .feat-meta .cat {
  color: var(--rust);
  border-left: 2px solid var(--rust);
  padding-left: 10px;
}
.feat-card h3 {
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0;
  font-weight: 400;
  color: var(--ink);
}
.feat-card h3 a { display: inline; background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s var(--ease); }
.feat-card h3 a:hover { background-size: 100% 1px; }
.feat-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.feat-secondary {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.feat-sm {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.feat-sm:last-child { border-bottom: 0; padding-bottom: 0; }
.feat-sm .ph { aspect-ratio: 1; border: 1px solid var(--rule); }
.feat-sm h4 {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
  margin: 6px 0 8px;
  font-weight: 400;
  letter-spacing: -.01em;
}
.feat-sm .feat-meta { margin-bottom: 0; }
.feat-sm p { font-size: 13px; color: var(--ink-muted); margin: 0; }

/* ---------- Latest articles (index list) ---------- */
.latest { padding: 0 0 var(--section); }
.latest-list { display: flex; flex-direction: column; }
.latest-row {
  display: grid;
  grid-template-columns: 60px 100px 1fr 200px 120px;
  align-items: center;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  transition: padding-left .3s var(--ease);
  position: relative;
}
.latest-row:last-child { border-bottom: 1px solid var(--rule); }
.latest-row:hover { padding-left: 16px; }
.latest-row:hover::before {
  content: "→";
  position: absolute;
  left: -8px;
  color: var(--rust);
  font-family: var(--display);
  font-size: 22px;
}
.latest-row .no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-faint);
}
.latest-row .thumb { aspect-ratio: 4/3; border: 1px solid var(--rule); }
.latest-row .body h4 {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.15;
  margin: 0 0 6px;
  font-weight: 400;
  letter-spacing: -.01em;
}
.latest-row .body .desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
  max-width: 56ch;
}
.latest-row .cat-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.latest-row .cat-tag .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rust);
  margin-right: 8px;
}
.latest-row .date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
}

/* ---------- Newsletter / CTA strip ---------- */
.newsletter {
  background: var(--bg-dark);
  color: var(--bg-paper);
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}
.newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 90% 30%, var(--rust) 0 200px, transparent 200px),
    radial-gradient(circle at 20% 80%, var(--moss) 0 220px, transparent 220px);
  opacity: .35;
  pointer-events: none;
  filter: blur(40px);
}
.newsletter .container {
  padding-top: 100px;
  padding-bottom: 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.newsletter h2 {
  font-family: var(--display);
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  font-weight: 400;
}
.newsletter h2 em { font-style: italic; color: var(--rust-light); }
.newsletter p {
  font-size: 17px;
  color: var(--bg-deep);
  max-width: 42ch;
  margin: 0;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.input-row {
  display: flex;
  border: 1px solid var(--bg-deep);
  border-radius: 999px;
  padding: 6px;
  background: rgba(255,255,255,.04);
}
.input-row input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--bg-paper);
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 15px;
}
.input-row input::placeholder { color: var(--ink-faint); }
.input-row button {
  background: var(--rust);
  color: var(--bg-paper);
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .2s var(--ease);
}
.input-row button:hover { background: var(--rust-deep); }
.newsletter-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--ink);
  padding: 80px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand h3 {
  font-family: var(--display);
  font-size: 48px;
  font-style: italic;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1;
}
.footer-brand h3 span { color: var(--rust); }
.footer-brand p {
  font-size: 14px;
  color: var(--ink-muted);
  max-width: 36ch;
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--rust); }

.colophon {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 16px;
}
.colophon b { color: var(--ink); font-weight: 500; }

/* =========================================================
   POST PAGE
   ========================================================= */

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--rust);
  z-index: 100;
  transition: width .1s linear;
}

.breadcrumb {
  padding: 28px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.breadcrumb a { color: var(--ink-muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 10px; color: var(--rule); }

/* Article hero */
.article-hero {
  padding: 50px 0 60px;
}
.article-hero .eyebrow-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.article-hero .cat-badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 14px;
  background: var(--rust);
  color: var(--bg-paper);
  border-radius: 999px;
}
.article-hero .code-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.article-title {
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 108px);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 32px;
  font-weight: 400;
  max-width: 22ch;
  color: var(--ink);
}
.article-title em { font-style: italic; }

.article-lede {
  font-family: var(--display);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 48px;
  font-style: italic;
  font-weight: 400;
}

.article-meta {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-meta dt {
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.article-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

/* Cover image */
.article-cover {
  aspect-ratio: 21/9;
  border: 1px solid var(--rule);
  margin: 60px 0 80px;
  position: relative;
}
.article-cover .caption {
  position: absolute;
  bottom: -32px; left: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.article-cover .caption b { color: var(--ink); font-weight: 500; }

/* Three-column layout */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 60px;
  padding-bottom: var(--section);
  position: relative;
}

/* TOC sticky */
.toc {
  position: sticky;
  top: 110px;
  align-self: start;
  font-size: 14px;
}
.toc h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.toc ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toc ol li {
  counter-increment: toc;
  position: relative;
  padding-left: 30px;
  line-height: 1.4;
}
.toc ol li::before {
  content: "0" counter(toc);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: .05em;
}
.toc ol li a {
  color: var(--ink-2);
  transition: color .2s var(--ease);
  display: block;
  padding: 4px 0;
}
.toc ol li a:hover,
.toc ol li.active a { color: var(--rust); }
.toc ol li.active::before { color: var(--rust); }

/* Article body content */
.article-body {
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 65ch;
}
.article-body > * + * { margin-top: 1.2em; }
.article-body p { margin: 0; }
.article-body p.dropcap::first-letter {
  font-family: var(--display);
  font-size: 5em;
  float: left;
  line-height: .85;
  padding: 8px 14px 0 0;
  color: var(--rust);
  font-style: italic;
}

.article-body h2 {
  font-family: var(--display);
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -.015em;
  font-weight: 400;
  margin-top: 80px !important;
  margin-bottom: 24px;
  position: relative;
  scroll-margin-top: 110px;
}
.article-body h2::before {
  content: attr(data-n);
  position: absolute;
  top: 8px; left: -60px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--rust);
}

.article-body h3 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 400;
  font-style: italic;
  margin-top: 48px !important;
  margin-bottom: 12px;
  color: var(--ink);
  letter-spacing: -.01em;
}

.article-body ul, .article-body ol {
  padding-left: 24px;
}
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
}
.article-body ul li::before {
  content: "→";
  position: absolute;
  left: 0; top: 0;
  color: var(--rust);
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.2;
}
.article-body ol li { margin-bottom: 10px; padding-left: 8px; }
.article-body ol li::marker { font-family: var(--mono); color: var(--rust); font-size: 14px; }

.article-body strong { font-weight: 600; }
.article-body em { font-style: italic; }
.article-body a {
  color: var(--ink);
  background-image: linear-gradient(var(--rust), var(--rust));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 95%;
  transition: background-size .3s var(--ease);
}
.article-body a:hover { background-size: 100% 100%; color: var(--bg-paper); }

/* Pull quote */
.pull-quote {
  margin: 60px -40px !important;
  padding: 40px 50px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
  position: relative;
}
.pull-quote::before {
  content: "„";
  position: absolute;
  top: 0; left: -10px;
  font-family: var(--display);
  font-size: 120px;
  line-height: 1;
  color: var(--rust);
  font-style: italic;
}
.pull-quote .attr {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 18px;
  color: var(--ink-muted);
}

/* Info / warning box */
.info-box {
  margin: 48px 0 !important;
  padding: 28px 32px;
  background: var(--bg-paper);
  border-left: 4px solid var(--rust);
  position: relative;
}
.info-box .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-box .label::before {
  content: "⚠";
  font-size: 14px;
}
.info-box p { margin: 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.6; }
.info-box.moss { border-color: var(--moss); }
.info-box.moss .label { color: var(--moss); }
.info-box.moss .label::before { content: "ⓘ"; }

/* Tables */
.data-table {
  margin: 48px 0 !important;
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  font-family: var(--sans);
}
.data-table thead { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.data-table td:first-child {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--rust);
}
.data-table tbody tr:hover td { background: var(--bg-paper); }

/* Inline figure */
.figure {
  margin: 48px -40px !important;
}
.figure .ph { aspect-ratio: 16/9; border: 1px solid var(--rule); }
.figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--rust);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.side-block h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.facts-box {
  background: var(--bg-paper);
  border: 1px solid var(--rule);
  padding: 24px;
}
.facts-box dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 16px;
}
.facts-box dt:first-child { margin-top: 0; }
.facts-box dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
}
.facts-box dd em { font-family: var(--display); font-size: 18px; font-style: italic; }

.related-list { display: flex; flex-direction: column; gap: 22px; }
.related-item { display: grid; grid-template-columns: 60px 1fr; gap: 14px; align-items: start; }
.related-item .ph { aspect-ratio: 1; border: 1px solid var(--rule); }
.related-item .meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 4px;
}
.related-item h5 {
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  margin: 0;
}

/* End-of-article CTA */
.article-cta {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 60px;
  margin: 80px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.article-cta h3 {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  margin: 0 0 10px;
  font-weight: 400;
  letter-spacing: -.015em;
}
.article-cta h3 em { font-style: italic; color: var(--rust); }
.article-cta p { font-size: 15px; color: var(--ink-muted); margin: 0; max-width: 50ch; }

/* Related articles section (below article) */
.related-articles {
  border-top: 1px solid var(--ink);
  padding-top: 56px;
  padding-bottom: var(--section);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.related-card .ph {
  aspect-ratio: 4/3;
  border: 1px solid var(--rule);
  margin-bottom: 20px;
}
.related-card .feat-meta { margin-bottom: 8px; }
.related-card h4 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 400;
  letter-spacing: -.01em;
}
.related-card p { font-size: 14px; color: var(--ink-muted); margin: 0; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-up .9s var(--ease) both;
}

.stagger > * { opacity: 0; animation: fade-up .8s var(--ease) forwards; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .15s; }
.stagger > *:nth-child(3) { animation-delay: .25s; }
.stagger > *:nth-child(4) { animation-delay: .35s; }
.stagger > *:nth-child(5) { animation-delay: .45s; }
.stagger > *:nth-child(6) { animation-delay: .55s; }
.stagger > *:nth-child(7) { animation-delay: .65s; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  /* Menu rozwija się tylko gdy hamburger ma aria-expanded="true" (JS w script.js) */
  .mobile-menu.is-open { display: block; border-top: 1px solid var(--rule); }
  .mobile-menu.is-open .container { padding-top: 6px; padding-bottom: 14px; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .featured-grid { grid-template-columns: 1fr; gap: 60px; }
  .cat-card:nth-child(1), .cat-card:nth-child(2), .cat-card:nth-child(3) { grid-column: span 6; }
  .cat-card:nth-child(4), .cat-card:nth-child(5), .cat-card:nth-child(6), .cat-card:nth-child(7) { grid-column: span 6; }
  /* 2 karty w rzędzie = mniej miejsca → zmniejszamy nazwę działu, żeby się mieściła */
  .cat-card .cat-symbol { font-size: clamp(30px, 5.2vw, 56px); }
  .article-layout { grid-template-columns: 1fr; }
  .toc, .sidebar { position: static; }
  .toc { padding-bottom: 20px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
  .article-body { max-width: 100%; }
  .article-body h2::before { display: none; }
  .pull-quote, .figure { margin: 48px 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .latest-row { grid-template-columns: 30px 90px 1fr; }
  .latest-row .cat-tag, .latest-row .date { display: none; }
  .newsletter .container { grid-template-columns: 1fr; }
  .article-cta { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .topbar .ticker { display: none; }
  .cat-card { aspect-ratio: auto; padding: 18px; }
  .cat-card:nth-child(n) { grid-column: span 6; }
  /* telefon: karty ~144px szer. — nazwa musi być mała, by zmieścić "Odśnieżanie"/"Winiarstwo" */
  .cat-card .cat-symbol { font-size: clamp(21px, 6.6vw, 30px); margin: 6px 0; }
  .feat-sm { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .colophon { flex-direction: column; align-items: flex-start; }
}
