/*
  Homepage quality pass.

  Load this file after home-evolution.css. It deliberately resolves the final
  mobile cascade without changing the shared base styles used by subpages.
*/

/* Keep every AGD name visible in a centered, full-width grid. Partner logos
   retain the single deliberately calm marquee defined in the page styles. */
.agd-brands-viewport{
  width:100%;
  overflow:visible;
  mask-image:none;
  -webkit-mask-image:none;
}

.agd-brands-track{
  width:100%;
  animation:none!important;
  transform:none!important;
  will-change:auto!important;
}

.agd-brands-list[aria-hidden="true"]{
  display:none!important;
}

.agd-brands-list{
  display:grid;
  grid-template-columns:repeat(11,minmax(0,1fr));
  width:100%;
  min-height:0;
  padding:4px clamp(26px,5vw,74px);
  gap:5px clamp(6px,1.2vw,18px);
}

.agd-brands-list>li{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:26px;
  padding:4px 2px;
  text-align:center;
  line-height:1.2;
}

.agd-brands-viewport::-webkit-scrollbar{
  display:none;
}

.agd-brands-list li::before{
  content:none!important;
}

.agd-warranty{
  align-self:end;
  display:grid;
  grid-template-columns:minmax(150px,.72fr) minmax(230px,1.28fr);
  gap:clamp(14px,2vw,28px);
  max-width:760px;
  margin:0;
  padding:14px 18px;
  border:0;
  background:linear-gradient(90deg,rgba(34,35,37,.68),rgba(34,35,37,.28) 78%,transparent);
  color:rgba(249,251,255,.82);
  text-shadow:0 2px 14px rgba(20,21,23,.48);
}

.agd-warranty strong{
  color:var(--white);
  font-family:"Playfair Display",serif;
  font-size:clamp(20px,1.65vw,26px);
  font-weight:600;
  letter-spacing:-.025em;
  line-height:1.02;
}

.agd-warranty span{
  align-self:center;
  font-size:12px;
  line-height:1.45;
}

/* Stable digit boxes prevent the count-up from changing inline geometry. */
#doswiadczenie .heritage-stat-count{
  box-sizing:content-box;
  font-variant-numeric:lining-nums tabular-nums;
  font-feature-settings:"lnum" 1,"tnum" 1;
  text-align:center;
}

#doswiadczenie .heritage-stat-count[data-heritage-count="36"]{
  width:2ch;
  min-width:2ch;
}

#doswiadczenie .heritage-stat-count[data-heritage-count="5000"]{
  width:4ch;
  min-width:4ch;
}

#doswiadczenie .heritage-stat-count[data-heritage-count="100"]{
  width:3ch;
  min-width:3ch;
}

.offer-swipe-affordance{
  display:none;
}

@media(hover:hover) and (pointer:fine){
  #offerAccordion .offer-panel{scale:1!important}
  #offerAccordion .offer-panel:hover{scale:.985!important}
}

@media(min-width:1101px){
  #offerAccordion.offer-accordion.offer-carousel{
    position:relative;
    display:flex;
    width:100%;
    padding:0;
    gap:7px;
    overflow:hidden;
    isolation:isolate;
  }

  #offerAccordion.offer-carousel .offer-panel,
  #offerAccordion.offer-carousel .offer-panel:not(.active){
    flex:0 0 clamp(88px,7vw,116px);
    min-width:clamp(88px,7vw,116px);
    transition:filter .4s,scale .28s var(--ease);
  }

  #offerAccordion.offer-carousel .offer-panel.offer-carousel-lead{
    z-index:2;
    flex:1 0 clamp(88px,7vw,116px);
  }

  #offerAccordion.offer-carousel .offer-carousel-track{
    position:relative;
    display:flex;
    flex:1 0 100%;
    align-self:stretch;
    width:100%;
    min-width:100%;
    gap:7px;
    overflow:visible;
    will-change:transform;
  }

  #offerAccordion.offer-carousel .offer-carousel-clone{
    position:absolute;
    inset-block:0;
    z-index:1;
    flex:none;
    pointer-events:none;
    scale:1!important;
  }

  #offerAccordion.offer-carousel.is-rotating .offer-panel{
    pointer-events:none;
    scale:1!important;
    will-change:transform;
  }

  #offerAccordion.offer-carousel.is-rotating .offer-detail{
    opacity:0!important;
    visibility:hidden!important;
    transition:none!important;
  }

  #offerAccordion.offer-carousel.is-rotating .offer-label{
    opacity:1!important;
    visibility:visible!important;
  }
}

