/* Documentary — layout zgodny z podstrona_Documentary/sekcje.pdf (tokeny z base.css) */

.doc-page {
  --doc-gold: var(--gold-main);
  --doc-gold-soft: rgba(184, 151, 58, 0.72);
  --doc-gold-line: rgba(184, 151, 58, 0.45);
  --doc-ink: #14120f;
  --doc-ink-soft: #4a4540;
  --doc-cream: var(--surface-cream-a);
  --doc-cream-b: var(--surface-cream-b);
  --doc-dark: #050505;
  --doc-frame: 1px solid var(--doc-gold-line);
  background: transparent;
}

/* Klik w obraz → BPM lightbox (initImageLightbox w app.js); bez data-no-lightbox. */
.doc-page img[src] {
  cursor: zoom-in;
}

/* Treść jak OSBW / Advertising: globalna klasa .page-inner z base.css (szerokość + padding-inline). */

.doc-framed {
  border: var(--doc-frame);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
}

.doc-founder .doc-framed,
.doc-s3 .doc-framed,
.doc-roots .doc-framed,
.doc-tour .doc-framed,
.doc-eco .doc-framed,
.doc-support .doc-framed {
  background: rgba(255, 252, 245, 0.45);
}

.doc-framed img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.doc-h1 {
  margin: 0;
  font-family: var(--hero-h1-font-family);
  font-size: var(--hero-h1-font-size);
  font-weight: var(--hero-h1-font-weight);
  line-height: var(--hero-h1-line-height);
  letter-spacing: var(--hero-h1-letter-spacing);
  color: #faf9f6;
}

.doc-h1--dark {
  color: var(--doc-ink);
}

.doc-h2 {
  margin: 0;
  font-family: var(--type-h2-font-family);
  font-size: var(--type-h2-font-size);
  font-weight: var(--type-h2-font-weight);
  line-height: var(--type-h2-line-height);
  letter-spacing: var(--type-h2-letter-spacing);
  color: #faf9f6;
}

.doc-h2--dark {
  color: var(--doc-ink);
}

.doc-serif-lead {
  margin: 0 0 18px;
  font-family: var(--type-h2-font-family);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--doc-gold-soft);
}

.doc-serif-lead--dark {
  color: #7a6230;
}

.doc-body {
  margin: 0 0 16px;
  font-family: var(--type-body-font-family);
  font-size: var(--type-body-font-size);
  line-height: var(--type-body-line-height);
  font-weight: var(--type-body-font-weight);
}

.doc-body:last-child {
  margin-bottom: 0;
}

.doc-body--cream-on-dark {
  color: rgba(247, 244, 238, 0.88);
}

.doc-body--dark {
  color: var(--doc-ink-soft);
}

.doc-body--cream-bg {
  color: var(--doc-ink-soft);
}

/* —— Hero (PDF str. 1) —— */
.doc-hero {
  position: relative;
  background: var(--doc-dark);
  color: var(--text-main);
  padding: clamp(40px, 7vh, 88px) 0 clamp(48px, 8vh, 96px);
  box-sizing: border-box;
}

.doc-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
}

.doc-hero__copy {
  align-self: start;
  text-align: left;
  max-width: 36rem;
}

.doc-hero__list {
  margin: clamp(28px, 4vh, 40px) 0 0;
  padding: clamp(22px, 3vh, 32px) 0 0;
  border-top: 1px solid rgba(184, 151, 58, 0.22);
  list-style: none;
}

.doc-hero__list li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 18px;
  font-family: var(--type-h5-font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #faf9f6;
  line-height: 1.45;
}

.doc-hero__list li:last-child {
  margin-bottom: 0;
}

.doc-hero__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 4px;
  height: 1.05em;
  background: var(--doc-gold);
  border-radius: 1px;
}

.doc-hero__visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

@media (min-width: 961px) {
  .doc-hero__layout {
    align-items: start;
  }

  .doc-hero__visual {
    align-self: start;
    height: var(--doc-hero-copy-h, auto);
    max-height: var(--doc-hero-copy-h, none);
  }
}

.doc-hero__collage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.doc-hero__fig {
  margin: 0;
  position: relative;
  min-height: 0;
  height: 100%;
}

.doc-hero__fig--hero {
  grid-column: 1 / -1;
  grid-row: 1;
}

.doc-hero__collage .doc-framed {
  height: 100%;
  min-height: 0;
}

