/* B-ART — koncepcja 07 „Pracownia w stodole” */
:root {
  --paper: #ECE2CC;
  --paper-2: #E2D4B6;
  --ink: #2B1F17;
  --pencil: #6E6253;
  --barn: #8B2E24;
  --barn-dark: #5E1E18;
  --oak: #B5803F;
  --pine: #D8B784;
  --polaroid: #FAF6EC;
  --grid: rgba(72, 96, 122, .12);
  --margin-x: clamp(1.25rem, 6vw, 6rem);

  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-text: "Literata", Georgia, serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .17 0 0 0 0 .08 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  margin: 0;
  background-color: var(--paper);
  background-image:
    var(--noise),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 220px 220px, 24px 24px, 24px 24px;
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}
/* czerwony margines zeszytu */
body::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--margin-x) * .55);
  width: 1.5px; background: rgba(139, 46, 36, .35); pointer-events: none; z-index: 0;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--barn); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: 72%;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: .98;
  margin: 0;
}
h2 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); }
h3 { font-size: 1.45rem; font-stretch: 80%; font-weight: 750; line-height: 1.1; }
p { margin: 0 0 1em; }
.hand { font-family: var(--f-hand); font-weight: 600; line-height: 1.1; color: var(--barn); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.link {
  font-family: var(--f-display); font-stretch: 85%; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; border-bottom: 2px solid var(--barn); padding-bottom: 1px;
}
.link:hover { color: var(--barn); }

/* ---------- logo: wypalony stempel ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: .18em;
  font-family: var(--f-display); font-weight: 900; font-stretch: 62%;
  font-size: 1.9rem; line-height: 1; letter-spacing: .02em;
  color: var(--barn); text-decoration: none;
  padding: .22em .42em .2em;
  border: 2.5px solid currentColor;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4.5px currentColor;
  transform: rotate(-2.5deg);
  background: transparent;
}
.stamp__dash { width: .38em; height: .16em; background: currentColor; transform: skewX(-25deg); margin: 0 .04em; }
.stamp--small { font-size: 1.4rem; }

.top {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.1rem var(--margin-x);
}
.top__nav { display: flex; gap: clamp(.9rem, 2.2vw, 2.2rem); }
.top__nav a {
  font-family: var(--f-display); font-stretch: 85%; font-weight: 650; font-size: 1rem;
  text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent;
}
.top__nav a:hover { border-bottom-color: var(--barn); }

/* ---------- plansze przypinane ---------- */
.pin { position: relative; z-index: 1; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

/* ---------- 1. HERO ---------- */
.hero { height: 260vh; margin-top: -4.5rem; }
.hero__stage {
  display: grid;
  grid-template-columns: minmax(0, 37fr) minmax(0, 63fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 5rem var(--margin-x) 2rem;
}
.hero__where { font-size: 1.6rem; margin-bottom: .6rem; transform: rotate(-2deg); transform-origin: left; }
.hero__title { font-size: clamp(3.2rem, 7.4vw, 7.6rem); font-stretch: 64%; font-weight: 850; line-height: .9; margin-bottom: 1.6rem; }
.hero__line { display: block; }
.hero__line--new {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.hero__line--new::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--barn); -webkit-text-stroke: 0;
  clip-path: inset(0 calc((1 - var(--d, 0)) * 100%) 0 0);
}
.hero__lead { max-width: 34ch; font-size: 1.08rem; }
.hero__hint { opacity: calc(1 - var(--d, 0) * 2); display: flex; align-items: flex-end; gap: .4rem; font-size: 1.45rem; color: var(--pencil); margin-top: 1.4rem; }
.hero__hint svg { width: 74px; flex: none; fill: none; stroke: var(--pencil); stroke-width: 2.2; stroke-linecap: round; transform: translateY(-4px); }

.hero__photo { margin: 0; justify-self: end; width: 100%; max-width: 900px; }
.hero__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: calc(100svh - 12rem);
  margin-left: auto;
  background: var(--polaroid);
  padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 22px 40px -18px rgba(43,31,23,.55);
  transform: rotate(1.2deg);
}
.hero__frame img {
  position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px);
  object-fit: cover;
}
.hero__after { clip-path: inset(0 calc((1 - var(--d, 0)) * 100%) 0 0); }
.hero__door {
  position: absolute; top: 4px; bottom: 4px;
  left: calc(12px + (100% - 24px) * var(--d, 0));
  width: 26px; margin-left: -13px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.25), transparent 30%, transparent 70%, rgba(0,0,0,.3)),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(0,0,0,.25) 46px 48px),
    var(--barn);
  box-shadow: 6px 0 14px rgba(0,0,0,.35), -6px 0 14px rgba(0,0,0,.25);
  opacity: calc(var(--door-on, 1));
}
.hero__door span { position: absolute; left: 50%; top: 50%; width: 6px; height: 38px; margin: -19px 0 0 -3px; border-radius: 3px; background: #2a2019; }

.tape {
  position: absolute; width: 120px; height: 32px; z-index: 3;
  background: rgba(226, 210, 166, .82);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.tape--tl { top: -14px; left: -30px; transform: rotate(-32deg); }
.tape--br { bottom: -12px; right: -28px; transform: rotate(-28deg); }

.hero__cap { position: relative; height: 2.2rem; margin-top: 1.2rem; font-size: 1.55rem; text-align: right; }
.hero__cap span { position: absolute; right: 0; top: 0; transition: opacity .4s; }
.hero__cap-b { opacity: 0; }
.hero.is-after .hero__cap-a { opacity: 0; }
.hero.is-after .hero__cap-b { opacity: 1; }

/* ---------- co robimy ---------- */
.lines { position: relative; z-index: 1; padding: clamp(2rem, 5vw, 4rem) var(--margin-x) clamp(2rem, 5vw, 4rem); }
.lines__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  max-width: 1100px; margin: 0 auto;
}
.line-card h3 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); font-stretch: 70%; font-weight: 800; margin-bottom: .8rem; }
.line-card p { max-width: 46ch; }
.lines__note { grid-column: 1 / -1; font-size: 1.7rem; text-align: center; transform: rotate(-1.5deg); margin: 1rem 0 0; }

