/* ============================================
   jatymy.pl — Wspólny arkusz stylów
   Używany przez: /, /artykuly/*, /jak-to-dziala/, /faq/, /o-nas/, /kontakt/,
   /regulamin/, /polityka-prywatnosci/
   ============================================ */

:root {
  --bg: #fbf7f4;
  --bg-alt: #f4ebe4;
  --ink: #1c1a2e;
  --ink-soft: #4a4658;
  --muted: #8a8398;
  --line: #e8ddd4;
  --accent: #d94b6a;
  --accent-dark: #b8324e;
  --accent-soft: #fce8e0;
  --deep: #1a1f4b;
  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --maxw: 1200px;
  --prose-w: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 400; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--accent); }

p { color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(217, 75, 106, .28);
}
.btn-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 75, 106, .38);
}
.btn-cta-lg { padding: 15px 32px; font-size: 16px; }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: all .2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Header (sticky, wspólny dla całego serwisu) ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 244, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 1px;
  color: var(--ink);
}
.brand-dot { color: var(--accent); font-weight: 700; margin: 0 1px; }
.brand-tld { color: var(--muted); font-weight: 400; margin-left: 2px; }
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .nav-links a:not(.btn-cta) { display: none; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .nav { padding: 14px 0; }
  .brand { font-size: 20px; }
  .nav-links { gap: 12px; }
  .nav .btn-cta { padding: 11px 20px; font-size: 14.5px; }
}
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .brand { font-size: 18px; }
  .nav .btn-cta { padding: 11px 18px; font-size: 14px; }
  /* .brand-tld pozostaje widoczne — użytkownik chce zobaczyć .pl */
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 20px 0 8px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 400px) {
  .breadcrumbs { font-size: 12px; padding: 14px 0 4px; }
  .breadcrumbs ol { gap: 4px; }
  .breadcrumbs li:not(:last-child)::after { margin-left: 4px; }
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 6px;
  color: var(--line);
}
.breadcrumbs a { color: var(--muted); transition: color .2s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs li[aria-current="page"] { color: var(--ink-soft); }

/* ---------- Article page ---------- */
.article-header {
  padding: 30px 24px 50px;
  max-width: calc(var(--prose-w) + 48px);
  margin: 0 auto;
  box-sizing: content-box;
}
@media (max-width: 720px) {
  .article-header { padding: 24px 20px 40px; }
}
@media (max-width: 400px) {
  .article-header { padding: 20px 16px 32px; }
}
.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.article-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 20px;
}
.article-lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 28px;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ---------- Article body (prose) ---------- */
.prose {
  max-width: calc(var(--prose-w) + 48px);
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-soft);
  padding: 0 24px 60px;
  box-sizing: content-box;
}
@media (max-width: 720px) {
  .prose { padding: 0 20px 40px; font-size: 17px; }
}
@media (max-width: 400px) {
  .prose { padding: 0 16px 32px; font-size: 16.5px; }
}
.prose > * + * { margin-top: 20px; }
.prose h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 48px 0 12px;
  color: var(--ink);
}
.prose h3 {
  font-size: clamp(20px, 2vw, 24px);
  margin: 32px 0 10px;
  font-weight: 600;
}
.prose p strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 24px; }
.prose ul li, .prose ol li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 28px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.4;
}
.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(217, 75, 106, .3);
  transition: border-color .2s;
}
.prose a:hover { border-bottom-color: var(--accent); }
.prose .drop::first-letter {
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 500;
  float: left;
  line-height: 0.85;
  padding: 6px 12px 0 0;
  color: var(--accent);
}
@media (max-width: 560px) {
  .prose .drop::first-letter {
    font-size: 54px;
    padding: 4px 10px 0 0;
  }
  .prose blockquote {
    font-size: 19px;
    padding-left: 18px;
  }
  .prose ul, .prose ol { padding-left: 20px; }
}

