/* Czcionki hostowane razem ze stroną (licencja SIL OFL, pliki LICENSE w katalogu fonts) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-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: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-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: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
  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;
}

/* Paleta: papier, atrament, żółty zakreślacz */
:root {
  --paper: #eef1f3;
  --paper-2: #e2e7ea;
  --ink: #12161c;
  --muted: #566170;
  --rule: rgba(18, 22, 28, 0.15);
  --hl: rgba(255, 225, 77, 1);
  --redact: #12161c;
  --hl-solid: #ffe14d;
  --panel: #12161c;
  --panel-ink: #dbe2e9;
  --panel-muted: #8b97a6;
  --panel-line: rgba(255, 255, 255, 0.1);

  --f-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-log: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-wipe: cubic-bezier(0.76, 0, 0.24, 1);
  --gut: clamp(1.25rem, 5vw, 2.5rem);
  --margin-col: 12.5rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0f1319;
  --paper-2: #171c24;
  --ink: #e9edf1;
  --muted: #9aa5b3;
  --rule: rgba(233, 237, 241, 0.14);
  --hl: rgba(245, 215, 66, 0.3);
  --redact: #2b3342;
  --panel: #0a0d12;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.1875rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--hl-solid); color: #12161c; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, calc(100% - 2 * var(--gut))); margin-inline: auto; }
.row {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
}
.skip {
  position: absolute;
  left: var(--gut);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.95rem var(--f-display);
  border-radius: 8px;
}
.skip:focus { top: 0.75rem; }

/* Nawigacja */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--rule); }
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}
.mk { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.mk svg { display: block; height: 1.8rem; width: auto; fill: none; stroke: currentColor; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.nav-right { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 1.75rem); }
.nav-links { display: flex; gap: clamp(0.8rem, 2.4vw, 1.75rem); }
.nav-links a {
  font: 500 1.14rem/1 var(--f-display);
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0;
  background: linear-gradient(var(--hl-solid), var(--hl-solid)) no-repeat 0 100% / 0% 3px;
  transition: color 0.2s, background-size 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="true"] { color: var(--ink); background-size: 100% 3px; }
.theme {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s;
}
.lang {
  min-width: 2.25rem; height: 2.5rem; padding: 0 0.35rem;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font: 600 0.85rem/1 var(--f-display); letter-spacing: 0.04em; cursor: pointer;
  transition: background 0.2s;
}
.lang:hover { background: var(--paper-2); }
.lang-foot { display: none; }
.theme:hover { background: var(--paper-2); }
.theme svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon { display: none; }

/* Sekcje */
.sec { padding-block: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: 1rem; }
.sec-title {
  position: sticky;
  top: 6rem;
  align-self: start;
  margin: 0.45rem 0 0;
  font: 600 0.95rem/1.3 var(--f-display);
  color: var(--muted);
}

/* Hero: pasy cenzury odsłaniają nagłówek */
.hero { padding-top: clamp(8rem, 20vh, 12rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.who { margin: 0.6rem 0 0; font: 400 0.95rem/1.45 var(--f-display); color: var(--muted); }
.who strong { display: block; font-weight: 650; font-size: 1.05rem; color: var(--ink); }
.hero-side { min-width: 0; }
.moons { display: flex; flex-direction: column; gap: 1.6rem; width: 2.52rem; margin-top: 0.6rem; color: var(--muted); }
.moons svg { display: block; width: 2.52rem; height: 2.52rem; overflow: visible; opacity: 0.5; }
.moons .ring { fill: none; stroke: currentColor; stroke-width: 0.9; }
.moons .lit { fill: currentColor; fill-opacity: 0.45; stroke: none; }
.brand { display: flex; align-items: center; gap: 0.9rem; }
.bits { display: grid; grid-template-columns: repeat(8, 0.55rem); grid-auto-rows: 0.45rem; width: max-content; font: 400 0.4rem/1 var(--f-log); color: var(--muted); user-select: none; -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%); mask-image: linear-gradient(to right, #000 0%, transparent 100%); }
.bits .d { display: grid; place-items: center; opacity: 0.24; transition: opacity 0.9s ease; }
.bits .d.f { opacity: 0.6; transition-duration: 0.15s; }
.hero .row { grid-template-columns: 3.2rem minmax(0, 1fr); column-gap: 2rem; }
.hero-main { container-type: inline-size; }
.hero-title {
  margin: 0;
  font: 780 clamp(1.9rem, 6.2vw, 5rem) / 1.02 var(--f-display);
  font-size: min(9.2cqw, 6rem); /* najdłuższy wiersz zawsze mieści się w jednej linii */
  font-stretch: 118%;
  letter-spacing: -0.02em;
}
.line-last { display: flex; align-items: baseline; width: fit-content; max-width: 100%; }
.caret {
  flex: none;
  width: 0.1em;
  height: 0.7em;
  margin: 0 0 0 0.18em;
  background: var(--ink);
  opacity: 0;
  animation: caret 1.1s steps(1, end) 2.4s infinite;
}
@keyframes caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.rl {
  display: block;
  position: relative;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.07em 0.04em 0.09em 0;
  margin-bottom: -0.04em;
}
.rl::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--redact);
  animation: wipe 1.05s var(--ease-wipe) both;
  animation-delay: calc(0.55s + var(--i) * 0.34s);
}
@keyframes wipe { to { transform: translateX(101%); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.after-wipe { animation: appear 0.9s ease both; animation-delay: 2.1s; }
.lead { max-width: 36rem; margin: clamp(1.75rem, 4vw, 2.75rem) 0 0; font-size: clamp(1.2rem, 2.3vw, 1.4rem); line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: 600 1rem/1.2 var(--f-display);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
@media (hover: hover) {
  .btn:hover { background: var(--hl-solid); color: #12161c; transform: translateY(-1px); }
}

.link {
  font: 600 1rem/1.3 var(--f-display);
  text-decoration: none;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 100% / 100% 0.2em;
  transition: background-size 0.3s var(--ease);
}
.link:hover { background-size: 100% 100%; }

/* Zakreślacz: rysuje się, gdy fraza trafia w pole widzenia */
mark.hl {
  color: inherit;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 78% / 100% 64%;
  padding: 0 0.14em;
  margin: 0 -0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 1s var(--ease);
}
.js mark.hl:not(.on) { background-size: 0% 64%; }

/* Obszary */
.areas { display: grid; gap: clamp(3.5rem, 8vw, 6rem); }
.area h3 {
  margin: 0 0 0.9rem;
  font: 650 clamp(1.55rem, 3.2vw, 2.1rem) / 1.15 var(--f-display);
  font-stretch: 108%;
  letter-spacing: -0.015em;
}
.area p { max-width: 38rem; margin: 0; }
.area .tools, .proj-pad .tools { margin-top: 1rem; font: 400 0.95rem/1.5 var(--f-display); color: var(--muted); }

/* Konsola: AI zakreśla podejrzane zdarzenia po kliknięciu */
.console {
  margin: 2rem 0 0;
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 14px;
  border: 1px solid var(--panel-line);
  overflow: hidden;
}
.console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  border-bottom: 1px solid var(--panel-line);
}
.console-title { font: 500 0.9rem/1.3 var(--f-display); color: var(--panel-muted); }
.run {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--hl-solid);
  color: #12161c;
  font: 650 0.95rem/1 var(--f-display);
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.run:hover:not(:disabled) { transform: translateY(-1px); }
.run:disabled { opacity: 0.55; cursor: progress; }
.run:focus-visible { outline-color: #fff; }
.log { list-style: none; margin: 0; padding: 0.5rem 0; font: 400 0.8rem/1.55 var(--f-log); }
.ev {
  position: relative;
  display: grid;
  grid-template-columns: 4.6rem 3.2rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0.32rem 1.1rem;
  transition: opacity 0.4s;
}
.ev > * { position: relative; z-index: 1; }
.ev::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hl-solid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.ev::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 3px;
  background: var(--hl-solid);
  opacity: 0;
  transition: opacity 0.15s;
}
.ev.now::after { opacity: 1; }
.ev.hit { color: #12161c; }
.ev.hit::before { transform: scaleX(1); }
.ev.ok { opacity: 0.5; }
.ev time, .ev .src { color: var(--panel-muted); }
.ev.hit time, .ev.hit .src { color: #3a3f1a; }
.ev .msg { overflow-wrap: anywhere; }
.why {
  grid-column: 3;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  font: 500 0.82rem/1.45 var(--f-display);
  transition: max-height 0.5s var(--ease), margin 0.5s var(--ease), visibility 0s 0.5s;
}
.ev.hit .why { max-height: 6rem; margin-top: 0.25rem; visibility: visible; transition-delay: 0.25s, 0.25s, 0s; }
.console-sum:empty { display: none; }
.area .console-sum {
  max-width: none;
  margin: 0;
  padding: 0.9rem 1.1rem 1.1rem;
  border-top: 1px solid var(--panel-line);
  font: 500 0.95rem/1.45 var(--f-display);
  color: var(--panel-ink);
}
.area .console-note { margin-top: 0.75rem; font: 400 0.85rem/1.4 var(--f-display); color: var(--muted); }

/* Projekty */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.proj { border-bottom: 1px solid var(--rule); }
.proj-h { margin: 0; font: inherit; }
.proj-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 1.5rem;
  width: 100%;
  padding: 1.6rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.proj-name {
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.7rem;
  font: 650 clamp(1.35rem, 2.6vw, 1.7rem) / 1.2 var(--f-display);
  font-stretch: 106%;
  letter-spacing: -0.01em;
}
.pn {
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 82% / 0% 0.42em;
  transition: background-size 0.4s var(--ease);
}
.proj.open .pn, .proj-btn:focus-visible .pn { background-size: 100% 0.42em; }
@media (hover: hover) { .proj-btn:hover .pn { background-size: 100% 0.42em; } }
.badge {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: 600 0.72rem/1.3 var(--f-display);
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: 0.15em;
}
.proj-sum { grid-column: 1; margin-top: 0.35rem; color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.proj-icon { grid-column: 2; grid-row: 1; position: relative; width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; }
.proj-icon::before, .proj-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 2px;
  margin: -1px 0 0 -0.5rem;
  background: var(--ink);
  transition: transform 0.4s var(--ease);
}
.proj-icon::after { transform: rotate(90deg); }
.proj.open .proj-icon::after { transform: rotate(0deg); }
.proj-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.proj.open .proj-body { grid-template-rows: 1fr; }
.proj-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s 0.45s; }
.proj.open .proj-in { visibility: visible; transition-delay: 0s; }
.proj-pad { padding: 0.25rem 0 2rem; max-width: 40rem; }
.proj-pad p { margin: 0; }
.proj-pad ul { margin: 1rem 0 0; padding-left: 1.2rem; list-style: "– "; }
.proj-pad li { margin-top: 0.35rem; padding-left: 0.2rem; }
.proj-pad li::marker { color: var(--muted); }
.proj-pad .link-wrap { margin: 1.25rem 0 0; }

/* O mnie */
.about p { max-width: 38rem; margin: 0 0 1.25rem; }
.facts { margin: 2.5rem 0 0; display: grid; gap: 1.25rem; }
.facts div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 1.5rem; }
.facts dt { font: 600 0.95rem/1.6 var(--f-display); color: var(--muted); padding-top: 0.2rem; }
.facts dd { margin: 0; }

/* Bąbel: elastyczna kulka z charakterem */
.cb-row .contact-big { flex: 0 1 auto; max-width: 13.5ch; min-width: 0; }
.cb-row { display: flex; align-items: center; flex-wrap: nowrap; gap: clamp(0.9rem, 4vw, 3rem); }
@media (max-width: 760px) { .cb-row .contact-big { font-size: clamp(1.7rem, 7.6vw, 2.4rem); max-width: none; flex: 1 1 0; } }
.blob { position: relative; flex: none; width: clamp(3.6rem, 9vw, 6.4rem); margin: 1.6rem 0 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.blob:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 1rem; }
.blob svg { display: block; width: 100%; height: auto; overflow: visible; }
.b-shadow { fill: var(--ink); opacity: 0.12; transform-box: fill-box; transform-origin: center; }
.b-hop, .b-bre { transform-box: view-box; transform-origin: 50% 98px; }
.b-body { fill: var(--paper); stroke: currentColor; stroke-width: 2.4; }
.b-eye { fill: currentColor; transform-box: fill-box; transform-origin: center; }
    .b-wink { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; opacity: 0; }
.b-smile { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.b-open { fill: currentColor; opacity: 0; }
.b-face { transition: transform 0.18s ease-out; }
.blob-say {
  position: absolute; left: 100%; top: 0.5rem; margin-left: 0.6rem; transform: translate(-6px, 0);
  padding: 0.35rem 0.7rem; border: 1px solid var(--rule); border-radius: 0.7rem; background: var(--paper); color: var(--ink);
  font: 500 0.9rem/1.25 var(--f-display); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
}
@media (max-width: 760px) { .blob-say { left: auto; right: 0; top: auto; bottom: 100%; margin: 0 0 0.5rem; transform: translateY(6px); } .blob-say.on { transform: none; } }
@media (min-width: 761px) { .blob-say { left: 50%; top: 100%; margin: 1.3rem 0 0; transform: translate(-50%, -6px); } .blob-say.on { transform: translate(-50%, 0); } }
.blob-say.on { opacity: 1; transform: none; }
.blob.idle .b-bre { animation: b-breathe 3.2s ease-in-out infinite; }
.blob.hop .b-hop { animation: b-hop 1.15s cubic-bezier(0.3, 0, 0.3, 1) both; }
.blob.hop .b-shadow { animation: b-shadow 1.15s cubic-bezier(0.3, 0, 0.3, 1) both; }
.blob.hop .b-open { animation: b-mouth 1.15s steps(1, end) both; }
.blob.hop .b-smile { animation: b-smile-off 1.15s steps(1, end) both; }
.blob.wink .b-eye-r { animation: b-eye-r 0.9s ease both; }
.blob.wink .b-wink { animation: b-wink 0.9s ease both; }
.blob.wink .b-smile { animation: b-smirk 0.9s ease both; transform-box: fill-box; transform-origin: center; }
.blob.spin .b-hop { animation: b-spin 1.1s ease-in-out both; }
@keyframes b-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 0.965); } }
@keyframes b-hop {
  0% { transform: scale(1, 1); }
  14% { transform: scale(1.15, 0.8); }
  36% { transform: translateY(-34px) scale(0.88, 1.16); }
  50% { transform: translateY(-38px) scale(0.95, 1.05); }
  68% { transform: translateY(0) scale(1.2, 0.76); }
  80% { transform: scale(0.95, 1.07); }
  90% { transform: scale(1.03, 0.98); }
  100% { transform: scale(1, 1); }
}
@keyframes b-shadow { 0%, 100% { transform: scale(1); opacity: 0.12; } 14% { transform: scale(1.1); } 45% { transform: scale(0.55); opacity: 0.05; } 68% { transform: scale(1.2); opacity: 0.16; } }
@keyframes b-mouth { 0% { opacity: 0; } 20% { opacity: 1; } 66% { opacity: 0; } 100% { opacity: 0; } }
@keyframes b-smile-off { 0% { opacity: 1; } 20% { opacity: 0; } 66% { opacity: 1; } 100% { opacity: 1; } }
@keyframes b-eye-r { 0%, 100% { transform: scaleY(1); opacity: 1; } 15%, 80% { transform: scaleY(0.1); opacity: 0; } }
@keyframes b-wink { 0%, 100% { opacity: 0; } 15%, 80% { opacity: 1; } }
@keyframes b-smirk { 0%, 100% { transform: none; } 15%, 80% { transform: translate(2px, -1px) rotate(-6deg) scaleX(1.08); } }
@keyframes b-spin { 0% { transform: rotate(0); } 100% { transform: rotate(720deg); } }

/* Kontakt */
.contact-big {
  margin: 0;
  max-width: 22ch;
  font: 700 clamp(1.9rem, 5.2vw, 3.6rem) / 1.08 var(--f-display);
  font-stretch: 114%;
  letter-spacing: -0.02em;
}
.contact p { margin: 1.5rem 0 0; }
.contact .link { font-size: clamp(1.2rem, 2.6vw, 1.5rem); }

.cform { margin-top: 2rem; max-width: 34rem; }
.contact .cform p { margin: 0; }
.fld { margin-bottom: 1.25rem; }
.fld label { display: block; margin-bottom: 0.35rem; font: 600 0.9rem/1.3 var(--f-display); color: var(--muted); }
.fld input, .fld textarea {
  display: block; width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule); border-radius: 10px;
  background: transparent; color: var(--ink);
  font: 400 1.05rem/1.5 var(--f-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fld textarea { resize: vertical; min-height: 8rem; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 3px 0 var(--hl-solid); }
.fld [aria-invalid="true"] { border-color: #c2410c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-bottom: 2rem; }
.cform .btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.cform-status { font: 500 0.95rem/1.4 var(--f-display); color: var(--muted); }
.cform-status.err { color: #c2410c; }
:root[data-theme="dark"] .cform-status.err, :root[data-theme="dark"] .fld [aria-invalid="true"] { color: #fb923c; border-color: #fb923c; }

.foot { padding-block: 2.25rem 3rem; border-top: 1px solid var(--rule); font: 400 0.9rem/1.5 var(--f-display); color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 0.5rem 2rem; }

/* Telefon */
@media (max-width: 820px) {
  .row, .hero .row { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; }
  .sec-title { position: static; margin: 0; }
  .who { margin: 0 0 1.5rem; }
  .hero-side .who { margin-bottom: 0; }
  .moons { flex-direction: row; justify-content: space-between; width: min(100%, 21rem); gap: 0; margin: 0 0 1.75rem; }
  .moons svg { width: 1.93rem; height: 1.93rem; }
  .hero-title { font-stretch: 100%; font-size: min(11cqw, 6rem); }
  .facts div { grid-template-columns: minmax(0, 1fr); row-gap: 0.1rem; }
  body { font-size: 1.0625rem; }
}
@media (max-width: 560px) {
  /* Dwa rzędy: u góry logo i przyciski, niżej menu z dużą, czytelną czcionką */
  .nav-in { width: calc(100% - 2rem); height: auto; flex-wrap: wrap; padding-block: 0.35rem 0.2rem; }
  .nav-right { display: contents; }
  .brand { order: 1; margin-right: auto; gap: 0.7rem; }
  .mk svg { height: 1.5rem; }
  .bits { grid-template-columns: repeat(8, 0.46rem); grid-auto-rows: 0.375rem; font-size: 0.34rem; }
  .lang { order: 2; height: 2.5rem; min-width: 2.5rem; }
  .theme { order: 3; width: 2.5rem; height: 2.5rem; }
  .nav-links { order: 4; flex: 0 0 100%; justify-content: space-between; gap: 0.5rem; margin-top: 0.1rem; }
  .nav-links a { font-size: 1.22rem; white-space: nowrap; padding: 0.45rem 0 0.55rem; }
  .sec { scroll-margin-top: 3rem; }
  .ev { grid-template-columns: 4.3rem minmax(0, 1fr); }
  .ev .src { display: none; }
  .why { grid-column: 2; }
}
@media (max-width: 350px) {
  .nav-links a { font-size: 1.1rem; }
}

.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0,0,0,.14);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s, background .2s;
}
.to-top.show { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.to-top:hover { background: var(--hl-solid); color: #12161c; }
.to-top svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Płynne wejście sekcji przy przewijaniu */
.js .rv { opacity: 0; transform: translateY(1.6rem); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* Ograniczony ruch: te same treści, bez animacji */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rl::after { display: none; }
  .caret { animation: none; opacity: 1; }
  .blob .b-hop, .blob .b-bre, .blob .b-shadow, .blob .b-eye-r, .blob .b-wink, .blob .b-smile, .blob .b-open { animation: none !important; }
  .after-wipe { animation: none; }
  .js mark.hl:not(.on) { background-size: 100% 64%; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
