/* ============================================================
   lendzioszek.com - strona główna
   ============================================================ */

:root {
  --bg: #222629;
  --bg-lift: rgba(255, 255, 255, 0.045);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.38);
  --hairline: rgba(255, 255, 255, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(255, 255, 255, 0.06), transparent 65%),
    radial-gradient(ellipse 70% 45% at 50% 112%, rgba(255, 255, 255, 0.03), transparent 60%);
  color: var(--text);
  font-family: "Karla", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: rgba(255, 255, 255, 0.85); color: var(--bg); }

a:focus-visible,
.btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.overline {
  font-size: clamp(0.68rem, 1.4vw, 0.8rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  margin-left: 0.5em; /* wyrównuje optycznie letter-spacing ostatniej litery */
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2.2rem;
}

.name {
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  font-weight: 200;
  letter-spacing: 0.14em;
  margin-left: 0.14em;
  text-transform: uppercase;
  line-height: 1.18;
}

.rule {
  width: 72px;
  height: 1px;
  background: var(--hairline);
  margin: 2.6rem 0;
}

/* ---------- Przycisk ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
              border-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.45s var(--ease);
}

.btn:hover, .btn:focus-visible {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn:hover .btn-arrow { transform: translateX(6px); }

/* ---------- Przełącznik języka ---------- */

.lang-link {
  position: absolute;
  top: 1.7rem;
  right: 2rem;
  z-index: 10;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease);
}

.lang-link:hover, .lang-link:focus-visible { color: var(--text); }

/* ---------- Wskaźnik przewijania ---------- */

.scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.45));
  overflow: hidden;
  position: relative;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: scrollSweep 2.6s var(--ease) infinite;
}

@keyframes scrollSweep {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ---------- Marki ---------- */

.brands {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 2rem 7rem;
}

.section-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.45em;
  margin-left: 0.45em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4.5rem;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3.5rem 3rem;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.6rem 1.2rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
}

.brand-name {
  margin-top: 1rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.brand:hover .brand-name, .brand:focus-visible .brand-name { opacity: 1; transform: none; }

.brand img {
  width: 100%;
  max-width: 190px;
  height: auto;
  opacity: 0.78;
  filter: brightness(1);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.brand:hover { background: var(--bg-lift); transform: translateY(-4px); }
.brand:hover img { opacity: 1; transform: scale(1.04); }

/* ---------- Stopka ---------- */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}

.mail {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.mail:hover, .mail:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.5);
}

.copy {
  margin-top: 1.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

/* ---------- Animacje wejścia ---------- */

.fade {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 1.1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade, .reveal { animation: none; transition: none; opacity: 1; transform: none; }
  .scroll-line::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsywność ---------- */

@media (max-width: 900px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 2.8rem 2rem; }
}

@media (max-width: 640px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1.4rem; }
  .brand { padding: 1.1rem 0.8rem; }
  .brand img { max-width: 150px; }
  .name-break { display: block; height: 0.4em; }
  .rule { margin: 2.1rem 0; }
  .btn { padding: 0.95rem 2.2rem; letter-spacing: 0.22em; }
  .brands { padding: 2rem 1.4rem 5rem; }
}

/* ============================================================
   Podstrona: /mateuszlendzioszek/
   ============================================================ */

.page-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2rem;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
}

.page-nav.scrolled {
  background: rgba(28, 31, 34, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.nav-anchors { display: flex; gap: 1.8rem; }

.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease);
}

.back-link:hover, .back-link:focus-visible { color: var(--text); }

.sub-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8rem 1.5rem 5rem;
}

.sub-hero .name { font-size: clamp(1.9rem, 6vw, 3.6rem); }

.portrait {
  width: min(380px, 80vw);
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 2rem;
  scroll-margin-top: 56px;
}

.lead {
  max-width: 620px;
  margin-top: 2.6rem;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.85;
}

.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 200;
  letter-spacing: 0.32em;
  margin-left: 0.32em;
  text-transform: uppercase;
  margin-bottom: 3.8rem;
}

