/* ==========================================================================
   ApiFamily — arkusz stylów
   System oparty na znaku firmowym: modularne bloki, granat + czerwień,
   jeden czerwony akcent na sekcję (tak jak jedno czerwone "P" w logo).
   ========================================================================== */

/* ── Fonty (self-hosted, bez zapytań do zewnętrznych serwerów) ───────────── */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Archivo';
  src: url('../fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plexmono-500-latin-ext.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Plex Mono';
  src: url('../fonts/plexmono-500-latin.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokeny ──────────────────────────────────────────────────────────────── */
:root {
  --navy:      #00448F;   /* granat z logo */
  --navy-deep: #002A57;
  --navy-mid:  #00366F;
  --red:       #B7131E;   /* czerwień z logo */
  --red-deep:  #8E0E17;

  --ink:    #111318;
  --ink-2:  #4B5462;
  --ink-3:  #6C7686;

  --paper:  #FFFFFF;
  --mist:   #EFF2F6;
  --mist-2: #E3E9F0;
  --rule:   #D6DDE6;

  --r:    6px;
  --r-lg: 14px;         /* promień bloków — echo kwadratów z logo */

  --wrap: 1180px;
  --gut:  clamp(18px, 4.5vw, 40px);
  --sect: clamp(60px, 8.5vw, 116px);

  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SF Mono', 'DejaVu Sans Mono', Consolas, monospace;

  --shadow:    0 1px 2px rgba(0, 42, 87, .05), 0 8px 24px -12px rgba(0, 42, 87, .16);
  --shadow-lg: 0 2px 4px rgba(0, 42, 87, .06), 0 24px 48px -20px rgba(0, 42, 87, .28);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: 12px 20px; font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; color: #fff; }

/* ── Typografia ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }

h1, .h1 {
  font-size: clamp(2.25rem, 5.6vw, 4.15rem);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.038em;
}
h2, .h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.03em;
}
h3, .h3 { font-size: clamp(1.1rem, 1.5vw, 1.28rem); letter-spacing: -.015em; }
h4      { font-size: 1rem; }

p + p, p + ul, p + ol, ul + p, h2 + p, h3 + p { margin-top: .9em; }
h2 + h3 { margin-top: 1.6em; }
p + h3, ul + h3, ol + h3 { margin-top: 1.8em; }
p + h2, ul + h2 { margin-top: 2.2em; }

strong { color: var(--ink); font-weight: 700; }

.lead {
  font-size: clamp(1.09rem, 1.65vw, 1.31rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.small { font-size: .9375rem; }

/* Nadkreślenie sekcji — mono ścieżka z czerwonym slashem */
.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.1em;
}
.eyebrow span { color: var(--red); }
.eyebrow--light { color: rgba(255, 255, 255, .62); }
.eyebrow--light span { color: #FF6B75; }

/* Lista z kwadratowymi znacznikami (motyw bloków) */
.ticks li {
  position: relative;
  padding-left: 1.6em;
  margin-top: .55em;
}
.ticks li::before {
  content: '';
  position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--navy);
}
.ticks li:nth-child(3n+2)::before { background: var(--red); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.sect { padding-block: var(--sect); }
.sect--mist  { background: var(--mist); }
.sect--tight { padding-block: clamp(44px, 6vw, 76px); }

.sect__head { max-width: 46rem; margin-bottom: clamp(30px, 4vw, 54px); }
.sect__head p { margin-top: 1em; }

/* ── Przyciski ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .82em 1.5em;
  border: 2px solid transparent;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .96rem;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, color .16s, border-color .16s, transform .16s;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 1em 1.9em; font-size: 1.02rem; }

.btn--red   { background: var(--red);  border-color: var(--red);  color: #fff; }
.btn--red:hover   { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }

.btn--navy  { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--navy:hover  { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }

.btn--ghost { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); background: #fff; }

.btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }

/* ── Nagłówek strony ─────────────────────────────────────────────────────── */
.mast {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.mast__in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { flex: none; line-height: 0; }
.brand img { width: auto; height: 38px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.6rem, 1.6vw, 1.6rem); }
.nav__list { display: flex; align-items: center; gap: clamp(.5rem, 1.5vw, 1.45rem); }
.nav__list a {
  display: block;
  padding: .4em 0;
  font-size: .935rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
  border-bottom: 2px solid transparent;
}
.nav__list a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.nav__list a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--red); }
.nav__cta { padding: .62em 1.15em; font-size: .9rem; }

.burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  padding: 11px 9px;
  background: none; border: 1px solid var(--rule); border-radius: var(--r);
  cursor: pointer;
}
.burger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .burger { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; padding: 8px var(--gut) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list a { padding: .85em 0; border-bottom: 1px solid var(--mist-2); }
  .nav__list a:hover, .nav__list a[aria-current="page"] { border-bottom-color: var(--mist-2); }
  .nav__cta { margin-top: 1.1rem; padding: .85em 1.2em; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(44px, 6.5vw, 92px) clamp(52px, 7vw, 104px);
  background:
    linear-gradient(180deg, var(--mist) 0%, rgba(239, 242, 246, 0) 62%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
}
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--navy); }
.hero__sub {
  margin-top: 1.35rem;
  max-width: 36rem;
  font-weight: 500;
  letter-spacing: -.012em;
  color: var(--ink);
}
.hero__p { margin-top: 1.1rem; max-width: 34rem; }
.hero__act { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
  margin-top: 2.4rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
}

