/* VPN Ghost v3 — 3D-сцены на скролле поверх стиля v2.
   Без WebGL (или при reduced motion) класса .has-3d нет, и страница остаётся обычной v2-вёрсткой. */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.has-3d { scroll-behavior: auto; }

/* ---------- HERO ---------- */
.h3d {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px max(16px, calc((100% - 1180px) / 2)) 80px;
  overflow: hidden;
}
.h3d__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.has-3d .h3d__canvas { display: block; }
.h3d .hero__text { position: relative; z-index: 2; max-width: 560px; }
.h3d .hero__lead { color: var(--muted); font-size: 18px; margin: 22px 0 30px; max-width: 500px; }
.h3d .hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.h3d .hero__facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: 14px; }
.h3d .hero__facts b { color: var(--text); }

.h3d__say, .h3d__steps, .h3d__hint { display: none; }
.has-3d .h3d__say, .has-3d .h3d__steps, .has-3d .h3d__hint { display: revert; }
.has-3d .h3d__steps { display: flex; }

.h3d__say {
  position: absolute; z-index: 2;
  left: max(16px, calc((100% - 1180px) / 2)); top: 50%;
  transform: translateY(-50%);
  opacity: 0; pointer-events: none;
}
.h3d__say span {
  display: block; margin-bottom: 10px;
  color: var(--accent-2); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.h3d__say b { display: block; font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: -.03em; }
.h3d__say[data-say="2"] b {
  background: linear-gradient(90deg, #7fc4ff, #3b8bff 50%, #b98cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.h3d__steps {
  position: absolute; z-index: 2; right: max(16px, calc((100% - 1180px) / 2)); top: 50%;
  transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0;
  flex-direction: column; gap: 14px;
  font-size: 13px; color: var(--muted);
}
.h3d__steps li { opacity: .35; transition: opacity .4s, transform .4s var(--ease), color .4s; }
.h3d__steps li.is-on { opacity: 1; color: var(--text); transform: translateX(-8px); }
.h3d__steps b { color: var(--accent-2); margin-right: 8px; }
.h3d__hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; margin: 0;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

/* ---------- TUNNEL (покадровая сцена) ---------- */
.tunnel { display: none; }
.has-3d .tunnel { display: block; position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.tunnel__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tunnel__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,6,8,.85) 0%, rgba(5,6,8,0) 62%); }
.tunnel__cap {
  position: absolute; left: max(16px, calc((100% - 1180px) / 2)); top: 50%;
  transform: translateY(-50%); max-width: 540px; opacity: 0; pointer-events: none;
}
.tunnel__cap p:not(.eyebrow) { color: #c4cbe0; font-size: 18px; max-width: 440px; }

/* ---------- WHY: изогнутая галерея ---------- */
.why { position: relative; }
.why__canvas { display: none; }
.has-3d .why {
  width: 100%; max-width: none; height: 100vh; height: 100svh; padding: 0; overflow: hidden;
  background: radial-gradient(60% 50% at 50% 62%, rgba(59,139,255,.14), transparent 70%);
}
.has-3d .why__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.has-3d .why > .eyebrow, .has-3d .why > h2 {
  position: relative; z-index: 2; margin-left: max(16px, calc((100% - 1180px) / 2));
}
.has-3d .why > .eyebrow { margin-top: 110px; }
/* карточки остаются в DOM для поиска и скринридеров */
.has-3d .why .cards {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0;
}

/* ---------- SERVERS: глобус ---------- */
.globe { display: none; }
.has-3d .servers { grid-template-columns: 1fr 1fr; grid-template-areas: "text globe" "list globe"; row-gap: 30px; }
.has-3d .servers__text { grid-area: text; }
.has-3d .servers__list { grid-area: list; }
.has-3d .servers__list .srv { transform: none; margin-left: 0; }
.has-3d .globe { display: block; grid-area: globe; position: relative; aspect-ratio: 1; width: 100%; }
.globe canvas { width: 100%; height: 100%; display: block; }
.globe__note {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}

@media (max-width: 900px) {
  .h3d { align-items: flex-end; padding-bottom: 12vh; }
  .has-3d .h3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72%; z-index: 1; pointer-events: none;
    background: linear-gradient(0deg, rgba(5,6,8,.94) 0%, rgba(5,6,8,.82) 55%, rgba(5,6,8,0) 100%); }
  .h3d__steps { display: none !important; }
  .h3d__say { top: auto; bottom: 16vh; transform: none; }
  .tunnel__shade { background: linear-gradient(0deg, rgba(5,6,8,.9) 0%, rgba(5,6,8,0) 70%); }
  .tunnel__cap { top: auto; bottom: 12vh; transform: none; right: 16px; }
  .has-3d .servers { grid-template-columns: 1fr; grid-template-areas: "text" "globe" "list"; }
  .has-3d .globe { max-width: 460px; margin: 0 auto; }
}
