/* v105 */
/* Style experiments stylesheet */
:root {
  --exp-primary: #1d2822;
  --exp-secondary: #f2eee5;
  --exp-accent: #7d3d24;
  --exp-accent-rare: #7d3d24;
  --exp-bg: #f2eee5;
  --exp-surface: #ffffff;
  --exp-text: #1d2822;
  --exp-text-light: #6b5b52;
}

body.style-experiments {
  background-color: var(--exp-bg);
  color: var(--exp-text);
}

/* Hero - make it more impactful on first view */
body.style-experiments .hero {
  min-height: 100vh;
}

body.style-experiments .hero-overlay {
  background: linear-gradient(135deg, rgba(29,40,34, 0.75) 0%, rgba(29,40,34, 0.4) 100%);
}

body.style-experiments .hero-tag {
  color: var(--exp-secondary);
  text-shadow: 0 2px 8px rgba(29,40,34, 0.6);
}

body.style-experiments .hero h1 {
  text-shadow: 0 4px 20px rgba(29,40,34, 0.7);
  margin-bottom: 28px;
}

body.style-experiments .hero p {
  color: rgba(242,238,229, 0.95);
  text-shadow: 0 2px 12px rgba(29,40,34, 0.6);
  margin-bottom: 48px;
  font-size: 1.15rem;
}

body.style-experiments .btn-primary {
  background: var(--exp-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(29,40,34, 0.35);
}

body.style-experiments .btn-primary:hover {
  background: #0f251b;
  box-shadow: 0 6px 24px rgba(29,40,34, 0.45);
}

body.style-experiments .btn-outline {
  background: rgba(242,238,229, 0.12);
  border-color: rgba(242,238,229, 0.8);
  backdrop-filter: blur(4px);
}

body.style-experiments .btn-outline:hover {
  background: var(--exp-secondary);
  color: var(--exp-primary);
  border-color: var(--exp-secondary);
}

body.style-experiments .nav {
  background: linear-gradient(to bottom, rgba(29,40,34, 0.55) 0%, transparent 100%);
}

body.style-experiments .nav.scrolled {
  background: rgba(242,238,229, 0.98);
  backdrop-filter: blur(12px);
}

/* Hero sequence with scroll-driven transitions */
.hero-sequence {
  position: relative;
  height: 100vh;
  height: 100svh;
  /* 700px — десктопный «воздух» под контент, но пол не должен быть выше самой
     видимой области: с прежним min-height:700px на экране короче 700px
     (landscape телефона — 390px) hero рос на 310px за экран, и страница до
     него долистывалась вниз. min() с svh держит пол ≤ высоты экрана; браузер
     без поддержки svh отбрасывает эту строку и остаётся на запасном 100vh
     (компенсируется hero-fit скриптом в index.html). */
  min-height: 700px;
  min-height: min(700px, 100svh);
  overflow: hidden;
  z-index: 2;
}

.hero-sequence-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hs-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: opacity, transform;
  opacity: 0;
  z-index: 0;
}

.hs-layer[data-step="1"] {
  background-image: url('public/hero-steps/hero-step-1.png');
  background-image: -webkit-image-set(url('public/hero-steps/hero-step-1.webp') 1x);
  background-image: image-set(url('public/hero-steps/hero-step-1.webp') type('image/webp'), url('public/hero-steps/hero-step-1.png') type('image/png'));
  opacity: 1 !important;
  transform: scale(1);
}

.hs-layer[data-step="2"] {
  background-image: url('public/hero-steps/hero-step-2.png');
  background-image: -webkit-image-set(url('public/hero-steps/hero-step-2.webp') 1x);
  background-image: image-set(url('public/hero-steps/hero-step-2.webp') type('image/webp'), url('public/hero-steps/hero-step-2.png') type('image/png'));
  transform: scale(1.02);
}

.hs-layer[data-step="3"] {
  background-image: url('public/hero-steps/hero-step-3.png');
  background-image: -webkit-image-set(url('public/hero-steps/hero-step-3.webp') 1x);
  background-image: image-set(url('public/hero-steps/hero-step-3.webp') type('image/webp'), url('public/hero-steps/hero-step-3.png') type('image/png'));
  transform: scale(1.04);
}

