/*
 * The groups of the catalogue as strips (template-parts/product-groups.php), the owner's choice of
 * 2026-11-19 — the prototypes „Witryna” on the ground of „Półka”, the layout „Obok”, the photograph
 * „Pod tytuł”: on /produkty/ under its title, where its photograph, its intro and the bar of group
 * buttons stood — and, since that evening, the industries' strips on the Rozwiązania page and the home
 * page too (template-parts/solution-areas.php), the owner wanting the two alike. They began as the Kadr,
 * whose photograph stood behind the words; here it stands over them.
 *
 * Whether a strip is open is two custom properties on it, --open (0 or 1) and --shown (hidden or
 * visible), set by one pair of rules: open is the strip the script marks [data-active], or — before
 * assets/js/solution-areas.js has marked the set .is-ready, or without it — the strip under the
 * pointer or holding the focus, the first staying open only while no other is. Everything else reads
 * the two properties.
 *
 * The open strip's words are laid out at its open width from the start (--count strips, 5.6 to 1),
 * so nothing reflows while it opens.
 */
.products-hero{padding-bottom:0}
.products-hero h1{max-width:none;font-size:clamp(2.17rem,4vw,3.6rem)}
.products-hero .pg{margin-top:30px}
/* The catalogue starts where the intro under the strips would have: 28 px under them. */
.products-hero+.catalog-page{padding-top:28px}