@media(max-width:1100px){
  .offer{
    position:relative;
  }

  .offer-swipe-affordance{
    position:absolute;
    z-index:8;
    top:15px;
    left:clamp(18px,3vw,32px);
    right:clamp(18px,3vw,32px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-height:34px;
    padding:7px 11px;
    color:rgba(255,255,255,.94);
    background:rgba(28,29,31,.72);
    border:0;
    font:750 11px/1.2 "Instrument Sans",Arial,sans-serif;
    letter-spacing:.035em;
    pointer-events:none;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
  }

  .offer-swipe-affordance[hidden]{
    display:none!important;
  }

  .offer-swipe-affordance__hint::after{
    content:"  \2192";
    color:var(--accent);
    font-size:16px;
    line-height:0;
  }

  .offer-swipe-affordance__count{
    flex:none;
    min-width:4.8ch;
    color:var(--accent);
    font-variant-numeric:tabular-nums;
    text-align:right;
  }

  #offerAccordion.offer-accordion{
    --offer-card-width:clamp(320px,68vw,620px);
    --offer-rail-pad:max(18px,calc((100% - var(--offer-card-width))/2));
    height:min(72dvh,680px);
    min-height:520px;
    gap:12px;
    padding:7px var(--offer-rail-pad);
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-inline:contain;
    scroll-padding-inline:var(--offer-rail-pad);
    scroll-snap-type:x mandatory;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,135,38,.86) rgba(255,255,255,.14);
    touch-action:pan-x pan-y;
  }

  #offerAccordion.offer-accordion::-webkit-scrollbar{
    display:block;
    height:4px;
  }

  #offerAccordion.offer-accordion::-webkit-scrollbar-track{
    background:rgba(255,255,255,.14);
  }

  #offerAccordion.offer-accordion::-webkit-scrollbar-thumb{
    background:rgba(255,135,38,.86);
  }

  #offerAccordion .offer-panel,
  #offerAccordion .offer-panel.active,
  #offerAccordion .offer-panel:not(.active){
    flex:0 0 var(--offer-card-width);
    min-width:var(--offer-card-width);
    scroll-snap-align:center;
    scroll-snap-stop:always;
    scale:1!important;
    transition:filter .24s ease!important;
  }

  #offerAccordion .offer-panel:not(.active) .offer-label{
    inset:auto 16px 18px;
    display:block;
    min-height:0;
    padding:0;
    opacity:1;
    color:var(--white);
    font-size:clamp(14px,2vw,17px);
    line-height:1.2;
    text-align:left;
    white-space:normal;
    writing-mode:horizontal-tb;
    transform:none;
  }

  #offerAccordion .offer-panel:not(.active):focus-within .offer-label{
    color:var(--accent);
  }

  #offerAccordion .offer-detail[hidden]{
    display:none!important;
  }
}

