/* ================================================================
   S1.CSS — Hero (тёмный)
================================================================ */

#s1 {
  background: radial-gradient(ellipse 80% 60% at 60% 40%, #3d1a06 0%, #1e0c04 40%, #0d0602 100%);
}

#s1 .bg { background-image: url('../img/bg-s1.jpg'); }
#s1 .bg-placeholder {
  position:absolute; inset:0;
}

#s1 canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Горизонтальная световая линия */
.glow-line {
  position: absolute;
  top: 329px;
  left: 0; right: 0;
  height: 2px;
  transform: rotate(-0.2deg);
  background: linear-gradient(90deg,
    transparent 0%, rgba(200,160,60,0.3) 10%,
    rgba(220,180,80,0.9) 30%, #fff8e0 50%,
    rgba(220,180,80,0.9) 70%, rgba(200,160,60,0.3) 90%, transparent 100%
  );
  box-shadow: 0 0 12px 4px rgba(220,180,80,0.5), 0 0 40px 8px rgba(180,120,20,0.3);
  z-index: 3;
  animation: linePulse 4s ease-in-out infinite;
}
@keyframes linePulse { 0%,100%{ opacity:0.5 } 50%{ opacity:1 } }

/* Молнии */
.lightning-wrap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  z-index: 2;
  pointer-events: none;
}
.lightning {
  position: absolute;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to top, transparent, rgba(140,190,255,0.9), rgba(180,220,255,0.6), transparent);
  filter: blur(1px);
  animation: lFlicker 3s ease-in-out infinite;
}
.lightning::after {
  content: '';
  position: absolute;
  top: 0; left: -3px;
  width: 8px; height: 100%;
  background: inherit;
  filter: blur(4px);
  opacity: 0.4;
}
.l1  { left:38%; height:200px; animation-delay:0s;   animation-duration:2.8s }
.l2  { left:42%; height:260px; animation-delay:.4s;  animation-duration:3.2s }
.l3  { left:46%; height:220px; animation-delay:.8s;  animation-duration:2.5s }
.l4  { left:55%; height:180px; animation-delay:.2s;  animation-duration:3.5s }
.l5  { left:62%; height:290px; animation-delay:1s;   animation-duration:2.9s }
.l6  { left:70%; height:240px; animation-delay:.6s;  animation-duration:3.1s }
.l7  { left:78%; height:310px; animation-delay:1.4s; animation-duration:2.7s }
.l8  { left:82%; height:200px; animation-delay:.9s;  animation-duration:3.3s }
.l9  { left:86%; height:260px; animation-delay:.3s;  animation-duration:2.6s }
.l10 { left:90%; height:220px; animation-delay:1.2s; animation-duration:3s   }
@keyframes lFlicker {
  0%,100% { opacity:.7;  transform:scaleX(1)   }
  25%     { opacity:1;   transform:scaleX(1.5) }
  50%     { opacity:.5;  transform:scaleX(.8)  }
  75%     { opacity:.9;  transform:scaleX(1.2) }
}

/* Navbar */
.s1-nav {
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 40px;
  z-index: 10;
  background-color: #310F0010;
  backdrop-filter: blur(3px);
}
.logo { display:flex; flex-direction:column; align-items:center; gap:2px; text-decoration:none; }
.logo svg { width:64px; height:44px; }
.logo-text { font-size:9px; font-weight:400; letter-spacing:3.5px; color:var(--gold); text-transform:uppercase; }
.nav-right { display:flex; align-items:center; gap:28px; }
.nav-langs { display:flex; gap:18px; }
.nav-langs a { font-size:13px; letter-spacing:1px; color:rgba(245,240,232,0.7); text-decoration:none; transition:color .2s; }
.nav-langs a:hover, .nav-langs a.active { color:var(--cream); }
.nav-menu { display:flex; flex-direction:column; gap:5px; cursor:pointer; padding:4px; }
.nav-menu span { display:block; width:22px; height:1.5px; background:var(--cream); opacity:.85; }
.btn-consult {
  background: var(--cream);
  border: 1.5px solid rgba(245,240,232,0.85);
  color: var(--dark-brown);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  padding: 12px 30px;
  cursor: pointer;
  transition: background .25s;
  white-space: nowrap;
  letter-spacing: .5px;
}
.btn-consult:hover { background: transparent; 
  color: var(--cream);
}

