/* ============================================================
   Małgorzata Mordarska — styl strony
   Świeży editorial: kinetyczna typografia, marquee, poziome
   portfolio, paralaksa, animowane odsłanianie zdjęć.
   ============================================================ */

:root {
  --white: #ffffff;
  --paper: #fbfaf9;
  --stone: #edebe8;
  --mist: #f2f1ef;
  --black: #0f0f0f;
  --ink: #131313;
  --ink-soft: #5b5b5b;
  --gray: #8d8d8d;
  --line: #e0dedb;
  --line-dark: #2c2c2c;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1180px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--ink); color: var(--white); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #c9c4bd; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* subtelne ziarno na całej stronie (analogowa faktura) */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 95;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0,0); }
  10% { transform: translate(-3%,2%); }
  30% { transform: translate(2%,-3%); }
  50% { transform: translate(-2%,-2%); }
  70% { transform: translate(3%,1%); }
  90% { transform: translate(-1%,3%); }
}

.only-desktop { display: none; }
.only-mobile { display: inline; }
@media (min-width: 720px) {
  .only-desktop { display: inline; }
  .only-mobile { display: none; }
}

[data-parallax] { will-change: transform; }

/* ===== Preloader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .8s var(--ease-out);
}
.loader.is-done { transform: translateY(-101%); }
.loader__inner { text-align: center; }
.loader__mark {
  height: 64px;
  margin: 0 auto 1rem;
  animation: loaderMark 1.1s var(--ease-out) both;
}
.loader__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: .12em;
  color: var(--ink-soft);
  animation: loaderName 1.1s .15s var(--ease-out) both;
}
@keyframes loaderMark { from { opacity: 0; transform: translateY(18px) scale(.92); } }
@keyframes loaderName { from { opacity: 0; transform: translateY(12px); } }

/* ===== Nawigacja ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background .35s, box-shadow .35s, transform .45s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(251,250,249,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 18px rgba(0,0,0,.07);
}
.nav.is-hidden { transform: translateY(-101%); }

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}
.nav__logo em { font-style: italic; color: var(--gray); }
.nav__logo-mark { height: 32px; width: auto; }
@media (max-width: 380px) { .nav__logo-text { display: none; } }

.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .25s;
}
.nav__links a:hover { color: var(--ink); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .4rem;
}
.nav__burger span { width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }

@media (max-width: 719px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(251,250,249,.97);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav__links.is-open { max-height: 320px; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav__links a { padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ===== Sekcje ===== */
.section { padding: 7rem 0; background: var(--paper); }
.section--black { background: var(--black); color: var(--white); }

.section__inner { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

.section__eyebrow {
  font-size: .75rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
}
.section__idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  letter-spacing: .05em;
  color: var(--ink);
  margin-right: .7rem;
}
.section--black .section__idx { color: var(--white); }

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 1.6rem;
}

/* maskowane wjazdy linii tytułów */
.t-lines .ln { display: block; overflow: hidden; }
.t-lines .ln > span {
  display: block;
  transform: translateY(112%);
  transition: transform .9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * .13s);
}
.t-lines.on .ln > span { transform: none; }

/* ===== Przyciski ===== */
.btn {
  display: inline-block;
  padding: .95rem 2.3rem;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .3s, color .3s, transform .3s var(--ease-out);
}
.btn::after {
  content: "→";
  display: inline-block;
  margin-left: .7rem;
  transition: transform .35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(5px); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--stone);
  color: var(--ink);
  padding: 6.2rem 1.5rem 2rem;
  overflow: hidden;
}

