@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&display=swap');


html, body {
  margin: 0; 
  padding: 0; 
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", Arial, sans-serif;
  color: #222;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #182625;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.preloader-gif {
  width: 100px;
  height: 100px;
}

/* Ukryj zawartość na czas ładowania */
body.loading #container,
body.loading #ui {
  opacity: 0;
  pointer-events: none;
} 

#container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.scene {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  box-sizing: border-box;
  pointer-events: auto;
  background-color: rgb(255, 255, 255);
}

.scene #scene6{background-color:#444;}

/* Przyciski do portfolio itd */
#portfolio {
  text-decoration: none;
  justify-content: center;
  text-align: center;
  border: 1px solid #222;
  border-radius: 2px;
  padding: 15px 20px;
  cursor: pointer;
  font-family: 'Montserrat';
  font-weight: 500;
  background: transparent;
  font-size: 16px;
  color: #222;
  pointer-events: auto;
  user-select: none;
  margin-top: 20px;
  transition: background-color 1s, color 1s;
}

#portfolio:hover {
  background-color: #222;
  color: white;
}

@media (max-width: 1024px) {
  #portfolio {
    font-size: 14px;
    padding: 12px 17px;
  }
}

@media (max-width: 768px) {
  #portfolio {
    font-size: 12px;
    padding: 10px 15px;
  }
}    

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px;
}

.text-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
  border: 0.5px solid rgb(19, 19, 19);
  border-radius: 5px;
  gap: 5px;
}

.text-social p {
  margin: 0;
  font-weight: 400;
  font-size: 16px;
  color: #333;
}

.sociale {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social {
  width: 20px;
  height: 20px;
  cursor: pointer;
  transition: width 0.3s, height 0.3s;
}

.social:hover {
  width: 25px;
  height: 25px;
}

@media (max-width: 1024px) {
  .sociale {
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .sociale {
    margin-top: 3px;
  }
}

/* Ułożenie strony pol-na-pol */
.half {
  display: flex;
  position: relative;
  width: 50%;
  height: 100vh;
  box-sizing: border-box;
  padding: 60px;
  color: white;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  overflow: hidden;
}

.right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: left;
  max-width: 800px;
  margin: auto;
}

.left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  max-width: 800px;
  margin: auto;
}

.left h1,
.left h2,
.left p {
  margin: 0;
}

.left p {
  text-align: justify;
}

/* Responsywność */
@media (max-width: 1024px) {
  .scene {
    flex-direction: column;
  }
  .half {
    width: 100%;
    height: 50vh;
  }
}

.canvas-container {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

canvas#webpCanvas6 {
  display: none;
}

h1 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 100px;
  color: #444;
  letter-spacing: 0px;
  line-height: 80px;
  margin: 40px auto 5px auto;
  padding-bottom: 10px;
}

@media (max-width: 1024px) {
  h1 {
    font-size: 70px;
    line-height: 58px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 50px;
    line-height: 40px;
  margin: 20px auto 5px auto;
  }
}

h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 28px;
  color: #444;
  letter-spacing: 0px;
  line-height: normal;
}

@media (max-width: 1024px) {
  h2 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  h2 {
    font-size: 16px;
  }
}

p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #444;
  letter-spacing: 0px;
  margin-top: 100px;
}

@media (max-width: 1024px) {
  p {
    font-size: 16px;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  p {
    font-size: 14px;
    margin-top: 10px;
  }
}

a{
  text-decoration: none;
  color:#222;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: white;
  color: rgb(255, 255, 255);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000; 
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: 
    top 1s ease-in-out,
    visibility 0.1s linear ;
  /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);*/
}

@media(max-width: 1024px){
  .navbar{
    background-color: white;
    height: 50px;
  }
}

@media(max-width: 768px){
  .navbar{
    background-color: white;
    height: 40px;
  }
}

.back-button {
  background: none;
  text-decoration: none;
  border: none;
  color: black;
  font-size: 16px;
  font-family: 'Montserrat';
  cursor: pointer;
  transition: opacity 0.2s ease;
  padding-top: 20px;
}

.back-button:hover {
  opacity: 0.7;
}

