/* =========================================================
   FORMA · projekt demonstracyjny
   Ciepła biel, atrament, terakota. Kompozycja magazynu.
   ========================================================= */

:root {
  /* kolor */
  --paper: #f2eee7;
  --paper-2: #e9e3d9;
  --paper-3: #dcd4c6;
  --field: #faf8f4;
  --ink: #252721;
  --ink-2: #45473f;
  --muted: #66675e;
  --terra: #a64b32;
  --terra-deep: #8a3a25;
  --terra-light: #e3916f;
  --line: rgba(37, 39, 33, 0.18);
  --line-strong: rgba(37, 39, 33, 0.38);
  --on-ink: #f2eee7;
  --on-ink-soft: rgba(242, 238, 231, 0.74);
  --on-ink-line: rgba(242, 238, 231, 0.22);

  /* typografia */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --fs-label: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h3: clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem);
  --fs-h2: clamp(2.6rem, 1.3rem + 5.2vw, 7rem);

  /* przestrzeń */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2.5rem;
  --sp-7: 4rem;
  --sp-section: clamp(5rem, 11vw, 10rem);
  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(12px, 2vw, 28px);
  --header-h: 64px;

  /* ruch */
  --ease-out: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 160ms;
  --dur-2: 300ms;
  --dur-3: 560ms;

  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
section[tabindex="-1"]:focus, main:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}
.process :focus-visible { outline-color: var(--terra-light); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font: 600 var(--fs-small) / 1 var(--font-display);
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); font-size: 0.875em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.drawer__title:focus { outline: none; }

/* ---------- typografia wspólna ---------- */
.h2 {
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 620;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* linia redakcyjna: numer sekcji, nazwa, dopisek */
.rule {
  display: flex;
  gap: var(--sp-4);
  align-items: baseline;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--ink);
  font: 500 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rule__no { color: var(--terra); font-weight: 700; font-variant-numeric: tabular-nums; }
.rule__end { margin-left: auto; color: var(--muted); }
.rule--dark { border-top-color: var(--on-ink); }
.rule--dark .rule__no { color: var(--terra-light); }
.rule--dark .rule__end { color: var(--on-ink-soft); }

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 50px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.9375rem / 1 var(--font-display);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color var(--dur-2) var(--ease-out);
}
.btn:hover { background: var(--terra); }
.btn__arrow { display: inline-block; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }
a.btn:hover .btn__arrow { transform: translateY(3px); }
.btn--terra { background: var(--terra); }
.btn--terra:hover { background: var(--ink); }
.btn--small { min-height: 40px; padding: 0 1rem; font-size: var(--fs-small); }
.btn--wide { width: 100%; justify-content: center; }

.link-btn {
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font: 600 0.9375rem / 1 var(--font-display);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
  transition: text-decoration-color var(--dur-1), text-decoration-thickness var(--dur-1);
}
.link-btn:hover { text-decoration-color: var(--terra); text-decoration-thickness: 2px; }

.frame { position: relative; overflow: hidden; background: var(--paper-3); }

