/* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none; 
  -ms-user-select: none; 
}*/

body{
	font-family: "Special Elite", system-ui;
	background:black; 
	color:white;
	
  }

body.mainpage {
	height: 100vh;

}

html, body {
  margin: 0;
padding:0;}

a{text-decoration:none;color:white;}
.wrapper {
  position: relative;

}
.buy-btn{padding:6px 18px;margin-top:10px;font-size:20px;font-weight:600;cursor:pointer;}
.hidden{display:none!important;}
.contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
}

.contacts a {
  text-decoration: none;
  color: inherit;
  font-size:2vw;
}

.wrapper.mainpage {
  width: 100%;
  height: 100%;

}

.centered-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* квадрат и масштаб от большего измерения окна */
  width: min(20vmax, 20vmax);
  height: min(20vmax, 20vmax);
  object-fit: cover;
  border-radius:50%;
   pointer-events: none;
  -webkit-user-drag: none;

}

.mainpage h1{position:absolute; top: 15%; left:50%;   transform: translate(-50%, -50%);   font-size:  3.2vw;
color:#dddddd;
font-family: "Homemade Apple", cursive;
}



.mainpage #menu{
	  position: absolute;
font-size:  1.4vw;
	left: 50%;
  bottom: 3vw;
  transform: translate(-50%, -50%);
	background:black;
	white-space: nowrap;
}

.page #menu{

font-size:  1.4vw;
text-align:center;
padding:20px 20px 40px;
}
#menu a{  
color:white;text-decoration:none;margin:0 1.5vw;}


#grain-container {
    position: fixed;
    z-index: 33300;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: hard-light;
	
}

#about {margin: 0 auto; max-width:960px;padding:3vw;}

#about img{float:right;width:40%;margin-left:30px;margin-bottom:10px;}


#about .txt {line-height:1.5;font-size:1.2em;}

#about h3{text-align:center;}
.about.wrapper #menu{position:relative;text-align: center;}

h2{text-align:center;margin-top:1.5em;font-size:1.5em;}
h3{font-size:1.3em;}

#about p{text-align:justify;}

.year{font-size:1.7em;}


ul li{list-style-type: none;}



#projects{}

/* --- GALLERY --- */
#projects .gallery {
  column-count: 3;
  column-gap: 1em;
  max-width: calc(1200px + 2em); /* учитываем gap */
  margin: 0 auto;
  padding: 2em 0; /* убрали боковые паддинги, чтобы не смещало */
  box-sizing: border-box;
  text-align: center;
}

#projects .gallery-item {
  display: block;
  width: 100%;
  margin-bottom: 1em;
  break-inside: avoid;
  text-align: left;
}

#projects .gallery-item img {
  width: 100%;
  height: auto;
  display: block;

 
}

.project h1{position:relative; text-align:center; font-size:  3.2vw;color:#dddddd;font-family: "Homemade Apple", cursive;}

.project .caption{display:none;}

.forsale .project .caption{display:block;}

#projects .caption {
  margin-top: 1.5em;
  text-align: center;
  font-size: 1em;
  font-family: "Special Elite", system-ui;
  color: #ccc;
}

#logo{margin: 35px auto 15px;
    height: 180px;
    width: 180px;}


#logo img {width:100%;height:100%;}

#project-description {text-align:justify; max-width: calc(1200px + 2em);margin: 0 auto;line-height:1.3;}
#project-description-2 {text-align:justify; max-width: calc(1200px + 2em);margin: 0 auto;line-height:1.3;}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background-color: black;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  margin-bottom: 1em;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-caption {
  color: #ccc;
  font-family: "Special Elite", system-ui;
  font-size: 1em;
  text-align: center;
  padding: 0 2em;
  max-width: 90%;
  user-select: none;
}

.lightbox .close {
  position: fixed;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.lightbox-nav {
	display:none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3em;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 0 0.3em;
  transition: opacity 0.2s;
}

.lightbox-nav.prev {
  left: 20px;
}
.lightbox-nav.next {
  right: 20px;
}
.lightbox-nav:hover,
.lightbox .close:hover {
  opacity: 0.6;
}

#loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease;
  color: #fff;
  letter-spacing: 2px;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

#loading-text {
  position: relative;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

#dots {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}

/* мобильные свайпы */


/* --- Responsive --- */
@media (max-width: 900px) { 
	.mainpage h1{font-size:5vw;}
	.mainpage #menu {
    
    font-size: 5vw;
 text-align: center;
}
.mainpage #menu a{margin-top: 15px !important;
        display: block;}
	#logo {
    margin: 75px auto 15px;
    height: 150px;
    width: 150px;
}
  #projects .gallery {
    column-count: 2;
  }
   #projects .gallery-item { 
    flex: 1 1 calc(50% - 1em);
  }
  
   .page #menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* расстояние между ссылками */
    padding: 30px 0 50px;
    font-size: 6vw; /* крупнее шрифт */
  }

  .page #menu a {
    margin: 0; /* убираем горизонтальные отступы */
    display: block;
  }
}