.hs-layer[data-step="4"] {
  background-image: url('public/hero-steps/hero-step-4.png');
  background-image: -webkit-image-set(url('public/hero-steps/hero-step-4.webp') 1x);
  background-image: image-set(url('public/hero-steps/hero-step-4.webp') type('image/webp'), url('public/hero-steps/hero-step-4.png') type('image/png'));
  transform: scale(1.06);
}

.hero-sequence::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29,40,34, 0.58) 0%, rgba(29,40,34, 0.38) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-sequence-content {
  position: relative;
  z-index: 3;
  height: 100vh;
  height: 100svh;
  min-height: 700px;
  min-height: min(700px, 100svh);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hs-step {
  position: absolute;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  will-change: opacity, transform;
}

.hs-step[data-step="1"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hs-step h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--exp-secondary, #f2eee5);
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(29,40,34, 0.7);
}

.hs-step p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(242,238,229, 0.95);
  margin-bottom: 40px;
  text-shadow: 0 2px 12px rgba(29,40,34, 0.6);
  line-height: 1.7;
}

.hs-step .hero-tag {
  color: var(--exp-secondary, #f2eee5);
  text-shadow: 0 2px 8px rgba(29,40,34, 0.6);
}

/* Навбар виден всегда — и в hero-sequence, и в портфолио-шоукейсе
   (2026-11-16, просьба пользователя: navbar stays visible throughout hero
   sequence and portfolio showcase). Раньше .nav прятался (opacity 0 +
   pointer-events: none) до body.nav-visible, а updateNavVisibility() в
   index.html / style-experiments.html снимал класс внутри секвенций.
   Класс nav-visible сохранён — им по-прежнему управляется только кнопка
   «Наверх» (.scroll-top ниже): она, как и раньше, скрыта внутри секвенций.
   Z-index не тронут: .nav = 100 (css/index.css) — поверх пин-слоёв
   секвенций, под модалками (200) и крестиком мобильного меню. */
body.style-experiments .scroll-top {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.style-experiments.nav-visible .scroll-top {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.style-experiments.hide-scrollbar {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 768px) {
  .hero-sequence,
  .hero-sequence-content {
    min-height: 100svh;
    height: 100svh;
  }
  .hs-step h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }
  .hs-step p {
    font-size: 0.95rem;
  }
}

.hs-progress {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.style-experiments.progress-visible .hs-progress {
  opacity: 1;
}


.hs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(242,238,229, 0.4);
  border: 1px solid rgba(242,238,229, 0.6);
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.hs-dot.active {
  background: #7d3d24;
  border-color: #7d3d24;
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(125,61,36, 0.7);
}

.hs-dot.done {
  background: rgba(125,61,36, 0.55);
  border-color: rgba(125,61,36, 0.55);
}

@media (max-width: 768px) {
  /* Точки hero sequence на мобилке: снизу по центру —
     сверху их перекрывает навбар, поэтому ставим вниз. */
  .hs-progress {
    left: 50%;
    top: auto;
    bottom: 16px;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 10px;
  }
  .hs-dot {
    width: 8px;
    height: 8px;
  }
  /* Cookie-баннер высокий (bottom: 20px) перекрывает нижние индикаторы —
     прячем до закрытия баннера */
  body:has(#cookieConsentBanner) .hs-progress {
    opacity: 0;
    pointer-events: none;
  }
}

.hs-nav-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: rgba(242,238,229, 0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(242,238,229, 0.5);
  border-radius: 8px;
  padding: 10px;
  z-index: 5;
  transition: opacity 0.3s ease, background 0.3s ease;
  opacity: 0;
  pointer-events: none;
}



.hs-nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--exp-secondary, #f2eee5);
}

.hs-nav-toggle:hover {
  background: rgba(242,238,229, 0.25);
}





.navbar.visible { opacity: 1 !important; pointer-events: auto !important; transform: translateY(0) !important; }