@media(max-width:767px){
  :root{
    --nav-h:56px;
    --site-update-safe-h:48px;
  }

  .header{
    height:var(--nav-h);
  }

  .site-update-banner__inner{
    min-height:46px;
  }

  .site-update-banner__viewport{
    min-height:46px;
    display:flex;
    align-items:center;
    padding-right:48px;
  }

  .site-update-banner__track{
    min-height:46px;
  }

  .site-update-banner__close{
    top:1px;
    right:2px;
  }

  .site-update-banner__set{
    gap:34px;
    padding-inline:34px;
  }

  .site-update-banner__copy{
    font-size:12px;
    line-height:1.25;
  }

  .agd-warranty{
    grid-template-columns:1fr;
    gap:6px;
    padding:11px 14px 12px;
    background:linear-gradient(90deg,rgba(34,35,37,.7),rgba(34,35,37,.28));
  }

  .agd-warranty strong{
    font-size:21px;
  }

  .agd-warranty span{
    font-size:11.5px;
    line-height:1.38;
  }

  .agd-brands-list{
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:3px 24px;
    gap:3px 6px;
  }

  .agd-brands-list>li{
    min-height:24px;
    padding:3px 1px;
    font-size:11.5px;
  }

  .journey-hero{
    --journey-stage-height:100svh!important;
    height:100svh!important;
    min-height:0!important;
  }

  .journey-hero .journey-sticky{
    position:relative;
    top:auto!important;
    height:100svh!important;
    min-height:0!important;
  }

  .journey-hero .journey-aside{
    padding:calc(var(--chrome-h) + var(--site-update-safe-h) + 12px) 16px 14px;
  }

  .journey-hero .journey-identity{
    width:min(100%,420px);
  }

  .journey-hero .journey-identity h1{
    font-size:clamp(42px,13vw,56px);
    line-height:.9;
  }

  .journey-hero .journey-lead{
    max-width:36ch;
    margin-top:10px;
    padding-left:12px;
    font-size:12.5px;
    line-height:1.38;
  }

  .journey-hero .journey-tabs{
    width:100%;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .journey-hero .journey-tab{
    min-height:44px;
    padding:8px 5px;
    text-align:center;
  }

  .journey-hero .journey-tab.active{
    padding-left:5px;
  }

  .journey-hero .scene-copy{
    right:16px;
    bottom:72px;
    left:16px;
    padding-left:12px;
  }

  .journey-hero .scene-copy strong{
    font-size:clamp(32px,10vw,42px);
  }

  .journey-hero .scene-copy p{
    font-size:11.5px;
    line-height:1.34;
  }

  #doswiadczenie{
    padding:22px 0 28px;
  }

  #doswiadczenie .heritage-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:auto auto;
    width:calc(100% - 28px);
    min-height:0;
    row-gap:8px;
    align-items:stretch;
  }

  #doswiadczenie .heritage-stat,
  #doswiadczenie .heritage-stat--primary,
  #doswiadczenie .heritage-stat:not(.heritage-stat--primary){
    grid-row:auto;
    min-height:116px;
    gap:6px;
    padding:13px 8px;
    transform:none;
  }

  #doswiadczenie .heritage-stat--primary{
    grid-column:1 / -1;
    grid-row:1;
    min-height:138px;
  }

  #doswiadczenie .heritage-stat:nth-child(2){
    grid-column:1;
    grid-row:2;
  }

  #doswiadczenie .heritage-stat:nth-child(3){
    grid-column:2;
    grid-row:2;
  }

  #doswiadczenie .heritage-stat-label,
  #doswiadczenie .heritage-stat--primary .heritage-stat-label{
    font-size:clamp(11px,3vw,12px);
    line-height:1.25;
    letter-spacing:.055em;
  }

  #doswiadczenie .heritage-stat-value{
    font-size:clamp(42px,13vw,52px);
  }

  #doswiadczenie .heritage-stat--primary .heritage-stat-value{
    font-size:clamp(74px,22vw,92px);
  }

  #doswiadczenie .heritage-stat-note{
    max-width:24ch;
    margin-top:6px;
    font-size:13px;
    line-height:1.4;
  }

  #offerAccordion.offer-accordion{
    --offer-card-width:clamp(280px,82vw,520px);
    --offer-rail-pad:max(18px,calc((100% - var(--offer-card-width))/2));
    height:clamp(480px,72svh,610px);
    min-height:480px;
    gap:10px;
  }

  #offerAccordion .offer-detail,
  #offerAccordion .offer-panel.active .offer-detail{
    right:18px;
    bottom:24px;
    left:18px;
  }

  #offerAccordion .offer-detail strong{
    font-size:clamp(34px,11vw,46px);
  }

  #offerAccordion .offer-detail span{
    font-size:13px;
    line-height:1.42;
  }
}