/* Тексты hero */
.hero-tagline {
  position: absolute; 
  top:80px; 
  left:50%; 
  transform:translateX(-50%);
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: 16px; 
  font-weight:300; 
  line-height:1.2;
  color: var(--cream); 
  letter-spacing:.5px; 
  white-space:nowrap; 
  z-index:4;
}
.hero-title {
  position: absolute; 
  top:265px; 
  left:150px; 
  white-space: nowrap;
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px; 
  font-weight:600;
  text-transform: uppercase; color:var(--cream);
  text-shadow: 0 0 60px rgba(200,160,60,.25), 0 2px 20px rgba(0,0,0,.6);
  z-index: 4;
}
.hero-subtitle {
  position: absolute; top:344px; left:150px;
  white-space: nowrap;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight:300;
  color: var(--cream); z-index:4;
}
.hero-caption {
  position: absolute; 
  bottom:8%; 
  left:150px;
  font-size: 18px; line-height:1.6; color:rgba(245,240,232,0.85); z-index:4;
}
.hero-caption .hl  { color:var(--gold); }
.hero-caption .bld { font-weight:700; text-transform:uppercase; letter-spacing:.5px; }


/* ================================================================
   S1 MOBILE
================================================================ */
@media (max-width: 768px) {

  #s1.panel {

    height: 700px;
  }

  /* Nav */
  .s1-nav {
    margin: 0 20px;
    /* padding: 0 16px; */
  }
  .nav-langs,
  .btn-consult { display: none; }

  .logo img { width: 50px; height: 30px; object-fit: contain;}
  .logo-text { font-size: 8px; letter-spacing: 2.5px; }

  /* Canvas */
  #s1 canvas {
    width: 100%;
  }

  /* Tagline */
  .hero-tagline {
    top: 100px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 200;
  }

  /* Title */
  .hero-title {
    top: 212px;
    left: 20px;
    font-size: 28px;
    white-space: normal;
    max-width: calc(100% - 40px);
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero-title .hero-title-1 {
    font-size: 20px;
  }

  /* Glow line */
  .glow-line {
    top: 295px;
  }

  /* Subtitle */
  .hero-subtitle {
    top: 310px;
    left: 20px;
    font-size: 24px;
    white-space: normal;
    max-width: calc(100% - 40px);
    font-weight: 200;
    line-height: 1.1;
  }

  /* Caption */
  .hero-caption {
    bottom: 100px;
    left: 20px;
    font-size: 15px;
    max-width: calc(100% - 40px);
  }

  /* Молнии — сдвигаем левее чтобы были по центру на узком экране */
  .l1  { left: 25%; }
  .l2  { left: 32%; }
  .l3  { left: 38%; }
  .l4  { left: 45%; }
  .l5  { left: 52%; }
  .l6  { left: 58%; }
  .l7  { left: 65%; }
  .l8  { left: 70%; }
  .l9  { left: 75%; }
  .l10 { left: 80%; }

}

/* ================================================================
   NAV OVERLAY
================================================================ */
.nav-overlay {
  position: fixed;
  top: 0; right: 0;
  width: 320px;
  height: 100%;
  background: rgba(13, 6, 2, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 32px;
}
.nav-overlay.open {
  transform: translateX(0);
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* Крестик закрытия */
.nav-overlay-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-overlay-close span {
  position: absolute;
  display: block;
  width: 22px; height: 1.5px;
  background: var(--cream);
  opacity: 0.8;
}
.nav-overlay-close span:first-child { transform: rotate(45deg); }
.nav-overlay-close span:last-child  { transform: rotate(-45deg); }

/* Лого внутри меню */
.nav-overlay-logo {
  margin-top: 8px;
  margin-bottom: 48px;
  align-self: flex-start;
}

/* Ссылки */
.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.nav-overlay-links a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.75);
  text-decoration: none;
  letter-spacing: 1px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.08);
  transition: color 0.2s;
}
.nav-overlay-links a:hover { color: var(--gold); }

/* Кнопка */
.nav-overlay-btn {
  margin-top: 40px;
  width: 100%;
  text-align: center;
}

/* Языки */
.nav-overlay-langs {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}
.nav-overlay-langs a {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: rgba(245, 240, 232, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-overlay-langs a:hover,
.nav-overlay-langs a.active { color: var(--gold); }