/* ==========================================================================
   webPixel Design — arkusz stylów
   --------------------------------------------------------------------------
   Spis treści:
    1. Zmienne (kolory, fonty, wymiary) + fonty lokalne
    2. Podstawy
    3. Nagłówek i menu
    4. Hero (pierwsza sekcja)
    5. Sekcja „Co robię” + wspólne nagłówki sekcji
    6. Realizacje — duże projekty
    7. Realizacje — małe projekty i boks „Twój projekt”
    8. Galeria zdjęć w projektach
    9. Lightbox (powiększenie zdjęć)
   10. Sekcja „Partnerstwo na lata” (ciemna)
   11. Sekcja „O studio”
   12. Kontakt i formularz
   13. Stopka
   14. Strona prywatności
   15. Animacje pojawiania się
   16. Responsywność: ≤ 1050 px
   17. Responsywność: ≤ 700 px (telefony)
   18. Urządzenia dotykowe (bez hover)
   19. Ograniczony ruch (prefers-reduced-motion)

   Zgodne z CSP style-src 'self': bez stylów inline w HTML/JS.
   ========================================================================== */


/* 1. ZMIENNE ============================================================== */

:root {
  /* Kolory podstawowe */
  --bg: #f5f4f0;            /* tło strony */
  --ink: #171d27;           /* tekst główny */
  --muted: #606671;         /* tekst drugorzędny */
  --brand: #008dd2;         /* niebieski z logo — duże nagłówki, ozdobniki */
  --brand-light: #a2d9f7;   /* jasny piksel z logo */
  --brand-navy: #566a8f;    /* granatowy piksel z logo */
  --blue: #006fa9;          /* akcent dla małych tekstów i przycisków (kontrast AA) */
  --blue-dark: #005f91;     /* akcent po najechaniu */
  --line: #d7d9dc;          /* linie podziału */
  --soft: #e9ebed;          /* jasne tło sekcji */
  --dark: #171d27;          /* tło ciemnej sekcji */

  /* Kolory pomocnicze */
  --surface: #e4e7ea;       /* tło placeholderów zdjęć */
  --chip-border: #c9cdd2;   /* ramki tagów */
  --overlay: rgba(17, 25, 39, .91);  /* tło przycisków na zdjęciach */
  --lightbox-bg: #141a24;   /* tło powiększenia */

  /* Ciemna sekcja */
  --dark-accent: #a2d9f7;
  --dark-accent-2: #6cc4f2;
  --dark-text: #b5bece;

  /* Fonty */
  --font: 'DM Sans', Arial, Helvetica, sans-serif;            /* tekst */
  --font-display: 'Manrope', Arial, Helvetica, sans-serif;    /* nagłówki, etykiety */

  /* Wymiary */
  --container: 1320px;
  --gutter: 36px;
  --header-h: 88px;
}


/* Fonty lokalne (licencja OFL, pliki w assets/fonts) — zgodne z CSP. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/manrope-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url(fonts/dm-sans-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url(fonts/dm-sans-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. PODSTAWY ============================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

/* 1. Wyważone linie w nagłówkach (bez pojedynczych słów w ostatniej linii) */
h1, h2, h3, h4,
.manifest,
.your-project h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* przyciski i pola nie dziedziczą fontu z <body> — wymuszamy */
button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--blue);
}

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

.dot {
  color: var(--brand);
}

/* Małe teksty w wersalikach (etykiety, indeksy sekcji) */
.eyebrow,
.section-index,
.section-aside,
.band-label,
.hero-foot,
.small-meta,
.project-meta,
.placeholder,
.your-project-kicker,
.timeline span {
  font: 700 11px/1.5 var(--font-display);
  letter-spacing: 1.5px;
}