/* —— Founder (PDF str. 2) —— */
.doc-founder {
  background: var(--surface-cream-f);
  color: var(--doc-ink);
  padding: var(--section-pad-y-large) 0;
}

.doc-founder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.doc-founder__gallery {
  --doc-founder-stack-fr: 0.32;
  container-type: inline-size;
  container-name: doc-founder-gallery;
  display: grid;
  grid-template-columns: 1fr 0.32fr;
  grid-template-rows: auto auto;
  gap: 12px;
  min-width: 0;
}

.doc-founder__lead {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.doc-founder__stack {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-founder__strip {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}

.doc-founder__stack .doc-framed {
  aspect-ratio: 1;
}

.doc-founder__lead.doc-framed {
  aspect-ratio: 3 / 4;
  max-height: 520px;
}

.doc-founder__strip.doc-framed {
  aspect-ratio: unset;
  width: 100%;
  /* Wysokość = szerokość kolumny miniaturek (kwadraty 1:1): (W − gap) × stackFr / (1 + stackFr) */
  height: calc((100cqi - 12px) * var(--doc-founder-stack-fr) / (1 + var(--doc-founder-stack-fr)));
  max-height: none;
  overflow: hidden;
}

.doc-founder__copy .doc-h2--dark {
  font-size: clamp(1.85rem, 2.8vw, 2.6rem);
}

.doc-founder__quote {
  margin-top: clamp(24px, 3vh, 36px);
  padding: clamp(18px, 2.2vw, 24px) clamp(18px, 2vw, 26px);
  border: var(--doc-frame);
  position: relative;
}

.doc-founder__quote-mark {
  position: absolute;
  top: 12px;
  left: 16px;
  font-family: var(--type-h2-font-family);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--doc-gold);
  opacity: 0.55;
}

.doc-founder__quote p {
  margin: 0;
  font-family: var(--type-h2-font-family);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: #6b5528;
  padding-left: 8px;
}

.doc-founder__quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--type-h2-font-family);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 600;
  color: var(--doc-ink-soft);
}

/* —— sekcja_3.png — Big Prayer Place (krem) —— */
.doc-s3 {
  background: var(--surface-cream-a);
  color: var(--doc-ink);
  padding: var(--section-pad-y-large) 0 0;
  border-top: 1px solid rgba(184, 151, 58, 0.22);
}

.doc-s3__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 44px);
  padding-bottom: var(--section-pad-y);
}

.doc-s3__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.doc-s3__subtitle {
  margin: 0 0 18px;
  font-family: var(--type-h2-font-family);
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  color: var(--doc-ink);
}

.doc-s3__actions {
  margin-top: 8px;
}

.doc-s3__hero-fig {
  margin: 0;
  border-radius: var(--radius-8);
}

.doc-s3__hero-fig.doc-framed {
  min-height: min(52vw, 420px);
}

.doc-s3__hero-fig img {
  width: 100%;
  height: 100%;
  min-height: min(52vw, 420px);
  object-fit: cover;
  display: block;
}

.doc-s3__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 14px);
}

.doc-s3__gal-fig {
  margin: 0;
  border-radius: var(--radius-8);
  aspect-ratio: 4 / 3;
}

.doc-s3__gal-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-s3__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
}

.doc-s3__card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: clamp(16px, 2vw, 22px) clamp(14px, 1.8vw, 18px);
  border: 1px solid rgba(184, 151, 58, 0.35);
  border-radius: var(--radius-10);
  background: rgba(255, 252, 245, 0.55);
  box-shadow: var(--shadow-ambient-soft);
}

.doc-s3__card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 151, 58, 0.55);
  border-radius: 50%;
  color: var(--gold-main);
}

.doc-s3__card-title {
  margin: 0 0 8px;
  font-family: var(--type-h3-font-family);
  font-size: clamp(1.02rem, 1.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--doc-ink);
}

.doc-s3__card-text {
  margin: 0;
  font-family: var(--type-body-font-family);
  font-size: var(--type-body-sm-font-size);
  line-height: var(--type-body-sm-line-height);
  color: var(--doc-ink-soft);
}

.doc-s3__purpose {
  width: 100%;
  margin-top: clamp(8px, 2vh, 16px);
  padding: clamp(18px, 2.5vh, 26px) 0 clamp(22px, 3vh, 32px);
  background: rgba(20, 18, 15, 0.04);
  border-top: 1px solid rgba(184, 151, 58, 0.18);
}

