/* ==========================================================================
   Courtney.pl — style bazowe + nagłówek
   ========================================================================== */

:root {
  --bg:        #f6f4f0;   /* ciepła kość słoniowa — tło strony */
  --surface:   #ffffff;   /* nagłówek, karty */
  --ink:       #141414;   /* tekst główny */
  --ink-soft:  #4a4a4a;   /* tekst pomocniczy */
  --ink-mute:  #8c8c8c;   /* podtytuły, licznik */
  --line:      #e5e1da;   /* delikatne linie */

  --font-ui:   "utile-display", "Helvetica Neue", Helvetica, Arial, sans-serif; /* Adobe Fonts: 400/700, normal + italic */

  --container: 1366px;
  --gutter:    clamp(20px, 4vw, 56px);

  --ease-out:  cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-anchor: none; /* zmiana wysokości sticky nagłówka nie może przesuwać scrollY */
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Wspólne: przyciski ikon ---------------------------------------- */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  color: var(--ink);
  transition: color .25s var(--ease-out), transform .3s var(--ease-out);
}
.icon-btn:hover { color: var(--ink-soft); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }

.icon { flex: none; }

.cart-count {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  transform: translateY(1px);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.header.no-anim, .header.no-anim * { transition: none !important; }
.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(20, 20, 20, .25);
}

/* --- Górny rząd --------------------------------------------------------- */

.header__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 32px 22px;
  transition: padding .35s var(--ease-out);
}
.header.is-scrolled .header__top { padding-block: 16px 10px; }

.header__tagline {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  animation: rise .9s var(--ease-out) both;
  animation-delay: .15s;
}

.header__burger { display: none; justify-self: start; margin-left: -8px; }

.header__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: rise .9s var(--ease-out) both;
}

.header__logo {
  width: clamp(150px, 16vw, 271px);
  height: auto;
  transition: width .35s var(--ease-out);
}
.header.is-scrolled .header__logo { width: clamp(130px, 12vw, 160px); }

.header__claim {
  font-size: 9.5px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-left: .32em; /* kompensacja ostatniego letter-spacing — realnie wyśrodkowane */
  transition: opacity .25s var(--ease-out), max-height .35s var(--ease-out), margin .35s var(--ease-out);
  max-height: 20px;
  overflow: hidden;
}
.header.is-scrolled .header__claim { opacity: 0; max-height: 0; margin-top: -12px; }

.header__actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: clamp(4px, 1vw, 14px);
  margin-right: -8px;
  animation: rise .9s var(--ease-out) both;
  animation-delay: .25s;
}
.header__actions .icon-btn--cart { gap: 4px; }

/* --- Nawigacja ---------------------------------------------------------- */

.nav__head, .nav__secondary { display: none; }

.nav__list {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 3vw, 44px);
  padding-bottom: 16px;
  transition: padding .35s var(--ease-out), margin .35s var(--ease-out);
  animation: rise .9s var(--ease-out) both;
  animation-delay: .35s;
}
.header.is-scrolled .nav__list { padding-bottom: 8px; margin-top: 2px; }

.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 14.5px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color .25s var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__link:focus-visible { outline: none; }

/* --- Animacja wejścia --------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   MOBILE / TABLET (≤ 1023px)
   ========================================================================== */

@media (max-width: 1023px) {

  .header__top {
    grid-template-columns: 1fr auto 1fr;
    padding-block: 14px;
  }
  .header.is-scrolled .header__top { padding-block: 10px; }

  .header__tagline { display: none; }
  .header__burger { display: inline-flex; }

  .header__brand { gap: 6px; }
  .header__logo { width: 150px; }
  .header.is-scrolled .header__logo { width: 130px; }
  .header__claim { display: none; }

  .header__action--desktop { display: none; }
  .header__actions { gap: 0; }

  /* Szuflada nawigacji: .nav = pełnoekranowa nakładka (tło), .nav__panel = przesuwany panel */
  .nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(20, 20, 20, .35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease-out), visibility 0s linear .5s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }

  .nav__panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(360px, 88vw);
    background: var(--surface);
    padding: 0 28px 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform .5s var(--ease-out);
  }
  .nav.is-open .nav__panel { transform: none; }

  .nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
  }
  .nav__head .icon-btn { margin-right: -8px; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    animation: none;
  }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link {
    display: block;
    padding: 18px 0;
    font-size: 14px;
    letter-spacing: .14em;
  }
  .nav__link::after { display: none; }

  .nav__secondary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 32px;
  }
  .nav__secondary a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__img { opacity: 1; transform: none; }
  .hero__phrase { opacity: 0; }
  .hero__progress { display: none; }
  .hero__down { opacity: 1; transform: none; }
  .hero__img--2, .hero__img--3 { opacity: 0; }
  .hero__timeline { display: none; }
  .hero__mask > * { opacity: 1; transform: none; }
}