/* Phone landscape needs a compact composition. Tablet landscape keeps a
   shortened scroll runway so the process wipe remains user-controlled. */
@media(orientation:landscape) and (max-height:540px) and (max-width:1100px){
  :root{
    --nav-h:56px;
    --site-update-safe-h:48px;
  }

  .site-update-banner__inner{
    min-height:46px;
  }

  .site-update-banner__viewport{
    min-height:46px;
    display:flex;
    align-items:center;
    padding-right:48px;
  }

  .site-update-banner__track{
    min-height:46px;
  }

  .site-update-banner__close{
    top:1px;
    right:2px;
  }

  .site-update-banner__copy{
    font-size:12px;
    line-height:1.25;
  }

  .journey-hero .journey-aside{
    padding:calc(var(--chrome-h) + var(--site-update-safe-h) + 7px) 16px 10px;
  }

  .journey-hero .journey-identity{
    width:min(56vw,460px);
  }

  .journey-hero .journey-identity h1{
    font-size:clamp(38px,7vw,48px);
    line-height:.88;
  }

  .journey-hero .journey-lead{
    max-width:44ch;
    margin-top:6px;
    padding-left:10px;
    font-size:11.5px;
    line-height:1.28;
  }

  .journey-hero .journey-tabs{
    width:100%;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .journey-hero .journey-tab,
  .journey-hero .journey-tab.active{
    min-height:40px;
    padding:6px 5px;
    text-align:center;
  }

  .journey-hero .scene-copy{
    top:calc(var(--chrome-h) + var(--site-update-safe-h) + 8px);
    right:16px;
    bottom:auto;
    left:auto;
    width:min(37vw,310px);
    padding-left:10px;
  }

  .journey-hero .scene-copy strong{
    margin-bottom:4px;
    font-size:clamp(27px,5vw,34px);
  }

  .journey-hero .scene-copy p{
    font-size:10.5px;
    line-height:1.28;
  }

  #offerAccordion.offer-accordion{
    height:min(78svh,420px);
    min-height:320px;
  }
}

@media(orientation:landscape) and (max-height:540px) and (max-width:767px){
  .journey-hero,
  .journey-hero .journey-sticky{
    height:100svh!important;
    min-height:0!important;
  }
}

@media(orientation:landscape) and (max-height:540px) and (min-width:768px) and (max-width:1100px){
  .journey-hero{
    --journey-stage-height:100svh!important;
    --journey-travel:100svh;
    height:calc(100svh + var(--journey-travel))!important;
    min-height:0!important;
  }

  .journey-hero .journey-sticky{
    position:sticky;
    top:0!important;
    height:100svh!important;
    min-height:0!important;
  }
}

@media(prefers-reduced-transparency:reduce){
  .offer-swipe-affordance{
    background:#393a3d;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
}

@media(prefers-reduced-motion:reduce){
  .agd-brands-list li:hover{
    transform:none;
  }

  html{
    scroll-behavior:auto!important;
  }

  *,
  *::before,
  *::after{
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }

  #partnerzy .heritage-partners-track,
  .agd-brands-track{
    transform:none!important;
    will-change:auto!important;
  }

  #offerAccordion .offer-panel,
  #offerAccordion .offer-panel.active,
  #offerAccordion .offer-panel:not(.active){
    transition:none!important;
  }
}
