/* ==========================================================================
   PoródNaMiarę.pl — sekcja „Noc 7 września” (2026-10): prawdziwa noc porodu Wiktorii,
   godzina po godzinie. Desktop: przyklejony kadr + przewijane kroki (scrollytelling).
   Telefon: pionowa taśma filmowa (każdy krok ma własne zdjęcie). JS: /js/pnm-noc.js.
   ========================================================================== */
.pn { position: relative; background: #17141F; color: #FAF5EF; overflow: clip; isolation: isolate; } /* clip, nie hidden — hidden psuje position: sticky kadru */
.pn::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 60% 40% at 20% 0%, rgba(160, 82, 94, .28), transparent 70%),
              radial-gradient(ellipse 50% 40% at 90% 100%, rgba(243, 199, 126, .14), transparent 70%); }
.pn-wrap { max-width: 1152px; margin: 0 auto; padding: 64px 16px 72px; }
@media (min-width: 768px) { .pn-wrap { padding: 104px 24px 112px; } }

/* nagłówek */
.pn-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.pn-kick { margin: 0 0 12px; font: 600 12px/1.4 'Figtree', system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #F0B9C0; }
.pn-h { margin: 0 0 16px; font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(30px, 5vw, 56px); line-height: 1.05; text-wrap: balance; }
.pn-h em { font-style: italic; color: #F3C77E; font-weight: 500; }
.pn-sub { margin: 0; font-size: 17px; line-height: 1.65; color: rgba(250, 245, 239, .8); }
.pn-date { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(250, 245, 239, .22); font: 600 13px/1 'Figtree', system-ui, sans-serif; letter-spacing: .08em; color: rgba(250, 245, 239, .85); }
.pn-date i { width: 8px; height: 8px; border-radius: 50%; background: #E9707F; box-shadow: 0 0 0 0 rgba(233, 112, 127, .7); animation: pn-rec 1.6s ease-out infinite; }
@keyframes pn-rec { to { box-shadow: 0 0 0 10px rgba(233, 112, 127, 0); } }

/* oś: kroki */
.pn-story { position: relative; }
.pn-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.pn-step { position: relative; margin: 0 0 44px; }
.pn-fig { position: relative; margin: 0 0 18px; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: #231E2E;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.pn-fig img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); transition: transform 6s ease-out; }
.pn-step.is-on .pn-fig img { transform: scale(1.12); }
.pn-fig::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 20, 31, 0) 55%, rgba(23, 20, 31, .75) 100%); }
.pn-tc { position: absolute; left: 16px; bottom: 12px; z-index: 1; font-family: 'Fraunces', serif; font-weight: 600; font-size: 46px; line-height: 1;
  color: #FAF5EF; letter-spacing: -.01em; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.pn-tc small { display: block; margin-top: 6px; font: 600 11px/1 'Figtree', system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #F0B9C0; }
.pn-txt { padding: 0 4px; }
.pn-when { margin: 0 0 6px; font: 600 12px/1.3 'Figtree', system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #F3C77E; }
.pn-t { margin: 0 0 8px; font-family: 'Fraunces', serif; font-weight: 600; font-size: 26px; line-height: 1.15; }
.pn-p { margin: 0; font-size: 16px; line-height: 1.65; color: rgba(250, 245, 239, .82); }

/* desktop: przyklejony kadr po lewej, kroki po prawej */
.pn-stage { display: none; }
@media (min-width: 1024px) {
  .pn-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
  .pn-stage { display: block; position: sticky; top: 12vh; height: 76vh; max-height: 760px; border-radius: 24px; overflow: hidden;
    background: #231E2E; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(250, 245, 239, .06); }
  .pn-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08);
    transition: opacity 1.1s ease, transform 7s ease-out; }
  .pn-stage img.is-on { opacity: 1; transform: scale(1.0); }
  .pn-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(23, 20, 31, .35) 0%, transparent 25%, transparent 60%, rgba(23, 20, 31, .85) 100%); }
  .pn-stage .pn-grain { position: absolute; inset: -50%; z-index: 2; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: pn-grain 1.2s steps(6) infinite; }
  .pn-clock { position: absolute; left: 28px; bottom: 24px; z-index: 3; font-family: 'Fraunces', serif; font-weight: 600; font-size: 88px; line-height: .9;
    letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 6px 30px rgba(0, 0, 0, .55); }
  .pn-clock small { display: block; margin-top: 10px; font: 600 12px/1 'Figtree', system-ui, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #F0B9C0; }
  .pn-rec { position: absolute; top: 22px; left: 24px; z-index: 3; display: flex; align-items: center; gap: 8px;
    font: 600 11px/1 'Figtree', system-ui, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: rgba(250, 245, 239, .85); }
  .pn-rec i { width: 8px; height: 8px; border-radius: 50%; background: #E9707F; animation: pn-rec 1.6s ease-out infinite; }
  .pn-bar { position: absolute; top: 0; left: 0; height: 3px; z-index: 3; background: linear-gradient(90deg, #A0525E, #F3C77E); width: 0; transition: width .6s ease; }

  .pn-step { min-height: 62vh; display: flex; align-items: center; margin: 0; padding-left: 36px; opacity: .32; transition: opacity .6s ease; }
  .pn-step.is-on { opacity: 1; }
  .pn-step::before { content: ''; position: absolute; left: 0; top: 50%; width: 11px; height: 11px; margin-top: -6px; border-radius: 50%;
    background: #17141F; border: 2px solid rgba(250, 245, 239, .35); transition: all .5s ease; }
  .pn-step.is-on::before { background: #F3C77E; border-color: #F3C77E; box-shadow: 0 0 0 6px rgba(243, 199, 126, .18); }
  .pn-steps::before { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: rgba(250, 245, 239, .14); }
  .pn-fig { display: none; }
  .pn-t { font-size: 34px; }
  .pn-p { font-size: 17.5px; max-width: 34ch; }
}
@keyframes pn-grain { 0% { transform: translate(0, 0) } 25% { transform: translate(-5%, 4%) } 50% { transform: translate(4%, -3%) } 75% { transform: translate(-3%, -5%) } 100% { transform: translate(0, 0) } }

/* finał: wezwanie do działania */
.pn-cta { position: relative; margin: 56px auto 0; max-width: 860px; text-align: center; padding: 44px 24px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(160, 82, 94, .32), rgba(62, 56, 82, .55)); border: 1px solid rgba(250, 245, 239, .14); }
@media (min-width: 768px) { .pn-cta { padding: 56px 48px; margin-top: 80px; } }
.pn-cta h3 { margin: 0 0 12px; font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; text-wrap: balance; }
.pn-cta p { margin: 0 auto 26px; max-width: 52ch; font-size: 16.5px; line-height: 1.6; color: rgba(250, 245, 239, .85); }
.pn-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pn-b1 { display: inline-block; background: #FAF5EF; color: #3E3852; font-weight: 700; padding: 15px 30px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 16px 36px -14px rgba(250, 245, 239, .5); transition: transform .2s, box-shadow .2s; }
.pn-b1:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(250, 245, 239, .65); }
.pn-b2 { display: inline-block; color: #FAF5EF; font-weight: 600; padding: 14px 26px; border-radius: 999px; text-decoration: none; border: 1px solid rgba(250, 245, 239, .4); }
.pn-b2:hover { background: rgba(250, 245, 239, .1); }
.pn-b1:focus-visible, .pn-b2:focus-visible { outline: 3px solid #F3C77E; outline-offset: 3px; }
.pn-note { margin: 18px 0 0 !important; font-size: 13px !important; color: rgba(250, 245, 239, .6) !important; }
@media (max-width: 639px) { .pn-b1, .pn-b2 { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) {
  .pn *, .pn *::before, .pn *::after { animation: none !important; transition: none !important; }
  .pn-fig img, .pn-stage img { transform: none !important; }
}
@media (max-width: 1023px) { .pn-when { display: none; } }
