/* Tokens and rules follow D:\Projects\Quantum\DESIGN.md, with one change asked for by Quantum:
   the page background is #191919 (the panther photo's black point), so the cool tints of the
   original tokens are neutralised to match it. Contrast ratios below are on #191919. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 100% 125%; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 100% 125%; font-display: swap;
  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: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400-600-latin-ext.woff2") format("woff2");
  font-weight: 400 600; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-400-600-latin.woff2") format("woff2");
  font-weight: 400 600; font-display: swap;
  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: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  font-weight: 400; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  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: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  font-weight: 500; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500; font-display: swap;
  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 {
  --night: #191919;     /* page; also the black point of img/puma-*.jpg, so the photo has no edge */
  --panel: #212121;     /* nodes, cards, fields */
  --white: #f2f2f2;     /* 15.6:1 */
  --silver: #bdbdbd;    /* 9.3:1 */
  --graphite: #858585;  /* 4.6:1 – diagram lines and field borders carry information, need 3:1 */
  --hairline: #2e2e2e;  /* decorative dividers only */
  --bronze: #c9a27a;    /* 7.4:1 – data flow, primary button, focus, links */
  --bronze-hi: #e2bf94;

  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 2px;
  --spine-x: 32px; /* centre of the 64px spine lane */
  --lane: 64px;
  --max: 1200px;
  --section-gap: 128px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--night); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--bronze); text-underline-offset: 3px; }
a:hover { color: var(--bronze-hi); }

:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; border-radius: var(--radius); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.12;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
h1 { font-size: 56px; }
h2 { font-size: 40px; }
h3 { font-size: 21px; font-weight: 600; }

p { margin: 0 0 16px; max-width: 62ch; }

.lead { color: var(--silver); font-size: 19px; }
.muted { color: var(--silver); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--bronze); color: var(--night); padding: 8px 12px; }

/* ---------- header (sits over the hero photo) ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 24px calc(var(--lane) + 16px);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font: 600 15px/1 var(--font-head);
  font-stretch: 125%;
  letter-spacing: 0.32em;
}
.brand:hover { color: var(--white); }
.brand img {
  width: 44px;
  height: auto;
  /* The one glow on the page: borrowed from the original panther logo. */
  filter: drop-shadow(0 0 10px rgba(242, 242, 242, 0.28));
}

.site-nav { margin-left: auto; display: flex; gap: 28px; align-items: center; }
.site-nav a:not(.btn) { color: var(--silver); text-decoration: none; font-size: 15px; }
.site-nav a:not(.btn):hover { color: var(--white); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bronze);
  color: var(--night);
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--bronze-hi); color: var(--night); }
.btn:disabled { opacity: 0.6; cursor: progress; }

.link-quiet {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--graphite);
  text-decoration-thickness: 1px;
}
.link-quiet:hover { color: var(--white); text-decoration-color: var(--bronze); }

/* ---------- hero: panther left, copy and the order's journey right ---------- */

/* The panther looks right; the copy column starts just past its nose (≈82% of the photo's
   width) and its eye (≈38% of the height) sits on the hero's vertical centre. */
.hero {
  --puma-w: min(66cqw, 120svh);
  --puma-x: 0px;
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  max-width: 1440px;
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 120px 16px 72px calc(var(--lane) + 16px);
}

.hero-puma {
  position: absolute;
  left: var(--puma-x);
  top: calc(50% - var(--puma-w) * 0.2533);   /* 0.38 × (1024 / 1536) */
  z-index: -1;
  width: var(--puma-w);
  height: auto;
  max-width: none;
  /* fade the cut-off body (bottom) and flank (left) into the page */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%), linear-gradient(to top, transparent, #000 28%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%), linear-gradient(to top, transparent, #000 28%);
  mask-composite: intersect;
}

.hero-copy {
  min-width: 0;
  margin-left: max(0px, calc(var(--puma-x) + var(--puma-w) * 0.86 - var(--lane)));
  max-width: 560px;
}

.hero h1 { max-width: 15ch; text-wrap: balance; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 32px; }

.hero-schema { margin-top: 48px; }

/* ---------- diagrams (DESIGN.md "Wzorcowe schematy": classes 1:1) ---------- */