@media(max-width: 1024px){
  .back-button {
  padding-top: 0px;
}
}


                                .portfolio-grid {
                                  padding-top: 10vh;
                                  padding-bottom: 10vh;
                                  display: flex;
                                  flex-wrap: wrap;
                                  width: 100%;
                                  height: auto;
                                  gap: 10px; /* <- to dodaje odstęp */
                                  z-index: 0;
                                }

                                @media (max-width: 1024px) {
                                          .portfolio-grid {
                                            padding-top: 0;
                                            
                                          }
                                        }

                                @media (max-width: 768px) {
                                          .portfolio-grid {
                                            padding-top: 0;
                                            
                                          }
                                        }                                        

                                .project {
                                  z-index: 40;
                                  position: relative;
                                  flex: 1 1 calc(25% - 7.5px); /* poprzednio -10px, teraz -7.5px z uwzględnieniem gap */
                                  transition: flex 1s cubic-bezier(0.65, 0, 0.35, 1), 
                                  filter 0.5s cubic-bezier(0.65, 0, 0.35, 1), 
                                  height 0.5s cubic-bezier(0.65, 0, 0.35, 1),
                                  margin-block 0.5s cubic-bezier(0.65, 0, 0.35, 1);
                                  display: flex;
                                  justify-content: center;
                                  align-items: center;
                                  height: 80vh;
                                  color: white;
                                  font-size: 24px;
                                  font-weight: 600;
                                  cursor: pointer;
                                  opacity: 0;
                                  filter: grayscale(100%);
                                  
                                }

                                .project:hover {
                                  filter: grayscale(0%);
                                }

                                .project.active {
                                  flex: 1 1 calc(70% - 7.5px);
                                  opacity: 1;
                                  filter: grayscale(0%);
                                  transition: flex 1s cubic-bezier(0.65, 0, 0.35, 1);
                                  z-index: 10; /* Upewnij się, że aktywny projekt jest na wierzchu */
                                  
                                }

                                .portfolio-grid.clicked .project:not(.active) {
                                  flex: 1 1 calc((100% - 70% - 30px) / 3); /* 30px to 3 przerwy po 10px */
                                  filter: brightness(0.7);
                                  filter: grayscale(100%); 
                                  opacity: 0.8;
                                  height: 70vh;
                                  margin-block: calc((80vh - 70vh) / 2); /* (25vh - 20vh) / 2*/
                                  transition: height 1s cubic-bezier(0.65, 0, 0.35, 1),
                                  margin-block 1s cubic-bezier(0.65, 0, 0.35, 1),
                                  flex 1s cubic-bezier(0.65, 0, 0.35, 1);
                                }
                                 
                                

                                @media (max-width: 1024px) {
                                  .portfolio-grid {
                                    flex-direction: column;
                                    height: 100vh;
                                    flex-wrap: nowrap;
                                    gap: 10px; /* dodane */
                                  }

                                  .project {
                                    flex-grow: 1;
                                    flex-shrink: 1;
                                    flex-basis: calc(25% - 7.5px); /* dla estetyki */
                                    width: 100%;
                                    margin: 0;
                                    
                                  }

                                  .project:hover {
                                  filter: grayscale(0%);
                                }

                                  .project.active {
                                    flex-basis: calc(70% - 7.5px);
                                    filter: grayscale(0%);
                                    height: 70vh !important; /* Zastępuje flex-basis */
                                  }

                                  .portfolio-grid.clicked .project:not(.active) {
                                    flex-basis: calc((100% - 70% - 20px) / 3); /* 2 gaps między 3 elementami */
                                    filter: brightness(0.7);
                                    filter: grayscale(100%);
                                    height: 10vh !important;
                                    margin-block: auto; 
                                  }
                                }

/* Kontener stopki */
.footer {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  background-color: #444;;
  font-size: 2em;
  font-weight: bold;
  overflow: hidden;
  z-index: 50;
}

.footer h1,
.footer h2,
.footer p {
  color: rgb(255, 255, 255);
}

/* Lewa część stopki */
.footer-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  width: 50%;
  height: 100%;
  padding: 60px;
  box-sizing: border-box;
}

/* Prawa część stopki */
.footer-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 50%;
  height: 100%;
  padding: 20px 80px 10px ;
  box-sizing: border-box;
}