/* 3. NAGŁÓWEK I MENU ====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 240, .92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}

.site-header.scrolled {
  border-color: var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 800 25px/1 var(--font-display);
  letter-spacing: -.9px;
}

/* Znak „pixele” z logo */
.brand-mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.brand-name span {
  color: var(--brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
  font-size: 13px;
  font-weight: 600;
}

/* aktywna sekcja (ustawia assets/script.js) */
.nav-links a:not(.nav-contact) {
  position: relative;
  padding: 6px 0;
}

.nav-links a:not(.nav-contact)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.nav-links a.is-active {
  color: var(--blue);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-links .nav-contact.is-active {
  color: white;
}

.nav-contact {
  border: 1px solid var(--ink);
  padding: 13px 19px;
}

.nav-contact.is-active,
.nav-contact:hover {
  background: var(--ink);
  color: white;
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 26px;
}


/* 4. HERO ================================================================= */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  padding-top: 85px;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--blue);
}

.eyebrow-line {
  width: 50px;
  height: 1px;
  background: var(--blue);
}

.hero-title,
.display-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.055em;
}

.hero-title {
  font-size: clamp(60px, 8.5vw, 132px);
  line-height: 1.08;
  margin: 35px 0 55px;
}

/* Animacja wjeżdżających linii tytułu */
.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: block;
  transform: translateY(115%);
  animation: slideIn .95s cubic-bezier(.2, .8, .2, 1) forwards;
}

.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }

@keyframes slideIn {
  to { transform: translateY(0); }
}

/* Duży znak „pixele” po prawej stronie hero (tylko na szerokich ekranach) */
.hero-mark {
  position: absolute;
  top: 150px;
  right: var(--gutter);
  z-index: 1; /* nad tytułem, żeby kwadraty reagowały na kursor */
  width: clamp(220px, 23vw, 330px);
  height: auto;
}

/* Animacja znaku (sterowanie: assets/script.js §3b):
   1) wejście kwadrat po kwadracie, 2) fala co kilka sekund,
   3) losowe „mrugnięcia” (.is-pop), 4) lekka paralaksa za kursorem. */
.hero-mark .px,
.hero-mark .px-pop,
.hero-mark rect {
  transform-box: fill-box;
  transform-origin: center;
}

/* paralaksa: --mx/--my ustawia JS na <svg>, --d (głębia) na każdym kwadracie */
.hero-mark .px {
  transform: translate(calc(var(--mx, 0) * var(--d, 0) * 1px), calc(var(--my, 0) * var(--d, 0) * 1px));
}

.hero-mark rect {
  cursor: default;
  transition: fill .5s ease;
  animation:
    pixelIn .5s cubic-bezier(.2, .8, .2, 1) calc(.3s + var(--i, 0) * 60ms) both,
    pixelWave 7s ease-in-out calc(2s + var(--diag, 0) * 140ms) infinite;
}

.hero-mark .px-pop.is-pop {
  animation: pixelPop .6s cubic-bezier(.3, .7, .3, 1);
}

.hero-mark.is-paused rect,
.hero-mark.is-paused .px-pop {
  animation-play-state: paused;
}

@keyframes pixelIn {
  from { opacity: 0; transform: translateY(40%) scale(.6); }
  to   { opacity: 1; transform: none; }
}

@keyframes pixelWave {
  0%, 74%, 100% { transform: none; filter: none; }
  80%           { transform: translateY(-22%); filter: brightness(1.12); }
  88%           { transform: translateY(4%); filter: none; }
  94%           { transform: none; }
}

@keyframes pixelPop {
  0%   { transform: none; }
  40%  { transform: scale(.7) rotate(-12deg); }
  70%  { transform: scale(1.08) rotate(3deg); }
  100% { transform: none; }
}

.accent {
  color: var(--brand);
}

.period {
  color: var(--ink);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  align-items: flex-end;
}

.hero-intro {
  max-width: 650px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.55;
  letter-spacing: -.025em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 27px;
  flex-shrink: 0;
}

/* Główny niebieski przycisk */
.btn-primary-custom {
  background: var(--blue);
  color: white;
  padding: 19px 24px;
  display: inline-flex;
  gap: 40px;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  transition: transform .3s, background .3s;
}

.btn-primary-custom:hover {
  background: var(--blue-dark);
  color: white;
  transform: translateY(-4px);
}