/* ---------- 2. DZIENNIK ---------- */
.diary { height: 480vh; }
.diary__stage {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: 3rem var(--margin-x);
}
.diary__text { position: relative; padding-left: 2.6rem; }
.diary__text h2 { margin-bottom: .9rem; margin-left: -2.6rem; }
.diary__intro { max-width: 44ch; margin-left: -2.6rem; margin-bottom: 1.6rem; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline__item { position: relative; padding: .35rem 0 .55rem; opacity: .42; transition: opacity .45s; }
.timeline__item::before {
  content: ""; position: absolute; left: -2.6rem; top: .72rem; width: 14px; height: 14px;
  margin-left: 2px; border-radius: 50%; background: var(--paper); border: 2px solid var(--pencil);
  transition: background .3s, border-color .3s;
}
.timeline__item .hand { font-size: 1.65rem; display: block; color: var(--ink); }
.timeline__item p { font-size: .95rem; max-width: 42ch; margin: .1rem 0 0; line-height: 1.5; }
.timeline__item.is-on { opacity: 1; }
.timeline__item.is-on::before { background: var(--barn); border-color: var(--barn); }
.timeline__item.is-on .hand { color: var(--barn); }
.timeline__track {
  position: absolute; left: 8px; width: 2px; bottom: 1.4rem;
  top: var(--tl-top, 50%);
  background: repeating-linear-gradient(180deg, var(--pencil) 0 5px, transparent 5px 10px);
  opacity: .6;
}
.timeline__fill {
  position: absolute; inset: 0; background: var(--barn);
  transform-origin: top; transform: scaleY(var(--p, 0));
}

.diary__stack { position: relative; height: min(78vh, 720px); }
.polaroid {
  position: absolute; left: 50%; top: 50%;
  width: min(33vw, 460px, 58vh);
  margin: 0; padding: 14px 14px 0;
  background: var(--polaroid);
  box-shadow: 0 2px 2px rgba(0,0,0,.06), 0 24px 40px -16px rgba(43,31,23,.55);
  transform: translate(calc(-50% + var(--x)), 130vh) rotate(calc(var(--r) * 3));
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.polaroid img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; filter: saturate(.85) contrast(1.02); }
.polaroid figcaption { font-size: 1.6rem; color: var(--ink); padding: .5rem .3rem .8rem; text-align: center; }
.polaroid.is-on { transform: translate(calc(-50% + var(--x)), -50%) rotate(var(--r)); }
.polaroid[data-i="0"] { transform: translate(calc(-50% + var(--x)), -50%) rotate(var(--r)); }

/* ---------- gatunki drewna ---------- */
.woods { position: relative; z-index: 1; padding: clamp(5rem, 10vw, 8rem) var(--margin-x); }
.woods__head { max-width: 1100px; margin: 0 auto 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; }
.woods__head p { max-width: 42ch; margin: 0; }
.woods__list { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
.wood h3 { margin: 1.2rem 0 .5rem; font-size: 1.8rem; font-stretch: 70%; }
.wood p { font-size: .98rem; }
.wood .wood__use { font-size: 1.5rem; margin-top: -.3rem; }
.wood__sample {
  position: relative; aspect-ratio: 5 / 3; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 14px 22px -14px rgba(43,31,23,.6);
  background-blend-mode: multiply, normal, normal;
}
.wood__sample span {
  position: absolute; left: 1rem; bottom: .8rem;
  background: rgba(250,246,236,.92); padding: .1rem .7rem .25rem; font-size: 1.6rem; color: var(--ink);
  transform: rotate(-3deg);
  clip-path: polygon(2% 0, 98% 3%, 100% 100%, 0 96%);
}
.wood__sample { background-size: 100% 100%, 100% 100%, 100% 100%, auto; }
.wood--oak .wood__sample {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.0025 0.05' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.2 0 0 0 0 0.07 -3.2 0 0 0 1.05'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.002 0.012' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.27 0 0 0 0 0.1 -2 0 0 0 0.8'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(100deg, rgba(255,230,180,.18), transparent 45%, rgba(60,30,10,.18)),
    #C28E4D;
  background-size: 100% 100%;
}
.wood--ash .wood__sample {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.002 0.035' numOctaves='3' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.34 0 0 0 0 0.2 -3 0 0 0 0.95'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.0015 0.01' numOctaves='3' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.42 0 0 0 0 0.25 -1.6 0 0 0 0.6'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(100deg, rgba(255,250,235,.25), transparent 50%, rgba(80,60,30,.12)),
    #DDC69E;
  background-size: 100% 100%;
}
.wood--walnut .wood__sample {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.003 0.06' numOctaves='3' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0 0.02 -3.2 0 0 0 1.1'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='360' preserveAspectRatio='none'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.002 0.014' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.1 0 0 0 0 0.05 -2 0 0 0 0.85'/%3E%3C/filter%3E%3Crect width='600' height='360' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, transparent 0 74%, rgba(196,160,112,.9) 86%, #d4b07c 100%),
    #5E3D27;
  background-size: 100% 100%;
}

/* ---------- 3. MASZYNA I RĘKA ---------- */
.split { height: 280vh; }
.split__stage { background: #1d1611; --x: 82; }
.split__machine, .split__hand {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.split__machine { object-position: 30% 45%; }
.split__hand-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 calc(var(--x) * 1%)); }
.split__hand { object-position: 50% 38%; transform: scale(1.07); }
.split__bar {
  position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 1%);
  width: 3px; margin-left: -1.5px; background: var(--polaroid);
  box-shadow: 0 0 18px rgba(0,0,0,.45);
}
.split__knob {
  position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: var(--barn); border: 3px solid var(--polaroid);
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.split__knob svg { width: 24px; fill: none; stroke: var(--polaroid); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.scrap {
  position: absolute; z-index: 2;
  background-color: var(--paper);
  background-image: var(--noise);
  padding: 1rem 1.3rem;
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.6);
  clip-path: polygon(0 2%, 3% 0, 97% 1%, 100% 4%, 99% 97%, 96% 100%, 2% 99%, 0 95%);
}
.split__title { top: 2.2rem; left: var(--margin-x); transform: rotate(-1.5deg); padding: .8rem 1.4rem .7rem; }
.split__title h2 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); }
.split__note { bottom: 2.5rem; max-width: 330px; font-size: .95rem; line-height: 1.5; }
.split__note p { margin: 0; }
.split__note .hand { font-size: 1.9rem; margin-bottom: .25rem; }
.split__note--l { left: var(--margin-x); transform: rotate(1deg); opacity: calc(1.3 - var(--p, 0) * 1.6); }
.split__note--r { right: var(--margin-x); transform: rotate(-1.2deg); opacity: calc(var(--p, 0) * 1.8 - .3); }