/* Responsywność */
@media (max-width: 768px) {
  .footer {
    padding-top: 40px;
    padding-bottom: 250px;
    flex-direction: column;
    height: auto;
  }

  .footer-left{
    width: 100%;
    height: auto;
    align-items: left;
    text-align: left;
    padding: 60px 80px;
  }
  .footer-right {
    width: 100%;
    height: auto;
    align-items: left;
    text-align: left;
    padding: 20px 80px;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid black;
  width: 100%;
  border-radius: 2px;
  font-size: 16px;
  resize: vertical;
  font-family: 'Montserrat';
}

.contact-form button {
  background-color: white;
  border: 1px solid black;
  color: rgb(51, 51, 51);
  padding: 12px;
  width: 80%;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 1s ease;
  font-family: 'Montserrat', sans-serif;
}

.contact-form button:hover {
  background-color: #222;
  color:rgb(255, 255, 255);
}

    .scene-video {
      width: 100%;
      height: auto;
      object-fit: cover;
      display: block;
      pointer-events: none;
    }

    body.loading .scene {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body:not(.loading) .scene {
  opacity: 1;
  transition: opacity 0.6s ease;
}




/* KONTENER GŁÓWNY - tylko pozycjonowanie */
.project-content {
 
  
  /* ANIMACJA POZYCJI (tylko ruch góra-dół) */
  transition: top 1s cubic-bezier(0.65, 0, 0.35, 1); 
  /* cubic-bezier - efekt "sprężyny" */
}

/*BAZA*/
/*1A*/
.project-number {
  z-index: 10;
  position: absolute;
  top: 5.79%;
  left: 1.12%;
  transform: none;
  text-align: center;
  max-width: 100%;
  display: inline-block;
  white-space: nowrap;
  pointer-events: none;
  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    font-size 1s ease-in-out ,
    color 0.1s ease-in-out 0.5s;
    
    
  opacity: 1;


  font-family: 'Bodoni Moda', serif;
  font-weight: 900;
  font-size: 4.17vh;
  color: #424242;
  
}
/* 2B */
.project-name {
  z-index: 4;
  position: absolute;
  top: 20%;
  left: 10.50%;
  transform: none;
  text-align: left;
  display: inline-block;
  overflow: visible;
  width: auto;
  pointer-events: none;
  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    opacity 0.5s ease-in-out , /* Opóźnienie tylko dla pojawiania */
    top 0.5s ease-in-out ; /* Opóźnienie tylko dla pojawiania */
    
  
  opacity: 0;
  font-family: 'Montserrat';
  font-weight: 500;
  font-size: 20px;
  color: #ffffff;
  white-space: normal;       /* pozwala na zawijanie tekstu */
  text-transform: uppercase; /* zamienia wszystkie litery na wielkie */
  max-width: 19.49vw;
  line-height: 1.2;
  text-align: justify;
  text-align-last: left;
  filter: blur(20px);
}

.project-text {
  z-index: 4;
  position: absolute;
  top: 40%;
  left: 10.50%;
  transform: none;
  text-align: left;
  max-width: auto;
  display: inline-block;
  white-space: nowrap;
  width: auto;
  pointer-events: none;
  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    opacity 0.5s ease-in-out , /* Opóźnienie tylko dla pojawiania */
    top 0.5s ease-in-out ; /* Opóźnienie tylko dla pojawiania */
    
  
  opacity: 0;
  font-family: 'Montserrat';
  font-weight: 300;
  font-size: 12px;
  color: #ffffff;
  white-space: normal;       /* pozwala na zawijanie tekstu */
  text-transform: uppercase; /* zamienia wszystkie litery na wielkie */
  max-width: 19.49vw;
  line-height: 1.4;
  text-align: justify;
  text-align-last: left;
  filter: blur(20px);

  
}

.job-picture {
  z-index: 5;
  position: absolute;
  top: 0%;
  right: 0%;
  width: 100%;
  height: 100%;
  transform: none;
  overflow: hidden; /* ukrywa wystające części obrazu */
  pointer-events: none;
  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    width 1s ease-in-out;
   
  
}


  .job-picture img {
  height: 100%;
  width: 100%;
  object-fit: cover;       /* sprawia, że zdjęcie wypełnia div i przycina się */
  object-position: center; /* ustawia pozycję zdjęcia w obrębie diva */
  display: block;
  pointer-events: none;
  z-index: 5;
}

.job-picture video {
  height: 100%;
  width: 100%;
  object-fit: cover;       /* sprawia, że zdjęcie wypełnia div i przycina się */
  object-position: center; /* ustawia pozycję zdjęcia w obrębie diva */
  display: block;
  pointer-events: none;
  z-index: 5;
}






  .case-study-button {
  z-index: 4;
  position: absolute;
  top: 70%;
  left: 10.50%;
  transform: none;
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat';
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  color:#ffffff;
  max-width: auto;
  white-space: nowrap;
  width:19.49vw;
  height: 5vh;
  border: 0.5px solid #ffffff ;
  filter: blur(20px);
  visibility: hidden;



  transition: 
    top 1s ease-in-out,
    opacity 1s ease-in-out,
    filter 1s ease-in-out ;
}

.case-study-button:hover {
  background-color:#ffffff;
  color:#222;
} 

/*///////////////////////////////////////////////////////////////////////////////////////*/


/* STAN AKTYWNY */  
.project.active .project-number {
  font-size: 8.80vh;
  color: #ffffff;
  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    font-size 1s ease-in-out ,
    color 0.1s ease-in-out 0.2s ;
    
}
/*1B*/
.project.active .project-name {
  opacity: 1;
  top: 25%;
  filter: blur(0px);
  

  
  
  
  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    opacity 0.5s ease-in-out 0.3s,
    top 0.5s ease-in-out 0.3s ,
    filter 0.5s ease-in-out 0.3s;
    
}



.project.active .project-text {
  opacity: 1;
  top: 45%;
  filter: blur(0px);
  
  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    opacity 0.5s ease-in-out 0.5s,
    top 0.5s ease-in-out 0.5s ,
    filter 0.5s ease-in-out 0.5s;
    
}

.project.active .job-picture {
  width: 58%;

  
  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    width 1s ease-in-out ;
    
    
    
}

.project.active .case-study-button {
  top: 80%;
  opacity: 1;
  filter: blur(0px);
  visibility:visible;

  
  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    top 0.5s ease-in-out 0.6s,
    opacity 0.5s ease-in-out 0.6s,
    filter 0.5s ease-in-out 0.6s;
    
    
    
}

/* STAN NIEAKTYWNY (POWRÓT) - TERAZ Z ANIMACJĄ */
.project.inactive .project-number {
  opacity: 1;
  font-size: 40px;
  color: #ffffff;
  
}

.project.inactive .project-name {
  opacity: 0;
  visibility:hidden;
 

}
/*///////////////////////////////////////////////////////////////////////*/
/* Responsywność */
@media (max-width: 1023px) {

.navbar.project-is-active {
  top: -100px;
  visibility: hidden;

  transition: 
    top 1s ease-in-out,
    visibility 0.1s linear 1s;


}


.project-number {
  top: 50%;


  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out;
    
  font-size: 3vh;
  
}

.project.active .project-number {
  font-size: 7vh;
  top: 0%;
  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out;
    
}



  .project-name {
    font-size: 18px;
    max-width: 27vw;    
  }

  .project.active .project-name {
  font-size: 20px;
  top: 15%;
  
  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out;
    
    
}

  .project-text {
  top: 30% ;
  max-width: 27vw;
}

.project.active .project-text {
  top: 40%;

.case-study-button {
  width:27vw;


}

}

@media (max-width: 767px) { 
.project-number {
   top: 50%;
  

  
  /* ANIMACJA - jedna spójna definicja */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out;
    
  font-size: 3vh;
  
}
.project.active .project-number {
  font-size: 4vh;
  top: 38%;
  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out;
    
}

  .project-name {
   
    max-width: 70vw;    
  }

  .project.active .project-name {
  font-size: 18px;
  top: 5%;
  left: 15%;
  

  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    font-size 1s ease-in-out ,
    top 1s ease-in-out,
    left 1s ease-in-out;
    
}

  .project-text {
    max-width: 70vw;    
  }

  .project.active .project-text {
  font-size: 12px;
  top: 17%;
  left: 15%;
  
  
  /* ANIMACJA WYJŚCIA - natychmiastowy start */
  transition: 
    top 1s ease-in-out,
    left 1s ease-in-out;
    
}

.project.active .case-study-button {
  top: 39%;
  max-width: 70vw;
  width: 100%;  
  left: 15%;
 


  
  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    top 0.5s ease-in-out ,
    width 0.5s ease-in-out ,
    left 1s ease-in-out;


    
    
    
}


.job-picture {
  height: 100%;
  width: 100%;
  top: 0%;

  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    width 1s ease-in-out ,
    height 1s ease-in-out,
    top 1s ease-in-out;
  
   
}

  
  .project.active .job-picture {
  height: 50%;
  width: 100%;
  top: 50%;

  /* ANIMACJA WEJŚCIA - z opóźnieniem */
  transition: 
    width 1s ease-in-out ,
    height 1s ease-in-out ,
    top 1s ease-in-out;
  
   
}
}}


.scene {
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: content;
}

video {
  will-change: transform, opacity;
  backface-visibility: hidden;
}