/* Podkreślony link tekstowy */
.text-link,
.project-link {
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid;
  padding-bottom: 5px;
}

.hero-foot {
  margin-top: auto;
  padding: 70px 0 24px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}


/* 5. SEKCJA „CO ROBIĘ” + WSPÓLNE NAGŁÓWKI SEKCJI ========================== */

.intro-band {
  background: var(--soft);
  padding: 130px 0;
}

.band-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
}

/* Lewa kolumna sekcji 01: znak z pikselami + etykieta, przyklejone przy przewijaniu */
.band-side {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 18px;
}

.band-label {
  order: -1; /* etykieta nad diagramem */
}

/* Diagram „Nie tylko kod. Cały kontekst.” — warstwy wokół kodu.
   Wejście: najpierw „Kod”, potem warstwy na zewnątrz; potem co kilka
   sekund impuls od środka. Uruchamia go klasa .visible (script.js). */
.context-map {
  --ring-gap: 18px;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  display: flex;
}

.cm-ring {
  --ring: #c9cfd6;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 30px var(--ring-gap) var(--ring-gap);
  border: 1px solid transparent;
  background: transparent;
  transition: border-color .6s ease, background-color .6s ease;
}

.cm-1 { --ring: #c3cad2; --fill: rgba(255, 255, 255, .35); --delay: 1.05s; --ping: 1.05s; }
.cm-2 { --ring: #a9c3d6; --fill: rgba(255, 255, 255, .35); --delay: .80s;  --ping: .80s; }
.cm-3 { --ring: #7fb3d6; --fill: rgba(255, 255, 255, .35); --delay: .55s;  --ping: .55s; }
.cm-4 { --ring: #3c9dd4; --fill: rgba(0, 141, 210, .06);  --delay: .30s;  --ping: .30s;
        align-items: center; justify-content: center; }

.cm-label {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  font: 700 10px/1.2 var(--font-display);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .5s ease, transform .5s ease;
}

.cm-4 > .cm-label { color: var(--blue); }

.cm-core {
  padding: 12px 22px;
  background: var(--brand);
  color: #fff;
  font: 800 15px/1 var(--font-display);
  letter-spacing: .5px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .45s ease, transform .5s cubic-bezier(.3, 1.5, .5, 1);
}

/* wejście (po pojawieniu się sekcji) */
.visible .cm-ring {
  border-color: var(--ring);
  background-color: var(--fill);
  transition-delay: var(--delay);
}

.visible .cm-ring > .cm-label {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--delay) + .1s);
}

.visible .cm-core {
  opacity: 1;
  transform: none;
  transition-delay: .1s;
  animation: corePulse 5s ease-in-out 2.4s infinite;
}

/* impuls od środka na zewnątrz, co 5 s */
.visible .cm-ring {
  animation: ringPing 5s ease-in-out calc(2.4s + var(--ping)) infinite;
}

@keyframes ringPing {
  0%, 16%, 100% { border-color: var(--ring); }
  6%            { border-color: var(--brand); }
}

@keyframes corePulse {
  0%, 12%, 100% { box-shadow: 0 0 0 0 rgba(0, 141, 210, 0); }
  4%            { box-shadow: 0 0 0 6px rgba(0, 141, 210, .25); }
}

.band-label {
  color: var(--blue);
}

/* Duży nagłówek sekcji; <em> = niebieski fragment */
.display-heading {
  font-size: clamp(46px, 6.1vw, 92px);
  line-height: 1.12;
  margin-bottom: 42px;
}

.display-heading em {
  font-style: normal;
  color: var(--brand);
}

.section-lead {
  font-size: clamp(19px, 2.15vw, 28px);
  line-height: 1.55;
  letter-spacing: -.02em;
  max-width: 750px;
}

/* Lista specjalizacji (chipsy) */
.expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

.expertise span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* mały „piksel” przed każdą specjalizacją */
.expertise span::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--brand);
}

.expertise span:nth-child(3n + 2)::before { background: var(--brand-light); }
.expertise span:nth-child(3n + 3)::before { background: var(--brand-navy); }