/* ==========================================================================
   PRZYCISKI
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 34px;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  isolation: isolate;
  overflow: hidden;
  transition: color .4s var(--ease-out);
}
.btn--line { border: 1px solid var(--ink); }
.btn--line::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.btn--line:hover { color: var(--surface); }
.btn--line:hover::before { transform: scaleX(1); transform-origin: left; }
.btn .icon { transition: transform .5s var(--ease-out); }
.btn:hover .icon { transform: translateX(6px); }
.btn:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }

/* ==========================================================================
   HERO
   ========================================================================== */

/* Oś czasu sekwencji (sekundy) */
.hero {
  --word-step: 1.4s;   /* co ile pojawia się kolejne słowo                 */
  --word-dur:  1.55s;  /* czas życia słowa (wejście + pauza + wyjście)     */
  --seq-start: .5s;    /* wjazd „Więcej niż” i pierwszego słowa            */
  --final-at:  3.5s;   /* start finału ≈ seq-start + word-step + word-dur  */
  --slide-at:  calc(var(--final-at) + 1.55s + 1.2s);
                       /* zmiana slajdu 1→2: koniec wjazdu przycisku (+.55s delay
                          + 1s animacji) i jeszcze 1.2s ruchu zdjęcia         */
  --slide-hold: 5s;    /* ile stoi slajd 3, zanim cykl ruszy od nowa           */
  --slide2-hold: 9s;   /* ile stoi slajd 2: wjazd kafli (od 1.2s), powolne rozmycie
                          (2.8s–4.1s), przycisk od 4s; potem stoi ok. 4s          */
  --slide3-at:  calc(var(--slide-at) + var(--slide2-hold));

  position: relative;
  width: 100%;
  background: var(--surface);
  overflow: hidden;
}

.hero__media { position: relative; }

/* Grafika 2560px: na 2K wyświetlana 1:1, poniżej skaluje się z szerokością */
.hero__img {
  width: 100%;
  max-width: 2560px;
  height: auto;
  margin-inline: auto;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 70% 40%;
  animation: hero-kenburns 8s var(--ease-out) both;
}
@keyframes hero-kenburns {
  from { opacity: 0; transform: scale(1.06); }
  20%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1); }
}

/* Slajd 1 zaczyna zanikać od razu przy zmianie slajdu */
.hero__img--1 {
  animation:
    hero-kenburns 8s var(--ease-out) both,
    hero-fade-out 1.8s ease-in forwards;
  animation-delay: 0s, var(--slide-at);
}
@keyframes hero-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Slajd 2: leży na slajdzie 1, wjeżdża crossfade’em (1.2s) i dalej
   powoli się przybliża tak jak pierwsze zdjęcie */
.hero__img--2 {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform-origin: 80% 45%;   /* oś oddalania w postaci po prawej stronie kadru */
  /* pojawia się z lekkim opóźnieniem i łagodnie (ease-in-out), łącznie z zanikaniem
     slajdu 1 całe przeniknięcie trwa ok. 2.5s; zoom osobno z ease-out */
  animation:
    hero-fade-in  2.2s ease-in-out both,
    hero-zoom     8s   var(--ease-out) both,
    hero-fade-out 1.8s ease-in forwards;
  animation-delay: calc(var(--slide-at) + .3s), var(--slide-at), var(--slide3-at);
}

/* Slajd 3: to samo przejście co 1→2, po --slide-hold */
.hero__img--3 {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform-origin: 50% 45%;   /* do ustawienia pod kompozycję hero3 */
  animation:
    hero-fade-in 2.2s ease-in-out both,
    hero-zoom    8s   var(--ease-out) both;
  animation-delay: calc(var(--slide3-at) + .3s), var(--slide3-at);
}
@keyframes hero-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hero-zoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

/* Warstwa tekstu nad grafiką */
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.hero__stage {
  position: relative;
  width: min(100%, 640px);
  margin-top: -18%;         /* blok tekstu w górnej części hero */
  pointer-events: auto;
}

/* --- „Więcej niż” + zmieniające się słowo ------------------------------- */