@media (max-width: 600px) {
	#logo {
    margin: 75px auto 15px;
    height: 150px;
    width: 150px;
}
  #projects .gallery {
    column-count: 1;
  }
  #projects .caption {
    font-size: 0.9em;
  }
   #projects .gallery-item {
    flex: 1 1 100%;
  }
   .lightbox-img { 
    max-width: 80%;   /* раньше было 90% — стало на 10% меньше */
    max-height: 75vh; /* чуть меньше по высоте тоже */
  }

  .lightbox-caption {
    font-size: 0.9em; /* немного меньше подпись, чтобы не мешала */
  }

  .lightbox .close {
    font-size: 60px;  /* крестик стал крупнее */
    top: 15px;
    right: 20px;
  }

  .lightbox-nav {
    font-size: 2.5em; /* стрелки чуть меньше, чем крестик */
  }
  
  .project h1{ font-size:  5.5vw;}
  
  #project-description{padding:0px 20px;}


}



@media (max-width: 600px) {
.mainpage #menu {
    
    bottom: 1vw;
  transform: translate(-50%, 0%);
}	
}

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.white{background:white;}

body.white .project h1{color:black;}
body.white #project-description{color:black;  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;}
  
  body.forsale #project-description{font-family: "Montserrat", sans-serif;}
body.white #menu a{color:black;}

.main-img {
    text-align: justify;
    max-width: calc(1200px + 2em);
    margin: 0 auto;
    line-height: 1.3;
	display:block;
	margin-top:25px;
	width:100%;

}

.page.white #projects .gallery{padding: 1em 0;}

.gallery.videos {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
}

.gallery.videos .video-item {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.gallery.videos .video-item iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}


.cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: calc(1200px + 2em); /* учитываем gap */
  margin: 0 auto;
  box-sizing: border-box;
  padding: 2em 0; /* убрали боковые паддинги, чтобы не смещало */


}

.card {
  display: flex;
  gap: 24px;
  padding: 20px;
}

.card img {
  width: 300px;
  height: auto;
  object-fit: cover;
}

.card-content {
  flex: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.card-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
}


.meta {
  list-style: none;
  padding: 20px 0 0;
  margin: 0;
  line-height: 1.2;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  font-size: 18px;
}

.price .lightbox-img {max-width:100%!important;}



.price {
  font-size: 26px;
  font-weight: 600;
  white-space: nowrap;
}

.price-original {
  position: relative;
  display: inline-block;
  margin-right: 12px;
}

/* перечёркиваем ТОЛЬКО оригинал */
.price.old .price-original::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 50%;
  height: 2px;
  background: red;
  transform: rotate(-2deg);
}

.price-sale {
  color: red;
  font-weight: 600;
}


@media (max-width: 768px) {

  /* карточка становится колонкой */
  .card {
    flex-direction: column;
    padding: 0;
    gap: 16px;
  }

  /* картинка на всю ширину */
  .card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* внутренний контент с отступами */
  .card-content {
    padding: 0 16px 20px;
  }

  /* заголовок + цена теперь колонкой */
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 10px;
  }

  .card-header h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  /* цена на новой строке */
  .price {
    font-size: 22px;
  }

  /* скидка аккуратно переносится */
  .price-original {
    margin-right: 10px;
  }

  /* мета-информация */
  .meta {
    font-size: 16px;
    padding-top: 14px;
    line-height: 1.35;
  }

  /* кнопка */
  .buy-btn {
    margin-top: 14px;
    font-size: 18px;
    width: 100%;
  }

}



#order-section {
  margin-top: 20px;
  text-align: center;
}

#order-section p {
  font-size: 14px;
  opacity: 1;
  margin-bottom: 12px;
}

#telegram-button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s ease;
  margin-left:10px;
}

#telegram-button:hover {
  opacity: 0.6;
}




#grain {
    height: 300%;
    width: 300%;
    background-image: url(images/grain.webp);
    opacity: 0.15;
    -webkit-animation: animateGrain 10s steps(8) infinite;
    animation: animateGrain 10s steps(8) infinite;
}

@-webkit-keyframes animateGrain{0%,100%{-webkit-translate:0 0;-moz-translate:0 0;-ms-translate:0 0;translate:0 0;}10%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}20%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}30%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}40%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}50%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}60%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}70%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}80%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}90%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}100%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}}

@keyframes animateGrain{0%,100%{-webkit-translate:0 0;-moz-translate:0 0;-ms-translate:0 0;translate:0 0;}10%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}20%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}30%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}40%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}50%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}60%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}70%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}80%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}90%{-webkit-translate:-5% -10%;-moz-translate:-5% -10%;-ms-translate:-5% -10%;translate:-5% -10%;}100%{-webkit-translate:-15% -20%;-moz-translate:-15% -20%;-ms-translate:-15% -20%;translate:-15% -20%;}}