.expertise span,
.tags span {
  font-size: 12px;
  border: 1px solid var(--chip-border);
  padding: 11px 16px;
}

.section-pad {
  padding: 135px 0;
}

/* Pasek „02 / WYBRANE REALIZACJE …… DOPISEK” */
.section-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 65px;
}

.section-index {
  color: var(--blue);
}

.section-aside {
  color: var(--muted);
}


/* 6. REALIZACJE — DUŻE PROJEKTY =========================================== */

.work-lead {
  max-width: 750px;
  margin-bottom: 90px;
}

.project {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 7%;
  align-items: center;
  margin-bottom: 140px;
}

/* Co drugi projekt ma zdjęcie po prawej */
.project-reverse {
  grid-template-columns: .88fr 1.12fr;
}

.project-reverse .project-visual {
  order: 2;
}

/* Boks na zdjęcie: proporcje 1.22 : 1 */
.project-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.22;
  background: var(--surface);
}

/* Placeholder, gdy brak zdjęcia */
.placeholder {
  background: var(--surface);
  border: 1px solid #d5d9dd;
  aspect-ratio: 1.22;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  color: #89919c;
  transition: transform .65s cubic-bezier(.2, .8, .2, 1), background .4s;
}

.project-visual .placeholder {
  height: 100%;
  aspect-ratio: auto;
}

.project:hover .placeholder {
  transform: scale(1.025);
  background: #dce1e6;
}

.placeholder-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.placeholder-center small,
.small-placeholder small {
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.placeholder-symbol {
  font-size: 52px;
  font-weight: 400;
  color: #9ca6b2;
}

.placeholder-bottom {
  margin-top: auto;
}

/* Opis projektu */
.project-meta {
  display: flex;
  gap: 25px;
  color: var(--blue);
}

.project-meta span {
  color: var(--muted);
}

.project-info h3 {
  font: 700 clamp(37px, 4.1vw, 64px)/1.14 var(--font-display);
  letter-spacing: -.045em;
  margin: 32px 0 25px;
}

.project-info p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 480px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 25px 0 30px;
}

.tags span {
  padding: 8px 12px;
}


/* 7. REALIZACJE — MAŁE PROJEKTY I BOKS „TWÓJ PROJEKT” ===================== */

.more-work {
  border-top: 1px solid var(--line);
  padding-top: 70px;
}

.more-work-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 38px;
}

.more-work-heading h3 {
  font: 700 clamp(32px, 4vw, 58px)/1.2 var(--font-display);
  letter-spacing: -.045em;
  margin: 0;
}

.more-work-heading p {
  max-width: 340px;
  color: var(--muted);
  margin: 0;
}

/* Siatka 3 kolumny (2 na tablecie, 1 na telefonie) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 24px;
}

.small-project {
  display: block;
}

/* Boks na zdjęcie małego projektu: proporcje 1.45 : 1 */
.small-placeholder {
  background: var(--surface);
  aspect-ratio: 1.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8c949e;
  font: 700 10px var(--font-display);
  letter-spacing: 1px;
  transition: background .3s;
}

.small-project:hover .small-placeholder {
  background: #dbe1e7;
}

.small-placeholder .small-placeholder-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.small-meta {
  color: var(--blue);
  margin-top: 24px;
}

.small-project h4 {
  font: 700 21px/1.35 var(--font-display);
  letter-spacing: -.025em;
  margin: 10px 0;
}

.small-project h4 span {
  float: right;
  color: var(--blue);
}

.small-project p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.small-project .project-link {
  display: inline-block;
  margin-top: 12px;
}

/* Niebieski boks „Tu może być Twój projekt” */
.your-project {
  min-height: 350px;
  background: var(--blue);
  color: white;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .3s;
}

.your-project:hover {
  color: white;
  transform: translateY(-6px);
}

.your-project-kicker {
  color: #ffffff;
}

.your-project-icon {
  position: absolute;
  right: 28px;
  top: 20px;
  font-size: 44px;
}

.your-project h4 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  margin-top: auto;
}

.your-project p {
  color: #e3f3fc;
}