.hero__phrase {
  display: flex;
  align-items: baseline;
  gap: .28em;
  margin: 0;
  font-size: clamp(40px, 3.6vw, 72px);
  line-height: 1.15;
  letter-spacing: -.005em;
  white-space: nowrap;
}

/* Część stała: wjeżdża raz, stoi przez oba słowa, wyjeżdża razem z ostatnim */
.hero__static {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
.hero__static > span {
  display: block;
  transform: translateY(110%);
  animation: hero-static var(--ease-out) both;
  animation-duration: calc(var(--word-step) + var(--word-dur));
  animation-delay: var(--seq-start);
}
/* procenty liczone dla 1.4s + 1.55s = 2.95s:
   wjazd kończy się ~0.42s (14%); wyjazd zaczyna dokładnie wtedy, gdy „moda”
   wchodzi w swoje 72% (1.4s + .72*1.55s = 2.516s → 85.3%), a segment wyjazdu
   ma tę samą długość (.434s), więc oba elementy zjeżdżają synchronicznie */
@keyframes hero-static {
  0%    { transform: translateY(110%); opacity: 1; }
  14%   { transform: translateY(0); }
  85.3% { transform: translateY(0); opacity: 1; }
  100%  { transform: translateY(-110%); opacity: 0; }
}

/* Słowo + kropka: kontener słów zmienia szerokość, kropka stoi tuż za nim
   i dzięki temu sama przesuwa się w bok */
.hero__swap {
  --overhang: .12em;   /* zapas na przewieszkę kursywy (pochyłe „d” wystaje poza szerokość tekstu) */
  display: inline-flex;
  align-items: baseline;
}

/* Słowa: wszystkie w jednej komórce siatki, maska na kontenerze.
   --w0 / --w1 (px) ustawia skrypt po zmierzeniu słów; bez JS = auto */
.hero__words {
  display: inline-grid;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
  padding-right: var(--overhang);
  width: calc(var(--w0) + var(--overhang));   /* bez JS: calc nieważny -> auto */
  animation: hero-words-width .45s var(--ease-out) both;
  animation-delay: calc(var(--seq-start) + var(--word-step) - .05s);
}
@keyframes hero-words-width {
  from { width: calc(var(--w0) + var(--overhang)); }
  to   { width: calc(var(--w1) + var(--overhang)); }
}
.hero__word {
  grid-area: 1 / 1;
  display: block;
  transform: translateY(110%);
  animation: hero-word var(--word-dur) var(--ease-out) both;
  animation-delay: calc(var(--seq-start) + var(--i) * var(--word-step));
}
.hero__word em {
  font-style: italic;
  color: var(--ink-soft);
}
@keyframes hero-word {
  0%   { transform: translateY(110%); opacity: 1; }
  27%  { transform: translateY(0); }
  72%  { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-110%); opacity: 0; }
}

/* Kropka: wjeżdża i wyjeżdża razem z „Więcej niż”, między słowami stoi */
.hero__dot {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
  margin-left: calc(-1 * var(--overhang));   /* kropka wraca na naturalną pozycję za literą */
  font-style: italic;
  color: var(--ink-soft);
}
.hero__dot > span {
  display: block;
  transform: translateY(110%);
  animation: hero-static var(--ease-out) both;
  animation-duration: calc(var(--word-step) + var(--word-dur));
  animation-delay: var(--seq-start);
}

/* --- Pasek postępu + licznik ------------------------------------------- */

.hero__progress {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  animation: hero-progress-out .4s var(--ease-out) both;
  animation-delay: calc(var(--final-at) - .35s);
}
.hero__progress-bar {
  position: relative;
  width: 160px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.hero__progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: hero-bar linear both;
  animation-duration: calc(var(--word-step) + var(--word-dur) * .72);
  animation-delay: var(--seq-start);
}
@keyframes hero-bar { to { transform: scaleX(1); } }