/* ---------- Galeria ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.9rem 1.6rem;
}

.gallery figure { margin: 0; cursor: zoom-in; }

.g-wide { grid-column: span 2; }

.gallery img {
  width: 100%;
  height: clamp(240px, 24vw, 310px);
  object-fit: cover;
  display: block;
  border-radius: 10px;
  opacity: 0.92;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.gallery figure:hover img { opacity: 1; transform: translateY(-3px) scale(1.015); }

.gallery figcaption {
  padding: 0.7rem 0.2rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.55;
  min-height: 3.1em; /* rezerwa na 2 linie - wyrównuje dół siatki */
  color: var(--text-faint);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(14, 16, 18, 0.95);
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox p {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.lightbox .lb-count {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--text-faint);
}

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1.7rem;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 4px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.lb-prev { left: 1.8rem; }
.lb-next { right: 1.8rem; }

.lb-prev:hover, .lb-next:hover, .lb-prev:focus-visible, .lb-next:focus-visible {
  background: #fff;
  color: var(--bg);
  border-color: #fff;
}

/* ---------- Oś czasu ---------- */

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2.8rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--hairline) 4%, var(--hairline) 96%, transparent);
}

.t-item { position: relative; padding-bottom: 4.4rem; }
.t-item:last-child { padding-bottom: 1rem; }

.t-item::before {
  content: "";
  position: absolute;
  left: -2.8rem;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--bg);
}

.t-year {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 200;
  letter-spacing: 0.15em;
  margin-bottom: 1.1rem;
}

.t-item p {
  color: var(--text-dim);
  line-height: 1.75;
  font-size: 0.97rem;
  margin-bottom: 1rem;
  max-width: 64ch;
}

.t-item p a, .global-note a, .brand-block p a {
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(#fff, #fff), linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease);
}

.t-item p a:hover, .global-note a:hover, .brand-block p a:hover { background-size: 100% 1px, 100% 1px; }

.t-logo { margin: 1.2rem 0 1.6rem; }
.t-logo img {
  width: auto;
  height: auto;
  max-width: min(100%, 420px);
  max-height: 38px;
}

.t-media { margin: 1.4rem 0 0.8rem; }
.t-media img, .t-media video {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  border-radius: 10px;
}

.t-media--wide img { max-width: 640px; }

.yt {
  position: relative;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 1.4rem 0;
}

.yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.video-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.video-links a {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.5;
  transition: color 0.3s var(--ease), transform 0.35s var(--ease);
}

.video-links a::before {
  content: "\25B8";
  color: var(--text);
  margin-right: 0.7rem;
}

.video-links a:hover { color: var(--text); transform: translateX(5px); }

.press-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

.press-links a {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.press-links a:hover, .press-links a:focus-visible {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  max-width: 640px;
}

.media-grid img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* ---------- Globalizacja ---------- */

.global-note { max-width: 780px; margin: 0 auto; text-align: center; }

.global-note p {
  color: var(--text-dim);
  line-height: 1.85;
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
}

/* ---------- Marki ---------- */

.brand-block {
  max-width: 980px;
  margin: 0 auto;
  padding: 4.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.brand-block:first-of-type { border-top: 0; padding-top: 1rem; }

.brand-side { margin-bottom: 2.4rem; }

.brand-main { min-width: 0; }

.brand-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 42px; /* skaluje bez zniekształcania proporcji */
}

.brand-site {
  display: inline-block;
  margin: 1.1rem 0 0;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.brand-site:hover, .brand-site:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
}

.brand-block p {
  color: var(--text-dim);
  line-height: 1.75;
  font-size: 0.95rem;
  text-align: left;
  margin-bottom: 1rem;
}

.brand-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2.2rem;
}

.brand-photos img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* nieparzysta liczba zdjęć: ostatnie rozciąga się na całą szerokość - siatka zawsze domknięta */
.brand-photos img:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  height: auto;
  max-height: 380px;
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
  .g-wide { grid-column: auto; }
  .gallery img { height: 240px; }
  .gallery figcaption { min-height: 0; }
  .section { padding: 3rem 1.4rem; }
  .timeline { padding-left: 2.1rem; }
  .t-item::before { left: -2.1rem; }
  .sub-hero { padding: 6.5rem 1.4rem 3.5rem; }
  .brand-block { padding: 3.4rem 0; }
}

/* ============================================================
   Animacje - dopracowanie
   ============================================================ */