.diagram { width: 100%; height: auto; }
.diagram .wire  { fill: none; stroke: var(--graphite); stroke-width: 1.5; }
.diagram .flow  { fill: none; stroke: var(--bronze);   stroke-width: 2; }
.diagram .dot   { fill: var(--bronze); }
.diagram .arrow { fill: var(--graphite); }
.diagram .arrow.hot { fill: var(--bronze); }
.diagram .box   { fill: var(--panel); stroke: var(--graphite); stroke-width: 1.5; }
.diagram .box.core { stroke: var(--bronze); }
.diagram text   { fill: var(--silver); font: 500 12px var(--font-mono); letter-spacing: .08em; }
.diagram text.sub { fill: var(--graphite); letter-spacing: 0; }
/* Grey wires are "what already exists": they stand still, no dash tricks.
   Only the bronze flow draws itself. Animating the grey wires left two of
   them stuck half-drawn in iPhone Safari while Chrome drew them fine.
   pathLength="1" on every .flow, so 1 = the whole line whatever its length;
   a fixed number (e.g. 600) silently leaves longer lines half drawn.
   Reduced-motion shows the flow already drawn. */
.diagram .flow { stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.2s ease-out .4s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Desktop and phone get different drawings, never a sideways-scrolling one. */
.diagram.v-mobile { display: none; }
@media (max-width: 640px) {
  .diagram.v-desktop { display: none; }
  .diagram.v-mobile { display: block; }
}

/* Below the fold the bronze flow draws while its section scrolls past. The timeline is
   named on the section (DESIGN.md): an anonymous view() would latch onto the nearest
   scroll container instead of the page. It finishes while the section is still well
   in view. Browsers without it keep the on-load version above. */
@supports (view-timeline: --schemat block) {
  #przed-po, #co-dowozimy { view-timeline: --schemat block; }
  #przed-po .diagram .flow,
  #co-dowozimy .diagram .flow {
    animation: draw linear both;
    animation-timeline: --schemat;
    animation-range: cover 8% cover 35%;
  }
}

/* ---------- the spine: everything below the hero is one process ---------- */

.spine {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 0 calc(var(--lane) + 16px);
}

.spine::before,
.spine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(16px + var(--spine-x));
  width: 1.5px;
}
.spine::before { background: var(--graphite); }

/* Bronze "data" fills the spine as the reader scrolls. Pure CSS: browsers
   without scroll timelines keep the static graphite line, nothing breaks. */
.spine::after { background: var(--bronze); transform-origin: top; transform: scaleY(0); }
@supports (animation-timeline: scroll()) {
  .spine::after { animation: spine linear both; animation-timeline: scroll(root); }
}
@keyframes spine { to { transform: scaleY(1); } }

.spine section { position: relative; padding: calc(var(--section-gap) / 2) 0; }

/* A node on the spine names the section - the only uppercase on the page. */
.node-label {
  position: relative;
  display: inline-block;
  margin: 0 0 24px;
  padding: 6px 10px;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--silver);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Horizontal branch from the spine into the node. */
.node-label::before {
  content: "";
  position: absolute;
  top: calc(50% - 0.75px);
  right: 100%;
  width: calc(var(--lane) - var(--spine-x));
  height: 1.5px;
  background: var(--graphite);
}

/* The junction on the spine. */
.node-label::after {
  content: "";
  position: absolute;
  top: calc(50% - 3px);
  right: calc(100% + var(--lane) - var(--spine-x) - 3.75px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bronze);
}

/* Grid items default to min-width: auto and refuse to shrink below their
   content, so a scrollable diagram would push the whole page sideways. */
.compare > *, .audit > *, .contact > * { min-width: 0; }

/* ---------- symptoms ---------- */

.readout {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  max-width: 760px;
}
.readout li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--hairline);
}
.readout li:first-child { border-top: 0; }
.readout li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border: 1.5px solid var(--graphite);
  border-radius: 50%;
}
.readout strong { display: block; font-weight: 500; }
.readout span { color: var(--silver); font-size: 15px; }