.hero__bottom {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.hero__stage {
  position: relative;
  flex: 1;
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero__title {
  position: relative;
  z-index: 1;
  width: 100vw;
  display: flex;
  flex-direction: column;
  gap: .5vw;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  line-height: .88;
}

.hero__line-clip {
  display: block;
  overflow: hidden;
  padding: 0 4vw;
  text-align: left;
}
.hero__line-clip--2 { text-align: right; }

.hero__line {
  display: inline-block;
  font-size: clamp(3rem, 12.5vw, 11.5rem);
  letter-spacing: .01em;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(calc(var(--sx, 0px) + var(--mx, 0px)), var(--my, 0px), 0);
}
.hero__line--outline {
  /* wypełnienie w kolorze tła malowane NAD obrysem (paint-order) zakrywa
     wewnętrzne szwy glifów, które text-stroke inaczej obrysowuje */
  color: var(--stone);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
@media (max-width: 719px) { .hero__line--outline { -webkit-text-stroke: 1.3px var(--ink); } }

/* litery — animacja wejścia po preloaderze */
.hero__line .ch {
  display: inline-block;
  transform: translateY(120%);
}
body.is-ready .hero__line .ch {
  animation: chUp .9s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 34ms + .1s);
}
@keyframes chUp { to { transform: translateY(0); } }

.hero__photo {
  /* zakotwiczone do samego dołu sekcji — kadr kończy się razem z tłem */
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  height: min(74vh, 740px);
  aspect-ratio: 4/5;
  overflow: hidden;
  margin: 0;
}
.hero__photo img {
  position: absolute;
  left: 0; bottom: -12%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: bottom;
  will-change: transform;
  transform: translate3d(var(--imx, 0px), calc(var(--isy, 0px) + var(--imy, 0px)), 0);
}

/* podpis roli przy nazwisku */
.hero__role {
  align-self: flex-end;
  padding: 0 4vw 0 0;
  margin-top: -0.4rem;
  font-size: .85rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__role--top {
  order: -1;
  align-self: flex-start;
  padding: 0 0 1.4rem 4vw;
}
body:not(.is-ready) .hero__role { opacity: 0; }
body.is-ready .hero__role { animation: roleIn .8s .75s var(--ease-out) both; }
@keyframes roleIn { from { opacity: 0; transform: translateY(14px); } }
body:not(.is-ready) .hero__photo { opacity: 0; transform: translateX(-50%) translateY(30px); }
body.is-ready .hero__photo {
  animation: photoIn 1.1s .5s var(--ease-out) both;
}
@keyframes photoIn {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hero__bottom { padding: 1.2rem 0 1.6rem; position: relative; z-index: 4; }

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__cta .btn--ghost {
  background: rgba(251,250,249,.85);
  backdrop-filter: blur(4px);
}
.hero__cta .btn--ghost:hover { background: var(--ink); }

.hero__note {
  text-align: right;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.9;
  display: none;
}
@media (min-width: 720px) { .hero__note { display: block; } }

@media (max-width: 719px) {
  .hero { padding-top: 5.4rem; }
  .hero__stage { min-height: 0; flex: 1 1 auto; justify-content: flex-start; padding-top: 9vh; }
  .hero__line { font-size: 12.5vw; letter-spacing: 0; }
  .hero__role {
    order: -1;
    align-self: center;
    margin: 0 0 2vh;
    padding: 0;
    font-size: .62rem;
    letter-spacing: .3em;
    white-space: nowrap;
  }
  .hero__photo { height: auto; width: min(100vw, 400px); }
  .hero__bottom { justify-content: center; margin-bottom: 0; padding-bottom: .6rem; }
}

/* ===== Odsłanianie ===== */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.rv.on { opacity: 1; transform: none; }

.rv-img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-out);
}
.rv-img.on { clip-path: inset(0); }
/* wewnętrzna skala tylko dla zdjęć bez paralaksy (paralaksa nadpisuje transform) */
.rv-img img:not([data-parallax]) { transform: scale(1.15); transition: transform 1.4s var(--ease-out); }
.rv-img.on img:not([data-parallax]) { transform: scale(1); }

/* ===== O mnie ===== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: center;
}
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.about__photo {
  position: relative;
  aspect-ratio: 4/5;
  isolation: isolate;
}
.about__photo::before {
  content: "";
  position: absolute;
  inset: 1.2rem -1.2rem -1.2rem 1.2rem;
  border: 1px solid var(--ink);
  z-index: -1;
  pointer-events: none;
}
.about__photo img {
  position: absolute;
  left: 0; top: -6%;
  width: 100%;
  height: 112%;
  object-fit: cover;
}
.about__frame-clip {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.about__cap {
  position: absolute;
  left: 0;
  bottom: -2.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: .95rem;
  letter-spacing: .08em;
  color: var(--gray);
}

.about__text p + p { margin-top: 1.2rem; }
.about__text { color: var(--ink-soft); }
.about__text .section__title { color: var(--ink); }
.about__text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.about__text a:hover { text-decoration-thickness: 2px; }

.about__pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  border-left: 2px solid var(--ink);
  padding-left: 1.4rem;
  margin: 1.8rem 0;
}
.about__pull em { font-style: italic; color: var(--gray); }

/* ===== Portfolio — poziomy scroll ===== */
.works { background: var(--mist); }
.works__space { position: relative; }
.works__sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 5.5rem 0 3rem;
}

.works__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.6rem;
}
.works__head .section__title { margin-bottom: 0; }
.works__hint {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gray);
  text-align: right;
  line-height: 2;
  display: none;
}
@media (min-width: 860px) { .works__hint { display: block; } }