/* ---------- proces ---------- */
.process { position: relative; z-index: 1; padding: clamp(5rem, 10vw, 8rem) var(--margin-x) clamp(3rem, 6vw, 5rem); max-width: 1300px; margin: 0 auto; }
.process h2 { margin-bottom: 2.5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.6rem; counter-reset: s; }
.steps li { position: relative; padding-top: 1rem; border-top: 2px dashed rgba(110, 98, 83, .55); }
.steps__n {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .6rem;
  font-size: 1.9rem; border: 2px solid var(--barn); border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-6deg);
}
.steps h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.steps p { font-size: .95rem; line-height: 1.5; margin: 0; }

/* ---------- 4. PÓŁKA ---------- */
.shelf { height: 400vh; }
.shelf__stage {
  background:
    var(--noise),
    linear-gradient(90deg, rgba(0,0,0,.0) 0, rgba(0,0,0,0) 100%),
    repeating-linear-gradient(90deg,
      #d9b886 0 118px, #cfa974 118px 120px, #6e4f2f 120px 123px,
      #dcbd8c 123px 232px, #caa46e 232px 234px, #6e4f2f 234px 237px,
      #d4b07b 237px 360px, #6e4f2f 360px 363px);
  display: flex; flex-direction: column; justify-content: center;
}
.shelf__stage::before { /* delikatne słoje sosny */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(92deg, transparent 0 22px, rgba(120,80,40,.10) 22px 23px, transparent 23px 51px);
  mix-blend-mode: multiply;
}
.shelf__head {
  position: absolute; top: 2rem; left: var(--margin-x); z-index: 3;
  background-color: var(--paper); background-image: var(--noise);
  padding: .9rem 1.4rem 1rem; max-width: 520px; transform: rotate(-1deg);
  box-shadow: 0 14px 24px -14px rgba(0,0,0,.55);
}
.shelf__head h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
.shelf__head .hand { font-size: 1.35rem; margin: .4rem 0 0; color: var(--pencil); }
.shelf__track {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: clamp(2rem, 4vw, 4rem);
  padding: 7.5rem var(--margin-x) 2rem calc(var(--margin-x) + 560px);
  width: max-content;
  transform: translate3d(calc(var(--shift, 0) * -1px), 0, 0);
  will-change: transform;
}
.pin-photo {
  position: relative; margin: 0; flex: none;
  width: clamp(220px, 21vw, 300px);
  background: var(--polaroid); padding: 12px 12px 0;
  transform: rotate(var(--r));
  box-shadow: 0 2px 2px rgba(0,0,0,.08), 0 20px 30px -14px rgba(40,24,10,.65);
}
.pin-photo:nth-child(odd) { margin-top: 3.5rem; }
.pin-photo::before { /* pinezka */
  content: ""; position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; z-index: 2;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e0796c 0 18%, var(--barn) 45%, var(--barn-dark) 100%);
  box-shadow: 2px 4px 4px rgba(0,0,0,.35);
}
.pin-photo img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; }
.pin-photo figcaption { font-size: 1.45rem; color: var(--ink); padding: .45rem .2rem .75rem; text-align: center; line-height: 1.05; }
.card-note {
  flex: none; width: 260px; padding: 1.3rem 1.4rem 1.2rem;
  background-color: #f3ead4; background-image: var(--noise);
  box-shadow: 0 18px 26px -14px rgba(40,24,10,.6);
  transform: rotate(-2deg);
  font-size: .95rem; line-height: 1.5;
}
.card-note .hand { font-size: 2.4rem; margin-bottom: .4rem; }
.card-note p:last-child { margin-bottom: 0; }
.card-note--wall { transform: rotate(2deg); }
.card-note--end { width: 290px; }
.card-note--end .link { display: inline-block; margin-top: .4rem; }
.shelf__board {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; z-index: 1;
  background: linear-gradient(180deg, #7a5532, #5b3d22 60%, #3c2814);
  box-shadow: 0 -6px 14px rgba(0,0,0,.25);
}

/* ---------- zamówienia ---------- */
.orders {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4rem, 8vw, 6rem) var(--margin-x); max-width: 1400px; margin: 0 auto; align-items: center;
}
.orders__text h2 { margin-bottom: 1.2rem; }
.orders__text > p { max-width: 46ch; }
.checklist { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.checklist li { position: relative; padding: .35rem 0 .35rem 2.2rem; border-bottom: 1px solid rgba(110,98,83,.25); }
.checklist li::before {
  content: ""; position: absolute; left: .2rem; top: .65rem; width: 1.2rem; height: .65rem;
  border-left: 2.5px solid var(--barn); border-bottom: 2.5px solid var(--barn);
  transform: rotate(-48deg); border-radius: 0 0 0 2px;
}
.orders__board { position: relative; height: min(700px, 80vh); min-height: 480px; }
.taped { position: absolute; margin: 0; background: var(--polaroid); padding: 10px 10px 0; box-shadow: 0 20px 30px -16px rgba(43,31,23,.6); }
.taped img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.taped figcaption { font-size: 1.35rem; padding: .4rem .2rem .6rem; text-align: center; color: var(--ink); }
.taped::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px;
  background: rgba(226,210,166,.85); transform: rotate(-4deg);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.taped--a { width: 44%; left: 0; top: 3%; transform: rotate(-4deg); z-index: 2; }
.taped--b { width: 42%; left: 40%; top: 42%; transform: rotate(3deg); z-index: 3; }
.taped--c { width: 35%; right: 0; top: 0; transform: rotate(-2deg); z-index: 4; }

/* ---------- kontakt: czerwone wrota ---------- */
.contact {
  position: relative; z-index: 1;
  padding: clamp(4rem, 9vw, 7rem) var(--margin-x);
  background:
    var(--noise),
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(0,0,0,.35) 140px 143px, transparent 143px 146px),
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.25)),
    var(--barn);
}
.contact::before { /* poprzeczka wrót */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 64px; margin-top: -32px;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(255,255,255,.04) 20%, rgba(0,0,0,.08) 80%, rgba(0,0,0,.3));
  pointer-events: none;
}
.contact__card {
  position: relative; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  background-color: var(--paper);
  background-image: var(--noise), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 220px 220px, 24px 24px, 24px 24px;
  padding: clamp(1.8rem, 4vw, 3.5rem);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transform: rotate(-.6deg);
}
.contact__info h2 { font-size: clamp(2.2rem, 4.4vw, 4rem); margin-bottom: 1.2rem; }
.contact__info h2 .hand { display: block; font-family: var(--f-hand); font-stretch: 100%; font-weight: 600; letter-spacing: 0; font-size: .55em; line-height: 1.1; margin-top: .35rem; transform: rotate(-1.5deg); transform-origin: left; }
.contact__list { margin: 1.6rem 0 0; }
.contact__list div { display: grid; grid-template-columns: 7rem 1fr; padding: .5rem 0; border-bottom: 1px solid rgba(110,98,83,.3); }
.contact__list dt { font-family: var(--f-display); font-stretch: 85%; font-weight: 700; }
.contact__list dd { margin: 0; }
.form { display: grid; gap: .9rem; align-content: start; }
.form__title { font-size: 2rem; margin: 0 0 .2rem; transform: rotate(-2deg); transform-origin: left; }
.form label { display: grid; gap: .25rem; font-family: var(--f-display); font-stretch: 85%; font-weight: 650; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-family: var(--f-text); font-weight: 400; font-size: 1rem;
  color: var(--ink); background: rgba(250,246,236,.7);
  border: 0; border-bottom: 2px solid var(--pencil); border-radius: 0;
  padding: .55rem .6rem; width: 100%;
}
.form textarea { resize: vertical; border: 2px solid rgba(110,98,83,.6); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--barn); background: var(--polaroid); }
.btn {
  justify-self: start; margin-top: .4rem; cursor: pointer;
  font-family: var(--f-display); font-stretch: 80%; font-weight: 800; font-size: 1.15rem;
  color: var(--polaroid); background: var(--ink); border: 0; padding: .8rem 1.6rem;
  box-shadow: 4px 4px 0 var(--barn);
}
.btn:hover { background: var(--barn); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.form__msg { font-size: 1.45rem; min-height: 1.6rem; margin: 0; }

/* ---------- stopka ---------- */
.foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  padding: 2.4rem var(--margin-x); font-size: .92rem;
}
.foot p { margin: 0; }
.foot__meta { margin-left: auto !important; color: var(--pencil); }