/* ── SYGNATURA: mozaika integracji ───────────────────────────────────────── */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(5px, .8vw, 9px);
  aspect-ratio: 1 / .92;
}
.mosaic__cell {
  display: grid; place-items: center;
  padding: 4px;
  border: 1px solid var(--mist-2);
  border-radius: var(--r);
  background: #fff;
  font-family: var(--mono);
  font-size: clamp(.5rem, 1.05vw, .69rem);
  line-height: 1.15;
  letter-spacing: .01em;
  text-align: center;
  color: var(--ink-3);
  box-shadow: 0 1px 2px rgba(0, 42, 87, .04);
  transition: color .18s, border-color .18s, transform .18s;
}
.mosaic__cell:hover { color: var(--navy); border-color: var(--navy); transform: translateY(-2px); }

.mosaic__hub {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  display: grid; place-content: center; gap: .3em;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--red);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.mosaic__hub b {
  display: block;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
}
.mosaic__hub span {
  font-family: var(--mono);
  font-size: clamp(.52rem, .85vw, .66rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

/* wejście: kafle „wpadają" po kolei, hub na końcu */
@media (prefers-reduced-motion: no-preference) {
  .mosaic__cell, .mosaic__hub { animation: blockIn .5s cubic-bezier(.2, .8, .3, 1) backwards; }
  .mosaic__cell:nth-child(1)  { animation-delay: .05s }
  .mosaic__cell:nth-child(2)  { animation-delay: .10s }
  .mosaic__cell:nth-child(3)  { animation-delay: .15s }
  .mosaic__cell:nth-child(4)  { animation-delay: .20s }
  .mosaic__cell:nth-child(5)  { animation-delay: .25s }
  .mosaic__cell:nth-child(6)  { animation-delay: .30s }
  .mosaic__cell:nth-child(7)  { animation-delay: .35s }
  .mosaic__cell:nth-child(8)  { animation-delay: .40s }
  .mosaic__cell:nth-child(9)  { animation-delay: .45s }
  .mosaic__cell:nth-child(10) { animation-delay: .50s }
  .mosaic__cell:nth-child(11) { animation-delay: .55s }
  .mosaic__cell:nth-child(12) { animation-delay: .60s }
  .mosaic__hub { animation-delay: .66s; animation-duration: .6s; }
}
@keyframes blockIn {
  from { opacity: 0; transform: scale(.86); }
  to   { opacity: 1; transform: none; }
}

/* ── Kafle / bloki treści ────────────────────────────────────────────────── */
.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.tile {
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  scroll-margin-top: 90px;
}
.tile h3 { margin-bottom: .5em; }
.tile p:first-of-type { margin-top: 0; }
.tile__no {
  display: block;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  color: var(--ink-3);
  margin-bottom: 1.1em;
}
/* Kafel jako link. Deklarowany PRZED wariantami kolorystycznymi, żeby
   `color: inherit` nie nadpisywało białego tekstu na granacie i czerwieni. */
.tile--link { text-decoration: none; color: var(--ink-2); transition: border-color .16s, transform .16s, box-shadow .16s; }
.tile--link:hover { border-color: var(--navy); transform: translateY(-3px); box-shadow: var(--shadow); }
.tile--link:hover h3 { color: var(--navy); }

.tile--navy { background: var(--navy); border-color: var(--navy); color: rgba(255, 255, 255, .82); }
.tile--navy h3, .tile--navy strong { color: #fff; }
.tile--navy .tile__no { color: rgba(255, 255, 255, .6); }
.tile--navy a { color: #fff; }

.tile--red { background: var(--red); border-color: var(--red); color: rgba(255, 255, 255, .86); }
.tile--red h3, .tile--red strong { color: #fff; }
.tile--red .tile__no { color: rgba(255, 255, 255, .68); }
.tile--red a { color: #fff; }

/* Kafel wyróżniony na całą szerokość siatki — dla usługi zapowiadanej
   osobno. Wewnątrz dwie kolumny, żeby nie powstał pas samego tekstu. */
.tile--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}
.tile--wide .tile__no { margin-bottom: .9em; }
.tile--wide h3 { font-size: clamp(1.3rem, 2.1vw, 1.75rem); letter-spacing: -.025em; }
@media (max-width: 780px) { .tile--wide { grid-template-columns: 1fr; } }

/* znacznik „nowe" przy numerze kafla */
.znacznik {
  display: inline-block;
  margin-left: .7em;
  padding: .15em .55em;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tile--navy .znacznik { background: var(--red); color: #fff; }

/* Kolorowe kafle zachowują swój kontrast także pod kursorem. */
.tile--navy.tile--link:hover { border-color: var(--navy-deep); background: var(--navy-deep); }
.tile--red.tile--link:hover  { border-color: var(--red-deep);  background: var(--red-deep); }
.tile--navy.tile--link:hover h3,
.tile--red.tile--link:hover h3 { color: #fff; }

/* ── Kroki procesu (kolejność jest tu informacją) ────────────────────────── */
.steps { counter-reset: krok; }
.steps > li {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: clamp(14px, 2vw, 30px);
  padding-block: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps > li::before {
  counter-increment: krok;
  content: counter(krok, decimal-leading-zero);
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1;
  color: var(--mist-2);
  letter-spacing: -.02em;
}
.steps > li:nth-child(1)::before { color: var(--red); }
.steps > li h3 { margin-bottom: .4em; }

/* ── Manifest technologiczny ─────────────────────────────────────────────── */
.stack { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stack { grid-template-columns: 1fr; } }

.stack__group {
  padding: clamp(18px, 2vw, 26px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  scroll-margin-top: 90px;
}
.stack__h {
  display: flex; align-items: baseline; gap: .6em;
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink);
  padding-bottom: .9em; margin-bottom: 1em;
  border-bottom: 2px solid var(--navy);
}
.stack__group:nth-child(3n+2) .stack__h { border-bottom-color: var(--red); }
.stack__h em { font-style: normal; margin-left: auto; color: var(--ink-3); letter-spacing: .1em; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: .34em .68em;
  background: var(--mist);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink);
  white-space: nowrap;
}

/* ── Karty realizacji ────────────────────────────────────────────────────── */
.proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 46px);
  align-items: start;
  padding-block: clamp(30px, 4vw, 56px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 90px;
}
.proj:last-of-type { border-bottom: 1px solid var(--rule); }
@media (max-width: 820px) { .proj { grid-template-columns: 1fr; } }

.proj__tag {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9em;
}
.proj__meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 1.4em;
}
.proj__shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 10px;
}
.shot {
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 16 / 10;
  transition: border-color .16s, transform .16s;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { border-color: var(--navy); transform: translateY(-2px); }

.shot--empty {
  display: grid; place-items: center;
  padding: 14px;
  border-style: dashed;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}

/* ── Siatka połączonych systemów ─────────────────────────────────────────
   Kafle z nazwami, spójne z blokami ze znaku firmowego. Jeśli w assets/loga/
   leży plik o nazwie systemu, w kaflu pojawia się logo zamiast tekstu.
   ───────────────────────────────────────────────────────────────────────── */
.loga__h {
  display: flex; align-items: baseline; gap: .6em;
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink);
  padding-bottom: .9em; margin-bottom: 1em;
  border-bottom: 2px solid var(--navy);
}
.loga__h em {
  font-style: normal; margin-left: auto;
  padding: .1em .5em;
  background: var(--red); color: #fff;
  border-radius: 3px;
  letter-spacing: .06em;
}

.loga {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr));
  gap: 8px;
}
.loga__el {
  display: grid; place-items: center;
  min-height: 4.1rem;
  padding: .7rem .5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink);
  transition: border-color .16s, transform .16s, color .16s;
}
.loga__el:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-2px); }
.loga__el--obraz { padding: .6rem .9rem; }