/* ---------- before / after ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.compare figure {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
}
.compare figure:hover { border-color: var(--graphite); }
.compare figcaption {
  margin-bottom: 16px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver);
}
.compare figure:last-child figcaption { color: var(--bronze); }

/* The diagram backgrounds are --panel; inside a --panel card they would vanish. */
.compare .diagram .box { fill: var(--night); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.metric b { display: block; font: 500 40px/1.1 var(--font-mono); color: var(--white); }
.metric span { color: var(--silver); font-size: 15px; }

/* ---------- what we deliver ---------- */

.hub { margin-top: 40px; max-width: 900px; }
.hub-note { margin-top: 24px; color: var(--silver); }

/* ---------- portfolio: a project register with one preview frame (DESIGN.md) ---------- */

.rejestr {
  --rej-gap: 64px;
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: var(--rej-gap);
  align-items: start;
  margin-top: 40px;
}

.wiersze { margin: 0; padding: 0; list-style: none; }

.wiersz {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}
.wiersz:last-child { border-bottom: 1px solid var(--hairline); }

.wiersz h3 { margin: 0 0 4px; font-size: 21px; }
.wiersz h3 a { color: var(--white); text-decoration: none; transition: color 0.15s; }
.wiersz-domena { margin: 0 0 6px; color: var(--silver); font: 400 14px/1.4 var(--font-mono); }
.wiersz-zdanie { margin: 0; color: var(--silver); font-size: 16px; }

/* The project type as a diagram node: the only uppercase in this section. */
.wiersz-wezel {
  padding: 6px 10px;
  border: 1.5px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--silver);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

/* Active row: a graphite wire from the row to the preview, bronze dot at its end. */
.wiersz::before,
.wiersz::after {
  content: "";
  position: absolute;
  top: 50%;
  opacity: 0;
  transition: opacity 0.25s;
}
.wiersz::before { left: 100%; width: var(--rej-gap); height: 1.5px; margin-top: -0.75px; background: var(--graphite); }
.wiersz::after { left: calc(100% + var(--rej-gap) - 3px); width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--bronze); }

.wiersz:is(:hover, :focus-within)::before,
.wiersz:is(:hover, :focus-within)::after,
.realizacje:not(:has(.wiersz:is(:hover, :focus-within))) .wiersz-1::before,
.realizacje:not(:has(.wiersz:is(:hover, :focus-within))) .wiersz-1::after { opacity: 1; }

.wiersz:is(:hover, :focus-within) h3 a,
.realizacje:not(:has(.wiersz:is(:hover, :focus-within))) .wiersz-1 h3 a { color: var(--bronze-hi); }

/* Phone-only screenshot under each row. */
.wiersz-zrzut { display: none; }

/* Held at the middle of the screen, so the wire from the hovered row lands on the frame. */
.podglad { position: sticky; top: max(96px, calc(50svh - 210px)); }

/* 16:10 frame, no browser bar, no device mockup. Screenshots are stacked inside it. */
.podglad-ramka {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--panel);
}
.podglad-ramka img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* at rest in greyscale; the active project in full colour (the only colour photo on the page) */
  filter: grayscale(1) brightness(0.85);
}

.podglad-podpis { display: grid; margin-top: 14px; }
.podglad-podpis p {
  grid-area: 1 / 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  max-width: none;
}
.podglad-domena { color: var(--silver); font: 400 14px/1.6 var(--font-mono); }

/* Which screenshot and caption show: pure CSS, no JS. Project 1 by default. */
.podglad-ramka img,
.podglad-podpis p {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, filter 0.25s;
}
.podglad .podglad-1 { opacity: 1; visibility: visible; }
.realizacje:has(.wiersz:is(:hover, :focus-within)) .podglad .podglad-1 { opacity: 0; visibility: hidden; }

.realizacje:has(.wiersz-1:is(:hover, :focus-within)) .podglad .podglad-1,
.realizacje:has(.wiersz-2:is(:hover, :focus-within)) .podglad .podglad-2,
.realizacje:has(.wiersz-3:is(:hover, :focus-within)) .podglad .podglad-3,
.realizacje:has(.wiersz-4:is(:hover, :focus-within)) .podglad .podglad-4,
.realizacje:has(.wiersz-5:is(:hover, :focus-within)) .podglad .podglad-5,
.realizacje:has(.wiersz-6:is(:hover, :focus-within)) .podglad .podglad-6,
.realizacje:has(.wiersz-7:is(:hover, :focus-within)) .podglad .podglad-7 { opacity: 1; visibility: visible; filter: none; }

/* ---------- how we work ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; position: relative; }

/* One horizontal wire through all four steps instead of 01/02/03/04. */
.steps::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--graphite);
}
.step { position: relative; padding-right: 24px; }
.step .node-label { margin-bottom: 20px; }
.step .node-label::before, .step .node-label::after { display: none; }
.step p { color: var(--silver); font-size: 16px; }

/* ---------- audit card ---------- */

.audit { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.audit-card {
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--panel);
  font: 400 14px/1.5 var(--font-mono);
}
.audit-card header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  color: var(--silver);
  letter-spacing: 0.04em;
}
.audit-card dl {
  margin: 0;
  padding: 8px 18px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}
.audit-card dt { color: var(--graphite); }
.audit-card dd { margin: 0; color: var(--white); }
.audit-card .bad::before { content: "● "; color: var(--bronze); }