/* ---------- tablet / mobile ---------- */
@media (max-width: 1000px) {
  .top__nav a:nth-child(1) { display: none; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 2.2rem; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  body::before { display: none; }
  .top { padding: .8rem 1.1rem; }
  .stamp { font-size: 1.5rem; }
  .top__nav { gap: .8rem; }
  .top__nav a { font-size: .9rem; }
  .top__nav a:nth-child(2), .top__nav a:nth-child(3) { display: none; }

  .hero { height: 220vh; margin-top: -3.6rem; }
  .hero__stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 1rem; padding: 4rem 1.1rem 1rem; }
  .hero__photo { order: -1; }
  .hero__frame { padding: 8px; max-height: none; }
  .hero__frame img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .hero__door { left: calc(8px + (100% - 16px) * var(--d, 0)); width: 18px; margin-left: -9px; }
  .tape { width: 80px; height: 24px; }
  .hero__cap { font-size: 1.25rem; height: 1.6rem; margin-top: .6rem; }
  .hero__where { font-size: 1.3rem; margin-bottom: .2rem; }
  .hero__title { font-size: clamp(2.6rem, 13vw, 3.6rem); margin-bottom: .9rem; }
  .hero__lead { font-size: .98rem; max-width: none; margin-bottom: 0; }
  .hero__hint { display: none; }

  .lines__grid { grid-template-columns: 1fr; }
  .lines__note { font-size: 1.45rem; }

  .diary { height: 420vh; }
  .diary__stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: .6rem; padding: 1rem 1.1rem 1rem; align-content: stretch; align-items: stretch; }
  .diary__text { padding-left: 2rem; }
  .diary__text h2 { margin-left: -2rem; font-size: 2.3rem; margin-bottom: .4rem; }
  .diary__intro { display: none; }
  .timeline__item { padding: .1rem 0 .15rem; }
  .timeline__item::before { left: -2rem; top: .45rem; width: 12px; height: 12px; }
  .timeline__item .hand { font-size: 1.3rem; }
  .timeline__item p { display: none; }
  .timeline__item.is-current p { display: block; font-size: .85rem; }
  .timeline__track { left: 6px; bottom: .3rem; }
  .diary__stack { order: -1; height: auto; min-height: 0; }
  .diary__text { order: 0; }
  .polaroid { width: min(64vw, 36svh); padding: 9px 9px 0; }
  .polaroid figcaption { font-size: 1.2rem; padding: .3rem .2rem .5rem; }

  .woods__head { grid-template-columns: 1fr; gap: 1rem; }
  .woods__list { grid-template-columns: 1fr; }

  .split { height: 240vh; }
  .split__title { top: 1.2rem; left: 1.1rem; }
  .split__note { bottom: 1.2rem; left: 1.1rem; right: 1.1rem; max-width: none; font-size: .88rem; padding: .8rem 1rem; }
  .split__note--r { bottom: auto; top: 6.2rem; }
  .split__note .hand { font-size: 1.5rem; }
  .split__knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }

  .steps { grid-template-columns: 1fr; gap: 1.4rem; }

  .shelf__head { top: 1.2rem; left: 1.1rem; right: 1.1rem; padding: .7rem 1rem .8rem; }
  .shelf__head .hand { font-size: 1.15rem; }
  .shelf__track { padding: 9rem 1.5rem 2rem 1.5rem; gap: 1.8rem; }
  .pin-photo { width: 240px; }
  .pin-photo:nth-child(odd) { margin-top: 2rem; }
  .card-note { width: 220px; }

  .orders { grid-template-columns: 1fr; }
  .orders__board { height: 420px; min-height: 0; }

  .contact { padding: 3rem .8rem; }
  .contact__card { grid-template-columns: 1fr; transform: none; }
  .contact__list div { grid-template-columns: 5.5rem 1fr; }
  .foot__meta { margin-left: 0 !important; }
}

