/* ==========================================================================
   15 lat Fundacji Politechniki Łódzkiej – strona jubileuszowa (oś czasu)
   Projekt: Figma „15 (Copy)” › www-timeline › „Wireframe - 2” (1440 px).

   • ≥ 1200 px – kompozycja 1:1 z projektem. --u to „1 px projektu”
     (1440 px okna = 1 px; węższe okno skaluje całość proporcjonalnie).
     Elementy .a są pozycjonowane w płótnie sekcji (.cv) zmiennymi
     --x / --y / --w / --h podanymi w pikselach projektu, liczonymi od
     lewej krawędzi panelu treści (x = 116 w Figmie) i od góry sekcji.
   • < 1200 px – ten sam HTML w zwykłym przepływie (układ mobilny 390 px
     i tablet), kolejność czytania = kolejność w kodzie.

   Krój: Pacaembu (docelowy krój marki, licencja komercyjna – nie jest
   dołączony). Jeśli jest zainstalowany w systemie, zostanie użyty;
   w przeciwnym razie strona korzysta z kroju zastępczego Lexend.
   Aby osadzić Pacaembu na serwerze, dodaj pliki woff2 do assets/fonts/
   i dopisz url(...) w regułach @font-face poniżej.
   ========================================================================== */

@font-face { font-family: "Pacaembu"; font-weight: 200; font-display: swap; src: local("Pacaembu ExtraLight"), local("Pacaembu-ExtraLight"); }
@font-face { font-family: "Pacaembu"; font-weight: 300; font-display: swap; src: local("Pacaembu Light"), local("Pacaembu-Light"); }
@font-face { font-family: "Pacaembu"; font-weight: 400; font-display: swap; src: local("Pacaembu Regular"), local("Pacaembu-Regular"), local("Pacaembu"); }
@font-face { font-family: "Pacaembu"; font-weight: 600; font-display: swap; src: local("Pacaembu SemiBold"), local("Pacaembu-SemiBold"); }
@font-face { font-family: "Pacaembu"; font-weight: 700; font-display: swap; src: local("Pacaembu Bold"), local("Pacaembu-Bold"); }
@font-face { font-family: "Pacaembu"; font-weight: 800; font-display: swap; src: local("Pacaembu ExtraBold"), local("Pacaembu-ExtraBold"); }

:root {
  /* kolory z projektu */
  --lilac: #eccaff;
  --purple: #5b227b;
  --plum: #311547;
  --ink: #1c0b29;
  --coral: #ff8175;
  --red: #ff4d48;
  --paper: #f4f0eb;
  --frame: #f1897d;
  --violet: #b269ff;
  --coral-cd: #ff8b7b;

  --font: "Pacaembu", "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cd: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --side: 0px;          /* szerokość bocznej kolumny z latami (desktop) */
  --gutter: 20px;       /* margines boczny w układzie mobilnym */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; background: var(--plum); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--plum);
  background: var(--plum);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
