/* OSTRA — layout i komponenty. Mobile-first, breakpointy 560 / 760 / 1000 / 1240. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.94;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
::selection { background: var(--ember); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}
.viewer :focus-visible { outline-color: var(--ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 0.75rem; top: 0.75rem; z-index: 200;
  transform: translateY(-160%);
  background: var(--ember); color: var(--void);
  padding: 0.8rem 1.15rem; border-radius: var(--r);
  font-weight: 600; text-decoration: none;
  transition: transform 0.16s var(--ease);
}
.skip:focus { transform: translateY(0); }

/* cel skip-linku: fokus przenoszony programowo, ramka wokół całego main byłaby myląca */
#tresc:focus { outline: none; }

.shell {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- typografia pomocnicza ---------- */
.index {
  display: flex; align-items: baseline; gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.index span { color: var(--ember); font-variant-numeric: tabular-nums; }

.sec-head { margin-bottom: clamp(2.25rem, 1.5rem + 2.6vw, 4rem); }
.sec-head h2 {
  font-size: var(--step-4);
  margin-top: 1.1rem;
}
.sec-lede {
  margin-top: 1.4rem;
  max-width: 54ch;
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.55;
}

/* sekcje wynurzają się z głębi: skala z 0.93 + rozjaśnienie, nie prosty fade z dołu */
.rise {
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.935);
  filter: brightness(0.45);
  transition: opacity 0.75s var(--ease-out), transform 0.95s var(--ease-out), filter 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.rise.in { opacity: 1; transform: none; filter: none; will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 50px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ember { background: var(--ember); border-color: var(--ember); color: var(--void); }
.btn-ember:hover { background: var(--ember-deep); border-color: var(--ember-deep); }
.btn-line { border-color: #3A3A45; }
.btn-line:hover { border-color: var(--ink); background: rgba(236, 233, 228, 0.06); }

/* ---------- nagłówek ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.top::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,8,11,0.86), rgba(8,8,11,0));
  pointer-events: none;
}
.top.is-stuck {
  background: rgba(8, 8, 11, 0.82);
  backdrop-filter: saturate(130%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.top.is-stuck::before { opacity: 0; }
.top-in {
  display: flex; align-items: center; gap: 0.5rem 1.4rem;
  min-height: 62px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-right: auto;
  min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.brand-mark { width: 21px; height: 21px; flex: none; color: var(--ember); }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0rem;
  letter-spacing: 0.26em;
  line-height: 1;
}
.nav { display: flex; align-items: center; gap: 0.15rem; }
.nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding-inline: 0.6rem;
  color: var(--ink-2); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.16s var(--ease);
}
.nav a:hover { color: var(--ink); }
.top-note {
  display: none;
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  padding-left: 1.2rem; border-left: 1px solid var(--line);
}
@media (max-width: 400px) {
  .top-in { gap: 0.4rem 0.6rem; }
  .brand-word { font-size: 0.9375rem; letter-spacing: 0.18em; }
  .brand-mark { width: 19px; height: 19px; }
  .nav { gap: 0; }
  .nav a { padding-inline: 0.38rem; font-size: 0.8125rem; }
}
@media (min-width: 420px) { .nav a { padding-inline: 0.6rem; } }
@media (min-width: 760px) { .nav a { padding-inline: 0.85rem; } }
@media (min-width: 1000px) { .top-note { display: block; } }

/* ---------- HERO / PRÓG ---------- */
.hero { position: relative; height: 240vh; height: 240svh; min-height: 1100px; }
.hero-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  min-height: 540px;
  overflow: hidden;
  display: flex; flex-direction: column;
  isolation: isolate;
}
.portal { position: absolute; inset: 0; z-index: 0; }
.portal-canvas, .portal-poster, .portal-poster img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.portal-canvas { object-fit: cover; }
.portal-poster { display: none; }
.portal-poster img { object-fit: cover; }
.portal.no-gl .portal-canvas { display: none; }
.portal.no-gl .portal-poster { display: block; }

.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,8,11,0.92) 0%, rgba(8,8,11,0.72) 34%, rgba(8,8,11,0.18) 62%, rgba(8,8,11,0) 80%),
    linear-gradient(180deg, rgba(8,8,11,0.72) 0%, rgba(8,8,11,0) 26%, rgba(8,8,11,0) 62%, rgba(8,8,11,0.88) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  margin-top: auto; margin-bottom: auto;
  padding-top: 6rem; padding-bottom: 5rem;
  will-change: transform, opacity;
}
.kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.7rem;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
}
.kicker-rule { width: 2.25rem; height: 1px; background: var(--ember); flex: none; }
.kicker-dim { color: var(--ink-3); }
.hero h1 {
  margin-top: clamp(1.1rem, 0.8rem + 1vw, 1.8rem);
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.86;
}
.hero h1 .stop { color: var(--ember); }
.hero-lede {
  margin-top: clamp(1.2rem, 1rem + 0.8vw, 1.75rem);
  max-width: 36ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  margin-top: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
}
.hero-foot {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding-bottom: 1.35rem;
}
.depth { display: flex; align-items: center; gap: 0.65rem; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.depth-track { display: block; width: 76px; height: 1px; background: var(--line); position: relative; }
.depth-bar { display: block; position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--ember); }
.depth-num { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 3.2em; }
.hero-scroll {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.hero-scroll svg { width: 11px; height: 26px; color: var(--ink-2); }
@media (max-width: 560px) {
  .hero-scroll { display: none; }
  .hero-content { padding-top: 5rem; padding-bottom: 3.5rem; }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(8,8,11,0.55) 0%, rgba(8,8,11,0.05) 28%, rgba(8,8,11,0.45) 54%, rgba(8,8,11,0.94) 88%);
  }
}
@media (min-width: 900px) {
  .hero-lede { max-width: 40ch; }
}