/* Logotypy mają skrajnie różne proporcje — wordmark DHL to 7:1, ikony
   płatności ~1:1. Ograniczamy JEDNOCZEŚNIE wysokość i szerokość, żeby
   wyrównać je optycznie, a nie mechanicznie do wspólnej wysokości
   (przy równej wysokości wordmark rozjechałby się na pół siatki). */
.loga__el img {
  width: auto; height: auto;
  max-height: 2.15rem;
  max-width: 6.6rem;
  object-fit: contain;
}

/* na jasnym tle sekcji kafle dostają biały spód, żeby się nie zlewały */
.sect--mist .loga__el { background: var(--paper); }

/* ── Udział w projektach zespołowych ─────────────────────────────────────── */
.udzial { display: flex; flex-direction: column; }
.udzial__rola {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9em;
}
.udzial h3 { margin-bottom: .6em; }
.udzial__h {
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1.6em;
}
.udzial .proj__meta { margin-top: auto; padding-top: 1.6em; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: none; place-items: center;
  padding: clamp(14px, 4vw, 48px);
  background: rgba(0, 25, 51, .93);
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: var(--r); }
.lightbox__cap {
  margin-top: 14px; text-align: center;
  font-family: var(--mono); font-size: .78rem; color: rgba(255, 255, 255, .75);
}
.lightbox__x {
  position: absolute; top: clamp(10px, 3vw, 26px); right: clamp(10px, 3vw, 26px);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); border: 0; border-radius: var(--r);
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox__x:hover { background: var(--red); }