.doc-s3__purpose-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.doc-s3__purpose-leaf {
  flex-shrink: 0;
  color: var(--gold-main);
  margin-top: 2px;
}

.doc-s3__purpose-text {
  margin: 0;
  font-family: var(--type-h2-font-family);
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  line-height: 1.55;
  color: var(--doc-ink-soft);
}

.doc-s3__purpose-strong {
  font-family: var(--type-body-font-family);
  font-size: var(--type-caption-font-size);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-main);
}

/* —— Roots (PDF str. 4) —— */
.doc-roots {
  background: var(--surface-cream-b);
  color: var(--doc-ink);
  padding: var(--section-pad-y-large) 0;
  border-top: 1px solid rgba(62, 49, 23, 0.08);
}

.doc-roots__mosaic {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 10px;
}

.doc-roots__mosaic .doc-framed:nth-child(1) {
  grid-column: 1;
}

.doc-roots__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.doc-roots__row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.doc-roots__purpose {
  margin-top: clamp(22px, 3vh, 32px);
  padding: clamp(16px, 2vw, 22px);
  border: var(--doc-frame);
}

.doc-roots__purpose-label {
  margin: 0 0 8px;
  font-family: var(--type-h5-font-family);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--doc-gold);
}

.doc-roots__purpose p {
  margin: 0;
  font-family: var(--type-h2-font-family);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.5;
  color: var(--doc-ink-soft);
}

.doc-roots__actions {
  margin-top: 22px;
}

/* —— Tour (PDF str. 5) —— */
.doc-tour {
  background: var(--surface-cream-c);
  color: var(--doc-ink);
  padding: var(--section-pad-y) 0;
  border-top: 1px solid rgba(62, 49, 23, 0.08);
}

.doc-roots__grid,
.doc-tour__grid,
.doc-living__grid,
.doc-eco__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.doc-roots__visuals {
  min-width: 0;
}

.doc-tour__badge {
  display: inline-block;
  margin: 14px 0 20px;
  padding: 10px 16px;
  border: var(--doc-frame);
  font-family: var(--type-h5-font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--doc-gold);
}

.doc-tour__visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 280px;
}

.doc-tour__visuals .doc-framed {
  min-height: 260px;
}

/* —— Living + Ecosystem (PDF str. 6) —— */
.doc-living {
  background: var(--doc-dark);
  color: var(--text-main);
  padding: var(--section-pad-y) 0;
  border-top: 1px solid rgba(184, 151, 58, 0.28);
}

.doc-living__mosaic {
  display: flex;
  gap: 10px;
  align-items: stretch;
  min-height: 340px;
}

.doc-living__hero {
  flex: 1.12;
  margin: 0;
  min-height: 320px;
  min-width: 0;
}

.doc-living__tiles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.doc-living__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
}

.doc-living__wide {
  margin: 0;
  flex: 0 0 auto;
}

.doc-living__row .doc-framed,
.doc-living__wide.doc-framed {
  min-height: 140px;
}

.doc-eco {
  background: var(--surface-cream-d);
  color: var(--doc-ink);
  padding: var(--section-pad-y-large) 0;
  border-top: 1px solid rgba(62, 49, 23, 0.08);
}

.doc-eco__grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}

.doc-eco__figure {
  margin: 0;
}

.doc-eco__figure.doc-framed {
  aspect-ratio: 16 / 10;
  height: 100%;
  min-height: 200px;
}

.doc-eco__figure.doc-framed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-eco__list {
  align-self: stretch;
  margin: 0;
  padding: clamp(12px, 1.8vw, 18px) clamp(14px, 2vw, 20px);
  border: 1px solid rgba(184, 151, 58, 0.35);
  border-radius: var(--radius-8);
  background: rgba(255, 252, 245, 0.88);
  box-shadow: var(--shadow-ambient-soft);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .doc-eco__list {
    background: rgba(253, 250, 244, 0.96);
  }
}

.doc-eco__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(184, 151, 58, 0.2);
}

.doc-eco__item:last-child {
  border-bottom: none;
}

.doc-eco__icon {
  width: 40px;
  height: 40px;
  border: var(--doc-frame);
  flex-shrink: 0;
}

.doc-eco__item h3 {
  margin: 0 0 6px;
  font-family: var(--type-h5-font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--doc-ink);
}

.doc-eco__item p {
  margin: 0;
  font-family: var(--type-body-font-family);
  font-size: var(--type-body-sm-font-size);
  line-height: var(--type-body-sm-line-height);
  color: var(--doc-ink-soft);
}