.your-project-cta {
  font-size: 12px;
  font-weight: 700;
  margin-top: 20px;
}


/* 8. GALERIA ZDJĘĆ W PROJEKTACH ===========================================
   Klasy dodaje assets/strona.js:
   .has-photo    — jest co najmniej jedno zdjęcie (placeholder znika)
   .has-multiple — więcej niż jedno zdjęcie (strzałki i kropki)
   Na komputerze przyciski pojawiają się po najechaniu lub fokusie (Tab).
   ========================================================================== */

.gallery-view {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.gallery-view.has-photo {
  background: #e9ebee;
}

.small-placeholder.has-photo {
  font-size: 0;
}

.gallery-view.has-photo > .placeholder,
.gallery-view.has-photo > .small-placeholder-text {
  display: none;
}

/* Zdjęcia leżą jedno na drugim; widoczne tylko .is-current */
.gallery-view .gallery-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  object-fit: contain;
  transition: opacity .25s ease;
}

.gallery-view .gallery-photo.is-current:not(.is-broken) {
  opacity: 1;
  visibility: visible;
}

.gallery-view .gallery-photo.is-broken {
  display: none;
}

/* Dopasowanie z konfiguracji: "dopasowanie" i "pozycja"
   cover   = zdjęcie wypełnia boks (zalecane; najlepiej zrzut w proporcjach boksu)
   contain = całe zdjęcie widoczne, ewentualne puste pasy w kolorze tła */
.gallery-view .gallery-photo.fit-contain { object-fit: contain; }
.gallery-view .gallery-photo.fit-cover   { object-fit: cover; }
.gallery-view .gallery-photo.pos-top     { object-position: top center; }
.gallery-view .gallery-photo.pos-center  { object-position: center; }

/* 3. Reakcja na najechanie: zdjęcie lekko się przybliża, tytuł zmienia kolor */
.gallery-view .gallery-photo {
  transition: opacity .25s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}

.project:hover .gallery-photo.is-current,
.small-project:hover .gallery-photo.is-current {
  transform: scale(1.035);
}

.gallery-view.has-photo .gallery-photo {
  cursor: zoom-in; /* kliknięcie w zdjęcie otwiera powiększenie */
}

.project-info h3,
.small-project h4 {
  transition: color .3s ease;
}

.project:hover .project-info h3,
.small-project:hover h4 {
  color: var(--blue);
}

/* Etykieta „GALERIA ZDJĘĆ” w lewym górnym rogu */
.gallery-view.has-multiple::after {
  content: 'GALERIA ZDJĘĆ';
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  background: #172033d9;
  color: #fff;
  padding: 8px 11px;
  font: 700 10px var(--font-display);
  letter-spacing: .1em;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

/* Pasek: ‹ • • • › na dole zdjęcia */
.gallery-view .gallery-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 20px);
  padding: 8px 12px;
  border-radius: 30px;
  background: var(--overlay);
  box-shadow: 0 5px 24px #0004;
  color: #fff;
  font: 600 12px var(--font-display);
  /* ukryty do najechania (ale dostępny z klawiatury) */
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}

.gallery-view:not(.has-multiple) .gallery-controls {
  display: none;
}

.gallery-controls button,
.gallery-zoom {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: white;
  font: 24px/1 var(--font-display);
  cursor: pointer;
}

.gallery-controls button:hover,
.gallery-zoom:hover {
  color: var(--brand-light);
}

/* Kropki */
.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gallery-controls .gallery-dot {
  display: block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  min-width: 9px;
  min-height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff70;
  cursor: pointer;
}

.gallery-controls .gallery-dot.is-active {
  background: #fff;
  box-shadow: 0 0 0 3px #ffffff30;
}

.gallery-controls .gallery-dot[hidden] {
  display: none;
}

/* Przycisk powiększenia ⤢ w prawym górnym rogu */
.gallery-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(16, 25, 42, .85);
  border-radius: 7px;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.gallery-view:not(.has-photo) .gallery-zoom {
  display: none;
}