/* ---------- ograniczony ruch: plansze się nie przypinają ---------- */
html.rm .pin { height: auto !important; }
html.rm .stage { position: relative; height: auto; min-height: 0; overflow: visible; padding-top: 4rem; padding-bottom: 4rem; }
html.rm .hero { margin-top: 0; }
html.rm .hero__stage { --d: .5; }
html.rm .hero__door, html.rm .hero__hint { display: none; }
html.rm .hero__line--new { color: var(--barn); -webkit-text-stroke: 0; }
html.rm .hero__line--new::after { display: none; }
html.rm .hero__cap span { position: static; display: block; opacity: 1; }
html.rm .hero__cap { height: auto; }
html.rm .diary__stack { height: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
html.rm .polaroid { position: relative; left: auto; top: auto; width: auto; transform: rotate(var(--r)) !important; transition: none; }
html.rm .timeline__item { opacity: 1; }
html.rm .timeline__item p { display: block; }
html.rm .timeline__fill { transform: none; }
html.rm .split__stage { height: 100vh; padding: 0; --x: 50; }
html.rm .split__note { opacity: 1; }
html.rm .shelf__stage { min-height: 100vh; }
html.rm .shelf__track { transform: none; width: auto; overflow-x: auto; padding-left: var(--margin-x); padding-top: 12rem; }
html.rm .polaroid, html.rm .hero__cap span, html.rm .timeline__item { transition: none; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