/* ---------- linie perspektywy ---------- */
.sec-lines {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(180deg, rgba(92,107,122,0.12) 0 1px, transparent 1px 90px);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 8%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 8%, transparent 72%);
  opacity: 0.75;
}
.sec-lines-rays {
  background-image:
    repeating-conic-gradient(from 0deg at 50% 118%, rgba(255,95,61,0.13) 0deg 0.09deg, transparent 0.09deg 6deg);
  mask-image: radial-gradient(90% 120% at 50% 118%, #000 10%, transparent 66%);
  -webkit-mask-image: radial-gradient(90% 120% at 50% 118%, #000 10%, transparent 66%);
  opacity: 0.5;
}

/* ---------- PRACE ---------- */
.works { position: relative; overflow: hidden; padding-block: var(--section-y); background: var(--void); }
.works .shell { position: relative; z-index: 1; }
.gallery-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.9rem 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 46px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.8125rem; font-weight: 500;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.chip:hover { color: var(--ink); border-color: #3C3C48; }
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--void);
}
.chip-n { font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-n { color: #55525C; }
.lens-hint {
  max-width: 46ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}
@media (max-width: 759px) { .lens-hint { display: none; } }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 0.4rem + 1.2vw, 1.5rem) clamp(0.6rem, 0.3rem + 1vw, 1.25rem);
}
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.work { position: relative; }
.work.is-out { display: none; }
/* karty wracające po filtrze wchodzą z głębi, bez skoku layoutu */
.work.is-entering { animation: work-in 0.42s var(--ease) both; }
@keyframes work-in {
  from { opacity: 0; transform: scale(0.965); }
  to { opacity: 1; transform: none; }
}
.grid.is-swapping { overflow: hidden; }
.work-media {
  position: relative;
  background: var(--surface);
  overflow: hidden;
  border-radius: 0;
  isolation: isolate;
}
.work-open {
  display: block; width: 100%;
  padding: 0; margin: 0;
  border: 0; border-radius: 0;
  background: none;
  cursor: zoom-in;
  position: relative;
  touch-action: manipulation;
}
.work-open img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: filter 0.4s var(--ease), transform 0.6s var(--ease);
}
.work-open:hover img { filter: brightness(1.12) contrast(1.02); }
.work-frame {
  position: absolute; inset: 0;
  border: 1px solid rgba(236, 233, 228, 0.10);
  pointer-events: none;
  transition: border-color 0.3s var(--ease);
}
.work-open:hover .work-frame,
.work-open:focus-visible .work-frame { border-color: rgba(255, 95, 61, 0.45); }
.work-open:focus-visible { outline-offset: -3px; }