/* Pokazanie przycisków po najechaniu lub fokusie */
.gallery-view.has-multiple:is(:hover, :focus-within) .gallery-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.gallery-view.has-multiple:is(:hover, :focus-within)::after {
  opacity: 1;
}

.gallery-view.has-photo:is(:hover, :focus-within) .gallery-zoom {
  opacity: 1;
  pointer-events: auto;
}

.gallery-controls button:focus-visible,
.gallery-zoom:focus-visible,
.portfolio-lightbox button:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 2px;
}


/* 9. LIGHTBOX (POWIĘKSZENIE ZDJĘĆ) ======================================== */

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(96vw, 1650px);
  max-width: 96vw;
  max-height: 96dvh;
  padding: 58px 78px 54px;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--lightbox-bg);
  color: white;
  box-shadow: 0 25px 100px #0008;
}

.portfolio-lightbox::backdrop {
  background: rgba(6, 11, 19, .88);
}

.portfolio-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(96dvh - 160px);
  margin: auto;
  object-fit: contain;
}

/* Wspólne dla przycisków w lightboxie */
.portfolio-lightbox button {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 5px;
  background: #28364c;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.portfolio-lightbox button[hidden] {
  display: none;
}

/* × zamknij */
.portfolio-lightbox .lightbox-close {
  top: 10px;
  right: 14px;
  z-index: 6;
  width: 42px;
  height: 42px;
}

/* ‹ › duże strzałki po bokach */
.portfolio-lightbox .lightbox-prev,
.portfolio-lightbox .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 64px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 38px;
  box-shadow: 0 4px 24px #0008;
}

.portfolio-lightbox .lightbox-prev { left: 12px; }
.portfolio-lightbox .lightbox-next { right: 12px; }

.portfolio-lightbox .lightbox-prev:hover,
.portfolio-lightbox .lightbox-next:hover {
  background: var(--blue-dark);
}

/* Licznik „2 / 3” */
.portfolio-lightbox .lightbox-count {
  display: block;
  margin-top: 8px;
  text-align: center;
  font: 13px var(--font-display);
}

/* Ponumerowane przyciski 1 2 3 pod zdjęciem */
.lightbox-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  min-height: 12px;
}

.portfolio-lightbox .lightbox-dot {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 7px;
  background: #344054;
  color: #d7deeb;
  font: 600 13px var(--font-display);
}

.portfolio-lightbox .lightbox-dot.is-active {
  background: var(--blue);
  color: #fff;
}

.portfolio-lightbox .lightbox-dot:hover {
  background: #1f6f9e;
  color: #fff;
}


/* 10. SEKCJA „PARTNERSTWO NA LATA” (CIEMNA) =============================== */

.longevity {
  background: var(--dark);
  color: white;
  padding: 135px 0;
}

.longevity .section-index { color: var(--dark-accent); }
.longevity .section-aside { color: #8994a6; }

.longevity .display-heading {
  margin-bottom: 35px;
}

.longevity .display-heading em {
  color: var(--dark-accent-2);
}

.longevity-copy {
  font-size: 21px;
  line-height: 1.7;
  max-width: 790px;
  color: var(--dark-text);
}

/* Liczby: 20 lat / 15 lat / 10+ lat */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 95px 0;
}

.number-block {
  border-top: 1px solid #414a5a;
  padding-top: 30px;
}

.number-block strong {
  font: 700 clamp(54px, 6vw, 90px)/1 var(--font-display);
  letter-spacing: -.06em;
}

.number-block sup {
  font-size: 20px;
  color: var(--dark-accent);
  letter-spacing: -.02em;
  margin-left: 9px;
}

.number-block p {
  font-size: 14px;
  color: #aab5c6;
  max-width: 220px;
  margin-top: 20px;
  line-height: 1.6;
}

/* Oś czasu */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  border-top: 1px solid #526075;
}

.timeline div {
  position: relative;
  padding-top: 22px;
}

.timeline div::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--brand);
}

/* kwadraty osi czasu w kolorach pikseli z logo */
.timeline div:nth-child(2)::before { background: var(--brand-light); }
.timeline div:nth-child(3)::before { background: var(--brand-navy); }
.timeline div:nth-child(4)::before { background: var(--brand); }