/* ---------- Inline CTA (w środku artykułu) ---------- */
.inline-cta {
  background: linear-gradient(135deg, #fef3f0 0%, var(--accent-soft) 100%);
  border: 1px solid #f6d5c8;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 44px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.inline-cta > div:first-child { flex: 1 1 260px; min-width: 0; }
.inline-cta .btn-cta {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 12px 24px;
  text-align: center;
  min-width: 160px;
}
@media (max-width: 560px) {
  .inline-cta {
    padding: 24px 20px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .inline-cta > div:first-child { flex: 1 1 auto; }
  .inline-cta .btn-cta { width: 100%; }
}
.end-cta .btn-cta {
  white-space: nowrap;
  text-align: center;
}
.inline-cta .txt {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink);
  max-width: 440px;
  line-height: 1.35;
}
.inline-cta .sub {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 4px;
  font-style: normal;
}

/* ---------- End-of-article CTA ---------- */
.end-cta {
  background: var(--deep);
  color: white;
  padding: 44px 40px;
  border-radius: var(--radius);
  text-align: center;
  margin: 60px auto 40px;
  max-width: var(--prose-w);
  position: relative;
  overflow: hidden;
}
.end-cta::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(217, 75, 106, .35) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.end-cta h3 {
  color: white;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 12px;
  position: relative;
}
.end-cta h3 em { color: #ffb8c8; font-style: italic; }
.end-cta p {
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.end-cta .btn-cta { position: relative; padding: 14px 32px; }

/* ---------- Related articles ---------- */
.related {
  border-top: 1px solid var(--line);
  padding: 60px 0;
  background: white;
}
.related h2 {
  text-align: center;
  margin-bottom: 40px;
}
.related-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- Article card (używana w hubie, kategoriach, related, homepage) ---------- */
.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all .3s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -20px rgba(26, 31, 75, .2);
  border-color: transparent;
}
.article-thumb {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center 25%;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.article-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.4) 100%);
}
.article-thumb.no-image {
  background: linear-gradient(135deg, #f4ebe4 0%, #e8dcd0 100%);
}
.article-cat {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
}
.article-body {
  padding: 22px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.25;
}
.article-body p {
  font-size: 14.5px;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}
.article-card .meta-row {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.article-card .meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ---------- Section head (używana wszędzie) ---------- */
.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head .eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { font-size: 18px; }

/* ---------- Footer (wspólny) ---------- */
footer.site {
  background: var(--deep);
  color: rgba(255, 255, 255, .6);
  padding: 60px 0 32px;
  font-size: 14px;
  margin-top: 80px;
}
/* Płynne przejście gdy przed footerem jest granatowa sekcja CTA */
.final-cta + footer.site,
.end-cta-section + footer.site {
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand {
  font-family: var(--sans);
  font-size: 24px;
  color: white;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.foot-brand .foot-dot { color: var(--accent); }
.foot-brand .foot-tld { color: rgba(255,255,255,.4); font-weight: 400; }
.foot-col h4 {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: white;
  margin-bottom: 18px;
  font-weight: 600;
}
.foot-col ul { list-style: none; }
.foot-col ul li { margin-bottom: 10px; }
.foot-col ul a { color: rgba(255, 255, 255, .6); transition: color .2s; }
.foot-col ul a:hover { color: white; }
.foot-legal {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .4);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Focus states (a11y) ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Category chips (używane na hubie /artykuly/) ---------- */
.category-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 30px 0 50px;
}
.chip {
  padding: 10px 20px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* ---------- Hero variant (dla stron kategorii i o-nas) ---------- */
.page-hero {
  padding: 40px 0 30px;
  text-align: center;
}
.page-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.page-hero h1 { max-width: 900px; margin: 0 auto 20px; }
.page-hero p {
  font-size: 19px;
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
}

/* ---------- Skeleton banner (dla szkieletów artykułów) ---------- */
.skeleton-banner {
  max-width: var(--prose-w);
  margin: 20px auto 0;
  background: #fff8db;
  border: 1px solid #f0e090;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  color: #7a5a10;
}
.skeleton-banner strong { color: #5a4508; }

.skeleton-stub {
  background: #fafaf5;
  border-left: 3px solid #e0d8b0;
  padding: 14px 18px;
  margin: 10px 0 16px;
  color: #806a20;
  font-size: 15px;
  font-style: italic;
  border-radius: 4px;
}
.skeleton-stub::before {
  content: '📝 ';
  font-style: normal;
}

/* ---------- Simple content page (o nas, kontakt, regulamin) ---------- */
.content-page {
  padding: 20px 0 60px;
}
.content-page .prose { padding-bottom: 40px; }