a { color: inherit; }
b, strong { font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; background: var(--coral); color: var(--plum);
  font-weight: 700; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ==========================================================================
   Typografia (wartości mobilne; desktop nadpisuje rozmiary niżej)
   ========================================================================== */
.l { font-weight: 300; }
.b { font-weight: 700; }
.year   { font-weight: 700; line-height: 1; font-size: clamp(64px, 19vw, 112px); color: var(--purple); letter-spacing: -0.01em; }
.h70    { font-weight: 700; line-height: 1.2; font-size: clamp(32px, 9vw, 52px); }
.h80    { font-weight: 300; line-height: 1.2; font-size: clamp(34px, 9.5vw, 56px); }
.lh13   { line-height: 1.3; }
.copy   { font-size: 15px; line-height: 1.6; }
.copy p + p { margin-top: 1.6em; }
.c-plum { color: var(--plum); }
.c-purple { color: var(--purple); }
.c-coral { color: var(--coral); }
.c-red { color: var(--red); }
.c-lilac { color: var(--lilac); }
.c-paper { color: var(--paper); }
.c-white, .stat.c-white { color: #fff; }
.c-black { color: #000; }
.m-center .year, .m-center .h70, .m-center .h80, .m-center .copy-c, .przyszlosc p { text-align: center; }

/* liczby / statystyki */
.stat { text-align: center; color: var(--purple); }
.stat__n { display: block; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.stat__l { display: block; font-weight: 600; line-height: 1.3; }
.n80 { font-size: 56px; font-weight: 600; line-height: 1.4; color: var(--red); }
.n50 { font-size: 40px; }
.n40 { font-size: 32px; }
.l24 { font-size: 19px; }
.l20 { font-size: 17px; font-weight: 400; }
.l18 { font-size: 16px; }

/* ==========================================================================
   Szkielet
   ========================================================================== */
.top {
  position: relative;
  background: linear-gradient(90deg, var(--plum), var(--purple));
  border-bottom: 1px solid var(--lilac);
  overflow: hidden;
}
.top__hatch {
  position: absolute; left: 0; top: 0; width: 100%; height: 14px;
  background: url("../deco/hatch-top.svg") left top / auto 26px repeat-x;
}
.top .cv { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 34px var(--gutter) 24px; }
.top__logo { width: 150px; }
.top__title { font-weight: 700; color: #fff; font-size: clamp(24px, 7vw, 34px); line-height: 1.15; }

.layout { position: relative; }

/* nawigacja po latach – mobile: przyklejony pasek */
.years {
  position: sticky; top: 0; z-index: 30;
  background: var(--plum);
  border-bottom: 1px solid rgba(236, 202, 255, .25);
}
.years ol {
  display: flex; gap: 4px; margin: 0; padding: 8px var(--gutter);
  list-style: none; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.years ol::-webkit-scrollbar { display: none; }
.years a {
  display: block; padding: 8px 10px;
  font-weight: 600; font-size: 15px; line-height: 1.2;
  color: var(--lilac); text-decoration: none; border-radius: 4px;
  transition: color .2s;
}
.years a:hover { color: #fff; }
.years a[aria-current="true"] { color: #ff8072; }

/* sekcje */
.sec { position: relative; }
.cv { position: relative; margin-inline: auto; }
.sec > .cv { max-width: 720px; padding: 64px var(--gutter); display: flex; flex-direction: column; gap: 28px; }

.bg-white  { background: #fff; }
.bg-plum   { background: var(--plum); }
.bg-ink    { background: var(--ink); }
.bg-coral  { background: var(--coral); }
.bg-lilac  { background: var(--lilac); }
.bg-purple { background: var(--purple); }

/* elementy ozdobne – na telefonie tylko paski szrafu */
.deco { display: none; pointer-events: none; }
.band {
  display: block; pointer-events: none;
  position: absolute; left: 0; right: 0; top: -23px; height: 46px; z-index: 2;
  background: left center / auto 100% repeat-x;
}
.band--purple { background-image: url("../deco/hatch-band-purple.svg"); }
.band--coral  { background-image: url("../deco/hatch-band-coral.svg"); }
.band--thin   { background-image: url("../deco/hatch-band-thin.svg"); top: 0; height: 12px; }

/* grupy (na desktopie „znikają” – display: contents) */
.grp-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 6px 4px; }
.grp-photos > .ph:only-child, .grp-photos > .ph--wide { grid-column: 1 / -1; }
.grp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; align-items: start; }
.grp-stats > .stat:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
.grp-stats:has(.n40) { grid-template-columns: 1fr; }
.grp-circles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.grp-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 30px; }

/* zdjęcia w koralowej ramce */
.ph {
  position: relative; overflow: hidden;
  aspect-ratio: var(--w) / var(--h);
  border: 4px solid var(--frame);
  background: var(--frame);
  transform: rotate(var(--r, 0deg));
}
.ph img {
  position: absolute; max-width: none;
  width: var(--iw, 100%); height: var(--ih, 100%);
  left: var(--il, 0); top: var(--it, 0);
}

/* kółka z hasłami */
.dot {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  width: 132px; aspect-ratio: 1; border-radius: 50%;
  text-align: center; font-weight: 700; line-height: 1.2;
}
.dot--lilac { background: var(--lilac); color: var(--purple); font-size: 15px; }
.dot--red   { background: var(--red); color: #fff; font-weight: 600; font-size: 14px; line-height: 1.3; padding: 12px; }
.dot--280 { width: 168px; align-self: center; }
.dot--280 .n { font-weight: 600; font-size: 21px; line-height: 1.5; }
.dot--280 small { font-size: 12.5px; line-height: 1.44; font-weight: 400; }

/* ==========================================================================
   Sekcje – układ mobilny
   ========================================================================== */
.hero { position: relative; background: var(--plum); color: #fff; overflow: hidden; }
.hero .cv { min-height: 520px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 220px var(--gutter) 40px; max-width: none; }
.hero__photo { position: absolute; inset: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--plum) 18%, rgba(49, 21, 71, .55) 60%, rgba(49, 21, 71, 0) 100%); }
.hero__date { position: relative; font-weight: 200; font-size: 24px; color: var(--paper); line-height: 1.2; }
.hero__rule { position: relative; width: 81px; height: 10px; }
.hero__title { position: relative; font-weight: 700; font-size: clamp(48px, 15vw, 72px); line-height: 1.1; }

.policlinic-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.policlinic-row .arrow { flex: none; display: flex; align-items: center; }
.policlinic-row .arrow img { width: 22px; }
.policlinic-row .arrow img + img { width: 24px; }

.s2012 { overflow: hidden; }
.s2012 .klaster { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.klaster__mark { position: relative; padding: 18px 96px 18px 18px; background: linear-gradient(115deg, #8f2ac0 76%, transparent 76.1%); }

.s2015 .photo2015 { position: relative; }
.s2015 .ph15 { position: relative; overflow: hidden; aspect-ratio: 1098 / 502; z-index: 2; }
.s2015 .ph15 img { position: absolute; max-width: none; width: 101.53%; height: 166.57%; left: 0; top: -21.82%; }
.s2015 .on-photo { position: absolute; left: 12px; bottom: 10px; z-index: 3; display: flex; align-items: center; gap: 18px; }
.s2015 .box { background: var(--ink); }

.s2017 .ldi-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.s2017 .od { font-size: 17px; }

.mikro { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 14px; text-align: center; }
.mikro__title { color: var(--purple); line-height: 1.2; }
.mikro__title span { display: block; }
.mikro__title .t1 { font-size: 24px; }
.mikro__title .t2 { font-size: 34px; font-weight: 700; }
.mikro .arrow { display: none; }

.przyszlosc .cv { text-align: center; align-items: center; }
.przyszlosc__sub { font-weight: 300; font-size: clamp(20px, 5.6vw, 28px); line-height: 1.3; }
.przyszlosc__logo { width: 220px; }

/* odliczanie */
.cd .cv { align-items: center; text-align: center; }
.cd__logo { width: 230px; }
.cd__date { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cd__rule { width: 140px; height: 4px; }
.cd__datetext { font-family: var(--font-cd); font-weight: 500; font-size: 19px; letter-spacing: .28em; margin-right: -.28em; color: var(--coral-cd); }
.cd__eyebrow { font-family: var(--font-cd); font-size: 15px; letter-spacing: .42em; margin-right: -.42em; color: var(--violet); }
.cd__title { font-family: var(--font-cd); font-weight: 700; font-size: clamp(22px, 6.4vw, 30px); color: var(--coral-cd); margin-top: 8px; }
.cd__units { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 380px; margin-top: 8px; }
.cd__unit { display: flex; flex-direction: column; align-items: center; }
.cd__value { font-family: var(--font-cd); font-weight: 900; font-size: clamp(52px, 16vw, 72px); line-height: 1.21; color: var(--coral-cd); font-variant-numeric: tabular-nums; }
.cd__label { font-family: var(--font-cd); font-size: 16px; color: var(--violet); }
.cd__group { display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* stopka */
.foot { background: var(--plum); color: #fff; font-family: var(--font-cd); }
.foot__in { max-width: 1440px; margin: 0 auto; padding: 36px var(--gutter) 28px; display: flex; flex-direction: column; gap: 16px; }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot__logo { width: 170px; }
.foot__social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.foot__social a { display: flex; padding: 8px; border-radius: 4px; }
.foot__social a:hover { background: rgba(255, 255, 255, .1); }
.foot__social img { width: 20px; height: 20px; }
.foot__copy { margin: 0; padding-top: 16px; border-top: 1px solid #fff; font-size: 14px; }

/* rozmiary tylko dla układu w przepływie (< 1200 px) */
@media (max-width: 1199.98px) {
  .two-col > div + div { margin-top: 1.6em; }
  .grp-circles .dot { width: min(132px, calc((100vw - 2 * var(--gutter) - 24px) / 3)); font-size: 12.5px; }
  .grp-logos img { width: auto; height: auto; max-height: 52px; max-width: 42%; }
  .grp-logos .tall { max-height: 96px; }
  .sec .logo-fpl-stare { width: 200px; }
  .sec .logo-klaster { width: 220px; }
  .sec .logo-cditl { width: 150px; }
  .sec .logo-ldi { width: 220px; }
  .sec .logo-policlinic { width: 300px; }
  .policlinic-row .logo-cditl { width: 96px; }
  .policlinic-row .logo-policlinic { width: 170px; }
  .s2015 .on-photo img { height: 44px; width: auto; }
}

/* tablet */
@media (min-width: 640px) and (max-width: 1199.98px) {
  :root { --gutter: 40px; }
  .copy { font-size: 16px; }
  .grp-photos { gap: 22px 20px; }
  .dot, .grp-circles .dot { width: 160px; }
  .grp-circles .dot--lilac { font-size: 18px; }
  .grp-circles .dot--red { font-size: 16px; }
  .dot--lilac { font-size: 18px; }
  .dot--red { font-size: 17px; }
  .dot--280 { width: 186px; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .two-col > div + div { margin-top: 0; }
  .mikro { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .mikro__title { order: 0; }
  .mikro .stat--left { order: -1; }
}

/* ==========================================================================
   DESKTOP ≥ 1200 px – kompozycja z Figmy
   ========================================================================== */
@media (min-width: 1200px) {
  :root {
    --u: calc(min(100vw, 1440px) / 1440);
    --side: calc(116 * var(--u));
  }
  /* 100vw wlicza pasek przewijania (Windows) – skala liczona od szerokości body */
  @supports (width: 1cqw) {
    body { container-type: inline-size; }
    :root { --u: calc(min(100cqw, 1440px) / 1440); }
  }
  .layout { overflow-x: clip; }
  html { scroll-padding-top: 0; }

  /* --- szkielet: boczna kolumna z latami + panel treści --- */
  .layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: var(--plum); }
  .main { grid-column: 2; min-width: 0; }
  .cv, .sec > .cv, .top .cv, .hero .cv {
    display: block; position: relative;
    width: calc(1324 * var(--u)); max-width: none;
    height: calc(var(--sh) * var(--u)); min-height: 0;
    margin: 0 auto; padding: 0; gap: 0;
  }

  .a {
    position: absolute;
    left: calc(var(--x) * var(--u));
    top: calc(var(--y) * var(--u));
    width: calc(var(--w) * var(--u));
    z-index: 3;
  }
  .a[style*="--h"] { height: calc(var(--h) * var(--u)); }
  .tr { text-align: right; }
  .tc { text-align: center; }
  .main :is(.grp-photos, .grp-stats, .grp-circles, .grp-logos, .two-col, .policlinic-row, .policlinic-row .arrow, .klaster, .klaster__mark, .ldi-block, .mikro, .cd__date, .cd__group, .photo2015, .on-photo) { display: contents; }

  .deco { display: block; position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); height: auto; max-width: none; z-index: 1; }
  .band { left: calc(var(--x) * var(--u)); right: auto; top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); height: calc(92 * var(--u)); background-size: calc(1361 * var(--u)) 100%; background-repeat: no-repeat; background-position: left top; z-index: 2; }
  .band--coral { background-size: calc(1324 * var(--u)) 100%; }
  .band--thin { height: calc(15 * var(--u)); background-size: calc(1324 * var(--u)) 100%; }

  /* --- typografia w skali projektu --- */
  .year   { font-size: calc(140 * var(--u)); letter-spacing: 0; }
  .h70    { font-size: calc(70 * var(--u)); line-height: 1.25; }
  .h80    { font-size: calc(80 * var(--u)); line-height: 1.25; }
  .lh13   { line-height: 1.3; }
  .copy   { font-size: calc(16 * var(--u)); }
  .n80 { font-size: calc(80 * var(--u)); line-height: 1.6; }
  .n50 { font-size: calc(50 * var(--u)); }
  .n40 { font-size: calc(40 * var(--u)); }
  .l24 { font-size: calc(24 * var(--u)); }
  .l20 { font-size: calc(20 * var(--u)); }
  .l18 { font-size: calc(18 * var(--u)); line-height: 1.5; }
  .stat--s2012 .stat__l { margin-top: calc(-12 * var(--u)); }

  .ph { border-width: calc(5 * var(--u)); height: calc(var(--h) * var(--u)); aspect-ratio: auto; z-index: 3; }
  .dot { position: absolute; width: calc(var(--w) * var(--u)); padding: 0; z-index: 3; }
  .dot--lilac { font-size: calc(20 * var(--u)); }
  .dot--red { font-size: calc(20 * var(--u)); }
  .dot--280 { justify-content: flex-start; padding-top: calc(35 * var(--u)); }
  .dot--280 .n { font-size: calc(24 * var(--u)); line-height: 1.6; }
  .dot--280 small { font-size: calc(14 * var(--u)); }

  /* --- nagłówek --- */
  .top { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); background: linear-gradient(90deg, var(--plum), var(--purple)); }
  .top .cv { grid-column: 2; --sh: 218; }
  .top__hatch { height: calc(26 * var(--u)); background-size: calc(1440 * var(--u)) 100%; background-repeat: repeat-x; }
  .top__logo { width: calc(267 * var(--u)); }
  .top__title { font-size: calc(48 * var(--u)); line-height: 1.25; text-align: right; white-space: nowrap; }

  /* --- boczna nawigacja --- */
  .years { grid-column: 1; position: relative; background: none; border: 0; z-index: 20; }
  .years ol {
    position: sticky; top: 0;
    flex-direction: column; gap: 0; overflow: visible;
    padding: calc(26 * var(--u)) 0 0 calc(16 * var(--u));
  }
  .years a { padding: 0; font-size: calc(16 * var(--u)); line-height: calc(44 * var(--u)); height: calc(44 * var(--u)); border-radius: 0; }
  .years li:first-child a { margin-top: calc(-12 * var(--u)); }

  /* --- hero --- */
  .hero { background: none; }
  .hero .cv { --sh: 737; background: var(--plum); width: calc(1324 * var(--u)); }
  .hero__photo { inset: 0 0 0 auto; width: calc(983 * var(--u)); }
  .hero__photo img { object-position: 50% 50%; }
  .hero__shade { background: linear-gradient(270deg, rgba(49, 21, 71, 0) 29.531%, var(--plum) 75.98%); }
  .hero__date { position: absolute; font-size: calc(30 * var(--u)); }
  .hero__rule { position: absolute; height: auto; }
  .hero__title { position: absolute; font-size: calc(90 * var(--u)); line-height: 1.2; }

  /* panele są o 2 px szersze niż płótno – jak w projekcie */
  .main .sec { overflow: visible; }
  .main .s2012 { overflow: clip; }

  .s2015 .ph15 { position: absolute; aspect-ratio: auto; }
  .s2015 .on-photo img { position: absolute; height: auto; }
  .s2015 .box { position: absolute; z-index: 3; }
  .s2015 .copy { z-index: 4; }
  .s2017 .od { font-size: calc(20 * var(--u)); white-space: nowrap; }
  .mikro__title .t1 { font-size: calc(30 * var(--u)); }
  .mikro__title .t2 { font-size: calc(45 * var(--u)); }
  .mikro .arrow { display: block; }
  .przyszlosc__sub { font-size: calc(40 * var(--u)); line-height: 1.25; }


  .cd__datetext { font-size: calc(23 * var(--u)); white-space: nowrap; }
  .cd__eyebrow { font-size: calc(20 * var(--u)); white-space: nowrap; }
  .cd__title { font-size: calc(35 * var(--u)); margin: 0; white-space: nowrap; }
  .cd__units { max-width: none; margin: 0; }
  .cd__value { font-size: calc(80 * var(--u)); }
  .cd__label { font-size: calc(22 * var(--u)); margin-top: calc(1 * var(--u)); }

  .foot__in { padding: 48px 100px; }
  .foot__row { padding-right: 46px; }
  .foot__logo { width: 213px; }
  .foot__copy { padding: 16px 46px; }
}