.hero__progress-count {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.hero__progress-count i { font-style: normal; margin-inline: 4px; opacity: .5; }

@keyframes hero-progress-out {
  to { opacity: 0; transform: translateY(-6px); }
}

/* --- Finał --------------------------------------------------------------- */

.hero__final {
  position: absolute;
  left: 0;
  top: -2.6em;               /* nakłada się na miejsce linii */
  width: 100%;
}

/* Maska: padding + ujemny margines = zero wpływu na układ, a wyjeżdżający
   element znika za krawędzią tak samo jak słowa „trend” / „moda” */
.hero__mask {
  display: block;
  overflow: hidden;
  padding: .12em 0 .18em;
  margin: -.12em 0 -.18em;
}
.hero__mask--inline {
  display: inline-block;
  padding: 3px;
  margin: -3px;
}
.hero__mask--rule { padding: 2px 0; margin: 0; }

/* Wnętrze maski: wjazd (rise) po --final-at + --d, wyjazd po --slide-at.
   Wyjazd ma fill „forwards” (bez „backwards”), żeby przed swoim startem
   nie nadpisywał wjazdu */
.hero__mask > * {
  display: block;
  opacity: 0;
  animation:
    rise 1s var(--ease-out) both,
    hero-exit .45s var(--ease-out) forwards;
  animation-delay:
    calc(var(--final-at) + var(--d, 0s)),
    var(--slide-at);
}
@keyframes hero-exit {
  to { transform: translateY(var(--exit-y, -110%)); opacity: 0; }
}

.hero__eyebrow {
  margin: 0 0 22px;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero__title {
  margin: 0;
  font-size: clamp(48px, 4.4vw, 88px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.01em;
}
.hero__title em { font-style: italic; color: var(--ink-soft); }

.hero__rule {
  width: 72px;
  height: 1px;
  margin: 34px 0 30px;
  background: var(--ink);
  transform-origin: left;
  animation-name: hero-rule, hero-exit;
}
@keyframes hero-rule {
  from { opacity: 1; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

.hero__mask--inline > .hero__cta { display: inline-flex; }

/* --- Slajd 2: pory roku ---------------------------------------------------
   Postać na hero2.webp stoi po prawej (profil zaczyna się ok. 66% szerokości
   kadru). Kafle to taśma: okno .hero__seasons w lewej części kadru, w nim
   .hero__seasons-track z trzema kopiami czterech pór roku przesuwająca się
   w dół w pętli (okres = jedna seria, --set-h). Okno nie obcina — obcina
   hero (overflow:hidden), więc kafle wchodzą spod nagłówka i znikają na
   dolnej krawędzi kadru jak taśma filmowa. Trzy kopie, bo okno jest wyższe
   niż jedna seria, a pętla nie może pokazać pustki. Przy pojawieniu całość
   lekko się przybliża (.hero__seasons-zoom), kafle wjeżdżają jeden po drugim
   jak teksty slajdu 1, a przy zmianie slajdu 2→3 całe okno zjeżdża w dół. */

.hero__seasons {
  --seasons-x:   37.5%;  /* środek kafli (ułamek szerokości hero), lekko na lewo od środka wolnej przestrzeni */
  --seasons-w:   45%;    /* szerokość kafli: kończą się przed profilem także na starcie zoomu zdjęcia */
  --seasons-in:  calc(var(--slide-at) + 1.2s);
                         /* wjazd 1. kafla: teksty slajdu 1 już zjechały, a lewa
                            część kadru jest biała na obu zdjęciach */
  --tile-h:      21.3%;  /* wysokość kafla i odstęp (ułamek wysokości okna): 4 kafle
                            zajmują cały kadr od 6% wysokości do dołu */
  --tile-g:      2.7%;
  --set-h:       calc(4 * (var(--tile-h) + var(--tile-g)));  /* jedna seria = okres pętli */
  --strip-period: 16s;   /* czas przesunięcia taśmy o jedną serię (4 kafle) */
  --blur-at:     calc(var(--seasons-in) + 1.6s);
                         /* start rozmycia: ostatni kafel kończy wjazd po 1.42s (--d .42s + 1s) */
  --blur-dur:    1.3s;   /* czas narastania rozmycia */
  --cta-at:      calc(var(--blur-at) + 1.2s);   /* przycisk „Sprawdź jesienną kolekcję”
                                                    wjeżdża w połowie rozmywania */
  --exit-y:      110%;   /* kierunek wyjazdu okna przy zmianie slajdu 2→3 (w dół, jak taśma) */

  position: absolute;
  top: 6%;
  bottom: 0;
  left: calc(var(--seasons-x) - var(--seasons-w) / 2);
  width: var(--seasons-w);
  pointer-events: none;
  animation: hero-exit .45s var(--ease-out) forwards;
  animation-delay: var(--slide3-at);
}

/* Animacja 1: przy pojawieniu kafle lekko się przybliżają */
.hero__seasons-zoom {
  position: absolute;
  inset: 0;
  animation: hero-seasons-zoom 2.4s var(--ease-out) both;
  animation-delay: var(--seasons-in);
}
@keyframes hero-seasons-zoom {
  from { transform: scale(.9); }
  to   { transform: none; }
}

/* Animacja 2: taśma. Start w chwili wjazdu kafli, żeby u góry stał wtedy
   pierwszy kafel serii (Lato, pod nim Jesień); najechanie na kafel
   zatrzymuje taśmę (aktywny da się kliknąć) */
.hero__seasons-track {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  row-gap: var(--tile-g);
  animation:
    hero-seasons-strip var(--strip-period) linear infinite both,
    hero-seasons-blur  var(--blur-dur) ease-in-out forwards;
  animation-delay: var(--seasons-in), var(--blur-at);
}
.hero__seasons:hover .hero__seasons-track { animation-play-state: paused; }
@keyframes hero-seasons-strip {
  from { transform: translateY(calc(-1 * var(--set-h))); }
  to   { transform: none; }
}

/* Animacja 3: zaraz po wjeździe kafle powoli się rozmywają (filter na
   taśmie, nie backdrop-filter — zdjęcie zostaje ostre) i lekko bledną,
   a na nich wjeżdża przycisk. Zasłona (.hero__seasons-veil) jest przezroczysta;
   po pojawieniu przejmuje kliknięcia, żeby rozmyte kafle nie reagowały */
@keyframes hero-seasons-blur {
  to { filter: blur(14px); opacity: .55; }
}
.hero__seasons-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  animation: hero-season-in 1s var(--ease-out) both;
  animation-delay: var(--cta-at);
}
.hero__seasons-cta { background: var(--surface); }

/* Kafel: ta sama dynamika wjazdu co teksty slajdu 1 (rise) po
   --seasons-in + --d. Do tego czasu jest visibility:hidden, inaczej
   niewidoczny aktywny kafel łapałby kliknięcia nad tekstami slajdu 1 */
.season {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 32px);
  height: var(--tile-h);
  padding-inline: clamp(16px, 2.2vw, 44px);
  color: var(--ink-mute);
  background: rgba(20, 20, 20, .06);
  isolation: isolate;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  animation: hero-season-in 1s var(--ease-out) both;
  animation-delay: calc(var(--seasons-in) + var(--d, 0s));
}
@keyframes hero-season-in {
  from { opacity: 0; transform: translateY(8px); visibility: hidden; }
  to   { opacity: 1; transform: none; visibility: visible; }
}

.season__index {
  font-size: 11px;
  letter-spacing: .2em;
  font-variant-numeric: tabular-nums;
}
.season__name {
  font-size: clamp(16px, 2.9vw, 56px);
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.season__meta {
  margin-left: auto;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.season__arrow { flex: none; transition: transform .5s var(--ease-out); }

/* Aktywna pora roku: biały kafel w linii, jak przycisk „Odkryj kolekcję”;
   po najechaniu wypełnia się czernią */
.season--active {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  transition: color .4s var(--ease-out);
}
.season--active .season__name { font-style: italic; }
.season--active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.season--active:hover { color: var(--surface); }
.season--active:hover::before { transform: scaleX(1); transform-origin: left; }
.season--active:hover .season__arrow { transform: translateX(6px); }
.season--active:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }

@media (max-width: 1023px) {
  .season { gap: 10px; padding-inline: 14px; }
  .season__index, .season__meta { display: none; }
}

/* --- Slajd 3: logo --------------------------------------------------------
   Postać na hero3.webp idzie po prawej (od ok. 70% szerokości kadru), środek
   jest biały. Logo stoi na środku ekranu w poziomie (hero jest na całą
   szerokość), blisko górnej krawędzi hero; wjeżdża jak teksty (rise) po
   wejściu zdjęcia i gaśnie przed końcem slajdu 3, zanim cykl ruszy od nowa
   i zacznie się pojawiać slajd 1. */

.hero__brand {
  --brand-in:  calc(var(--slide3-at) + 1.2s);
  --brand-out: calc(var(--slide3-at) + var(--slide-hold) - .9s);   /* .6s zanikania kończy się .3s przed restartem cyklu */
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;                 /* odległość od górnej krawędzi hero (ułamek jego wysokości) */
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.hero__brand-logo {
  width: clamp(140px, 15vw, 320px);   /* na 1920 → 288px */
  height: auto;
  opacity: 0;
  animation:
    rise 1s var(--ease-out) forwards,
    hero-brand-out .6s ease-in forwards;
  animation-delay: var(--brand-in), var(--brand-out);
}
@keyframes hero-brand-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* --- Pętla --------------------------------------------------------------
   Po postoju slajdu 3 skrypt restartuje wszystkie animacje hero (klasa
   is-reset na jedną klatkę). W kolejnych cyklach (is-looped) slajd 3 jest
   na starcie jeszcze widoczny i zanika, gdy slajd 1 wjeżdża od nowa. */
.hero.is-reset,
.hero.is-reset *,
.hero.is-reset *::before,
.hero.is-reset *::after { animation: none !important; }

.hero.is-looped .hero__img--3 {
  animation:
    hero-fade-out 1.8s ease-in,
    hero-fade-in  2.2s ease-in-out both,
    hero-zoom     8s   var(--ease-out) both;
  animation-delay: 0s, calc(var(--slide3-at) + .3s), var(--slide3-at);
}

/* --- Pasek czasu slajdu (dolna krawędź hero) ----------------------------- */

.hero__timeline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  z-index: 2;
}
/* Każde wypełnienie: bazowo scaleX(0); animacja bez fill-mode, więc po
   swoim czasie wraca do zera i kolejne zaczyna od początku */
.hero__timeline-fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation-name: hero-bar;
  animation-timing-function: linear;
}
.hero__timeline-fill--1 { animation-duration: var(--slide-at);   animation-delay: 0s; }
.hero__timeline-fill--2 { animation-duration: var(--slide2-hold); animation-delay: var(--slide-at); }
.hero__timeline-fill--3 { animation-duration: var(--slide-hold); animation-delay: var(--slide3-at); }

/* --- W dół (link przewijający pod hero) ---------------------------------- */

.hero__down {
  position: absolute;
  left: var(--gutter);
  bottom: 28px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s;
  animation: rise .6s var(--ease-out) both;
  animation-delay: 1.2s;
}
.hero__down:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --- Stan „po sekwencji” (reduced motion) -------------------------------- */

.hero.is-done .hero__img,
.hero.is-done .hero__static > span,
.hero.is-done .hero__words,
.hero.is-done .hero__word,
.hero.is-done .hero__dot > span,
.hero.is-done .hero__progress,
.hero.is-done .hero__progress-bar::after,
.hero.is-done .hero__img--2,
.hero.is-done .hero__img--3,
.hero.is-done .hero__timeline-fill,
.hero.is-done .hero__mask > * { animation: none; }
.hero.is-done .hero__timeline { display: none; }

.hero.is-done .hero__img { opacity: 1; transform: none; }
.hero.is-done .hero__static > span,
.hero.is-done .hero__dot > span,
.hero.is-done .hero__word { transform: translateY(-110%); opacity: 0; }
.hero.is-done .hero__progress { opacity: 0; }
.hero.is-done .hero__img--2,
.hero.is-done .hero__img--3 { opacity: 0; }
.hero.is-done .hero__mask > * { opacity: 1; transform: none; }
.hero.is-done .hero__seasons,
.hero.is-done .hero__brand { display: none; }

/* ==========================================================================
   NAGŁÓWEK SEKCJI (wspólny)
   ========================================================================== */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}
.section-head__eyebrow {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.section-head__title {
  margin: 0;
  font-size: clamp(32px, 2.6vw, 48px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
}
.section-head__link {
  position: relative;
  padding-bottom: 6px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.section-head__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.section-head__link:hover::after { transform: scaleX(.4); }

/* ==========================================================================
   PRODUKTY
   ========================================================================== */

.products {
  padding-block: 96px 112px;
  background: var(--surface);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (min-width: 1700px) {
  .products .container { max-width: 70%; }
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; gap: 40px; }
}

.product { position: relative; }

.product__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ebe7e0;
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.product:hover .product__media img { transform: scale(1.04); }

.product__tag {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 7px 11px 6px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
}

.product__wish {
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), color .25s;
}
.product:hover .product__wish,
.product__wish:focus-visible { opacity: 1; transform: none; }
.product__wish:hover { color: var(--ink-soft); }

.product__body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
}
.product__name {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .01em;
}
.product__name a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .4s var(--ease-out);
}
.product:hover .product__name a { background-size: 100% 1px; }
.product__price {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* --- Tymczasowy placeholder pod kolejne sekcje --------------------------- */

.placeholder {
  height: 80vh;
  background: #fff; /* #F7F5F1 — zostawiony na kiedyś */
}