/* ── Pasek CTA ───────────────────────────────────────────────────────────── */
.band { background: var(--navy); color: rgba(255, 255, 255, .8); }
.band__in {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: end;
  padding-block: clamp(46px, 6vw, 82px);
}
.band__h { color: #fff; }
.band__p { margin-top: 1.1em; max-width: 40rem; }
.band__act { display: flex; flex-wrap: wrap; gap: .7rem; }
.band__act .btn { flex: 1 1 auto; }
@media (max-width: 820px) { .band__in { grid-template-columns: 1fr; align-items: start; } }

/* ── Stopka ──────────────────────────────────────────────────────────────── */
.foot {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .68);
  font-size: .9375rem;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(26px, 3.5vw, 48px);
  padding-block: clamp(44px, 5.5vw, 72px);
}
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }

.foot__h {
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: 1.2em;
}
.foot__list li + li { margin-top: .5em; }
.foot__list a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.foot__list a:hover { color: #fff; text-decoration: underline; }
.foot__addr { margin-bottom: 1em; line-height: 1.55; }
.foot__addr strong { color: #fff; }
.foot__ids { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: rgba(255, 255, 255, .5); }
.foot__note { margin-top: 1.2em; font-size: .85rem; color: rgba(255, 255, 255, .5); }

/* Znak firmowy odtworzony blokami — działa na każdym tle, waży 0 bajtów */
.mark { display: flex; align-items: center; gap: 4px; margin-bottom: 1.4rem; }
.mark span {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 4px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em;
  color: #fff;
}
.mark__b { background: var(--navy); }
.mark__r { background: var(--red); }
.mark__w {
  width: auto !important; height: auto !important;
  margin-left: 4px;
  font-size: 1.3rem !important; font-weight: 700 !important; letter-spacing: -.04em !important;
  color: #fff;
}

.foot__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .84rem;
  color: rgba(255, 255, 255, .5);
}
.foot__bar a { color: rgba(255, 255, 255, .7); }
.foot__bar a:hover { color: #fff; }

/* ── Nagłówek podstrony ──────────────────────────────────────────────────── */
.phead {
  padding-block: clamp(40px, 5.5vw, 78px) clamp(30px, 4vw, 52px);
  background: linear-gradient(180deg, var(--mist), rgba(239, 242, 246, 0));
  border-bottom: 1px solid var(--rule);
}
.phead h1 { max-width: 24ch; }
.phead .lead { margin-top: 1.2rem; max-width: 44rem; }

/* Treść długiego tekstu */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose ul { margin-top: .9em; }

/* Spis treści na dłuższych podstronach */
.toc {
  padding: clamp(16px, 2vw, 22px);
  background: var(--mist);
  border-radius: var(--r-lg);
  border-left: 4px solid var(--red);
}
.toc__h {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .9em;
}
.toc ul { display: flex; flex-wrap: wrap; gap: .4em 1.2em; }
.toc a { font-size: .92rem; font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Dwie kolumny: treść + kolumna boczna */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.aside {
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--mist);
  border-radius: var(--r-lg);
  position: sticky; top: 90px;
}
.aside h2 { font-size: 1.2rem; }
.aside__dl { margin-top: 1.2em; font-size: .94rem; }
.aside__dl dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-top: 1em; }
.aside__dl dt:first-child { margin-top: 0; }
.aside__dl dd { margin: .2em 0 0; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .aside { position: static; } }

/* ── Formularz ───────────────────────────────────────────────────────────── */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; font-size: .92rem; color: var(--ink); }
.req { color: var(--red); }
.field .hint { font-size: .84rem; color: var(--ink-3); }