/* kaskadowe pojawianie się zdjęć wewnątrz odsłanianych sekcji */
@keyframes childIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.brand-photos img, .media-grid img { opacity: 0; }

.reveal.visible .brand-photos img,
.reveal.visible .media-grid img { animation: childIn 0.9s var(--ease) both; }

.reveal.visible .brand-photos img:nth-child(2),
.reveal.visible .media-grid img:nth-child(2) { animation-delay: 0.12s; }
.reveal.visible .brand-photos img:nth-child(3),
.reveal.visible .media-grid img:nth-child(3) { animation-delay: 0.24s; }
.reveal.visible .brand-photos img:nth-child(4) { animation-delay: 0.36s; }

.brand-photos img { transition: transform 0.45s var(--ease); }
.brand-photos img:hover { transform: translateY(-4px); }

/* oś czasu: kropka i rok pojawiają się z lekkim opóźnieniem po karcie */
.t-item::before {
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.6s var(--ease) 0.15s, transform 0.6s var(--ease) 0.15s;
}

.t-item.visible::before { opacity: 1; transform: scale(1); }

.t-year {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.7s var(--ease) 0.1s, transform 0.7s var(--ease) 0.1s;
}

.t-item.visible .t-year { opacity: 1; transform: none; }

/* portret: wjazd z subtelnym powiększeniem */
@keyframes fadeUpScale {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.portrait.fade { animation-name: fadeUpScale; }

/* lightbox: miękkie otwarcie */
@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.96); }
}

.lightbox.open { animation: childIn 0.3s ease; }
.lightbox.open img { animation: lbZoom 0.4s var(--ease); }

@media (max-width: 640px) {
  .brand-photos { grid-template-columns: 1fr; }
  .brand-photos img { height: 220px; }
  .brand-photos img:last-child:nth-child(odd) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-photos img, .media-grid img, .t-year, .t-item::before,
  .portrait.fade, .lightbox.open, .lightbox.open img {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Oś czasu 2.0 - rok przy linii, postęp przewijania, etapy
   ============================================================ */

.tl-progress {
  position: absolute;
  left: 4px;
  top: 8px;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.5) calc(100% - 80px),
    transparent 100%);
  pointer-events: none;
}

.t-item.lit::before { background: #fff; border-color: rgba(255, 255, 255, 0.9); }

.t-era {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0.6rem 0 3.8rem;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  white-space: nowrap;
}

.t-era::before, .t-era::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
}

@media (min-width: 761px) {
  .timeline { padding-left: 0; max-width: 860px; }

  .timeline::before, .tl-progress { left: calc(150px + 1.6rem); }

  .t-item {
    display: grid;
    grid-template-columns: 150px 3.2rem 1fr;
    padding-bottom: 4.6rem;
  }

  .t-item::before { left: calc(150px + 1.6rem - 4px); top: 0.6rem; }

  .t-year {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    font-size: clamp(1.5rem, 2.3vw, 1.9rem);
    line-height: 1.3;
    margin-bottom: 0;
    padding-top: 0.05rem;
  }

  .t-item > *:not(.t-year) { grid-column: 3; }
}

/* pasek liczb */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 880px;
  margin: 5rem auto 0;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 200;
  letter-spacing: 0.06em;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stats--home { margin-top: 0; }

/* przycisk do góry */
.to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(34, 38, 41, 0.75);
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
              background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

.to-top:hover, .to-top:focus-visible { background: #fff; color: var(--bg); border-color: #fff; }

@media (max-width: 640px) {
  .page-nav { padding: 1rem 1.1rem; }
  .page-nav .back-link { font-size: 0.6rem; letter-spacing: 0.14em; }
  .nav-anchors { gap: 1rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.6rem 1rem; }
  .lb-prev { left: 0.6rem; }
  .lb-next { right: 0.6rem; }
  .lb-prev, .lb-next { width: 44px; height: 44px; }
  .to-top { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* marki: numer + logo w przyklejonej lewej kolumnie, treść po prawej */
@media (min-width: 761px) {
  .brand-block {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 0 3.8rem;
    align-items: start;
  }

  .brand-side {
    position: sticky;
    top: 90px;
    margin-bottom: 0;
  }
}