.work-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.7rem;
}
.work-title {
  font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.work-tech {
  font-size: 0.75rem;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.35;
}
@media (max-width: 620px) {
  .work-meta { display: block; padding-top: 0.55rem; }
  .work-tech { text-align: left; margin-top: 0.2rem; font-size: 0.6875rem; }
}

/* ---------- SOCZEWKA ---------- */
.lens {
  --d: 172px;
  position: absolute; left: 0; top: 0;
  width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease);
  background-color: #050507;
  background-repeat: no-repeat;
  background-image: var(--lens-src, none);
  box-shadow:
    0 0 0 1px rgba(255, 95, 61, 0.75),
    0 0 26px 3px rgba(255, 95, 61, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.65);
  z-index: 4;
  overflow: hidden;
}
.lens.is-on { opacity: 1; visibility: visible; }
.lens::after {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,0.16), transparent 46%);
  pointer-events: none;
}
.lens-cross {
  position: absolute; left: 50%; top: 50%;
  width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px;
  opacity: 0.85;
}
.lens-cross::before, .lens-cross::after {
  content: ""; position: absolute; background: rgba(236,233,228,0.55);
}
.lens-cross::before { left: 0; right: 0; top: 50%; height: 1px; }
.lens-cross::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.lens-chroma {
  position: absolute; inset: 0; border-radius: 50%;
  background-image: var(--lens-src, none);
  background-repeat: no-repeat;
  opacity: 0;
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle, transparent 58%, #000 76%, #000 93%, transparent 99%);
  -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 76%, #000 93%, transparent 99%);
  transition: opacity 0.18s var(--ease);
  pointer-events: none;
}
.lens.is-on .lens-chroma { opacity: 0.55; }
.lens-chroma-a { background-color: rgba(255, 60, 30, 0.5); transform: translateX(-2.5px); }
.lens-chroma-b { background-color: rgba(40, 170, 255, 0.42); transform: translateX(2.5px); }
@media (max-width: 760px) {
  .lens { --d: 148px; }
}

.zoom-btn {
  display: none;
  position: absolute; right: 0.5rem; bottom: 0.5rem; z-index: 5;
  min-height: 46px; min-width: 46px;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(236, 233, 228, 0.28);
  border-radius: var(--r);
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 0.8125rem; font-weight: 600;
  cursor: pointer;
}
.zoom-btn[aria-pressed="true"] {
  background: var(--ember); color: var(--void); border-color: var(--ember);
}
.zoom-btn:hover { border-color: var(--ink); }
@media (hover: none), (pointer: coarse) {
  .zoom-btn { display: inline-flex; align-items: center; }
}
.touch-hint { display: none; }
@media (hover: none), (pointer: coarse) {
  .touch-hint {
    display: block;
    font-size: 0.6875rem; color: var(--ink-3);
    padding-top: 0.45rem;
  }
}

/* na dotyku podpowiedź jest potrzebna — pokazujemy ją także pod filtrami */
@media (max-width: 759px) and (hover: none), (max-width: 759px) and (pointer: coarse) {
  .lens-hint { display: block; flex-basis: 100%; font-size: 0.75rem; color: var(--ink-3); }
}

.demo-note {
  margin-top: clamp(1.75rem, 1.2rem + 1.4vw, 2.75rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  color: var(--ink-3);
  max-width: 62ch;
}

/* ---------- PROCES ---------- */
.process { position: relative; overflow: hidden; padding-block: var(--section-y); background: var(--void); }
.process .shell { position: relative; z-index: 1; }
.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.15rem;
  padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  grid-column: 1;
  font-family: var(--font-display);
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
}
.step-body { grid-column: 2; max-width: 62ch; }
.step-body h3 {
  font-size: var(--step-2);
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.step-body p { color: var(--ink-2); font-size: var(--step-0); line-height: 1.62; }
.step-body p + p { margin-top: 0.65rem; }
.step-detail {
  font-size: 0.8125rem !important;
  color: var(--ink-3) !important;
  letter-spacing: 0.01em;
}
.step-stack {
  position: absolute; right: 0; top: clamp(1.6rem, 1.2rem + 1.6vw, 2.75rem);
  width: 66px; height: 66px;
  display: none;
}
.step-stack i {
  position: absolute; inset: 0;
  border: 1px solid var(--line);
  border-radius: 1px;
}
.step-stack i:nth-child(1) { transform: translate(0, 0); border-color: rgba(255,95,61,0.5); }
.step-stack i:nth-child(2) { transform: translate(8px, 8px); }
.step-stack i:nth-child(3) { transform: translate(16px, 16px); border-color: rgba(92,107,122,0.4); }
@media (min-width: 900px) {
  .step { grid-template-columns: 4.5rem 1fr auto; align-items: start; }
  .step-num { padding-top: 0.55rem; }
  .step-stack { position: static; display: block; grid-column: 3; margin-top: 0.15rem; }
}

/* ---------- O PRACOWNI ---------- */
.studio { position: relative; padding-block: var(--section-y); background: var(--surface); border-block: 1px solid var(--line-soft); overflow: hidden; }
.studio-grid { display: grid; gap: clamp(2rem, 1.2rem + 3vw, 4rem); }
.studio-mark {
  position: relative; height: 160px;
  order: 2;
}
.sm-frame {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid rgba(255, 95, 61, 0.22);
  transform: translate(-50%, -50%);
}
.sm-frame-1 { width: 160px; height: 160px; }
.sm-frame-2 { width: 112px; height: 112px; border-color: rgba(167,164,176,0.22); }
.sm-frame-3 { width: 62px; height: 62px; border-color: rgba(255,95,61,0.5); background: radial-gradient(circle, rgba(255,95,61,0.16), transparent 70%); }
.studio-copy { order: 1; }
.studio-copy h2 { font-size: var(--step-3); margin: 1rem 0 1.4rem; max-width: 18ch; }
.studio-copy p { color: var(--ink-2); max-width: 56ch; font-size: var(--step-0); line-height: 1.65; }
.studio-copy p + p { margin-top: 0.9rem; }
.studio-copy .fiction {
  margin-top: 1.3rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--ember);
  color: var(--ink);
  font-size: 0.9375rem;
}
.studio-facts { order: 3; display: grid; gap: 0; border-top: 1px solid var(--line); align-self: start; }
.studio-facts > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.studio-facts dt { font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding-top: 0.22rem; }
.studio-facts dd { margin: 0; font-size: 0.9375rem; color: var(--ink); line-height: 1.45; }
@media (min-width: 760px) {
  .studio-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .studio-copy { grid-column: 1; }
  .studio-facts { grid-column: 2; grid-row: 1; }
  .studio-mark { order: 3; grid-column: 1 / -1; height: 200px; }
}
@media (min-width: 1100px) {
  .studio-grid { grid-template-columns: 1.35fr 0.9fr 0.75fr; }
  .studio-mark { grid-column: 1; grid-row: 1; height: 100%; min-height: 320px; }
  .studio-copy { grid-column: 2; }
  .studio-facts { grid-column: 3; }
}

