/* Zaplab — szwajcarski modernizm: siatka 12 kolumn, Geist + Geist Mono (OFL, hostowane lokalnie),
   tekst prawie czarny na białym, jeden akcent (szwajcarska czerwień; bez niebieskiego — decyzja właściciela 2026-10-31). Struktura z linii i światła, bez kart i cieni. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/geist-latin-ext.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/geist-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/geist-mono-latin-ext.woff2) format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/geist-mono-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ffffff;
  --ink: #0c0c0b;
  --ink-2: #4d4c49;
  --ink-3: #6f6d68;
  --rule: #0c0c0b;
  --rule-soft: #dcdad5;
  --accent: #d22f14;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 24px;
  --edge: 40px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Siatka: 12 kolumn w ramce 1280 px */
.frame {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* Pasek górny */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.mark {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.bar nav { display: flex; gap: 4px; }

.bar nav a {
  padding: 10px 12px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.bar nav a:hover { color: var(--ink); }

.bar nav .signin {
  margin-left: 8px;
  color: var(--ink);
  border: 1px solid var(--rule-soft);
  transition: border-color 150ms var(--ease);
}
.bar nav .signin:hover { border-color: var(--ink); }

/* Przełącznik języka PL/EN */
.lang {
  display: inline-flex;
  margin-left: 8px;
  border: 1px solid var(--rule-soft);
}
.lang button {
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: 500 12.5px/1 var(--mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Otwarcie */
.hero { padding-top: 104px; padding-bottom: 96px; }

.eyebrow,
.label,
.idx,
.cap,
figcaption,
.meta,
.button-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.eyebrow { color: var(--ink-3); }

h1 {
  margin-top: 28px;
  max-width: 15.5em;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 560;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

h1 em { font-style: normal; color: var(--accent); }

.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  margin-top: 64px;
  align-items: end;
}

.hero-text {
  grid-column: 1 / span 6;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  grid-column: 8 / span 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  justify-self: end;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}
.button:hover { background: var(--accent); }
.button:active { transform: scale(0.98); }

.button-meta {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.78);
}

.button-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.button-outline:hover { background: var(--ink); color: var(--paper); }
.button-outline .button-meta { border-left-color: currentColor; color: inherit; opacity: 0.65; }

.contact-li { margin-top: 36px; }

.foot-links { display: inline-flex; gap: 24px; }

.textlink {
  display: inline-block;
  padding: 12px 0;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--rule-soft);
  transition: text-decoration-color 150ms var(--ease);
}
.textlink:hover { text-decoration-color: var(--ink); }

/* Pas z liczbami */
.tally {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.tally-in {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tally p {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 36px var(--gutter) 34px;
  border-left: 1px solid var(--rule-soft);
}
.tally p:first-child { padding-left: 0; border-left: 0; }

.num {
  font-size: clamp(44px, 6vw, 92px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.cap { color: var(--ink-2); }

/* Sekcje: indeks i tytuł w kolumnach 1–3, treść w 4–12 */
.block {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  padding-top: 40px;
  padding-bottom: 112px;
}

/* linia między sekcjami tylko na szerokość treści (ramka ma marginesy wewnętrzne) */
.block + .block { position: relative; }
.block + .block::before,
.foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--edge);
  right: var(--edge);
  height: 1px;
  background: var(--rule-soft);
}

.hero + .block { position: relative; }
.hero + .block::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--edge);
  right: var(--edge);
  height: 1px;
  background: var(--rule);
}

.block-head {
  grid-column: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idx { color: var(--accent); font-weight: 500; }

h2 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.block-body { grid-column: 4 / span 9; }

/* Cztery zasady */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--gutter);
  counter-reset: zasada;
}

.principles li {
  counter-increment: zasada;
  padding: 22px 0 30px;
  border-top: 1px solid var(--rule);
}

.principles h3 {
  display: flex;
  gap: 14px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.principles h3::before {
  content: counter(zasada, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 26px;
  color: var(--ink-3);
}

.principles p {
  margin-top: 10px;
  padding-left: 32px;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Okaz: jedno stwierdzenie z raportu */
.specimen { margin-top: 56px; }

figcaption { color: var(--ink-3); }

.specimen-grid {
  display: grid;
  grid-template-columns: 4fr 5fr 3fr;
  margin-top: 14px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.specimen-grid > div {
  padding: 22px var(--gutter) 26px;
  border-left: 1px solid var(--rule-soft);
}
.specimen-grid > div:first-child { padding-left: 0; border-left: 0; }
.specimen-grid > div:last-child { padding-right: 0; }

.label { color: var(--ink-3); margin-bottom: 12px; }

.claim { font-size: 16px; line-height: 1.5; text-wrap: pretty; }

blockquote {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  text-wrap: pretty;
}

.source { font-size: 15px; line-height: 1.4; font-weight: 500; }

.source a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-soft);
}
.source a:hover { color: var(--accent); text-decoration-color: currentColor; }

.meta { margin-top: 8px; color: var(--ink-3); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--accent);
}

/* Projekty (strona domowa) */
.projects { display: flex; flex-direction: column; }
.project { padding: 0 0 72px; }
.project + .project { padding-top: 40px; border-top: 1px solid var(--rule-soft); }
.project-no {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 12px;
}
.project-title {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  font-weight: 560;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.project-text {
  margin-top: 16px;
  max-width: 44em;
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}
.tags {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.project .specimen { margin-top: 36px; }
.project.case > .specimen { grid-column: 1 / -1; margin-top: 48px; }

/* O mnie */
.about-text { max-width: 44em; font-size: 19px; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.timeline { margin-top: 40px; border-top: 1px solid var(--rule); }
.timeline li {
  display: grid;
  grid-template-columns: 160px 1fr;
  column-gap: var(--gutter);
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--rule-soft);
}
.years { font-family: var(--mono); font-size: 12.5px; line-height: 26px; color: var(--ink-3); }
.timeline h3 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.timeline p:not(.years) { margin-top: 6px; color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }

/* Studium przypadku */
.case {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  column-gap: var(--gutter);
}

.case-text { grid-column: 1 / span 6; }

.case-title {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.12;
  font-weight: 560;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.case-facts { margin-top: 32px; border-top: 1px solid var(--rule); }

.case-facts > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  column-gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.case-facts dt {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 26px;
  color: var(--ink-3);
}

.case-facts dd { line-height: 1.55; text-wrap: pretty; }

.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 36px 0 40px;
}

.figures li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid var(--rule-soft);
}
.figures li:first-child { padding-left: 0; border-left: 0; }

.fig {
  font-size: 30px;
  line-height: 1;
  font-weight: 560;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.figures .cap { font-size: 12px; }

.cover {
  grid-column: 7 / span 3;
  align-self: start;
  display: block;
  border: 1px solid var(--rule-soft);
  transition: border-color 150ms var(--ease), transform 200ms var(--ease);
}
.cover:hover { border-color: var(--ink); transform: translateY(-2px); }
.cover img { display: block; width: 100%; height: auto; }

/* Kontakt */
.mail {
  display: inline-block;
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 10px;
  text-decoration-color: var(--rule-soft);
  transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease);
}
.mail:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Stopka */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 32px;
  position: relative;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}
.foot a { padding: 10px 0; text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Pojawianie się sekcji (tylko z JS, bez reduced-motion) */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 500ms var(--ease), transform 500ms var(--ease); }

/* Tablet */
@media (max-width: 1024px) {
  :root { --edge: 32px; }
  .hero-text { grid-column: 1 / span 8; }
  .hero-actions { grid-column: 1 / -1; justify-self: start; margin-top: 32px; }
  .block-head { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 16px; margin-bottom: 28px; }
  .block-body { grid-column: 1 / -1; }
  .specimen-grid { grid-template-columns: 1fr 1fr; }
  .specimen-grid > div:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
}

/* Telefon */
@media (max-width: 680px) {
  :root { --edge: 20px; --gutter: 16px; }
  body { font-size: 16px; }
  .bar-in { height: 56px; }
  .bar nav a:not(.signin) { display: none; }
  .lang { margin-left: 0; margin-right: 8px; }
  .hero { padding-top: 56px; padding-bottom: 56px; }
  h1 { margin-top: 20px; }
  .hero-foot { display: block; margin-top: 36px; }
  .hero-text { font-size: 17px; }
  .hero-actions { margin-top: 28px; }
  .tally-in { grid-template-columns: 1fr; }
  .tally p { padding: 22px 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .tally p:first-child { border-top: 0; }
  .block { padding-top: 32px; padding-bottom: 72px; }

  .principles { grid-template-columns: 1fr; }
  .principles p { padding-left: 0; }
  .specimen-grid { grid-template-columns: 1fr; }
  .specimen-grid > div { padding: 20px 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .specimen-grid > div:first-child { border-top: 0; }
  .case { display: block; }
  .case-facts > div { grid-template-columns: 1fr; row-gap: 4px; }
  .figures { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .figures li:nth-child(3) { padding-left: 0; border-left: 0; }
  .timeline li { grid-template-columns: 1fr; row-gap: 4px; }
  .project { padding-bottom: 56px; }
  .about-text { font-size: 17px; }
  .cover { display: none; }
}
