/* Offer cards: native desktop stacking and static touch layouts. */
[data-home-page] .home-offer-stack {
  width: min(1180px, calc(100% - var(--home-gutter, 22px) * 2));
  margin: var(--home-section-gap, 88px) auto 0;
  position: relative;
  isolation: isolate;
}
.home-offer-stack__slot { position: relative; margin: 0 0 24px; }
.home-offer-stack__slot:last-of-type { margin-bottom: 0; }
.home-offer-stack__card {
  display: grid; grid-template-columns: 1fr 1.15fr; grid-template-areas: "copy visual";
  min-width: 0; min-height: 400px; height: 100%;
  border: 1px solid var(--brand-line); border-radius: 12px;
  background: var(--surface-premium-solid);
  overflow: hidden; transform-origin: 50% 0;
}
.home-offer-stack__copy { grid-area: copy; padding: clamp(24px, 4vw, 52px); align-self: center; min-width: 0; }
.home-offer-stack__number { display: block; color: var(--brand); margin-bottom: 24px; font: inherit; }
.home-offer-stack__copy .ghost-title { margin: 0 0 20px; }
.home-offer-stack__copy .ghost-title::after {
  content: ''; display: block; width: 56px; height: 2px; margin-top: 20px; background: var(--brand);
}
.home-offer-stack__copy .ghost-desc { margin: 0 0 28px; }
.home-offer-stack__copy .ghost-desc--box { max-width: none; }
.ghost-desc--box > span { display: block; }
.home-offer-stack__copy .ui-text-cta { text-align: left; max-width: 100%; }
.home-offer-stack__visual { grid-area: visual; position: relative; margin: 0; min-width: 0; min-height: 300px; overflow: hidden; background: #080a0d; }
.home-offer-stack__image { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.home-offer-stack__slot:focus-within { z-index: 10; }
/* Touch focus must not lift a card above the next card in the stack. */
[data-home-page] .home-offer-stack.is-touch-sequence > .home-offer-stack__slot:focus-within { z-index: auto; }
.home-offer-stack__slot:focus-within .home-offer-stack__card { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (min-width: 901px) {
  .home-offer-stack__slot:nth-child(odd) .home-offer-stack__card {
    grid-template-columns: 1.15fr 1fr; grid-template-areas: "visual copy";
  }
}
@media (min-width: 901px) and (min-height: 700px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-offer-stack {
    --offer-height: min(600px, 62svh);
    --offer-top: max(80px, calc((100svh - var(--offer-height)) / 2 - 22px));
  }
  .js .home-offer-stack:not(.is-stack-static) .home-offer-stack__slot {
    position: sticky; top: calc(var(--offer-top) + var(--offer-index) * 22px);
    height: var(--offer-height); margin-bottom: clamp(100px, 18svh, 200px);
  }
  .js .home-offer-stack:not(.is-stack-static) .home-offer-stack__slot:last-of-type { margin-bottom: 0; }
  .home-offer-stack.is-nearby:not(.is-stack-static) .home-offer-stack__card,
  .home-offer-stack.is-nearby:not(.is-stack-static) .home-offer-stack__image { will-change: transform; }
}
@media (max-width: 900px) {
  .home-offer-stack__card { grid-template-columns: 1fr; grid-template-areas: "visual" "copy"; min-height: 0; height: auto; }
  /* Preserve the source frame, including the square second offer. */
  .home-offer-stack__visual { min-height: 0; aspect-ratio: var(--offer-image-ratio, 16 / 9); max-height: min(520px, 65svh); }
  .home-offer-stack__image { object-fit: contain; object-position: center; }
  .home-offer-stack__copy { padding: 28px 24px; }
  .home-offer-stack__number { margin-bottom: 16px; }
  .home-offer-stack__copy .ui-text-cta { min-height: 44px; }
}

/* The fourth card compares two registered versions of the same frame. */
.home-offer-stack__card.home-offer-stack__card--compare { display: block; position: relative; }
.offer-compare { --compare-position: 50%; position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; user-select: none; }
.offer-compare__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.offer-compare__image--before { clip-path: inset(0 0 0 var(--compare-position)); }
.offer-compare__shade { position: absolute; inset: 45% 0 0; pointer-events: none; background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.offer-compare__title { position: absolute; z-index: 2; text-shadow: 0 2px 12px rgba(0,0,0,.7); left: 5%; right: 5%; bottom: clamp(22px,4vw,48px); margin: 0; color: #fff; text-align: center; pointer-events: none; }
.offer-compare__label { position: absolute; top: 20px; padding: 6px 10px; color: #fff; background: #0009; border: 1px solid transparent; border-radius: 6px; font: 600 12px/1.2 var(--font-body); pointer-events: none; transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.offer-compare__label.is-active { background: var(--brand); color: #fff; border-color: #fff; box-shadow: 0 0 20px rgba(59,140,235,.4); }
@media (prefers-reduced-motion: reduce) { .offer-compare__label { transition: none; } }
.offer-compare__label--before { right: 20px; }.offer-compare__label--after { left: 20px; }
.offer-compare__divider { position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--compare-position); width: 2px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.offer-compare__handle { position: absolute; left: 50%; top: 43%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: var(--brand); color: #fff; box-shadow: 0 0 22px #0007; font: 700 22px/1 var(--font-body); }
.offer-compare__divider { display: none; }
.offer-compare.is-ready .offer-compare__divider { display: block; }
.offer-compare:focus-within { outline: 3px solid var(--brand); outline-offset: -4px; }
.offer-compare__range { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; clip-path: inset(50%); overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .offer-compare.is-ready { cursor: ew-resize; } }
@media (max-width: 900px) {
  .home-offer-stack__card.home-offer-stack__card--compare { aspect-ratio: 4 / 3; min-height: 260px; }
  .offer-compare__title { bottom: 20px; }
  .offer-compare__label { top: 12px; }.offer-compare__label--before { right: 12px; }.offer-compare__label--after { left: 12px; }
}

/* The same manifest is mounted here on desktop and restored outside on touch. */
.home-offer-stack__slot--manifest[hidden] { display: none !important; }
.home-offer-stack:has(> [data-offer-manifest-slot][hidden]) > .home-offer-stack__slot:nth-of-type(4) { margin-bottom: 0; }
.home-offer-stack__slot--manifest > .premium-mask { height: 100%; }
.home-offer-stack__card.premium-mask__surface {
  display: flex; min-height: 400px; height: 100%; padding: clamp(32px, 4vw, 56px);
  background: var(--bg-black); position: relative; top: auto;
}
.is-offer-manifest .premium-mask__headline { font-size: clamp(2.8rem, 5vw, 5.5rem); margin-bottom: 28px; }
.is-offer-manifest .premium-mask__text { font-size: clamp(2rem, 3.6vw, 4rem); }
.is-offer-manifest.is-statement-sticky::after { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .home-offer-stack:has(.is-offer-manifest.is-statement-entering) + .case-module--showcase:not(:focus-within) { opacity: 0; pointer-events: none; }
}
@media (min-width: 901px) and (min-height: 700px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .js .home-offer-stack:not(.is-stack-static) .home-offer-stack__slot--manifest { margin-bottom: 0; }
}
/* Match the typography of “Fragmenty workflow w praktyce”. */
[data-home-page] .offer-compare__title {
  color: var(--cinema-text, #f0f4fa); font: 600 clamp(1.18rem, 2.2vw, 1.7rem)/1.5 var(--font-display);
  letter-spacing: -.035em; text-wrap: balance;
}
@media (max-width: 768px) {
  [data-home-page] .offer-compare__title { font-size: 1.05rem; line-height: 1.56; }
}
/* Enlarge the case heading only where its existing size is smaller. */
@media (min-width: 982px) {
  [data-home-page] #caseModuleTitle {
    color: var(--cinema-text, #f0f4fa); font: 600 clamp(1.18rem, 2.2vw, 1.7rem)/1.5 var(--font-display);
    letter-spacing: -.035em; text-wrap: balance;
  }
}

.home-offer-stack__card--manifest{border-color:transparent}

/* Keep the first two offer frames full-width in the tablet layout. */
@media (min-width: 601px) and (max-width: 900px) {
  .home-offer-stack > .home-offer-stack__slot:nth-child(-n+2) .home-offer-stack__visual {
    width: 100%; height: auto; max-height: none; align-self: start;
  }
}

/* Homepage manifest: a little more headroom on desktop. */
@media (min-width:901px) and (hover:hover) and (pointer:fine) {
 [data-home-page] .home-offer-stack__card.premium-mask__surface { padding-block:64px; }
}
@media (min-width:901px) and (min-height:700px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
 .js [data-offer-stack]:not(.is-stack-static) > .home-offer-stack__slot--manifest {
  height:min(calc(var(--offer-height) + 96px),calc(100svh - var(--offer-top) - 88px - 24px));
 }
}
@media (max-width:900px), (hover:none), (pointer:coarse) {
 [data-home-page] .home-offer-stack__slot--manifest > .premium-mask { height:auto; }
 [data-home-page] .home-offer-stack__card.premium-mask__surface {
  height:auto; min-height:clamp(360px,70svh,600px);padding:72px 16px;
 }
 [data-home-page] .is-offer-manifest .premium-mask__headline {font-size:clamp(1.9rem,7.3vw,4rem);}
 [data-home-page] .is-offer-manifest .premium-mask__text {font-size:clamp(1.45rem,5.8vw,3.2rem);line-height:1.2;}
 [data-home-page] .is-offer-manifest .premium-mask__line {white-space:normal;}
 [data-home-page] .home-offer-stack.is-touch-sequence {padding-bottom:0;}
}

/* Only the card underneath the mobile comparison is softened. */
@media (max-width:900px), (max-width:1366px) and (hover:none) and (pointer:coarse) {
 .home-offer-stack.is-touch-sequence .home-offer-stack__card.is-compare-underlay { filter:blur(2px); }
}

/* Comparison reveal: poster remains visible until playback starts. */
.offer-compare__video {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none;opacity:0;}
.offer-compare.is-video-visible .offer-compare__video {opacity:1;}
@media(max-width:900px),(hover:none),(pointer:coarse) {
 .offer-compare__video {display:none;}
 [data-home-page] .offer-compare__video {display:block;}
}
@media(prefers-reduced-motion:reduce) {
 .offer-compare__video,
 [data-home-page] .offer-compare__video {display:none;}
}

/* Chronicles: right-aligned copy, local shade, clear foreground camera. */
[data-home-page] .home-offer-stack__card--chronicles {
  position: relative; display: flex; align-items: flex-end; isolation: isolate;
  min-height: 400px; background: #080a0d;
}
[data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__visual {
  position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  max-height: none; aspect-ratio: auto; z-index: -2;
}
[data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__image {
  object-fit: cover; object-position: center 40%;
}
[data-home-page] .home-offer-stack__card--chronicles::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 62% 90% at 100% 100%, rgba(3,8,14,.97) 0%, rgba(3,8,14,.92) 45%, rgba(3,8,14,.65) 65%, transparent 100%);
}
[data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__copy {
  align-self: flex-end; width: min(62%, 640px); margin-left: auto; text-align: right;
  padding: 24px clamp(24px,4vw,52px) 30px;
}
[data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__number { margin-bottom: 10px; }
[data-home-page] .home-offer-stack__card--chronicles .ghost-title { margin-bottom: 12px; }
[data-home-page] .home-offer-stack__card--chronicles .ghost-title::after { margin-top: 12px; margin-left: auto; }
[data-home-page] .home-offer-stack__card--chronicles .ghost-desc { color: #e0e5ec; margin: 0 0 18px auto; }
[data-home-page] .home-offer-stack__card--chronicles .ui-text-cta { text-align: right; }
@media (max-width:900px) {
  [data-home-page] .home-offer-stack__card--chronicles { min-height: 0; padding-top: 56.25%; }
  [data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__image {
    height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  }
  [data-home-page] .home-offer-stack__card--chronicles::after {
    bottom: auto; aspect-ratio: 16 / 9;
    background: linear-gradient(180deg, transparent 75%, #080a0d 100%);
  }
  [data-home-page] .home-offer-stack__card--chronicles .home-offer-stack__copy { width: 100%; padding: 16px 24px 28px; }
}

/* Desktop only: allow the Chronicles description to use the full copy width. */
@media (min-width:901px) {
  [data-home-page] .home-offer-stack__card--chronicles .ghost-desc { max-width: none; }
}

/* Mobile second offer: a shorter photo area, with the bear's head retained. */
@media (max-width: 900px) {
  [data-home-page] .home-offer-stack__card[aria-labelledby="offerStackTitle2"] .home-offer-stack__visual {
    aspect-ratio: 4 / 3;
  }
  [data-home-page] .home-offer-stack__card[aria-labelledby="offerStackTitle2"] .home-offer-stack__image {
    object-fit: cover;
    object-position: center top;
  }
}