.doc-eco__actions {
  margin-top: 18px;
}

/* —— What's next + Support (PDF str. 7) —— */
.doc-next {
  background: var(--surface-cream-h);
  color: var(--doc-ink);
  padding: var(--section-pad-y-large) 0;
  border-top: 1px solid rgba(62, 49, 23, 0.08);
}

.doc-next__head {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto clamp(32px, 5vh, 48px);
}

.doc-next__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
}

.doc-next__card {
  display: flex;
  flex-direction: column;
  text-align: center;
  border: var(--doc-frame);
  background: rgba(255, 252, 245, 0.65);
}

.doc-next__card-fig {
  margin: 0;
  aspect-ratio: 4 / 3;
}

.doc-next__card-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-next__card-body {
  padding: clamp(16px, 2vw, 22px) clamp(12px, 1.5vw, 16px) clamp(20px, 2.5vw, 26px);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.doc-next__card h3 {
  margin: 0 0 10px;
  font-family: var(--type-h3-font-family);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 600;
  color: var(--doc-ink);
}

.doc-next__card p {
  margin: 0;
  font-size: var(--type-body-sm-font-size);
  line-height: var(--type-body-sm-line-height);
  color: var(--doc-ink-soft);
}

.doc-support {
  background: var(--surface-cream-g);
  color: var(--doc-ink);
  padding: 0 0 var(--section-pad-y-large);
  border-top: 1px solid rgba(62, 49, 23, 0.08);
}

.doc-support__shell {
  width: 100%;
  max-width: calc(var(--site-content-max) + var(--site-content-pad-x) + var(--site-content-pad-x));
  margin-inline: auto;
  padding: clamp(28px, 4vh, 44px) var(--site-content-pad-x);
  border: var(--doc-frame);
  display: grid;
  grid-template-columns: minmax(0, 0.22fr) minmax(0, 1fr) minmax(0, 0.22fr);
  gap: clamp(16px, 2.5vw, 28px);
  align-items: center;
}

.doc-support__thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-support__thumbs--right {
  align-items: flex-end;
}

.doc-support__thumbs .doc-framed {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 16 / 10;
}

.doc-support__center {
  text-align: center;
  padding: clamp(8px, 2vw, 20px) 0;
}

.doc-support__center .doc-h2--dark {
  color: var(--doc-ink);
}

.doc-support__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  justify-content: center;
  margin-top: clamp(22px, 3vh, 32px);
}

@media (max-width: 1100px) {
  .doc-next__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-s3__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-eco__grid {
    grid-template-columns: 1fr;
  }

  .doc-eco__figure {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  .doc-eco__list {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 960px) {
  .doc-hero__layout,
  .doc-founder__grid,
  .doc-s3__hero,
  .doc-roots__grid,
  .doc-tour__grid,
  .doc-living__grid {
    grid-template-columns: 1fr;
  }

  .doc-hero__visual {
    height: auto;
    min-height: min(52vh, 480px);
    clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
  }

  .doc-hero__collage {
    height: min(52vh, 480px);
    min-height: min(52vh, 480px);
    grid-template-rows: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .doc-founder__gallery {
    grid-template-columns: 1fr 0.36fr;
    --doc-founder-stack-fr: 0.36;
  }

  .doc-s3__gallery,
  .doc-s3__cards {
    grid-template-columns: 1fr;
  }

  .doc-living__mosaic {
    flex-direction: column;
  }

  .doc-living__hero {
    flex: none;
    aspect-ratio: 16 / 10;
    max-height: 320px;
  }

  .doc-living__row {
    grid-template-columns: 1fr;
  }

  .doc-roots__row3 {
    grid-template-columns: 1fr;
  }

  .doc-tour__visuals {
    grid-template-columns: 1fr;
  }

  .doc-support__shell {
    grid-template-columns: 1fr;
  }

  .doc-support__thumbs,
  .doc-support__thumbs--right {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .doc-support__thumbs .doc-framed {
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  .doc-founder__gallery {
    grid-template-columns: 1fr;
  }

  .doc-founder__stack {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .doc-founder__stack .doc-framed {
    flex: 1 1 42%;
    max-width: 48%;
  }

  .doc-founder__strip.doc-framed {
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: none;
  }

  .doc-next__cards {
    grid-template-columns: 1fr;
  }

}
