/* ═══════════ NSGrowth — blog / baza wiedzy ═══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #ffffff;
  --bg2:       #f2f2f2;
  --card:      #ffffff;
  --ink:       #131313;
  --ink-block: #131313;
  --muted:     #585858;
  --muted2:    #8a8a8a;
  --border:    rgba(0,0,0,.07);
  --border2:   rgba(0,0,0,.14);
  --accent:    #d62828;
  --accent2:   #f77f00;
  --accent-g:  linear-gradient(135deg, #d62828, #f77f00);
  --r-card:    20px;
  --r-big:     28px;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'Courier New', monospace;
  --nav-shadow: 0 8px 20px rgba(19,21,21,.05);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg:      #0d0d11;
  --bg2:     #17171d;
  --card:    #1b1b22;
  --ink:     #f0f0f2;
  --muted:   #a4a4ae;
  --muted2:  #75757f;
  --border:  rgba(255,255,255,.09);
  --border2: rgba(255,255,255,.18);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--ink);
  line-height: 1.6; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(214,40,40,.85); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── NAWIGACJA ── */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1.25rem 1.5rem; pointer-events: none; }
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.nav-island {
  pointer-events: auto;
  display: flex; align-items: center; gap: .5rem;
  background: rgba(18,18,24,.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 1.25rem; padding: .85rem 1.1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.nav-island.is-right { margin-left: auto; padding: .375rem; }
.logo { font-size: 1.25rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; color: #fff; line-height: 1; }
.logo-ns { background: var(--accent-g); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-back {
  font-family: var(--font-body); font-size: .875rem; font-weight: 500;
  color: #fff; text-decoration: none; padding: .55rem 1.1rem;
  border-radius: .9375rem; transition: background .3s;
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
}
.nav-back:hover { background: rgba(255,255,255,.14); }
.nav-back svg { width: 13px; height: 13px; }
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto; padding: 0;
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: .9375rem; cursor: pointer; transition: background .3s;
}
.theme-btn:hover { background: rgba(255,255,255,.24); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .icon-sun { display: none; }
[data-theme="dark"] .theme-btn .icon-sun { display: block; }
[data-theme="dark"] .theme-btn .icon-moon { display: none; }

/* ── NAGŁÓWEK STRONY ── */
.page-head {
  background: var(--ink-block); color: #fff;
  padding: 9rem 1.5rem 4rem; text-align: center;
}
.wrap { max-width: 780px; margin: 0 auto; }
.wrap-wide { max-width: 1080px; margin: 0 auto; }
.eyebrow {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6);
  display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); }
.page-head h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 600;
  letter-spacing: -.045em; line-height: 1.12; text-wrap: balance;
  margin: 1.1rem 0 1rem;
}
.page-head .lead { color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.7; }
.meta-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem;
  margin-top: 1.6rem; font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5);
}

/* ── TREŚĆ ARTYKUŁU ── */
.article { padding: 3.5rem 1.5rem 4rem; }
.article-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.article-side { position: sticky; top: 7rem; }
.article-main { max-width: 760px; }
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; gap: 0; }
  .article-side { position: static; margin-bottom: 2.4rem; }
  .article-main { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .article-side { position: static; } }
.toc {
  background: var(--bg2); border-radius: var(--r-card);
  padding: 1.4rem 1.6rem; margin-bottom: 2.8rem;
}
.article-side .toc { margin-bottom: 0; }
.toc-title {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem;
}
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: .45rem; }
.toc li { counter-increment: toc; }
.toc a { color: var(--ink); text-decoration: none; font-size: .93rem; display: flex; gap: .6rem; }
.toc a::before { content: counter(toc) '.'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.toc a:hover { color: var(--accent); }

.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 600;
  letter-spacing: -.035em; line-height: 1.25;
  margin: 2.8rem 0 1rem; scroll-margin-top: 6.5rem;
}
.prose h3 {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em;
  margin: 2rem 0 .7rem;
}
.prose p { color: var(--muted); font-size: 1.02rem; line-height: 1.75; margin-bottom: 1.1rem; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 1.4rem 0; padding-left: 0; list-style: none; }
.prose ul li, .prose ol li {
  color: var(--muted); font-size: 1.02rem; line-height: 1.7;
  padding-left: 1.9rem; margin-bottom: .7rem; position: relative;
}
.prose ul li::before {
  content: ''; position: absolute; left: .55rem; top: .72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-g);
}
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; }
.prose ol li::before {
  content: counter(li); position: absolute; left: 0; top: .05em;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-block); color: #fff;
  font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.prose code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--bg2); color: var(--accent);
  padding: .15em .45em; border-radius: 5px;
}

