/* ─────────────────────────────────────────────────────────────
   site.css — style strony /blog RaportLab
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F4F1E8;
  --surface: #FFFFFF;
  --ink: #10182A;
  --ink2: #38435A;
  --muted: #636D7D;
  --line: #E5E1D6;
  --lineStrong: #D4CFC1;
  --accent: #15795B;
  --accentSoft: #EAF2EE;
  --accentBorder: rgba(21, 121, 91, .22);
  --shadow: 0 1px 2px rgba(16, 24, 42, .05), 0 12px 32px rgba(16, 24, 42, .07);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: var(--ink2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accentSoft); color: var(--ink); }

a { color: var(--accent); }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 10px clamp(20px, 5vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: #fff;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 800; font-size: 15px; letter-spacing: -.04em;
}
.logo-name {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--ink);
}
.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--ink2);
  font-size: 14.5px; font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 700; }
.nav-links .nav-cta {
  color: #fff !important; background: var(--ink);
  padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 600; transition: opacity .2s;
}
.nav-links .nav-cta:hover { opacity: .85; }

/* ─── MOBILE MENU (hamburger) ─── */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--lineStrong);
  border-radius: 10px;
  color: var(--ink); cursor: pointer;
}
.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px clamp(20px, 5vw, 48px) 24px;
  transform: translateY(-100%);
  opacity: 0; visibility: hidden;
  transition: transform .28s ease, opacity .28s ease, visibility .28s ease;
  box-shadow: 0 12px 32px rgba(16, 24, 42, .14);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px;
}
.mobile-menu-close {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--lineStrong);
  border-radius: 10px;
  color: var(--ink); cursor: pointer;
}
.mobile-menu-links { list-style: none; margin-top: 8px; }
.mobile-menu-links li { border-top: 1px solid var(--line); }
.mobile-menu-links a {
  display: block; padding: 18px 2px;
  text-decoration: none; color: var(--ink);
  font-size: 1rem; font-weight: 500;
}
.mobile-menu-cta {
  display: block; text-align: center; margin-top: 22px;
  background: var(--ink); color: #fff !important;
  padding: 16px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: opacity .2s;
}
.mobile-menu-cta:hover { opacity: .9; }

main { min-height: 70vh; }

/* ─── WRAPPER / NAGŁÓWEK SEKCJI ─── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

.page-head { padding: 148px 0 8px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow span { width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.page-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; color: var(--ink);
  line-height: 1.08; letter-spacing: -.03em; margin-top: 14px;
}
.page-sub {
  font-size: 1.08rem; color: var(--ink2);
  max-width: 56ch; line-height: 1.6; margin-top: 16px;
}

/* ─── LISTA ARTYKUŁÓW ─── */
.articles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; padding: 48px 0 96px;
}
.article-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; transition: transform .18s ease, box-shadow .18s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(16,24,42,.08), 0 20px 44px rgba(16,24,42,.10); }
.article-cover {
  aspect-ratio: 16 / 9; width: 100%; object-fit: cover;
  background: var(--accentSoft); display: block;
}
.article-cover-fallback {
  aspect-ratio: 16 / 9; width: 100%;
  background: linear-gradient(135deg, var(--accentSoft), #fff);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 800; font-size: 2rem; letter-spacing: -.04em;
}
.article-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.article-date { font-size: .8rem; color: var(--muted); }
.article-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 700; font-size: 1.18rem; color: var(--ink);
  letter-spacing: -.02em; line-height: 1.25; margin-top: 8px;
}
.article-excerpt { font-size: .92rem; color: var(--ink2); line-height: 1.6; margin-top: 10px; }
.article-more {
  margin-top: auto; padding-top: 18px;
  font-size: .88rem; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}

.empty-state {
  padding: 60px 0 110px; color: var(--muted); font-size: 1rem;
}

/* ─── POJEDYNCZY ARTYKUŁ ─── */
.post-head { padding: 140px 0 0; }
.post-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: 22px;
}
.post-back:hover { color: var(--ink); }
.post-meta { font-size: .85rem; color: var(--muted); }
.post-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700; color: var(--ink);
  line-height: 1.06; letter-spacing: -.03em; margin-top: 12px;
}
.post-lead { font-size: 1.15rem; color: var(--ink2); line-height: 1.6; margin-top: 18px; }
.post-cover {
  width: 100%; border-radius: 18px; border: 1px solid var(--line);
  margin: 32px 0 8px; display: block;
}

/* Treść artykułu (HTML z edytora) */
.prose { padding: 24px 0 96px; font-size: 1.06rem; line-height: 1.75; color: var(--ink2); }
.prose > * + * { margin-top: 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'Schibsted Grotesk', sans-serif;
  color: var(--ink); letter-spacing: -.02em; line-height: 1.2;
  margin-top: 1.7em;
}
.prose h2 { font-size: 1.7rem; font-weight: 700; }
.prose h3 { font-size: 1.32rem; font-weight: 600; }
.prose h4 { font-size: 1.1rem; font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .4em; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 20px;
  color: var(--ink); font-style: italic;
}
.prose pre {
  background: var(--ink); color: #fff; padding: 18px 20px;
  border-radius: 12px; overflow-x: auto; font-size: .9rem;
}
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.prose hr { border: none; border-top: 1px solid var(--line); }

/* ─── FOOTER ─── */
.footer { border-top: 1px solid var(--line); padding: 32px clamp(20px, 5vw, 48px); }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.footer-copy { font-size: .82rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: .82rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--ink); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) { .articles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 750px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .articles { grid-template-columns: 1fr; }
}