/* ---------- contact ---------- */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.contact-lines { margin: 24px 0 32px; padding: 0; list-style: none; }
.contact-lines li { padding: 10px 0; border-top: 1px solid var(--hairline); }
.contact-lines li:last-child { border-bottom: 1px solid var(--hairline); }
/* Normal case: uppercase belongs to diagram nodes only (DESIGN.md, "Zakazane"). */
.contact-lines span {
  display: inline-block;
  min-width: 90px;
  color: var(--graphite);
  font-size: 15px;
}

/* DESIGN.md form: label above the field (never placeholder only), panel field, graphite border. */
.contact-form {
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--silver); font-size: 15px; }
.field .opt { color: var(--graphite); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  background: var(--night);
  color: var(--white);
  font: 400 16px/1.5 var(--font-body);
}
.field textarea { resize: vertical; min-height: 132px; }
.field input::placeholder { color: var(--graphite); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; border-color: var(--bronze); }
.field [aria-invalid="true"] { border-color: var(--bronze-hi); }
.field-error { margin: 6px 0 0; color: var(--bronze-hi); font-size: 14px; }
.field-error::before { content: "⚠ "; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-note { color: var(--graphite); font-size: 14px; }
.form-status { margin: 16px 0 0; min-height: 1.6em; color: var(--silver); }
.form-status.ok { color: var(--white); }
.form-status.ok::before { content: "✓ "; color: var(--bronze); }
.form-status.err { color: var(--bronze-hi); }
.form-status.err::before { content: "⚠ "; }

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 16px 48px calc(var(--lane) + 16px);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 48px;
  color: var(--graphite);
  font-size: 14px;
}
.footer-logo { width: 180px; height: auto; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.site-footer a { color: var(--silver); }

/* ---------- simple pages (404, thank-you) ---------- */

.page-plain {
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: 160px 16px 72px calc(var(--lane) + 16px);
}
.page-plain p { color: var(--silver); }

/* ---------- responsive ---------- */

/* medium screens: slide the panther left so the copy keeps a readable measure */
@media (max-width: 1180px) {
  .hero { --puma-w: 74cqw; --puma-x: -18cqw; }
}

@media (max-width: 900px) {
  :root { --lane: 32px; --spine-x: 0px; --section-gap: 80px; }

  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  h3 { font-size: 19px; }

  .site-header { gap: 12px; padding-top: 16px; }
  /* the wide-tracked wordmark and the button do not fit side by side on a phone */
  .site-header:has(.site-nav) .brand-name { display: none; }
  .site-nav a:not(.btn) { display: none; }
  .site-nav .btn { min-height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }

  /* photo on top, cropped to the head; copy and schema below */
  .hero { display: block; min-height: 0; padding: 0 16px 24px 32px; }
  .hero-puma {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% + 48px);
    margin-left: -32px;
    aspect-ratio: 10 / 9;
    object-fit: cover;
    object-position: 78% 35%;
    -webkit-mask-image: linear-gradient(to top, transparent, #000 32%);
    mask-image: linear-gradient(to top, transparent, #000 32%);
  }
  .hero-copy { position: relative; margin: -64px 0 0; }

  .compare, .audit, .contact { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }

  /* Phones: straight spine, no branches. */
  .node-label::before, .node-label::after { display: none; }

  .steps { grid-template-columns: 1fr; gap: 8px; }
  .steps::before { display: none; }

  .contact-form { padding: 20px; }

  /* Portfolio on phones: no preview frame; every row carries its own colour screenshot. */
  .rejestr { display: block; }
  .podglad { display: none; }
  .wiersz { align-items: start; padding: 24px 0 28px; }
  .wiersz::before, .wiersz::after { display: none; }
  .realizacje:not(:has(.wiersz:is(:hover, :focus-within))) .wiersz-1 h3 a { color: var(--white); }
  .wiersz-zrzut { display: block; grid-column: 1 / -1; margin-top: 8px; }
  .wiersz-zrzut img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--graphite);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .wiersz-zrzut a { display: inline-block; margin-top: 12px; }
}

@media (max-width: 640px) {
  /* less frame padding, so node labels in the before/after cards stay above 10px */
  .compare figure { padding: 16px 12px; }
}

/* ---------- the panther emerges from the dark (opacity only: edges stay invisible) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-puma { animation: emerge 2.2s cubic-bezier(0.25, 0.6, 0.3, 1) both; }
}
@keyframes emerge { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .diagram .flow { stroke-dashoffset: 0; }
  .spine::after { transform: scaleY(1); opacity: 0; }
}
