@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/Ubuntu-Light.ttf") format("truetype");
}

@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/Ubuntu-Regular.ttf") format("truetype");
}

@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/Ubuntu-Bold.ttf") format("truetype");
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: #180f24; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f6effa;
  font-family: Ubuntu, Arial, sans-serif;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

header, main, footer { width: 100%; max-width: 603px; flex-shrink: 0; margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: 14.4px; padding: 48.6px 41.4px 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12.6px;
  color: inherit;
  text-decoration: none;
  font-size: 28.8px;
  font-weight: 700;
  letter-spacing: -.9px;
  min-width: 0;
}

.languages { display: flex; gap: 10.8px; align-items: center; flex-shrink: 0; }
.languages button { font: inherit; color: inherit; cursor: pointer; background: transparent; border: 0; width: 35.64px; height: 35.64px; padding: 0; font-size: 17.01px; font-weight: 700; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.languages button[aria-pressed="true"] { color: #fff; border: 0; border-bottom: 4px solid #7d2043; text-shadow: 0 1px 1px #180b2d99; -webkit-appearance: none; appearance: none; }

.languages button[aria-pressed="true"], .webhome-link, .details-close {
  background-color: #bd147d;
  background-image: linear-gradient(115deg, #bd147d 0%, #dc326b 45%, #ed602d 100%);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: padding-box;
}

.languages button[aria-pressed="true"]:is(:hover, :focus-visible),
.webhome-link:is(:hover, :focus-visible),
.details-close:is(:hover, :focus-visible) {
  background-image: linear-gradient(115deg, #a81270 0%, #c72d61 45%, #d95528 100%);
}

.brand img { display: block; width: 32.4px; height: 38.88px; object-fit: contain; flex-shrink: 0; }
.brand-force {
  color: #009fff;
  font-weight: 300;
  display: inline-block;
  opacity: 0.1;
  animation: force-pulse 3s linear infinite;
}

@keyframes force-pulse {
  0%, 33.333333%, 100% { opacity: 0.1; }
  66.666667% { opacity: 1; }
}

main { position: relative; z-index: 1; padding: 53.2px 41.4px 0; }
.projects {
  --project-size: 96px;
  --project-radius: 23px;
  --projects-spacing: 46.8px;
  width: 100%;
  margin-bottom: var(--projects-spacing);
}

.projects-intro { margin: 0 0 calc(var(--projects-spacing) * .7); font-size: 18.63px; font-weight: 300; line-height: 1.5; letter-spacing: -.18px; }

.project-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, var(--project-size)));
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project { min-width: 0; width: 100%; }
.project-link, .project-upcoming {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.project-link {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--project-radius);
  -webkit-tap-highlight-color: transparent;
}
.project-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--project-radius);
  overflow: hidden;
}

