/* Szablon case study. Te same tokeny i typografia co strona główna (index.html).
   Układ: wiersze z etykietą 224px po lewej i treścią po prawej, kolumna tekstu do ~68 znaków. */
:root {
  --black: #000000;
  --white: #ffffff;
  --muted: #969696;
  --text-2: #666666;
  --line: #d9d9d9;
  --surface: #f4f4f4;
  --link: #0099ff;
  --font: "Manrope", "Manrope Placeholder", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 80px;
  --row-gap: 160px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; font-weight: 500; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 4px; }
.nowrap { white-space: nowrap; }

/* ---------- Nawigacja (jak na stronie głównej) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: 86px; background: var(--white);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: block; width: 27px; height: 36px; }
.brand img { width: 27px; height: 36px; }
.nav { display: flex; gap: 40px; }
.roll {
  position: relative; display: inline-block; overflow: hidden;
  font-size: 18px; line-height: 25.2px; height: 25.2px;
}
.roll span { display: block; transition: transform .45s cubic-bezier(.44,0,.2,1); }
.roll span + span { position: absolute; left: 0; top: 100%; }
.roll:hover span, .roll:focus-visible span { transform: translateY(-100%); }

/* ---------- Układ ---------- */
.case {
  max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto;
  padding: 199px var(--gutter) var(--row-gap);
  display: flex; flex-direction: column; gap: var(--row-gap);
}
.eyebrow { font-size: 16px; line-height: 22.4px; }

/* ---------- Nagłówek case'a ---------- */
.case-hero { display: flex; flex-direction: column; gap: 25px; }
.back { font-size: 16px; line-height: 22.4px; color: var(--text-2); align-self: flex-start; margin-bottom: 16px; }
.back:hover { color: var(--black); }
.case-hero h1 { font-size: 64px; line-height: 76.8px; font-weight: 700; max-width: 960px; text-wrap: balance; }
.case-lead { font-size: 24px; line-height: 36px; color: var(--text-2); max-width: 820px; }

.meta {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.meta > div { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; box-shadow: inset 0 1px 0 0 var(--line); min-width: 0; }
.meta dt { font-size: 14px; line-height: 20px; color: var(--muted); }
.meta dd { font-size: 16px; line-height: 22.4px; }

/* ---------- Liczby ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  background: var(--black); color: var(--white);
  border-radius: 24px; padding: 56px;
}
.stat { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stat-num { font-size: 56px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-words .stat-num { font-size: 32px; line-height: 1.2; text-wrap: balance; }
.stat-label { font-size: 16px; line-height: 22.4px; color: var(--muted); max-width: 30ch; }

/* ---------- Wiersze z etykietą ---------- */
.row {
  display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 16px;
}
.row-body { min-width: 0; }
.prose { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.prose h2, .section-title { font-size: 40px; line-height: 56px; text-wrap: balance; }
.section-title { margin-bottom: 64px; max-width: 760px; }
.prose p, .prose li { font-size: 18px; line-height: 30px; color: var(--text-2); }
.prose strong { color: var(--black); font-weight: 500; }

.quote {
  margin-top: 16px; padding: 8px 0 8px 32px;
  box-shadow: inset 2px 0 0 0 var(--black);
  display: flex; flex-direction: column; gap: 8px;
}
.quote p:first-child { font-size: 32px; line-height: 44px; color: var(--black); }
.quote .quote-src { font-size: 16px; line-height: 22.4px; color: var(--muted); }

.findings, .measures { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 14px; }
.findings li::marker { color: var(--black); font-variant-numeric: tabular-nums; }
.method { font-size: 16px !important; line-height: 24px !important; color: var(--muted) !important; }

/* ---------- Kluczowe decyzje ---------- */
.decision { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; box-shadow: inset 0 1px 0 0 var(--line); }
.decision + .decision { margin-top: 96px; }
.decision h3 { font-size: 32px; line-height: 44px; display: flex; gap: 20px; text-wrap: balance; }
.dec-no { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.shot { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.shot-frame {
  aspect-ratio: 4 / 3; max-width: 100%;
  border-radius: 16px; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--muted);
  border: 1px dashed var(--line);
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.shot figcaption { font-size: 14px; line-height: 20px; color: var(--text-2); }

.pr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.pr > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pr-label { font-size: 14px; line-height: 20px; color: var(--muted); }
.pr p:not(.pr-label) { font-size: 18px; line-height: 30px; color: var(--text-2); }

/* ---------- CTA ---------- */
.case-cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
  padding-top: 64px; box-shadow: inset 0 1px 0 0 var(--line);
}
.case-cta h2 { font-size: 40px; line-height: 56px; max-width: 880px; text-wrap: balance; }
.case-cta p { font-size: 18px; line-height: 30px; color: var(--text-2); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--black); color: var(--white);
  border-radius: 64px; padding: 16px 32px; margin-top: 8px;
}
.btn .roll { color: var(--white); }
.btn svg { width: 16px; height: 16px; transition: transform .45s cubic-bezier(.44,0,.2,1); }
.btn:hover svg { transform: translate(2px, -2px); }

/* ---------- Stopka ---------- */
body > footer {
  background: var(--black); color: var(--white);
  padding: 125px var(--gutter) calc(125px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; text-align: center;
}
body > footer p { font-size: 18px; line-height: 25.2px; max-width: 1120px; }
body > footer b { font-weight: 700; }

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

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  :root { --gutter: 40px; --row-gap: 120px; }
  .case { padding-top: 160px; }
  .case-hero h1 { font-size: 48px; line-height: 57.6px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 180px minmax(0, 1fr); }
  .stats { padding: 40px; }
  .stat-num { font-size: 44px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 809px) {
  :root { --gutter: 16px; --row-gap: 80px; }
  .site-header { height: 70px; }
  .nav { gap: 20px; }
  .roll { font-size: 15px; }
  .nav .roll:nth-child(2) { display: none; }
  .case { padding-top: 110px; }
  .case-hero h1 { font-size: 32px; line-height: 38.4px; }
  .case-lead { font-size: 18px; line-height: 28px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; margin-top: 32px; }
  .stats { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; border-radius: 20px; }
  .stat-num { font-size: 40px; }
  .stats-words .stat-num { font-size: 26px; }
  .row { grid-template-columns: 1fr; gap: 16px; }
  .prose h2, .section-title, .case-cta h2 { font-size: 26px; line-height: 36.4px; }
  .section-title { margin-bottom: 40px; }
  .prose p, .prose li, .pr p:not(.pr-label) { font-size: 16px; line-height: 26px; }
  .quote p:first-child { font-size: 24px; line-height: 33px; }
  .decision h3 { font-size: 22px; line-height: 30px; gap: 12px; }
  .decision + .decision { margin-top: 64px; }
  .shots, .pr { grid-template-columns: 1fr; gap: 20px; }
  body > footer { padding: 68px 24px calc(68px + env(safe-area-inset-bottom, 0px)); }
}