/* ---------- KONTAKT ---------- */
.contact { position: relative; overflow: hidden; padding-block: var(--section-y); background: var(--void); }
.contact .shell { position: relative; z-index: 1; }
.contact-grid { display: grid; gap: clamp(2rem, 1.2rem + 3vw, 4.5rem); }
.contact-grid h2 { font-size: var(--step-4); margin-top: 1.1rem; }
.contact-mail { margin-top: 1.75rem; font-size: 0.9375rem; color: var(--ink-2); }
.contact-mail a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration-color: #4A4A56; }
.contact-mail a:hover { text-decoration-color: var(--ember); }
.contact-small { margin-top: 0.45rem; font-size: 0.75rem; color: var(--ink-3); max-width: 42ch; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-2);
}
.field input, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field textarea:hover { border-color: #34343E; }
.field input:focus, .field textarea:focus { border-color: var(--ember); outline: none; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--ember); background: rgba(255, 95, 61, 0.06); }
.field input::placeholder, .field textarea::placeholder { color: #6E6B77; }
.err { min-height: 0; font-size: 0.8125rem; color: var(--ember); line-height: 1.4; }
.err:not(:empty) { min-height: 1.2em; margin-top: 0.1rem; }
.form-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  margin-top: 0.3rem;
}
.form-note { font-size: 0.75rem; color: var(--ink-3); max-width: 30ch; line-height: 1.45; }
.form-status { font-size: 0.875rem; color: var(--ink-2); min-height: 1.4em; }
.form-status.is-ok { color: var(--ink); }
.form-status.is-bad { color: var(--ember); }