.timeline span {
  display: block;
  margin-bottom: 10px;
  color: var(--dark-accent);
}

.timeline strong {
  font-size: 14px;
  font-weight: 500;
  color: #d7deea;
}


/* 11. SEKCJA „O STUDIO” =================================================== */

.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
}

.approach .section-index {
  display: block;
  margin-bottom: 70px;
}

.approach-right {
  padding-top: 100px;
}

/* Cytat z niebieską kreską */
.manifest {
  font: 700 clamp(23px, 2.5vw, 36px)/1.4 var(--font-display);
  letter-spacing: -.03em;
  border-left: 3px solid var(--brand);
  padding-left: 25px;
  margin: 55px 0 70px;
}

.manifest span {
  color: var(--brand);
}

/* Kroki 01 / 02 / 03 */
.step {
  display: grid;
  grid-template-columns: 55px 1fr;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.step > span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.step h3 {
  font: 700 21px var(--font-display);
  letter-spacing: -.025em;
}

.step p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 0;
}


/* 12. KONTAKT I FORMULARZ ================================================= */

.contact-section {
  background: #e8ebef;
  padding: 130px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10%;
}

.contact-lead {
  font-size: 22px;
  line-height: 1.6;
  max-width: 500px;
}

.contact-note {
  color: var(--muted);
  line-height: 1.7;
  max-width: 440px;
}

.contact-mail {
  margin-top: 60px;
  font-size: 13px;
  color: var(--muted);
}

.contact-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 22px;
}

.contact-form label span {
  font-weight: 400;
  color: var(--muted);
}