/* ── FAQ ── */
.faq-block { margin-top: 3.5rem; }
.faq-block h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 600; letter-spacing: -.035em; margin-bottom: 1.4rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 16px; margin-bottom: .7rem; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 1.4rem; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: .97rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); text-align: left;
}
.faq-h { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-icon {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: .95rem; color: var(--ink); transition: transform .3s, background .25s, color .25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--accent-g); color: #fff; }
.faq-a {
  max-height: 0; overflow: hidden; padding: 0 1.4rem;
  color: var(--muted); font-size: .95rem; line-height: 1.7;
  transition: max-height .35s ease, padding .3s;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 1.4rem 1.25rem; }

/* ── CTA ── */
.cta-box {
  margin-top: 3.5rem; background: var(--ink-block); color: #fff;
  border-radius: var(--r-big); padding: 2.6rem 2.2rem; text-align: center;
  position: relative; overflow: hidden;
}
.cta-box::after {
  content: ''; position: absolute; right: -60px; bottom: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--accent-g); opacity: .3; filter: blur(10px);
}
.cta-box h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; margin-bottom: .7rem; position: relative; z-index: 1; }
.cta-box p { color: rgba(255,255,255,.82); font-size: .97rem; line-height: 1.6; max-width: 460px; margin: 0 auto 1.7rem; position: relative; z-index: 1; }
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  padding: .55rem .6rem .55rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: none; cursor: pointer; position: relative; z-index: 1;
  background: var(--accent-g); color: #fff;
  box-shadow: 0 10px 30px rgba(214,40,40,.28);
  transition: transform .18s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(214,40,40,.4); }
