/* =============================
   ОСНОВНЫЕ ПЕРЕМЕННЫЕ ШРИФТОВ
   ============================= */
:root {
  --font-title: "Michroma", sans-serif;
  --font-sub: "Russo One", serif;
  --font-specification: "SUSE Mono", sans-serif;
}

/* =============================
   Блок-прелоадер
   ============================= */
#intro {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backdrop-filter: blur(15px);
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: #fff;
  text-align: center;
  transition: opacity 1s ease, backdrop-filter 1s ease;
}

.mobile-text { display: none; }
.desktop-text { display: block; }

@media (max-width:480px){
  .desktop-text{ display:none; }
  .mobile-text{ display:block; }
}

#intro .glow-text{
  position: relative;
  display:inline-block;
  font-size: clamp(24px,6vw,60px);
  font-family: var(--font-title);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.1) 0%,
    rgba(255,255,255,0.8) 50%,
    rgba(255,255,255,0.1) 100%
  );
  background-size:200% 100%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation: shine 2s linear infinite;
}

@keyframes shine{
  0%{ background-position:-200% 0; }
  100%{ background-position:200% 0; }
}

#intro h1{ font-size:clamp(48px,10vw,98px); margin:0; font-family:var(--font-title);}
#intro p{ font-size:clamp(16px,2vw,24px); margin-top:0.5em; font-family:var(--font-sub); }

.main-content{ opacity:0; transition:opacity 1s ease;}
#intro.hide{ opacity:0; backdrop-filter:blur(0px); pointer-events:none; }

.background {
  position: fixed;
  inset: 0; /* эквивалент top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  background-image: url("background.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-blend-mode: overlay;
  filter: brightness(1.5) contrast(1.1);
  z-index: -2;
}


body{
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  font-family: system-ui, sans-serif;
  color:#e8ecf1;
  display:flex;
  flex-direction:column;
  align-items:center;
  position:relative;
  cursor: url("kursor.png") 10 10, auto;
  background:#0b0f14;
}

canvas#noise{
  position:fixed; top:0; left:0;
  width:100%; height:100%;
  pointer-events:none; z-index:-1;
}

.main,.portfolio,.clients-block,.after-clients,.why-block,.footer,.about,.specifications{
  position:relative;
  z-index:2;
  width:100%;
  max-width:1200px;
  margin:0 auto;
  box-sizing:border-box;
  padding:0 1em;
}

.hero{
  text-align:center;
  padding:2em 1em 1em;
}
.hero h1{
  font-family: var(--font-title);
  font-weight:400;
  font-size: clamp(48px,8vw,98px);
  margin:0;
  text-transform: uppercase;
}
.hero p{
  font-family: var(--font-sub);
  font-size:1.5em;
  letter-spacing:0.08em;
  color:#9da9b7;
  margin:0.5em 0 0;
}
@media(max-width:1024px){ .hero p{ font-size:0.9em; } }
@media(max-width:480px){ .hero p{ font-size:0.75em; } }

.portfolio{
  width:100%;
  max-width:1200px;
  padding:2em 1em 4em;
  text-align:center;
  margin:0 auto;
}
.portfolio h2{
  font-family: var(--font-title);
  font-size:clamp(24px,4vw,40px);
  margin-bottom:0em;
}

.projects{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:0.15em;
  transition:all 0.3s ease;
  overflow:visible;
}
@media(max-width:1024px){ .projects{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:480px){ .projects{ grid-template-columns:1fr; } }

.project{
  background: rgba(15,20,25,0.6);
  border-radius:15px;
  position:relative;
  z-index:2;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
  overflow:visible;
}
.project video{
  width:100%;
  height:auto;
  display:block;
  border-radius:15px;
  transition: transform 0.3s ease, z-index 0s;
}
.project.hovered video{
  transform:scale(1.05);
  z-index:2;
}
.project:hover{ cursor:url("kursor-hover.png") 10 10, auto; }
.project.blurred{ filter:blur(5px);}
.project.hovered{ box-shadow:0 10px 20px rgba(0,0,0,0.5);}

.clients-block{
  background: url("bg2.webp") center center / cover no-repeat, #1a1f28;
  padding: 1em;
  border-radius: 15px;
  max-width: 1200px;
  margin: 2em auto;
  text-align: left;
  color: #e8ecf1;
  font-family: "SUSE Mono", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.clients-title {
  font-family: var(--font-title);
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 0.5em;
  color: #e8ecf1;
}

.clients-content {
  display: flex;
  gap: 1em;
  flex-wrap: wrap; /* чтобы на мобилках красиво переносилось */
}