.field input, .field textarea, .field select {
  width: 100%;
  padding: .78em .9em;
  font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  transition: border-color .16s, box-shadow .16s;
}
.field textarea { min-height: 9.5rem; resize: vertical; line-height: 1.55; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 68, 143, .14);
  outline: none;
}
.field--bad input, .field--bad textarea { border-color: var(--red); background: #FEF6F6; }
.field__err { font-size: .86rem; font-weight: 600; color: var(--red); }

.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 620px) { .row { grid-template-columns: 1fr; } }

.check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.check input { width: 20px; height: 20px; margin-top: .18em; accent-color: var(--navy); }
.check span { font-size: .9rem; line-height: 1.5; }

/* pułapka na boty — poza ekranem, niewidoczna dla ludzi */
.trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Wskaźnik proof of work — dyskretny, bez animacji przyciągającej wzrok */
.pow {
  display: flex; align-items: center; gap: .6em;
  font-size: .86rem;
  color: var(--ink-3);
}
.pow__ikona {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--rule);
}
.pow--pracuje .pow__ikona { background: var(--navy); animation: powPuls 1s ease-in-out infinite; }
.pow--ok      .pow__ikona { background: var(--navy); }
.pow--blad    .pow__ikona { background: var(--red); }
.pow--ok      .pow__txt   { color: var(--navy); font-weight: 600; }

@keyframes powPuls { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .pow--pracuje .pow__ikona { animation: none; }
}

.alert {
  padding: 1.1rem 1.3rem;
  border-radius: var(--r-lg);
  border-left: 4px solid;
  margin-bottom: 1.8rem;
}
.alert h2 { font-size: 1.15rem; margin-bottom: .3em; }
.alert--ok  { background: #F0F6FF; border-color: var(--navy); }
.alert--bad { background: #FEF4F4; border-color: var(--red); }

/* ── Mapa (ładowana po kliknięciu — bez zapytań do OSM przed zgodą) ──────── */
.map {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 16 / 10;
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map__facade {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: .9rem; justify-items: center;
  padding: 20px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg,  var(--mist-2) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, var(--mist-2) 0 1px, transparent 1px 34px),
    var(--mist);
  border: 0;
  cursor: pointer;
  font: inherit;
}
.map__pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--red);
  transform: rotate(-45deg);
  box-shadow: var(--shadow);
}
.map__facade strong { display: block; font-size: 1.02rem; }
.map__facade .small { color: var(--ink-2); max-width: 30rem; }
.map__facade .btn { pointer-events: none; }

/* ── Tabela cen / porównań ───────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: .85em 1.1em; text-align: left; border-bottom: 1px solid var(--rule); }
th { font-size: .72rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--mist); }
tr:last-child td { border-bottom: 0; }
td strong { white-space: nowrap; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq details {
  border-top: 1px solid var(--rule);
  padding-block: 1.15rem;
}
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: baseline; gap: .8rem;
  font-weight: 700; font-size: 1.04rem; color: var(--ink);
  cursor: pointer; list-style: none;
  letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+';
  flex: none;
  font-family: var(--mono); font-size: 1.15rem; line-height: 1.2; color: var(--red);
}
.faq details[open] summary::before { content: '−'; }
.faq details > p { margin-top: .8em; padding-left: 1.9rem; max-width: 46rem; }

/* ── Drobne ──────────────────────────────────────────────────────────────── */
.center { text-align: center; }
.mt-s { margin-top: .9em; }
.mt-m { margin-top: 1.3em; }
.mt-l { margin-top: clamp(28px, 3.5vw, 46px); }
.mb-l { margin-bottom: 1.8rem; }
.narrow { max-width: 38rem; }
.muted { color: var(--ink-3); }
.field--narrow { max-width: 16rem; }
.nowrap { white-space: nowrap; }
