/* Premium in a Box: shared stack/comparison, with a naturally sized description. */
html:has(.page-offer--premium-box), .page-offer--premium-box { --bg: #000; --patron-bg: #000; background-color: #000; }
.page-offer--premium-box .patron-section,
.page-offer--premium-box .premium-final-cta { background: #000; }
:is(#czym-jest-premium-w-pudelku, #czym-jest-premium-skalowane) { overflow: visible; }
:is(#czym-jest-premium-w-pudelku, #czym-jest-premium-skalowane) > .patron-filmstrip { display: none; }
.premium-box-stack { position: relative; isolation: isolate; width: 100%; margin: 0 auto; }
:is(#czym-jest-premium-w-pudelku, #czym-jest-premium-skalowane) .premium-box-stack .premium-box-story {
  display: block; width: 100%; max-width: none; height: auto;
  border-color: var(--brand-line); border-radius: 12px;
}
.premium-box-stack .home-offer-stack__card--compare { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
.premium-box-stack .offer-compare__title {
  font: 700 clamp(1.25rem, 2.25vw, 1.6rem)/1.3 var(--font-display); letter-spacing: -.035em;
}
@media (min-width: 901px) and (min-height: 700px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .premium-box-stack .home-offer-stack__card--compare { height: var(--offer-height); aspect-ratio: auto; }
  .js .premium-box-stack:not(.is-stack-static) .home-offer-stack__slot {
    height: auto;
    top: min(80px, calc(100svh - var(--offer-card-height, 800px) - 32px));
  }
  .js .premium-box-stack:not(.is-stack-static) .home-offer-stack__slot:last-child {
    min-height: 0; background: var(--bg-black);
    top: min(80px, calc(100svh - var(--offer-card-height, 800px)));
  }
}
/* The final card ends the stack; no empty viewport is reserved after it. */
@media (max-width: 900px), (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  .premium-box-stack.is-touch-sequence .home-offer-stack__slot:last-child {
    min-height: 0; background: var(--bg-black);
    top: min(80px, calc(100svh - var(--touch-card-height)));
  }
}

/* One section owns each gap; avoid stacking bottom and top padding. */
.page-offer--premium-box {
  --box-section-gap: clamp(72px, 6vw, 96px);
  --box-topic-gap: clamp(96px, 8vw, 120px);
  --box-heading-gap: clamp(28px, 3vw, 40px);
}
.page-offer--premium-box main > .patron-section {
  padding-block: var(--box-section-gap) 0;
  border-top: 0;
}
.page-offer--premium-box :is(#czym-jest-premium-w-pudelku, #czym-jest-premium-skalowane, #co-zyskujesz, #co-mozemy-skalowac) {
  padding-top: var(--box-topic-gap);
}
.page-offer--premium-box .patron-section-header {
  margin-bottom: var(--box-heading-gap);
}
.page-offer--premium-box .patron-kicker:empty { display: none; }
.page-offer--premium-box .premium-box-stack.is-touch-sequence { padding-bottom: 0; }
.page-offer--premium-box .premium-upgrade { margin-top: var(--box-heading-gap); }
.page-offer--premium-box .np-process:not(.is-scrolling) { padding-block: var(--box-topic-gap) 0; }
/* External margin leaves the sticky sequence's scroll distance unchanged. */
.page-offer--premium-box .np-process.is-scrolling { margin-top: var(--box-topic-gap); }
.page-offer--premium-box .np-process.is-scrolling .np-process__stage { justify-content: flex-start; }
.page-offer--premium-box .np-process__header.main-section-header { margin-bottom: var(--box-heading-gap); }
.page-offer--premium-box .np-process.is-touch-sequence:not(.is-scrolling) .np-process__track { padding-bottom: 0; }
.page-offer--premium-box .np-process.is-touch-sequence .np-process__touch-card:last-child {
  min-height: 0; padding-bottom: 0;
}
.page-offer--premium-box .module-credits { padding-block: var(--box-section-gap) 0; }
.page-offer--premium-box #creditsFade > .main-section-header { margin-bottom: var(--box-heading-gap); }
.page-offer--premium-box .credits-more-wrap { margin-top: var(--box-heading-gap); }
.page-offer--premium-box .premium-product-footer { margin-top: var(--box-section-gap); }
@media (max-width: 900px) {
  .page-offer--premium-box { --box-section-gap: 56px; --box-topic-gap: 72px; --box-heading-gap: 28px; }
}
@media (min-width: 901px) and (min-height: 700px) and (hover: hover) and (pointer: fine) {
  /* Fit the stage to its content: no invisible viewport tail before Why us. */
  .page-offer--premium-box .np-process.is-scrolling .np-process__stage { height: auto; min-height: 0; overflow: visible; clip-path: inset(0 0 -28px); }
}
@media (max-width: 900px) {
  .premium-box-stack .home-offer-stack__card--compare { aspect-ratio: 4 / 3; min-height: 260px; }
  .premium-box-stack .offer-compare__title { font-size: clamp(1rem, 4vw, 1.25rem); }
}

/* Offer workflow cards keep their real height on phones/tablets. The opaque
   backdrop hides older pinned cards without reserving an empty viewport. */
@media (max-width: 900px), (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  .page-offer--premium-box .np-process.is-touch-sequence:not(.is-scrolling) .np-process__track {
    clip-path: inset(0); isolation: isolate;
  }
  .page-offer--premium-box .np-process.is-touch-sequence:not(.is-scrolling) .np-process__touch-card {
    min-height: 0; padding-bottom: 0; margin-bottom: clamp(32px, 6svh, 56px);
  }
  .page-offer--premium-box .np-process.is-touch-sequence .np-process__touch-card::before {
    content: ''; position: absolute; inset: 0; min-height: calc(100svh - 80px);
    background: #000; z-index: -1; pointer-events: none;
  }
  .page-offer--premium-box .np-process.is-touch-sequence:not(.is-scrolling) .np-process__touch-card:last-child { margin-bottom: 0; }
}
/* Scaled retains its own case selection and uses the same section rhythm. */
.page-premium-scaled-proof .np-process { background: #000; }
.page-premium-scaled-proof .np-process__header,
.page-premium-scaled-proof .np-process__track,
.page-premium-scaled-proof .np-process__footer { width: min(1180px, calc(100% - var(--scaled-proof-gutter) * 2)); }
.page-premium-scaled-proof .np-process__track { will-change: auto; }
.page-premium-scaled-proof .np-process.is-nearby.is-scrolling .np-process__track { will-change: transform; }
.page-offer--premium-scaled .case-module--showcase { padding-block: var(--box-topic-gap) 0; background: #000; }
.page-offer--premium-scaled .case-module-heading--showcase { margin-bottom: var(--box-heading-gap); }
