/* ============================================================
   /platforma (+ /platforma/omnicore, /omniflow, /omnigate)
   Style page-specific — linkowane TYLKO przez strony Platformy.
   Buduje na tokenach z styles.css. Mobile-first. Bez JS strona czytelna.
   Zasada briefu: przestrzeń jest bohaterem, jeden akcent na sekcję,
   żargon architektury wyłącznie w składanej sekcji „Jak to działa".
   ============================================================ */

/* ---------- REVEAL ON SCROLL (ten sam wzorzec co /wdrozenia) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Helpery ---------- */
.pf-measure { max-width: 720px; }
.pf-center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- BREADCRUMB ---------- */
.pf-breadcrumb {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--color-text-dim);
}
.pf-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pf-breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.pf-breadcrumb a:hover { color: var(--color-brass); }
.pf-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: rgba(26,41,66,0.3); }
.pf-breadcrumb [aria-current] { color: var(--color-text); }

/* ---------- CTA row (platforma nie ładuje innych page-css) ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-row.pf-center { justify-content: center; }

/* ---------- HERO ---------- */
.pf-hero { text-align: center; padding: 48px 0 40px; }
@media (min-width: 900px) { .pf-hero { padding: 80px 0 60px; } }
.pf-hero .eyebrow { color: var(--color-brass); }
.pf-hero__logo { display: flex; justify-content: center; margin-bottom: 22px; }
.pf-hero__logo img { max-height: 60px; width: auto; display: block; }
.pf-hero__logo-ph {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px dashed rgba(164,124,58,0.4);
  border-radius: 999px;
  color: var(--color-text-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.pf-hero__logo-ph::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--color-brass);
  opacity: 0.65;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pf-hero__title { max-width: 760px; margin: 0 auto var(--space-4); }
.pf-hero .lede { max-width: 640px; margin-left: auto; margin-right: auto; }
.pf-hero__cta { margin-top: 28px; }

/* HERO z logo z boku (strony modułów) — logo po lewej, treść po prawej, do lewej */
.pf-hero--split { text-align: left; }
.pf-hero--split .pf-hero__grid { display: grid; gap: 26px; align-items: center; }
@media (min-width: 820px) {
  .pf-hero--split .pf-hero__grid { grid-template-columns: 0.8fr 1.2fr; gap: 52px; }
}
.pf-hero--split .pf-hero__logo { margin-bottom: 0; width: 100%; }
.pf-hero--split .pf-hero__logo img { max-height: none; width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
/* pusty slot logo w układzie z bokiem = ramka 3:2 (jak figura) */
.pf-hero--split .pf-hero__logo-ph {
  width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: var(--radius-lg);
  flex-direction: column; justify-content: center; gap: 8px; padding: 24px;
  background: linear-gradient(135deg, rgba(164,124,58,0.07), rgba(26,41,66,0.04));
}
.pf-hero--split .pf-hero__title { max-width: none; margin-left: 0; margin-right: 0; }
.pf-hero--split .lede { max-width: 560px; margin-left: 0; margin-right: 0; }
.pf-hero--split .pf-hero__cta { justify-content: flex-start; }

/* ---------- BAND: kotwica metody (gdzie to siedzi) ---------- */
.pf-band__inner { max-width: 760px; }
.pf-band__inner p { margin-bottom: var(--space-4); }

/* ---------- MODUŁY (3 karty, jasne tło) ---------- */
.pf-modules {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}
@media (min-width: 820px) { .pf-modules { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.pf-module {
  display: flex;
  flex-direction: column;
  background: var(--color-cream);
  border: 1px solid rgba(26,41,66,0.1);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.pf-module:hover { transform: translateY(-3px); border-color: rgba(164,124,58,0.45); box-shadow: 0 12px 28px rgba(26,41,66,0.07); }
.section--dark .pf-module { background: rgba(245,239,228,0.04); border-color: rgba(245,239,228,0.12); }
.pf-module__role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: 10px;
}
.pf-module__name { margin-bottom: 10px; }
.pf-module__desc { color: var(--color-text-muted); margin-bottom: 20px; }
.pf-module__link {
  margin-top: auto;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
}
.pf-module__link:hover { color: var(--color-brass); }

/* ---------- „CO ROBI" — punkty skutków ---------- */
.pf-points { display: grid; gap: 18px; margin-top: 8px; }
@media (min-width: 820px) { .pf-points { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.pf-point__title { margin-bottom: 8px; }
.pf-point p { color: var(--color-text-muted); margin: 0; }
.pf-point__title::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-brass);
  margin-bottom: 14px;
}
/* Punkty w kolumnie tekstu obok figury (sekcja „Co robi") — zawsze stos. */
.pf-points--stack { grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
@media (min-width: 820px) { .pf-points--stack { grid-template-columns: 1fr; gap: 22px; } }
.pf-points--stack .pf-point__title::before { margin-bottom: 10px; }

/* ---------- STACK / DIAGRAM (fallback tekstowy: wie → rozmawia → chroni) ---------- */
.pf-stack {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-top: 8px;
}
@media (min-width: 720px) { .pf-stack { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; } }
.pf-stack__node {
  background: var(--color-cream);
  border: 1px solid rgba(26,41,66,0.1);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
}
.pf-stack__node strong { display: block; font-family: var(--font-serif); font-size: 18px; color: var(--color-navy); }
.pf-stack__node span { font-size: 13px; color: var(--color-text-muted); }
.pf-stack__arrow { text-align: center; color: var(--color-brass); font-size: 20px; }
@media (max-width: 719px) { .pf-stack__arrow { transform: rotate(90deg); } }

/* ---------- „JAK TO DZIAŁA" — składane, wizualnie podrzędne ---------- */
.pf-howit {
  max-width: 760px;
  margin: 8px auto 0;
  border-top: 1px solid rgba(26,41,66,0.12);
}
.section--dark .pf-howit { border-top-color: rgba(245,239,228,0.16); }
.pf-howit__details { border-bottom: 1px solid rgba(26,41,66,0.12); }
.section--dark .pf-howit__details { border-bottom-color: rgba(245,239,228,0.16); }
.pf-howit__summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}
.pf-howit__summary::-webkit-details-marker { display: none; }
.pf-howit__summary:hover { color: var(--color-brass); }
.pf-howit__summary::after { content: "+"; font-size: 18px; line-height: 1; }
.pf-howit__details[open] .pf-howit__summary::after { content: "–"; }
.pf-howit__body { padding: 0 0 24px; color: var(--color-text-muted); font-size: 15px; }
.pf-howit__body p { color: var(--color-text-muted); }
.section--dark .pf-howit__body p { color: rgba(245,239,228,0.72); }
.pf-howit__levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pf-howit__levels li { padding-left: 16px; border-left: 2px solid rgba(164,124,58,0.4); }
.pf-howit__levels strong { color: var(--color-text); }
.section--dark .pf-howit__levels strong { color: var(--color-cream); }

/* ---------- POZOSTAŁE MODUŁY (cross-link na podstronie modułu) ---------- */
.pf-others { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 720px) { .pf-others { grid-template-columns: 1fr 1fr; gap: 20px; } }
.pf-other {
  display: block;
  background: var(--color-cream);
  border: 1px solid rgba(26,41,66,0.1);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease;
}
.pf-other:hover { transform: translateY(-2px); border-color: rgba(164,124,58,0.45); }
.pf-other__role { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brass); margin-bottom: 6px; }
.pf-other__name { font-family: var(--font-serif); font-size: 19px; color: var(--color-navy); margin-bottom: 4px; }
.pf-other__desc { font-size: 14px; color: var(--color-text-muted); }
.pf-back { display: inline-block; margin-top: 24px; font-weight: 600; color: var(--color-navy); text-decoration: none; }
.pf-back:hover { color: var(--color-brass); }

/* ---------- STORY (scena → ten sam moment z modułem → pierwszy ruch) ---------- */
.pf-story { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) {
  .pf-story { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .pf-story--rev .pf-story__media { order: -1; }
}
.pf-story__text { max-width: 560px; }
.pf-story__before { color: var(--color-text-muted); }
.pf-story__after {
  color: var(--color-text);
  padding-left: 16px;
  border-left: 2px solid var(--color-brass);
}
.pf-story__move {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(26,41,66,0.12);
  font-size: 15px;
  color: var(--color-text-muted);
}
.pf-story__move strong { color: var(--color-brass); }

/* ---------- FIGURE (obraz lub placeholder z opisem) ---------- */
.pf-figure { margin: 0; }
.pf-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.pf-figure__ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, rgba(164,124,58,0.07), rgba(26,41,66,0.04));
  border: 1px dashed rgba(164,124,58,0.45);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
/* Ikona „obrazek" rysowana w CSS (lżejszy markup figur). */
.pf-figure__ph::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  background: var(--color-brass);
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 16l-5-5L5 20'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='M21 16l-5-5L5 20'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pf-figure__ph-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brass); }
.pf-figure__ph-desc { font-size: 13px; line-height: 1.55; color: var(--color-text-dim); max-width: 36ch; }

/* ---------- NOTE (callout: czasem wystarczy jeden moduł) ---------- */
.pf-note {
  margin: 28px auto 0;
  max-width: 720px;
  background: rgba(164,124,58,0.08);
  border: 1px solid rgba(164,124,58,0.25);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.pf-note p { margin: 0; color: var(--color-text-muted); }
.pf-note strong { color: var(--color-text); }

/* ---------- CTA pod-CTA (soft radar) ---------- */
.pf-soft { margin-top: 14px; font-size: 14px; color: var(--color-text-dim); }
.section--dark .pf-soft { color: rgba(245,239,228,0.6); }
.pf-soft a { color: var(--color-brass); text-decoration: none; }
.section--dark .pf-soft a { color: var(--color-brass-light); }
.pf-soft a:hover { text-decoration: underline; }