.works__track {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  padding: 0 max(1.5rem, calc((100vw - var(--max)) / 2 + 1.5rem));
  will-change: transform;
}

/* fallback / mobile: natywne przewijanie poziome */
.works--native .works__space { height: auto !important; }
.works--native .works__sticky { position: static; min-height: 0; }
.works--native .works__track {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.2rem;
  -webkit-overflow-scrolling: touch;
}
.works--native .works__track .wcard { scroll-snap-align: center; }

.wcard {
  flex: 0 0 auto;
  width: clamp(240px, 26vw, 400px);
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.wcard:nth-child(even) { margin-top: clamp(1.6rem, 4vh, 3.4rem); }
.wcard figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  margin: 0 0 1rem;
}
.wcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.wcard:hover img, .wcard:focus-visible img { transform: scale(1.05); }
.wcard figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,0);
  transition: background .4s;
}
.wcard:hover figure::after { background: rgba(15,15,15,.18); }

.wcard__meta { display: flex; gap: .9rem; align-items: baseline; }
.wcard__cat, .wcard__title { display: block; }
.wcard__idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gray);
}
.wcard__cat {
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: .15rem;
}
.wcard__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
}

.works__progress {
  margin: 2.4rem auto 0;
  width: min(280px, 60vw);
  height: 1px;
  background: var(--line);
}
.works__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width .1s linear;
}
.works--native .works__progress { display: none; }

/* ===== Pas paralaksy ===== */
.strip {
  position: relative;
  height: 62vh;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}
.strip__media { position: absolute; inset: 0; }
.strip__media img {
  position: absolute;
  left: 0; top: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
}
.strip__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}
.strip__quote {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.25;
  color: var(--white);
  text-align: center;
  padding: 0 1.5rem;
  max-width: 24ch;
}
.strip__quote em { font-style: italic; color: #d6d6d6; }

/* ===== Oferta ===== */
.services__list { margin-top: 2.6rem; border-bottom: 1px solid var(--ink); }

.srv {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.2rem 1.2rem;
  border-top: 1px solid var(--ink);
  overflow: hidden;
  cursor: default;
}
.srv::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s var(--ease-out);
  z-index: 0;
}
.srv:hover::before { transform: scaleY(1); }
.srv > * { position: relative; z-index: 1; transition: color .35s; }