/* Pola: tylko dolna linia */
.contact-form input:not([type=checkbox]),
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #b6bdc8;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 15px var(--font);
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Zgoda RODO */
.contact-form .consent {
  display: flex;
  align-items: start;
  gap: 12px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.consent input {
  margin-top: 4px;
  accent-color: var(--blue);
}

.consent a {
  text-decoration: underline;
}

.submit-button {
  display: flex;
  justify-content: space-between;
  min-width: 210px;
  padding: 18px 23px;
  border: 0;
  background: var(--blue);
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.submit-button:hover {
  background: var(--blue-dark);
}

.submit-button:disabled {
  opacity: .65;
  cursor: wait;
}

.form-status {
  font-size: 13px;
  margin-top: 14px;
}

/* Pułapka na boty — pole niewidoczne dla ludzi */
.honeypot {
  position: absolute;
  left: -9999px;
}


/* 13. STOPKA ============================================================== */

.footer {
  background: var(--bg);
  padding: 55px 0 22px;
}

.footer-main,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-main p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-main > a:last-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding-top: 20px;
  font-size: 11px;
  color: var(--muted);
}


/* 14. STRONA PRYWATNOŚCI ================================================== */

.legal-page {
  max-width: 900px;
  padding-top: 70px;
  padding-bottom: 90px;
}

.legal-page h1 {
  margin-top: 70px;
  font-size: clamp(35px, 6vw, 65px);
  letter-spacing: -.045em;
}

.legal-page p {
  line-height: 1.7;
}


/* 15. ANIMACJE POJAWIANIA SIĘ =============================================
   Elementy z klasą .reveal wjeżdżają, gdy pojawią się na ekranie
   (klasę .visible dodaje assets/script.js).
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .85s ease, transform .85s cubic-bezier(.2, .8, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* 16. RESPONSYWNOŚĆ: ≤ 1050 PX ============================================ */

@media (max-width: 1050px) {
  .hero-mark { display: none; }
  .hero-title { font-size: clamp(56px, 9vw, 105px); }
  .hero-bottom { display: block; }
  .hero-actions { margin-top: 28px; }

  .project { gap: 5%; }
  .project-info h3 { font-size: 42px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }

  .approach-grid { gap: 5%; }
}


/* 17. RESPONSYWNOŚĆ: ≤ 700 PX (TELEFONY) ================================== */

@media (max-width: 700px) {
  :root {
    --gutter: 22px;
    --header-h: 72px;
  }

  /* Nagłówek i rozwijane menu */
  .brand { font-size: 22px; gap: 9px; }
  .brand-mark { width: 22px; height: 22px; }
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }

  /* Hero */
  .hero { padding-top: 55px; }
  .eyebrow { font-size: 10px; gap: 6px 10px; flex-wrap: wrap; }
  .eyebrow > span { white-space: nowrap; }
  .eyebrow-line { display: none; }

  .hero-title {
    font-size: clamp(44px, 11.2vw, 78px);
    margin: 45px 0 40px;
  }

  .hero-intro { font-size: 18px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-foot { padding-top: 70px; font-size: 10px; }
  .hero-foot a { display: none; }

  /* Odstępy sekcji */
  .intro-band,
  .longevity,
  .contact-section,
  .section-pad { padding: 85px 0; }

  .display-heading { font-size: clamp(40px, 9vw, 65px); }
  .band-side { position: static; padding-top: 0; }
  .context-map { --ring-gap: 12px; max-width: 250px; margin-bottom: 6px; }
  .cm-ring { padding-top: 26px; }
  .cm-label { top: 8px; left: 10px; font-size: 9px; }
  .section-top { margin-bottom: 45px; }
  .section-aside { display: none; }

  /* Wszystkie siatki w jedną kolumnę */
  .band-grid,
  .project,
  .approach-grid,
  .contact-grid,
  .project-grid { grid-template-columns: 1fr; }

  /* Realizacje */
  .work-lead { margin-bottom: 55px; }
  .project { gap: 28px; margin-bottom: 85px; }
  .project-reverse .project-visual { order: 0; }
  .project-info h3 { font-size: 38px; margin: 18px 0; }
  .placeholder { padding: 18px; }
  .more-work-heading { display: block; }
  .more-work-heading p { margin-top: 15px; }

  /* Galeria */
  .gallery-view .gallery-controls { gap: 5px; padding: 6px; }
  .gallery-dots { gap: 5px; }

  /* Lightbox na pełny ekran */
  .portfolio-lightbox {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    padding: 60px 42px 45px;
    border-radius: 0;
  }

  .portfolio-lightbox img {
    max-width: 100%;
    max-height: calc(100dvh - 180px);
  }

  .portfolio-lightbox .lightbox-prev,
  .portfolio-lightbox .lightbox-next {
    width: 36px;
    height: 52px;
    font-size: 29px;
  }

  .portfolio-lightbox .lightbox-prev { left: 2px; }
  .portfolio-lightbox .lightbox-next { right: 2px; }

  /* Partnerstwo */
  .numbers { grid-template-columns: 1fr; gap: 28px; margin: 60px 0; }
  .number-block strong { font-size: 66px; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 30px; }

  /* O studio */
  .approach .section-index { margin-bottom: 30px; }
  .approach-right { padding-top: 0; }
  .manifest { margin: 45px 0; }

  /* Kontakt */
  .contact-grid { gap: 45px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Stopka */
  .footer-main { align-items: flex-start; flex-direction: column; }
  .footer-bottom { flex-wrap: wrap; }
}


/* 18. URZĄDZENIA DOTYKOWE (BEZ HOVER) =====================================
   Na telefonach i tabletach przyciski galerii są zawsze widoczne.
   ========================================================================== */

@media (hover: none) {
  .gallery-view.has-multiple .gallery-controls {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .gallery-view.has-photo .gallery-zoom {
    opacity: 1;
    pointer-events: auto;
  }

  .gallery-view.has-multiple::after {
    opacity: 1;
  }
}


/* 19. OGRANICZONY RUCH ==================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-title .line > span {
    animation: none;
    transform: none;
  }

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

  .gallery-view .gallery-photo { transition: none; }

  .hero-mark rect,
  .hero-mark .px-pop {
    animation: none !important;
    opacity: 1;
  }

  .hero-mark .px { transform: none; }

  .cm-ring, .cm-label, .cm-core {
    animation: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