/* Dolny border ikony: kolor tła ikony przyciemniony o ok. 38% (kanały RGB × 0,62), tak jak kafelki na webhome.pl. */
.project-link .project-icon { border-bottom: 4px solid var(--icon-edge, transparent); }
.project-link[data-project="tabularius"] { --icon-edge: #9e804a; } /* tło #ffcf78 */
.project-link[data-project="verbulio"] { --icon-edge: #9e7d30; } /* tło #ffc94d */
.project-link[data-project="profilo"] { --icon-edge: #09182c; } /* tło #0f2747 */
.project-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-name { font-size: 15px; line-height: 1.4; font-weight: 400; white-space: nowrap; flex-shrink: 0; overflow: visible; }
.project-placeholder { border: 2px dashed #a58eaf; color: #b6a2bf; }
.project-placeholder svg { width: 30px; height: 30px; }
.project-upcoming .project-name { color: #b6a2bf; }

/* Widok szczegółów projektu: ikony zmniejszone o 50% w jednej linii, bez podpisów i "Wkrótce". */
.project-open .projects { --project-size-small: calc(var(--project-size) / 2); --project-radius-small: calc(var(--project-radius) / 2); margin-bottom: 0; }
/* Rząd ikon przykleja się u góry ekranu z odstępem jak pływający przycisk "Wypróbuj na żywo".
   Dopełnienie (pod tło po przyklejeniu) znoszą ujemne marginesy, więc w spoczynku ikony stoją tam, gdzie wcześniej.
   scroll-margin-top: tu app.js przewija po otwarciu opisu, kawałek poniżej miejsca przyklejenia. */
.project-open .project-list {
  --sticky-top: max(20px, env(safe-area-inset-top));
  display: flex;
  justify-content: center;
  gap: 18px;
  position: sticky;
  top: var(--sticky-top);
  z-index: 5;
  width: fit-content;
  margin: -14px auto;
  padding: 14px;
  border-radius: 18px;
  scroll-margin-top: calc(var(--sticky-top) + 4px);
  transition: background-color .2s ease, box-shadow .2s ease;
}
/* Przyklejony rząd dostaje tło z kryciem 80%: treść pod nim lekko prześwituje, ale nie przeszkadza.
   Bez rozmycia, bo rozmyta ciemna treść pod spodem dawała wrażenie pełnego krycia. */
.project-open .project-list.is-stuck {
  background-color: #180f24cc;
  box-shadow: 0 8px 24px #0c061599;
}
.project-open .project { width: var(--project-size-small); }
.project-open .project-upcoming, .project-open .project-name { display: none; }
.project-open .project-link, .project-open .project-icon { border-radius: var(--project-radius-small); }
.project-open .project-link.is-active .project-icon { box-shadow: 0 0 0 2px #180f24, 0 0 0 4px #dc326b; overflow: hidden; }
.project-open .project-link.is-active { position: relative; }
.project-open .project-link.is-active::after {
  content: "";
  transition: opacity .2s ease;
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ed602d;
  transform: translateX(-50%);
}
/* Kropka pod aktywną ikoną wystawałaby poza tło przyklejonego rzędu; wystarcza obwódka. */
.project-list.is-stuck .project-link.is-active::after { opacity: 0; }
.project-open .offer { display: none; }

.project-details { margin: 46px 0 64px; }
.project-details[hidden] { display: none; }
.details-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.details-title { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.6px; outline: none; }
/* Skrót do aplikacji: pływający przycisk przy dolnej krawędzi ekranu (dla tych, którzy nie czytają całości). */
.details-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 10px 18px;
  border-radius: 10px;
  border-bottom: 3px solid #7d2043;
  background-image: linear-gradient(115deg, #bd147d 0%, #dc326b 45%, #ed602d 100%);
  box-shadow: 0 8px 24px #0c061599;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 1px #180b2d99;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity .2s ease, transform .2s ease;
}
.details-quick:is(:hover, :focus-visible) {
  background-image: linear-gradient(115deg, #a81270 0%, #c72d61 45%, #d95528 100%);
}
.details-quick svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Znika, gdy widać już przycisk na dole opisu. */
.details-cta-visible .details-quick { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }
/* Jak przycisk zamykania kontaktu na webhome.pl: okrągły, rozmiar aktywnego przycisku języka. */
.details-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 35.64px;
  height: 35.64px;
  padding: 0;
  border: 0;
  border-bottom: 4px solid #7d2043;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.details-close svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px #180b2d99); }
.details-lead { margin: 0 0 28px; font-size: 18.63px; font-weight: 300; line-height: 1.5; color: #e8dcef; }

/* align-items: start, bo małe zrzuty mogą mieć różne proporcje (np. pionowy edytor Profilo). */
.details-gallery { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; margin: 0 0 28px; }
.details-shot { margin: 0; position: relative; }
.details-shot-main { grid-column: 1 / -1; }
.shot-mock {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ffffff1f;
  background:
    linear-gradient(#ffffff14, #ffffff14) 0 0 / 100% 22px no-repeat,
    radial-gradient(circle at 80% 20%, #dc326b40, transparent 55%),
    radial-gradient(circle at 15% 90%, #009fff33, transparent 50%),
    linear-gradient(135deg, #2a1940, #1f1430);
}
.details-shot:not(.details-shot-main) .shot-mock { aspect-ratio: 4 / 3; }
/* Prawdziwy zrzut: pasek okna nad obrazem, a wysokość ramki wynika z proporcji zrzutu. */
.details-shot .shot-mock.has-image {
  aspect-ratio: auto;
  padding-top: 22px;
  background: linear-gradient(#ffffff14, #ffffff14) 0 0 / 100% 22px no-repeat, #1f1430;
}
.shot-zoom { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.shot-zoom:focus-visible { outline-offset: -3px; }
.shot-zoom img { display: block; width: 100%; height: auto; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
/* Lekkie przybliżenie po najechaniu podpowiada, że zrzut można powiększyć. */
@media (hover: hover) {
  .shot-zoom:hover img { transform: scale(1.03); }
}
/* Podpis leży na zrzucie, więc kliknięcie w niego też otwiera powiększenie. */
.details-shot figcaption { pointer-events: none; }

/* Powiększenie zrzutu: na komputerze cały zrzut mieści się w oknie, na telefonie jest szerszy
   niż ekran i przesuwa się go palcem (strona blokuje powiększanie gestem). */
/* Pasek z podpisem leży nad obszarem zrzutu (position: absolute), a zrzut jest wyśrodkowany
   w całym oknie z równym marginesem u góry i u dołu. Bez procentowych wysokości w flexie,
   które Safari rozwiązywał inaczej i spychał zrzut w dół. */
.lightbox {
  --lightbox-gap: 72px;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  overflow: hidden;
}
.lightbox[open] { display: block; }
.lightbox:focus { outline: none; }
/* W powiększeniu przycisk zamykania bez dolnej krawędzi. */
.lightbox-close { border-bottom: 0; }
.lightbox::backdrop { background: #0c0615e6; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
}
.lightbox-caption { margin: 0; font-size: 15px; font-weight: 700; color: #e8dcef; }
.lightbox-scroll {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: var(--lightbox-gap) 20px max(var(--lightbox-gap), env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}
/* Na komputerze zrzut wypełnia okno, ale z marginesem: najwyżej 90% szerokości i 85% wysokości okna. */
.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(90vw, calc(100vw - 40px));
  max-height: min(85dvh, calc(100dvh - 2 * var(--lightbox-gap)));
  border-radius: 10px;
  box-shadow: 0 16px 48px #0c0615;
  transform-origin: 0 0;
}
body.lightbox-open { overflow: hidden; }
/* Podpowiedź przesuwania (tylko gdy zrzut jest szerszy niż ekran, włącza ją app.js). */
.lightbox-hint {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 12px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: #180f24e6;
  box-shadow: 0 8px 24px #0c061599;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .3s ease, transform .3s ease;
}
.lightbox-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
.lightbox-hint svg { width: 22px; height: 22px; flex-shrink: 0; animation: swipe-hint 1.4s ease-in-out infinite; }
@keyframes swipe-hint {
  0%, 100% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-hint svg { animation: none; }
}
.shot-mock::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed602d;
  box-shadow: 13px 0 0 #f3b33d, 26px 0 0 #3ec27a;
}
.shot-mock i { position: absolute; left: 8%; height: 8%; border-radius: 4px; background: #ffffff1c; }
.shot-mock i:nth-child(1) { top: 26%; width: 46%; height: 10%; background: #ffffff33; }
.shot-mock i:nth-child(2) { top: 44%; width: 72%; }
.shot-mock i:nth-child(3) { top: 58%; width: 58%; }
.details-shot figcaption {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #180f24b3;
  color: #d6c2df;
  font-size: 12px;
}

.details-body p { margin: 0 0 16px; font-size: 16px; font-weight: 300; line-height: 1.65; color: #e8dcef; }
.details-subtitle { margin: 28px 0 12px; text-transform: uppercase; letter-spacing: 2.4px; font-size: 14px; font-weight: 700; color: #fff; }
.details-features { margin: 0 0 28px; padding: 0; list-style: none; display: grid; gap: 10px; }
.details-features li { position: relative; padding-left: 26px; font-size: 16px; font-weight: 300; line-height: 1.5; }
.details-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(115deg, #bd147d, #ed602d);
}
.details-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 36px; padding: 0; list-style: none; }
.details-tags li { padding: 5px 12px; background: #ffffff33; border-radius: 999px; font-size: 13px; font-weight: 700; color: #d6c2df; }
.details-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.details-actions [hidden] { display: none; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
::view-transition-group(*) { animation-duration: .4s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

.offer { display: flex; justify-content: flex-start; margin-bottom: 28px; }
.eyebrow { margin: 0 0 19.8px; text-transform: uppercase; letter-spacing: 3.6px; font-size: 19.8px; font-weight: 700; color: #ffffff; }
.portfolio-heading { margin-bottom: 29.74px; text-align: center; }

.webhome-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  border-bottom: 4px solid #7d2043;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 1px #180b2d99;
}

.webhome-link svg { width: 29px; height: 29px; flex-shrink: 0; }
a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid #dd8d88; outline-offset: 5px; }
footer {
  position: relative;
  z-index: 0;
  margin-top: -131px;
  min-height: 429.4px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  isolation: isolate;
  color: #d6c2df;
  font-size: 14.4px;
  text-align: center;
}
footer p { margin: 0; padding: 0 18px 30px; }

@media (max-width: 540px) {
  body { touch-action: pan-x pan-y; }
  header { padding: 30px 25px 0; gap: 16px; }
  .languages { gap: 5px; }
  .languages button { width: 39.6px; height: 39.6px; font-size: 16.2px; }
  .details-close { width: 39.6px; height: 39.6px; }
  main { padding: 72px 25px 0; }
  .eyebrow { font-size: 15px; letter-spacing: 3px; margin-bottom: 20px; }
  .portfolio-heading { margin-bottom: 30px; }
  .projects-intro { font-size: 17.1px; line-height: 1.4; }
  footer { min-height: 375px; margin-top: -122px; font-size: 13px; }
  footer p { padding: 0 20px 20px; }
  .projects { --project-size: min(68.4px, calc((100vw - 86px) * .225)); --project-radius: 16.2px; --projects-spacing: 43px; }
  .project-list { justify-content: space-between; gap: 12px; }
  .project-name { font-size: 14px; min-height: 2.8em; }
  .brand { font-size: 27px; gap: 10px; letter-spacing: -1px; }
  .brand img { width: 31.5px; height: 37.8px; }
  .webhome-link { font-size: 14px; }
  .project-open .project-list { gap: 14px; }
  .details-title { font-size: 26px; }
  .details-lead { font-size: 17.1px; line-height: 1.4; }
  /* Na telefonie małe zrzuty są jeden pod drugim, bo obok siebie byłyby nieczytelne. */
  .details-gallery { grid-template-columns: 1fr; gap: 16px; }
  .details-gallery-small.is-portrait { grid-template-columns: 1fr 1fr; gap: 10px; }
  /* Na telefonie zrzut w powiększeniu ma 750 px szerokości i przesuwa się go palcem. */
  .lightbox-scroll { align-items: center; justify-items: start; padding: var(--lightbox-gap) 16px max(var(--lightbox-gap), env(safe-area-inset-bottom)); }
  /* Przy przesuwaniu w pionie zrzut chowa się pod paskiem, więc pasek ma tło. */
  .lightbox-bar { background: #0c0615e6; }
  .lightbox-image { width: 750px; max-width: none; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-force { animation: none; opacity: 1; }
}

body {
  background-image: url("assets/background-sea-v3.svg?v=0be06c2f4b");
  background-repeat: no-repeat;
  background-position: center bottom 95px;
  background-size: max(100%, 1800px) auto;
}