/* ---------- STOPKA ---------- */
.foot { background: #060608; border-top: 1px solid var(--line-soft); padding-block: clamp(2.25rem, 1.5rem + 2vw, 3.5rem) 1.5rem; }
.foot-top {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line-soft);
}
.foot-brand {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.35rem; letter-spacing: 0.26em;
  text-decoration: none; color: var(--ink);
  margin-right: auto;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot-nav a, .foot-mail {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  font-size: 0.875rem; color: var(--ink-2); text-decoration: none;
}
.foot-nav a:hover, .foot-mail:hover { color: var(--ink); text-decoration: underline; }
.foot-mail { color: var(--ink); }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  padding-top: 1.4rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.credit a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration-color: #4A4A56; }
.credit a:hover { text-decoration-color: var(--ember); }
.disclaimer { max-width: 56ch; line-height: 1.5; }
.foot-year { font-variant-numeric: tabular-nums; }

/* ---------- PEŁNOEKRANOWY PODGLĄD ---------- */
.viewer { position: fixed; inset: 0; z-index: var(--z-viewer); }
.viewer[hidden] { display: none; }
.viewer-backdrop {
  position: absolute; inset: 0;
  background: #050506;
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}
.viewer.is-open .viewer-backdrop { opacity: 1; }
.viewer-panel {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(0.75rem, 0.4rem + 1.4vw, 1.75rem);
  padding-top: clamp(3.5rem, 2.6rem + 2vw, 4.5rem);
  gap: 0.75rem 1.25rem;
}
.viewer-close {
  position: absolute; top: 0.85rem; right: 0.85rem; z-index: 3;
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(236,233,228,0.22);
  border-radius: 50%;
  background: rgba(16,16,20,0.7);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.viewer-close svg { width: 17px; height: 17px; }
.viewer-close:hover { background: var(--ember); border-color: var(--ember); color: var(--void); }

.viewer-stage { grid-column: 1; grid-row: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; }
.viewer-figure {
  margin: 0; height: 100%; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.85rem; min-height: 0;
}
.viewer-media {
  position: relative;
  max-height: 100%;
  max-width: min(100%, 62vh);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0B0B0E;
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
  transform-origin: 50% 50%;
  touch-action: pan-y;
}
.viewer-media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.plx {
  position: absolute; inset: -3%;
  background-image: var(--plx-src, none);
  background-size: cover;
  background-position: center;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.3s var(--ease);
  will-change: transform;
}
.viewer.is-scrub .plx { opacity: 0.32; }
.plx-a { mask-image: radial-gradient(70% 60% at 30% 40%, #000 0%, transparent 72%); -webkit-mask-image: radial-gradient(70% 60% at 30% 40%, #000 0%, transparent 72%); }
.plx-b { mask-image: radial-gradient(60% 70% at 72% 62%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(60% 70% at 72% 62%, #000 0%, transparent 70%); }
.viewer-corner {
  position: absolute; inset: 0;
  border: 1px solid rgba(236,233,228,0.12);
  pointer-events: none;
}
.viewer-cap {
  width: 100%;
  max-width: min(100%, 62vh);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.viewer-count { font-family: var(--font-display); font-size: 0.6875rem; letter-spacing: 0.16em; color: var(--ember); font-variant-numeric: tabular-nums; }
.viewer-cap h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem); margin-top: 0.2rem; }
.viewer-meta { margin-top: 0.3rem; font-size: 0.8125rem; color: var(--ink-2); }
.viewer-cap-side { text-align: right; font-size: 0.75rem; color: var(--ink-3); line-height: 1.6; }
.viewer-demo { color: var(--ink-2); }
@media (max-width: 760px) {
  .viewer-cap-side { text-align: left; }
  .viewer-cap { gap: 0.5rem; }
  .viewer-cap-side p { display: inline; margin-right: 0.6rem; }
}

.viewer-rail {
  grid-column: 2; grid-row: 1 / span 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem;
  border-left: 1px solid var(--line-soft);
  padding-left: 0.75rem;
}
.rail-label { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.rail-btn {
  display: block;
  width: 68px; padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.16s var(--ease), transform 0.2s var(--ease);
}
.rail-btn img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; opacity: 0.55; transition: opacity 0.2s var(--ease); }
.rail-btn span {
  position: absolute; left: 0.3rem; bottom: 0.25rem;
  font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600;
  color: var(--ink); text-shadow: 0 1px 6px #000;
}
.rail-btn:hover { border-color: var(--ember); }
.rail-btn:hover img { opacity: 0.9; }
.rail-count {
  font-family: var(--font-display);
  font-size: 0.8125rem; line-height: 1.1; text-align: center;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.rail-count span { color: var(--ink-3); font-size: 0.6875rem; }
.viewer-hint {
  grid-column: 1; grid-row: 2;
  font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--ink-3);
  text-align: center;
}
@media (max-width: 900px) {
  .viewer-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; padding-top: 3.4rem; }
  .viewer-rail {
    grid-column: 1; grid-row: 2;
    flex-direction: row; justify-content: center;
    border-left: 0; border-top: 1px solid var(--line-soft);
    padding: 0.6rem 0 0;
  }
  .viewer-rail .rail-label, .viewer-rail .rail-count { display: none; }
  .rail-btn { width: 54px; }
  .viewer-hint { grid-row: 3; }
  .viewer-media { max-width: 100%; }
  .viewer-cap { max-width: 100%; }
}
@media (max-width: 420px) {
  .viewer-cap-side p { font-size: 0.6875rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .work-open:hover img { transform: none; }
}