.pg{--pg-ease:cubic-bezier(.23,1,.32,1);--photo-h:250px;--pad:clamp(18px,3.2cqw,24px);container-type:inline-size;display:flex;gap:3px;height:460px;overflow:hidden;border-radius:28px}
.pg-panel{--open:0;--shown:hidden;position:relative;isolation:isolate;flex:1 1 0;min-width:0;overflow:hidden;color:#fff;background:radial-gradient(circle at 50% var(--photo-h),rgba(40,183,201,.22),transparent 52%),var(--navy);transition:flex-grow 360ms var(--pg-ease)}
.pg-panel[data-active],.pg:not(.is-ready) .pg-panel:is(:hover,:focus-within){--open:1;--shown:visible;flex-grow:5.6}
.pg:not(.is-ready):is(:hover,:focus-within) .pg-panel[data-active]:not(:hover,:focus-within){--open:0;--shown:hidden;flex-grow:1}
.pg-photo{position:absolute;left:0;top:0;z-index:-2;width:100%;height:var(--photo-h);object-fit:cover;transition:transform 360ms var(--pg-ease)}
/* Closed: the photograph under navy. Every strip: the foot of the photograph goes into the navy under it. */
.pg-panel:before{content:"";position:absolute;left:0;top:0;z-index:-1;width:100%;height:var(--photo-h);background:rgba(9,24,71,.42);opacity:calc(1 - var(--open));transition:opacity 300ms ease-out}
.pg-panel:after{content:"";position:absolute;left:0;top:calc(var(--photo-h) - 96px);z-index:-1;width:100%;height:97px;background:linear-gradient(0deg,var(--navy) 0,rgba(9,24,71,.86) 12%,rgba(9,24,71,.5) 55%,rgba(9,24,71,0) 100%)}
.pg-tab{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:flex-start;padding:18px 0 22px 20px;color:#fff;background:none;border:0;cursor:pointer;font:inherit;text-align:left}
.pg-tab:focus-visible{outline:3px solid var(--cyan-light);outline-offset:-5px}
.pg-num{color:var(--cyan-light);font-size:12px;font-weight:850;letter-spacing:.08em;text-shadow:0 1px 4px rgba(9,24,71,.8)}
.pg-name{margin-top:auto;font-size:16px;font-weight:850;letter-spacing:-.005em;line-height:1;white-space:nowrap;writing-mode:vertical-rl;transform:rotate(180deg)}
.pg-num,.pg-name{opacity:calc(1 - var(--open));transition:opacity 140ms ease-out}
.pg-body{position:absolute;left:0;top:var(--photo-h);bottom:0;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 28px;width:calc((100cqw - (var(--count,7) - 1) * 3px) / (var(--count,7) - 1 + 5.6) * 5.6);padding:14px var(--pad) 20px;visibility:var(--shown);opacity:var(--open);transform:translateY(calc((1 - var(--open)) * 10px));transition:opacity calc(110ms + var(--open) * 130ms) ease-out calc(var(--open) * 160ms),transform calc(110ms + var(--open) * 210ms) var(--pg-ease) calc(var(--open) * 160ms),visibility 0s linear calc((1 - var(--open)) * 110ms)}
.pg-about{display:flex;flex-direction:column;align-items:flex-start}
.pg .pg-title{margin:0;color:#fff;font-size:clamp(1.3rem,3.2cqw,1.6rem);line-height:1.12;letter-spacing:-.025em}
.pg-text{margin:7px 0 0;color:rgba(255,255,255,.82);font-size:14px;line-height:1.45}
.pg-cta{display:inline-flex;align-items:center;gap:8px;min-height:42px;margin-top:auto;padding:0 17px;color:var(--navy);background:#fff;border-radius:11px;font-size:14px;font-weight:850;white-space:nowrap;transition:background-color 160ms ease-out,transform 160ms var(--pg-ease)}
.pg-cta:active{transform:scale(.97)}
.pg-body a:focus-visible{outline:3px solid var(--cyan-light);outline-offset:2px}
/* The rows: a subgroup, or a device — its symbol over its name. */
.pg-list{display:flex;flex-direction:column;justify-content:flex-end;margin:0;padding:0;list-style:none}
.pg-list a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:35px;color:#fff;border-bottom:1px solid rgba(255,255,255,.16);font-size:13.5px;font-weight:700;line-height:1.25;transition:color 160ms ease-out,border-color 160ms ease-out}
.pg-list li:first-child a{border-top:1px solid rgba(255,255,255,.16)}
.pg-list a>span:first-child{min-width:0;overflow:hidden}
.pg-list small{display:block;margin-top:1px;overflow:hidden;color:rgba(255,255,255,.62);font-size:11.5px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.pg-go{flex:none;color:var(--cyan-light);font-weight:850;transition:transform 160ms var(--pg-ease)}
@media (hover:hover) and (pointer:fine){
  .pg.is-ready .pg-panel:not([data-active]):hover .pg-photo{transform:scale(1.05)}
  .pg-cta:hover{background:var(--cyan-light)}
  .pg-list a:hover{color:var(--cyan-light);border-color:var(--cyan-light)}
  .pg-list a:hover .pg-go{transform:translateX(3px)}
}
/* The same strips carrying the industries (template-parts/solution-areas.php), on the Rozwiązania page and the
   home page: a row is a case, its label over its name, on two lines. */
.solutions-hero .pg{margin-top:30px}
/* The owner, 2026-11-19: there the rows' white words are in the weight of running text; the labels and the arrows stay bold. */
.pg-areas .pg-list a{font-weight:400}
.pg-list .pg-case{min-height:0;padding:9px 0}
.pg-list .pg-case small{margin:0 0 2px;color:var(--cyan-light);font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:normal}
/* „Pod tytuł”: at the page's width the open strip's photograph runs 70 px further down, under the group's
   name, so more of its scene is in the picture; the way into the navy is longer and the words stand where
   they stood. */
@media (min-width:1061px){
  .pg-photo{height:calc(var(--photo-h) + var(--open) * 70px)}
  .pg-panel:after{top:calc(var(--photo-h) - 96px + var(--open) * 26px);height:calc(97px + var(--open) * 44px);background:linear-gradient(0deg,var(--navy) 0,rgba(9,24,71,calc(.86 + var(--open) * .04)) calc(12% + var(--open) * 16%),rgba(9,24,71,calc(.5 + var(--open) * .12)) calc(55% - var(--open) * 3%),rgba(9,24,71,0) 100%)}
  .pg-title{text-shadow:0 1px 8px rgba(9,24,71,.7)}
}
/* The strips are the first thing seen, so they come in from the right as the page opens. */
@keyframes pg-in{from{opacity:0;transform:translateX(28px)}}
@media (prefers-reduced-motion:no-preference){.pg-panel{animation:pg-in 460ms var(--pg-ease) backwards;animation-delay:calc(80ms + var(--i,0) * 45ms)}}
/* A tablet: the open strip is some 330 px wide, so its words stand in one column under a lower photograph. */
@media (max-width:1060px){
  .pg{--photo-h:170px;height:540px}
  .pg-body{display:flex;flex-direction:column;gap:12px}
  .pg-about{display:contents}
  .pg-list{order:2}
  .pg-cta{order:3;align-self:flex-start;margin-top:0}
  .pg-list small{display:none}
  .pg-list .pg-case small{display:block}
}
/* A phone: a list that opens one row at a time, every name read across, the photograph in the open row alone. */
@media (max-width:760px){
  .pg{--photo-h:140px;flex-direction:column;gap:6px;height:auto;overflow:visible;border-radius:0}
  .pg-panel{display:flex;flex-direction:column;flex:none;border-radius:16px;background:var(--navy)}
  .pg-panel:before,.pg-panel:after,.pg-photo,.pg-body{display:none}
  .pg-panel[data-active] .pg-photo,.pg:not(.is-ready) .pg-panel:focus-within .pg-photo{display:block;position:relative;order:1}
  .pg-panel[data-active] .pg-body,.pg:not(.is-ready) .pg-panel:focus-within .pg-body{display:flex}
  .pg-tab{position:relative;inset:auto;width:100%;height:58px;flex-direction:row;align-items:center;gap:12px;padding:0 16px}
  .pg-num{text-shadow:none}
  .pg-name{margin:0;white-space:normal;writing-mode:horizontal-tb;transform:none}
  .pg-num,.pg-name{opacity:1}
  .pg-body{position:relative;top:auto;order:2;width:auto;padding:14px 16px 18px;visibility:visible;opacity:1;transform:none}
  .pg .pg-title{display:none}
  .pg-text{margin:0}
  .pg-list a{min-height:44px}
  .pg-list small{display:block}
}
@media (prefers-reduced-motion:reduce){.pg-panel,.pg-photo,.pg-body,.pg-num,.pg-name,.pg-go{transition:none}}