/* =========================================================
   NAGŁÓWEK
   ========================================================= */
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2);
}
.masthead.is-scrolled { border-bottom-color: var(--line); }
.masthead__inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark { width: 22px; height: 22px; flex: none; }
.brand__word {
  font: 780 1.0625rem / 1 var(--font-display);
  font-stretch: 125%;
  letter-spacing: 0.04em;
}
.nav { margin-left: auto; }
.nav__list { display: flex; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.7rem 0;
  font: 500 0.9375rem / 1 var(--font-display);
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.3rem;
  height: 2px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav__link:hover::after,
.nav__link[aria-current]::after { transform: scaleX(1); }
.masthead__cta { margin-left: clamp(1.25rem, 2.6vw, 2.5rem); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-left: auto;
  margin-right: -0.5rem;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  font: 600 var(--fs-small) / 1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.menu-toggle__bars { display: grid; gap: 5px; width: 22px; }
.menu-toggle__bars span { display: block; height: 2px; background: currentColor; }
.menu-toggle__bars span:last-child { width: 14px; justify-self: end; }

@media (max-width: 860px) {
  .nav, .masthead__cta { display: none; }
  .menu-toggle { display: inline-flex; }
  :root { --header-h: 58px; }
}

/* =========================================================
   01 HERO
   ========================================================= */
.hero { position: relative; isolation: isolate; min-height: 760px; height: 100svh; color: #fffaf1; background: #39352d; overflow: hidden; }
.hero__frame { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; transform: scale(1.055); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(18,20,15,.45),transparent 30%),linear-gradient(90deg,rgba(23,23,18,.46),transparent 78%),linear-gradient(0deg,rgba(17,20,15,.68),transparent 60%); }
.hero__content { height: 100%; display: flex; flex-direction: column; padding-top: clamp(170px, 24svh, 290px); padding-bottom: 120px; }
.hero__eyebrow { font: 500 11px/1.5 var(--font-display); text-transform: uppercase; letter-spacing: .2em; margin-bottom: 28px; }
.hero__title { font: 300 clamp(68px,8.1vw,132px)/.98 var(--font-text); letter-spacing: -.055em; }
.hero__title em { font-weight: 300; }
.hero__bottom { margin-top: auto; padding-top: 44px; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero__lead { font: 400 clamp(17px,1.5vw,22px)/1.6 var(--font-text); max-width: 33ch; }
.hero__explore { display: flex; align-items: center; gap: 38px; text-decoration: none; font: 500 14px/1.3 var(--font-display); padding: 12px 0; }
.hero__arrow { display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid #ffffff80; border-radius: 50%; font-size: 26px; transition: background .25s, color .25s, transform .25s; }
.hero__explore:hover .hero__arrow { background: var(--paper); color: var(--ink); transform: rotate(45deg); }
.hero__foot { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: space-between; gap: 24px; font: 400 10px/1.5 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
.hero__foot::before { content: ""; position: absolute; top: -21px; left: var(--gutter); right: var(--gutter); height: 1px; background: #ffffff45; }
.masthead.is-over-hero { color: #fffaf1; background: transparent; border-bottom-color: #ffffff30; }
.masthead.is-over-hero .masthead__cta { background: transparent; border: 1px solid #ffffff70; color: inherit; }
.masthead.is-over-hero .brand { color: inherit; }
.masthead.is-over-hero .brand__mark rect { fill: #dfb9a0; }
@media(max-width:760px) {
 .hero { min-height: 690px; }
 .hero__content { padding-top: 185px; padding-bottom: 110px; }
 .hero__title { font-size: clamp(56px,12vw,88px); }
 .hero__img { object-position: 58% center; }
 .hero__bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
 .hero__explore { gap: 24px; }
 .hero__arrow { width: 46px; height: 46px; }
 .hero__foot { font-size: 9px; }
 .hero__foot > span:nth-child(2) { display: none; }
}
@media(prefers-reduced-motion:no-preference) {
 .js .hero__frame { animation: hero-reveal 1.5s var(--ease-out) both; }
 .js .hero__title { animation: lift 1.2s var(--ease-out) .2s both; }
 .js .hero__eyebrow, .js .hero__bottom { animation: lift 1s var(--ease-out) .45s both; }
}
@keyframes hero-reveal { from { clip-path: inset(4% 3%); opacity: .3; } to { clip-path: inset(0); opacity: 1; } }
@keyframes lift { from { opacity: 0; transform: translateY(20px); } }

/* =========================================================
   SEKCJE
   ========================================================= */
.section { padding-block: var(--sp-section); }

/* ---------- 02 projekty ---------- */
.projects { padding-top: clamp(4rem, 8vw, 7rem); }
.projects__title { margin-bottom: clamp(3rem, 7vw, 6.5rem); }

.works {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(3.5rem, 8vw, 8rem);
}
.work--a { grid-column: 1 / span 7; }
.work--b { grid-column: 9 / span 4; margin-top: clamp(5rem, 17vw, 17rem); }
.works__note { grid-column: 1 / span 4; align-self: end; padding-bottom: 4.5rem; }
.work--c { grid-column: 5 / span 8; }

.work--a .work__frame { aspect-ratio: 4 / 5; }
.work--b .work__frame { aspect-ratio: 3 / 4; }
.work--c .work__frame { aspect-ratio: 3 / 2; }

.work__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.work__btn:focus-visible { outline-offset: 8px; }
.work__frame {
  display: block;
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--dur-3) var(--ease-out);
}
.work__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.work__meta {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  column-gap: var(--sp-3);
  row-gap: var(--sp-1);
  align-items: baseline;
  padding-top: var(--sp-4);
  font-family: var(--font-display);
}
.work__no {
  grid-row: 1 / span 2;
  color: var(--terra);
  font-size: var(--fs-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.work__name {
  font-size: clamp(1.45rem, 1rem + 1.35vw, 2.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.work__info { grid-column: 2; color: var(--muted); font-size: var(--fs-small); }
.work__open {
  grid-column: 3;
  grid-row: 1;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.work__arrow { display: inline-block; color: var(--terra); transition: transform var(--dur-2) var(--ease-out); }

/* hover: zdjęcie cofa się w passe-partout, jak odbitka na stole */
@media (hover: hover) {
  .work__btn:hover .work__frame { clip-path: inset(0.75rem 0.75rem 0.75rem 0.75rem); }
  .work__btn:hover .work__img { transform: scale(1.05); }
  .work__btn:hover .work__arrow { transform: translateX(4px); }
}

.works__note-big {
  font: 500 clamp(1.4rem, 1rem + 1.2vw, 2.05rem) / 1.15 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.works__note-big::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: var(--sp-5);
  background: var(--terra);
}
.works__note-small { margin-top: var(--sp-4); color: var(--muted); max-width: 34ch; }

@media (max-width: 1024px) {
  .work--a { grid-column: 1 / span 7; }
  .work--b { grid-column: 8 / span 5; }
  .works__note { grid-column: 1 / span 5; }
  .work--c { grid-column: 6 / span 7; }
}
@media (max-width: 760px) {
  .works { display: flex; flex-direction: column; row-gap: clamp(3rem, 12vw, 4rem); }
  .work--b { margin-top: 0; margin-left: 18%; }
  .works__note { order: 4; padding-bottom: 0; }
  .work__open { display: none; }
  .work__meta { grid-template-columns: 2.25rem minmax(0, 1fr); }
}

/* ---------- 03 filozofia ---------- */
.philosophy__intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}
.philosophy__intro .h2 { grid-column: 1 / span 7; }
.philosophy__lead {
  grid-column: 9 / span 4;
  color: var(--ink-2);
  font-size: var(--fs-lead);
  line-height: 1.45;
}
@media (max-width: 860px) {
  .philosophy__intro { display: block; }
  .philosophy__lead { margin-top: var(--sp-5); max-width: 36ch; }
}

/* Dwa ostre kadry: detal materiału i wnętrze. */
.scene { margin-block: clamp(3rem,7vw,6.5rem); }
.scene__stage { position: relative; margin-inline: auto; }
.scene__window { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--paper-3); }
.scene__img, .scene__detail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene__detail { display: none; }
.scene__label, .scene__progress { display: none; }
.scene__captions { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 24px var(--gutter); }
.scene__cap-no { display: block; font: 500 11px/1.4 var(--font-display); letter-spacing: .13em; text-transform: uppercase; margin-bottom: 15px; }
.scene__cap-text { font: 400 clamp(28px,3.6vw,56px)/1.1 var(--font-text); letter-spacing: -.035em; }
.scene.is-live { height: 220svh; }
.scene.is-live .scene__stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden; color: #fffaf1; }
.scene.is-live .scene__window { position: absolute; inset: 0; aspect-ratio: auto; }
.scene.is-live .scene__window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#161810a6,transparent 60%),linear-gradient(180deg,#16181038,transparent 30%); }
.scene.is-live .scene__detail { display: block; opacity: calc(1 - var(--reveal,0)); }
.scene.is-live .scene__label { display: block; position: absolute; top: 32px; left: var(--gutter); font: 500 11px/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .12em; }
.scene.is-live .scene__captions { position: absolute; bottom: 70px; left: var(--gutter); right: var(--gutter); padding: 0; display: grid; }
.scene.is-live .scene__cap { grid-area: 1/1; opacity: 0; visibility: hidden; transition: opacity .35s; }
.scene.is-live .scene__cap.is-active { opacity: 1; visibility: visible; }
.scene.is-live .scene__progress { display: block; position: absolute; bottom: 36px; left: var(--gutter); width: 110px; height: 2px; background: #ffffff50; }
.scene__progress span { display: block; height: 100%; background: #fffaf1; transform-origin: left; transform: scaleX(var(--progress,0)); }
@media(max-width:760px) { .scene__window { aspect-ratio:4/5; } .scene__captions { grid-template-columns:1fr; } .scene.is-live { height:190svh; } .scene__cap-text { font-size:38px; } }

/* ---------- materiały ---------- */
.materials {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.materials__head {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
}
.materials__head p { margin-top: var(--sp-4); color: var(--muted); max-width: 32ch; }
.materials__list { grid-column: 6 / span 7; border-bottom: 1px solid var(--line-strong); }
.material {
  display: grid;
  grid-template-columns: 2rem 3.25rem minmax(0, 1fr);
  grid-template-areas: "no sw name" "no sw text";
  column-gap: var(--sp-4);
  row-gap: var(--sp-1);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line-strong);
}
.material__no {
  grid-area: no;
  padding-top: 0.45rem;
  color: var(--terra);
  font: 700 var(--fs-small) / 1 var(--font-display);
}
.material__swatch {
  grid-area: sw;
  width: 3.25rem;
  height: 3.25rem;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(37, 39, 33, 0.12);
}
.material__name {
  grid-area: name;
  font: 600 clamp(1.4rem, 1.05rem + 1.1vw, 2.1rem) / 1.1 var(--font-display);
  letter-spacing: -0.02em;
}
.material__text { grid-area: text; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 860px) {
  .materials { display: block; }
  .materials__head { position: static; margin-bottom: var(--sp-6); }
  .material { grid-template-columns: 2.75rem minmax(0, 1fr); grid-template-areas: "sw name" "sw text"; }
  .material__no { display: none; }
  .material__swatch { width: 2.75rem; height: 2.75rem; }
}

/* ---------- 04 proces ---------- */
.process { background: var(--ink); color: var(--on-ink); }
.process__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
}
.process__aside {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--sp-6));
}
.process .h2 { margin-top: 0; }
.process__lead { margin-top: var(--sp-5); color: var(--on-ink-soft); max-width: 32ch; }
.counter {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  margin-top: clamp(2rem, 5vw, 4.5rem);
  font-family: var(--font-display);
}
.counter__track { display: block; overflow: hidden; height: 0.86em; font-size: clamp(5rem, 3rem + 7vw, 10.5rem); line-height: 0.86; }
.counter__num {
  display: block;
  font-weight: 760;
  font-stretch: 125%;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.counter__total { padding-bottom: 0.4rem; color: var(--on-ink-soft); font-size: 1.25rem; font-weight: 500; }
.process__bar { height: 2px; margin-top: var(--sp-5); background: var(--on-ink-line); }
.process__bar span {
  display: block;
  height: 100%;
  width: var(--progress, 20%);
  background: var(--terra-light);
  transition: width var(--dur-3) var(--ease-out);
}

.steps { grid-column: 6 / span 7; border-bottom: 1px solid var(--on-ink-line); }
.step { border-top: 1px solid var(--on-ink-line); }
.step__h { font: inherit; }
.step__head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto 1.5rem;
  align-items: center;
  column-gap: var(--sp-4);
  width: 100%;
  min-height: 72px;
  padding: var(--sp-5) 0;
  border: 0;
  background: none;
  color: var(--on-ink);
  text-align: left;
  font-family: var(--font-display);
}
.step__no { color: var(--terra-light); font-size: var(--fs-small); font-weight: 700; font-variant-numeric: tabular-nums; }
.step__name {
  font-size: clamp(1.45rem, 1rem + 1.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  transition: transform var(--dur-2) var(--ease-out);
}
.step__time { color: var(--on-ink-soft); font-size: var(--fs-small); white-space: nowrap; }
.step__icon { position: relative; width: 1.25rem; height: 1.25rem; justify-self: end; }
.step__icon::before, .step__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease-out);
}
.step__icon::after { transform: rotate(90deg); }
.step.is-open .step__icon::after { transform: rotate(0deg); }
@media (hover: hover) {
  .step__head:hover .step__name { transform: translateX(0.4rem); }
}

.step__panel {
  display: grid;
  grid-template-rows: 1fr;
}
.js .step__panel {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
}
.js .step.is-open .step__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows var(--dur-3) var(--ease-out), visibility 0s;
}
.step__body { min-height: 0; overflow: hidden; padding-left: calc(3rem + var(--sp-4)); }
.step__body > p:first-child { max-width: 44ch; font-size: var(--fs-lead); line-height: 1.45; }
.step__out-label {
  margin-top: var(--sp-5);
  color: var(--on-ink-soft);
  font: 600 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.step__out { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-6); }
.step__out li {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--on-ink-line);
  font: 500 var(--fs-small) / 1.3 var(--font-display);
}

@media (max-width: 860px) {
  .process__grid { display: block; }
  .process__aside { position: static; margin-bottom: var(--sp-6); }
  .counter { display: none; }
  .process__bar { display: none; }
  .step__head { grid-template-columns: 2.25rem minmax(0, 1fr) 1.25rem; row-gap: var(--sp-1); }
  .step__time { grid-column: 2; grid-row: 2; }
  .step__icon { grid-column: 3; grid-row: 1 / span 2; }
  .step__body { padding-left: calc(2.25rem + var(--sp-4)); }
}

/* ---------- 05 kontakt ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
  align-items: end;
}
.contact__title {
  grid-column: 1 / span 7;
  font: 620 clamp(3rem, 1.2rem + 6.4vw, 8.25rem) / 0.9 var(--font-display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.contact__side { grid-column: 9 / span 4; display: grid; gap: var(--sp-5); justify-items: start; }
.contact__lead { color: var(--ink-2); }
.contact__facts {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
  margin-top: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-strong);
}
.contact__facts dt {
  color: var(--muted);
  font: 600 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact__facts dd { font: 500 1rem / 1.4 var(--font-display); }
@media (max-width: 860px) {
  .contact__grid { display: block; }
  .contact__side { margin-top: var(--sp-6); }
}

/* ---------- stopka ---------- */
.footer { overflow: hidden; padding-top: var(--sp-6); }
.footer__word {
  height: 0.62em;
  overflow: hidden;
  font: 780 var(--word-fs, clamp(64px, 19vw, 320px)) / 0.84 var(--font-display);
  font-stretch: 125%;
  letter-spacing: -0.045em;
  white-space: nowrap;
  user-select: none;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-6);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--ink);
  font: 500 var(--fs-small) / 1.4 var(--font-display);
}
.footer__note { color: var(--muted); }
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  margin-left: auto;
  font-weight: 600;
  text-underline-offset: 0.3em;
}
.footer__top:hover { color: var(--terra); }

/* =========================================================
   DIALOGI (wspólne)
   ========================================================= */
dialog {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  inset: 0;
  color: var(--ink);
  background: transparent;
  overscroll-behavior: contain;
}
dialog::backdrop { background: transparent; }

.sheet__close {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  font: 600 var(--fs-small) / 1 var(--font-display);
  transition: background-color var(--dur-1), color var(--dur-1);
}
.sheet__close:hover { background: var(--ink); color: var(--paper); }

/* ---------- menu mobilne ---------- */
.menu {
  display: none;
  flex-direction: column;
  background: var(--paper);
  padding: 0 var(--gutter) var(--gutter);
  overflow-y: auto;
}
.menu[open] { display: flex; }
.menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.brand--static { min-height: 0; }
.menu__close {
  min-height: 44px;
  margin-right: -0.5rem;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  font: 600 var(--fs-small) / 1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.menu__list { display: grid; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
  font: 620 clamp(2.4rem, 11vw, 4.5rem) / 1 var(--font-display);
  letter-spacing: -0.035em;
  text-decoration: none;
}
.menu__no { color: var(--terra); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0; }
.menu__foot { margin-top: auto; padding-top: var(--sp-6); color: var(--muted); font: 500 var(--fs-small) / 1.4 var(--font-display); }

/* ---------- dialog projektu ---------- */
.sheet { background: var(--paper); overflow: hidden; }
.sheet::backdrop { background: transparent; }
.sheet__ghost {
  position: fixed;
  z-index: 5;
  display: none;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper-3);
}
.sheet__ghost img { width: 100%; height: 100%; object-fit: cover; }
.sheet__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  height: 100%;
}
.sheet__media {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
  padding: var(--gutter) 0 var(--gutter) var(--gutter);
}
.sheet__frame { flex: 1; min-height: 0; }
.sheet__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet__caption {
  color: var(--muted);
  font: 500 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sheet__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--gutter) var(--gutter) var(--gutter) clamp(1.5rem, 4vw, 4.5rem);
}
.sheet__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.sheet__count {
  font: 600 var(--fs-small) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.sheet__content { flex: 1; margin-top: clamp(2rem, 7vh, 5.5rem); }
.sheet__type {
  color: var(--terra);
  font: 600 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sheet__title {
  margin: var(--sp-3) 0 var(--sp-6);
  font: 620 clamp(2.4rem, 1.3rem + 3.4vw, 4.75rem) / 0.94 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.sheet__title:focus { outline: none; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  border-top: 1px solid var(--line-strong);
}
.facts > div { padding-block: var(--sp-3); border-bottom: 1px solid var(--line); }
.facts dt {
  color: var(--muted);
  font: 600 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.facts dd { margin-top: 0.15rem; font: 500 1rem / 1.35 var(--font-display); }
.sheet__text { margin-top: var(--sp-6); max-width: 46ch; }
.sheet__text p + p { margin-top: var(--sp-4); }
.sheet__text p:first-child { font-size: var(--fs-lead); line-height: 1.45; }
.sheet__sub {
  margin-top: var(--sp-6);
  font: 600 var(--fs-label) / 1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.swatches { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-3); }
.swatches li { display: flex; align-items: center; gap: 0.6rem; font: 500 var(--fs-small) / 1.2 var(--font-display); }
.swatches i { display: block; width: 26px; height: 26px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(37, 39, 33, 0.14); }
.sheet__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-strong);
}
.sheet__step {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 var(--fs-small) / 1.2 var(--font-display);
  text-align: left;
  transition: color var(--dur-1);
}
.sheet__step:last-child { text-align: right; }
.sheet__step:hover { color: var(--terra); }

@media (max-width: 860px) {
  .sheet { overflow-y: auto; }
  .sheet__layout { display: flex; flex-direction: column; height: auto; min-height: 100%; }
  .sheet__body { display: contents; }
  .sheet__bar {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 3;
    padding: var(--sp-2) var(--gutter);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .sheet__media { padding: var(--gutter) var(--gutter) 0; }
  .sheet__frame { flex: none; aspect-ratio: 4 / 3.4; }
  .sheet__content { margin-top: var(--sp-6); padding-inline: var(--gutter); }
  .sheet__nav { margin: var(--sp-6) var(--gutter) var(--gutter); }
}

/* ---------- dialog kontaktu (panel boczny) ---------- */
.drawer { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.drawer[open] { display: block; }
.drawer__scrim { position: fixed; inset: 0; background: rgba(37, 39, 33, 0.52); }
.drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(36rem, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-5) var(--gutter) var(--gutter);
  background: var(--paper);
}
.drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.drawer__title { font: 620 clamp(1.5rem, 1.2rem + 1vw, 2rem) / 1.05 var(--font-display); letter-spacing: -0.02em; }
.notice {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--paper-2);
  font-size: 0.98rem;
  line-height: 1.5;
}
.notice::before { content: ""; width: 12px; height: 12px; margin-top: 0.45em; background: var(--terra); }

.field { margin: 0 0 var(--sp-5); padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
  display: block;
  margin-bottom: var(--sp-2);
  padding: 0;
  font: 600 var(--fs-small) / 1.3 var(--font-display);
}
.field input, .field textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--field);
  font: 400 1.0625rem / 1.45 var(--font-text);
  transition: border-color var(--dur-1);
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--terra); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--terra-deep); }
.field__err { margin-top: var(--sp-2); color: var(--terra-deep); font: 600 var(--fs-small) / 1.35 var(--font-display); }
.field__err:empty { display: none; }

.choices { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  font: 500 var(--fs-small) / 1 var(--font-display);
  cursor: pointer;
  transition: background-color var(--dur-1), color var(--dur-1), border-color var(--dur-1);
}
.choice span:hover { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--terra); outline-offset: 2px; }
.form__hint { margin-top: var(--sp-3); color: var(--muted); font: 500 var(--fs-small) / 1.4 var(--font-display); }

.result { padding: var(--sp-5); background: var(--paper-2); }
.result:focus { outline: none; }
.result__title { margin-bottom: var(--sp-3); font: 620 1.5rem / 1.15 var(--font-display); letter-spacing: -0.015em; }
.result__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-5); }

/* =========================================================
   Ograniczony ruch: bez przemieszczeń, wynik bez zmian
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