.btn-disc {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-disc svg { width: 13px; height: 13px; }

/* ══════════ UKŁAD ZE STOSEM KART (styl Altrum) ══════════ */
.stack-section { padding: 4rem 1.5rem 6rem; }
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.stack-left { position: sticky; top: 7rem; max-width: 90%; }
.h-display {
  font-size: clamp(2.2rem, 4.6vw, 3rem); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.1; text-wrap: balance;
}
.stack-left .card-text { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.divider-s { height: 30px; }
.divider-m { height: 50px; }

.stack-cards { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 460px; margin-left: auto; }
.stack-card {
  position: sticky; top: 7rem;
  display: flex; flex-direction: column;
  min-height: 330px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; padding: 25px;
  text-decoration: none; color: inherit;
  transition: background .2s ease, border-color .2s ease;
}
.stack-card:nth-child(2) { top: calc(7rem + 20px); }
.stack-card:nth-child(3) { top: calc(7rem + 40px); }
.stack-card:nth-child(4) { top: calc(7rem + 60px); }
.stack-card:nth-child(5) { top: calc(7rem + 80px); }
.stack-card:hover { background: var(--bg2); border-color: var(--accent); }
.stack-num {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--muted2); margin-bottom: auto;
}
.stack-cat {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--border2); border-radius: 999px;
  padding: .3rem .75rem; margin-bottom: 1rem;
}
.stack-card h2 {
  font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em;
  line-height: 1.25; margin-bottom: .7rem;
}
.stack-card p { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.stack-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted2);
}
.stack-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border2); color: var(--ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.stack-arrow svg { width: 13px; height: 13px; }
.stack-card:hover .stack-arrow { background: var(--accent-g); color: #fff; border-color: transparent; transform: translate(2px,-2px); }

/* przycisk z przewijanym tekstem (text roll) */
.btn-roll {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-g); color: #fff;
  border-radius: 60px; padding: 13px 22px 13px 20px;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 10px 30px rgba(214,40,40,.28);
  transition: transform .2s ease, box-shadow .25s ease;
}
.btn-roll:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(214,40,40,.4); }
.btn-roll svg { width: 13px; height: 13px; flex-shrink: 0; }
.roll-mask { height: 15px; overflow: hidden; }
.roll-inner { display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.btn-roll:hover .roll-inner { transform: translateY(-15px); }
.roll-inner span {
  display: block; height: 15px; line-height: 15px;
  font-size: .8rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
}

@media (max-width: 860px) {
  .stack-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .stack-left { position: static; max-width: 100%; }
  .stack-cards { max-width: 100%; margin-left: 0; }
  /* karty dalej nakładają się na siebie, próg dopasowany do niższej belki */
  .stack-card { top: 5.5rem; min-height: 250px; }
  .stack-card:nth-child(2) { top: calc(5.5rem + 14px); }
  .stack-card:nth-child(3) { top: calc(5.5rem + 28px); }
  .stack-card:nth-child(4) { top: calc(5.5rem + 42px); }
  .stack-card:nth-child(5) { top: calc(5.5rem + 56px); }
}
@media (max-width: 479px) {
  .stack-card { top: 5rem; }
  .stack-card:nth-child(2) { top: calc(5rem + 12px); }
  .stack-card:nth-child(3) { top: calc(5rem + 24px); }
  .stack-card:nth-child(4) { top: calc(5rem + 36px); }
  .stack-card:nth-child(5) { top: calc(5rem + 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .stack-card, .stack-left { position: static; }
  .roll-inner { transition: none; }
}

/* ── LISTA WPISÓW ── */
.posts { padding: 4rem 1.5rem; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 1.9rem 1.8rem;
  text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(0,0,0,.1); }
.post-cat { font-family: var(--font-mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.post-card h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; margin: .55rem 0 .6rem; }
.post-card p { color: var(--muted); font-size: .93rem; line-height: 1.6; flex: 1; }
.post-more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.2rem;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.post-more svg { width: 13px; height: 13px; transition: transform .3s; }
.post-card:hover .post-more { color: var(--accent); }
.post-card:hover .post-more svg { transform: translate(3px,-3px); }

/* ── POWIĄZANE ── */
.related { margin-top: 3.5rem; }
.related-title { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.related-list { display: grid; gap: .7rem; }
.related-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg2); border-radius: 14px; padding: 1rem 1.3rem;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.related-list a:hover { transform: translateX(3px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.related-list svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* ── LINKI KRZYŻOWE (miasta i usługi) ── */
.xlinks { margin-top: 3.5rem; display: grid; gap: 2.2rem; }
.xlink-title {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem;
}
.xlink-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.xlink-tags a {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--bg2); border: 1px solid transparent; border-radius: 999px;
  padding: .5rem 1.05rem; color: var(--ink); text-decoration: none;
  font-size: .87rem; font-weight: 500; line-height: 1.35;
  transition: border-color .2s, color .2s, transform .2s;
}
.xlink-tags a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.xlink-tags a.is-more { background: none; border-color: var(--border2); font-weight: 600; }
.xlink-tags svg { width: 12px; height: 12px; flex-shrink: 0; }
@media (max-width: 479px) {
  .xlink-tags a { font-size: .82rem; padding: .45rem .9rem; }
}

/* ── STOPKA ── */
footer { padding: 0 1rem 1rem; }
.footer-panel {
  max-width: 1400px; margin: 0 auto;
  background: var(--ink-block); color: #fff;
  border-radius: var(--r-big); padding: 3rem 2.5rem 1.8rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.2rem; padding-bottom: 2.2rem; }
.footer-brand .logo { font-size: 1.25rem; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .87rem; line-height: 1.7; max-width: 320px; margin-top: .9rem; }
.fc-title { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: .78rem; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.7); text-decoration: none; }

/* ── DO GÓRY ── */
.to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 994;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--border2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s, color .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-g); color: #fff; border-color: transparent; }
.to-top svg { width: 18px; height: 18px; }

/* ── RESPONSYWNOŚĆ ── */
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (max-width: 560px) {
  .page-head { padding: 7.5rem 1.25rem 3rem; }
  .article, .posts { padding-left: 1.25rem; padding-right: 1.25rem; }
  .nav-island { padding: .7rem .9rem; }
  .nav-back span { display: none; }
  .footer-panel { padding: 2.4rem 1.5rem 1.5rem; }
  .footer-bottom { justify-content: center; text-align: center; }
  .to-top { bottom: 1rem; right: 1rem; width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-card, .related-list a, .btn { transition: none; }
}