.srv__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gray);
}
.srv__body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: .4rem;
}
.srv__body p { color: var(--ink-soft); max-width: 62ch; font-size: .97rem; }
.srv__arrow {
  font-size: 1.6rem;
  color: var(--gray);
  transition: transform .4s var(--ease-out), color .35s;
}
.srv:hover .srv__num, .srv:hover .srv__arrow { color: #b9b1a4; }
.srv:hover .srv__body h3 { color: var(--white); }
.srv:hover .srv__body p { color: #b9b9b9; }
.srv:hover .srv__arrow { transform: translateX(8px); color: var(--white); }

@media (max-width: 700px) {
  .srv { grid-template-columns: auto 1fr; }
  .srv__arrow { display: none; }
}

/* ===== Kontakt ===== */
.contact { position: relative; overflow: hidden; }
.contact__ghost {
  position: absolute;
  left: 0;
  right: 0;
  top: 26%;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(6rem, 22vw, 19rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.13);
  pointer-events: none;
  user-select: none;
}
.contact__inner { position: relative; text-align: center; }
.contact__lead { color: #9a9a9a; max-width: 46ch; margin: 0 auto 2.5rem; }

.contact__mail {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.6vw, 2.6rem);
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  position: relative;
  padding-bottom: .3rem;
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.contact__mail:hover::after { transform: scaleX(1); }

.contact__links {
  margin-top: 2.4rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9a9a9a;
}
.contact__links a { color: inherit; text-decoration: none; transition: color .3s; }
.contact__links a:hover { color: var(--white); }

/* ===== Stopka ===== */
.footer {
  background: var(--black);
  color: #6f6f6f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 1.6rem 2rem 2.2rem;
  font-size: .78rem;
  letter-spacing: .12em;
  border-top: 1px solid var(--line-dark);
}
.footer__top {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .2em;
  transition: color .3s;
}
.footer__top:hover { color: var(--white); }

/* ===== Modal projektu ===== */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,.86);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  margin: 4vh auto;
  width: min(1100px, 94vw);
  height: 92vh;
  overflow: hidden;
  background: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  animation: modalIn .4s var(--ease-out);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } }

@media (max-width: 860px) {
  .modal__panel {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
  }
}

.modal__close {
  position: absolute;
  top: .6rem; right: .6rem;
  z-index: 5;
  width: 2.6rem; height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .3s;
}
.modal__close:hover { background: rgba(0,0,0,.85); }

.modal__gallery {
  background: #ededec;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.modal__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0;
}
.modal__stage img,
.modal__stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ededec;
}
@media (max-width: 860px) {
  .modal__gallery { flex: 0 0 auto; }
  .modal__stage { flex: none; height: 54vh; }
}

.modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem; height: 2.8rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: var(--black);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background .3s;
}
.modal__arrow:hover { background: #fff; }
.modal__arrow--prev { left: .8rem; }
.modal__arrow--next { right: .8rem; }

.modal__thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: .5rem;
  padding: .8rem;
  overflow-x: auto;
}
.modal__thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 64px;
}
.modal__thumbs button.is-active { border-color: var(--black); }
.modal__thumbs img { width: 64px; height: 80px; object-fit: cover; }
.modal__thumbs .thumb-video {
  width: 64px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  font-size: 1.1rem;
}

.modal__info { padding: 2.6rem 2.4rem; overflow-y: auto; }
.modal__category {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: .8rem;
}
.modal__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.modal__desc { color: var(--ink-soft); margin-bottom: 1.8rem; }

.modal__meta {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45rem 1.4rem;
  font-size: .9rem;
}
.modal__meta dt {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .7rem;
  color: var(--gray);
  padding-top: .2rem;
}
.modal__meta dd { color: var(--ink-soft); }

body.modal-open { overflow: hidden; }

/* ===== Ograniczenie animacji ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv-img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .rv-img img { transform: none; transition: none; }
  .t-lines .ln > span { transform: none; transition: none; }
  .hero__line .ch, body.is-ready .hero__line .ch { transform: none; animation: none; }
  body:not(.is-ready) .hero__photo, body.is-ready .hero__photo { opacity: 1; transform: translateX(-50%); animation: none; }
  .hero__line { transform: none; }
  .hero__photo img { transform: none; }
  [data-parallax] { transform: none !important; }
  .loader { display: none; }
  body::after { animation: none; }
  body:not(.is-ready) .hero__role, body.is-ready .hero__role { opacity: 1; animation: none; }
}