#client-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  flex: 1; /* занимает нужное место слева */
}

.client-name {
  cursor: pointer;
  font-weight: bold;
  padding: 0.3em 0.5em;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
  color: #e8ecf1;
}

.client-name:hover {
  background: rgba(255,255,255,0.05);
}

#client-info-display {
  flex: 2; /* блок с инфой справа */
  padding: 1em;
  background: rgba(11,15,20,0.6);
  border-radius: 10px;
  min-height: 80px;
  transition: all 0.3s ease;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.4;
  color: #e8ecf1;
}

/* Активный клиент */
.client-name.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Заголовок-спойлер */
.clients-title {
  cursor: pointer;           /* курсор при наведении */
  user-select: none;         /* нельзя выделять текст */
}

/* Контейнер с контентом скрыт по умолчанию с анимацией */
.clients-content {
  max-height: 0;             /* скрыто */
  overflow: hidden;
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  transition: max-height 0.5s ease;
}

/* Развёрнутый блок */
.clients-content.active {
  max-height: 1000px;
}

.after-clients{
  position:relative;
  display:flex;
  overflow:hidden;
  width:100%;
  max-width:1200px;
  margin:2em auto;
  padding:0.5em 0;
}
.after-clients-inner{
  display:flex;
  gap:0.3em;
  transform:translateX(0);
  will-change: transform;
}
.after-clients .project{
  flex:0 0 auto;
  width:220px;
  border-radius:15px;
  overflow:hidden;
  transition:transform 0.3s ease;
}
.after-clients .project video{
  width:100%;
  height:auto;
  display:block;
  border-radius:15px;
}

.after-clients::before,
.after-clients::after{
  content:"";
  position:absolute;
  top:0;
  width:10%;
  height:100%;
  z-index:2;
  pointer-events:none;
}
.after-clients {
  position: relative;
  display: flex;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 2em auto;
  padding: 0.5em 0;

  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;

  mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0));
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

.specifications{
  background:url("bg2.webp") center center / cover no-repeat, #1a1f28;
  padding:0.01em 1em;
  border-radius:15px;
  max-width:1200px;
  margin:2em auto;
  text-align:left;
  color:#e8ecf1;
  font-family:"SUSE Mono",sans-serif;
}
.specifications h2{
  font-family: var(--font-title);
  font-size: clamp(24px,4vw,36px);
  margin-bottom:-0.2em;
}
.specifications p{
  font-size: clamp(14px,3vw,18px);
  line-height:0.5;
  color:#9da9b7;
}
.specifications p:hover{
  color:#fff;
  text-shadow:0 0 10px rgba(255,255,255,0.6);
  transform:translateX(4px);
}
.specifications p:nth-child(2),
.specifications p:nth-child(3),
.specifications p:nth-child(4){ margin-left:3vw; }
.specifications p:nth-child(5){ margin-left:4vw; }

.why-block{
  margin-top:2em;
  padding:1.5em;
  background: rgba(255,255,255,0.04);
  border-radius:8px;
  font-family: var(--font-sub);
  color:#e8ecf1;
  text-align:center;
}
.why-block h3{
  font-family:var(--font-title);
  margin:0 0 0.5em;
  text-transform:uppercase;
}
.why-block p{
  color:#9da9b7;
  font-size:clamp(14px,2.2vw,18px);
  line-height:1.4;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 10px 0;
  background: rgba(0,0,0,0.6);
  color: #cccccc;
  font-family: var(--font-sub);
  font-size: 0.8em;
  z-index: 3;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.footer a{
  color:#cccccc;
  text-decoration:none;
  transition:0.3s;
}
.footer a:hover{ color:#e8ecf1; }

/* =============================
   Видеоплеер с оверлеем и текстом
   ============================= */
#video-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#video-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#video-overlay video {
  max-width: 90%;
  max-height: 70%;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

#overlay-text {
  margin-top: 1em;
  padding: 1em 2em;
  max-width: 90%;
  background: rgba(0,0,0,0.7);
  color: #e8ecf1;
  font-family: var(--font-sub);
  font-size: clamp(14px,2vw,18px);
  line-height: 1.4;
  border-radius: 10px;
  text-align: center;
}

/* === Genshin-style cards === */
.card {
  position: relative;
  width: 600px;
  padding: 40px;
  background: linear-gradient(135deg, #0b0f14 0%, #1a1f28 100%);
  border-radius: 20px;
  overflow: hidden;
  margin: 2em auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.outline-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 160px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.15);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.content {
  position: relative;
  z-index: 2;
}

.title {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
}

.subtitle {
  margin-top: 10px;
  font-family: var(--font-sub);
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
