/* ===== WT IT — Base ===== */
:root {
  --bg: #050508;
  --accent-blue: #00d4ff;
  --accent-purple: #7b2fff;
  --text: #f0f0f5;
  --text-muted: rgba(240, 240, 245, 0.55);
  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

body.is-loading {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}

body.is-game-active {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Custom cursor — «чёрная дыра» + лёгкая линза под ней */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  will-change: transform;
}

body.has-custom-cursor .custom-cursor {
  opacity: 1;
  visibility: visible;
}

body.has-custom-cursor .custom-cursor.is-hidden {
  opacity: 0;
}

/* Лёгкое «гравитационное» искажение фона (не SVG на весь экран) */
.custom-cursor__lens {
  position: absolute;
  left: 0;
  top: 0;
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
  transform: scale(1);
  transition: width 0.35s ease, height 0.35s ease, margin 0.35s ease, opacity 0.35s ease;
  -webkit-backdrop-filter: blur(2.5px) saturate(1.15) brightness(1.07) contrast(1.04);
  backdrop-filter: blur(2.5px) saturate(1.15) brightness(1.07) contrast(1.04);
  mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.45) 38%,
    transparent 68%
  );
  -webkit-mask-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.45) 38%,
    transparent 68%
  );
}

.custom-cursor__ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
}

.custom-cursor__ring--outer {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid transparent;
  border-top-color: rgba(0, 212, 255, 0.95);
  border-right-color: rgba(123, 47, 255, 0.45);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.55));
  animation: cursor-ring-spin 5s linear infinite;
  transition: width 0.35s ease, height 0.35s ease, margin 0.35s ease;
}

.custom-cursor__ring--inner {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 1px solid rgba(123, 47, 255, 0.55);
  opacity: 0.75;
  animation: cursor-ring-spin 7s linear infinite reverse;
  transition: width 0.35s ease, height 0.35s ease, margin 0.35s ease;
}

.custom-cursor__core {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #14141c 0%, #020208 55%, #000 100%);
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.95),
    inset 0 0 4px rgba(0, 212, 255, 0.12);
  transition: transform 0.35s ease, width 0.35s ease, height 0.35s ease, margin 0.35s ease;
}

@keyframes cursor-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.custom-cursor.is-hover .custom-cursor__lens {
  width: 112px;
  height: 112px;
  margin: -56px 0 0 -56px;
  opacity: 0.62;
}

.custom-cursor.is-hover .custom-cursor__ring--outer {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
}

.custom-cursor.is-hover .custom-cursor__ring--inner {
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
}

.custom-cursor.is-hover .custom-cursor__core {
  transform: scale(1.08);
}

/* Noise overlay */
.noise-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.04;
  mix-blend-mode: overlay;
}

.site-wrap {
  position: relative;
  min-height: 100vh;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transform: scale(1.035);
  filter: blur(20px);
  will-change: clip-path;
}

.site-wrap.is-ready {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* ===== Hero — Tower Builder (2 columns) ===== */
.game-hero {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.game-hero.is-ended {
  overflow: visible;
  min-height: 100vh;
}

/* Левый столбец */
.hero-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 40%;
  height: 100vh;
  height: 100dvh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 2rem 2.5rem;
  background: var(--bg);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.game-hero.is-ended .hero-left {
  position: relative;
  width: 40%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 2rem 2.5rem;
}

.game-hero.is-ended .hero-left__intro {
  opacity: 0.22;
  transform: translateY(-10px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.hero-brand__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.hero-brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.hero-brand__name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
}

.hero-left__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 0;
  min-height: 0;
}

.hero-left__title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-left__sub {
  margin-top: 0.75rem;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

.hero-stage {
  position: relative;
  min-height: 8rem;
}

.hero-stage__num {
  position: absolute;
  left: -0.15em;
  top: -0.35em;
  font-family: var(--font-heading);
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.hero-stage__content {
  position: relative;
  z-index: 1;
}

.hero-stage__name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.hero-stage__desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  max-width: 22rem;
}

.hero-finish {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 28rem;
}

.hero-finish[hidden] {
  display: none !important;
}

.hero-finish__title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 300;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-finish__title--gradient {
  font-weight: 700;
  font-size: clamp(34px, 3.6vw, 56px);
  background: linear-gradient(100deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Подсветка буквы "о" — она работает как портал, в который затянется сцена */
.portal-anchor {
  position: relative;
  display: inline-block;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(100deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.55));
  animation: portalAnchorPulse 2.6s ease-in-out infinite;
}

@keyframes portalAnchorPulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.45)); }
  50%      { filter: drop-shadow(0 0 26px rgba(123, 47, 255, 0.75)); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-anchor { animation: none; }
}

.hero-finish__text {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.64);
  max-width: 26rem;
}

.hero-finish__metric {
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #00D4FF;
}

.hero-finish__note {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.4);
  max-width: 26rem;
}

.game-stage-counter {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 4;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  user-select: none;
}

.hero-scroll-hint {
  margin-top: 1.75rem;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}

/* Правый столбец */
.hero-right {
  position: relative;
  margin-left: 40%;
  width: 60%;
  height: 100vh;
  height: 100dvh;
  flex-shrink: 0;
}

.game-hero.is-ended .hero-right {
  margin-left: 0;
  width: 60%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
}

.game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.game-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.05s ease-out;
}

.game-flash.is-active {
  opacity: 0.2;
}

/* ========== Portal Track — высокая обертка с прилипающей сценой ==========
   Сама сцена прилипает к верху viewport, пока юзер прокручивает 500vh трека.
   Это нативный CSS sticky — работает гарантированно без ScrollTrigger.pin. */

.portal-track {
  position: relative;
  width: 100%;
  height: 560vh;
}

.portal-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #02020a;
  isolation: isolate;
  --portal-suck: 0;
}

.portal-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;

  opacity: calc(var(--portal-suck) * 0.95);
  background:
    radial-gradient(circle at 50% 50%,
      rgba(0, 212, 255, 0.10) 0%,
      rgba(2, 2, 10, 0.00) 28%,
      rgba(0, 0, 0, 0.82) 70%,
      rgba(0, 0, 0, 0.98) 100%);
  /* blur на fullscreen оверлее — частая причина микролагов на переходе */
  filter: none;
  transition: opacity 0.08s linear;
}

.warp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2; /* над туннелем, под контентом шагов */
  opacity: 0;
  mix-blend-mode: lighten;
  will-change: opacity;
}

/* Все шаги (01–05) — поверх WebGL-колец и виньетки */
.portal-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  isolation: isolate;
}

.portal-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform, opacity, filter;
}

/* Слой 1 — Hero */
.portal-layer--hero {
  z-index: 3; /* под warp и контентом шагов */
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Hero-left/right внутри портала — без position:fixed, иначе scale родителя их не двигает */
.portal-stage .hero-left {
  position: absolute;
}
.portal-stage .game-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Слой 2 — Three.js канвас туннеля */
.portal-layer--tunnel {
  z-index: 1;
  display: block;
  opacity: 0;
  pointer-events: none;
}

/* ========== Portal Slides — вылетают из глубины коридора ========== */

.portal-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6vh 6vw;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
  color: #fff;
}

.portal-slide__inner {
  width: min(1180px, 100%);
  text-align: left;
}

.portal-slide__num {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(64px, 9vw, 132px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4em;
  opacity: 0.04;
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    background 0.35s ease;
}

/* Подсветка цифры цветом кольца, которое «касается» шага */
.portal-slide__num.is-ring-lit {
  opacity: var(--num-lit-opacity, 1);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--ring-color, #00d4ff) 42%,
    var(--ring-color, #00d4ff) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 var(--num-glow, 24px) rgba(var(--ring-rgb, 0, 212, 255), 0.95))
    drop-shadow(0 0 calc(var(--num-glow, 24px) * 2) rgba(var(--ring-rgb, 0, 212, 255), 0.45));
}

.portal-slide__kicker {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #00D4FF;
  margin: 0 0 0.7rem;
}

.portal-slide__title {
  font-family: var(--font-heading);
  font-size: clamp(38px, 6.6vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 300;
  margin: 0 0 2rem;
  color: #fff;
  text-shadow: 0 0 28px rgba(0, 212, 255, 0.18);
}

.portal-slide__grid,
.portal-slide__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2.4rem;
}

.portal-slide__grid li,
.portal-slide__steps li {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(2, 2, 10, 0.78) 0%, rgba(2, 2, 10, 0.56) 100%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.portal-slide__grid li strong,
.portal-slide__steps li strong {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
}

.portal-slide__grid li span,
.portal-slide__steps li span {
  font-size: clamp(13px, 1.1vw, 15px);
  color: rgba(255, 255, 255, 0.62);
  font-weight: 300;
  line-height: 1.55;
}

/* Секция 01 — вторая строка в карточках */
.portal-card__sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.45;
}

/* Секция 02 — нижняя тонкая строка */
.portal-card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

/* Hover только для секции 01 */
.portal-slide--s1 .portal-slide__grid li {
  position: relative;
  transition: border-color 0.3s ease;
}
.portal-slide--s1 .portal-slide__grid li::after {
  content: "→";
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 18px;
  color: #00D4FF;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.portal-slide--s1 .portal-slide__grid li:hover {
  border-color: rgba(0, 212, 255, 0.4);
}
.portal-slide--s1 .portal-slide__grid li:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.portal-slide__steps {
  counter-reset: step;
  list-style: none;
}

.portal-slide__steps li {
  position: relative;
  padding-left: 3.4rem;
}

.portal-slide__steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.2rem;
  top: 1.1rem;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
}

.portal-slide__cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.portal-slide__cases article,
.portal-slide__cases .portal-case-carousel {
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(2, 2, 10, 0.80) 0%, rgba(2, 2, 10, 0.54) 100%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
}

.portal-slide__cases h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  margin: 0 0 0.6rem;
  color: #fff;
}

.portal-case__sub {
  margin: -0.2rem 0 0.7rem;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.portal-case__sub[data-tone="aqua"] { color: #00D4FF; }
.portal-case__sub[data-tone="amber"] { color: #FFB800; }
.portal-case__sub[data-tone="muted"] { color: rgba(255, 255, 255, 0.4); letter-spacing: 0.08em; }
.portal-case__sub[data-tone="soft"] { color: rgba(255, 255, 255, 0.5); letter-spacing: 0.08em; }

.portal-case__tag {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.portal-case__tag--live { color: #00FF88; }
.portal-case__tag--amber { color: #FFB800; }

.portal-case__btn {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid #00D4FF;
  color: #00D4FF;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Карусель кейсов (секция 03, колонка 3) */
.portal-case-carousel {
  display: flex;
  flex-direction: column;
  padding-left: 2.25rem;
  padding-right: 2.25rem;
  padding-bottom: 0.5rem;
  overflow: hidden;
}

.portal-carousel__viewport {
  position: relative;
  flex: 1;
  min-height: 11rem;
}

.portal-carousel__track {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  min-height: inherit;
}

.portal-carousel__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.portal-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.portal-carousel__slide.portal-case {
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-carousel__btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 2, 10, 0.72);
  color: #00d4ff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.portal-carousel__btn:hover {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.08);
}

.portal-carousel__btn--prev {
  left: 0.35rem;
}

.portal-carousel__btn--next {
  right: 0.35rem;
}

.portal-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.portal-carousel__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.portal-carousel__dot.is-active {
  background: #00d4ff;
  transform: scale(1.15);
}

.portal-carousel__cta {
  margin-top: 0.85rem;
}

.portal-slide__cases p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 300;
  line-height: 1.6;
}

.portal-slide__stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 2.4rem;
  margin: 0;
}

.portal-slide__stack div {
  border-left: 1px solid rgba(0, 212, 255, 0.4);
  padding-left: 1rem;
}

.portal-slide__stack dt {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.4rem;
}

.portal-slide__stack dd {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  letter-spacing: -0.005em;
}

.portal-stack__sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.45;
}

/* CTA — финальный слайд с формой */
.portal-cta .portal-cta__text {
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.55;
  margin: 0 0 2rem;
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 620px;
  pointer-events: auto;
}

.portal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.portal-form__field {
  appearance: none;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}

.portal-form__field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.portal-form__field:focus {
  border-color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.04);
}

.portal-form__field--area {
  resize: vertical;
  min-height: 92px;
  max-height: 220px;
  line-height: 1.5;
}

.portal-form__counter {
  margin: -0.35rem 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
  text-align: right;
}

.portal-form__counter.is-limit {
  color: rgba(255, 120, 120, 0.85);
}

.portal-form__hint {
  min-height: 1.2em;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.portal-form__hint.is-error {
  color: #ff7a9a;
}

.portal-form__submit.is-loading {
  opacity: 0.65;
  cursor: wait;
}

.portal-form__submit {
  margin-top: 0.4rem;
  padding: 1rem 1.6rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.05em;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}

.portal-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(0, 212, 255, 0.3);
}

@media (max-width: 780px) {
  .portal-slide { padding: 5vh 5vw; }
  .portal-slide__grid,
  .portal-slide__steps,
  .portal-slide__stack { grid-template-columns: 1fr; }
  .portal-slide__cases { grid-template-columns: 1fr; }
  .portal-form__row { grid-template-columns: 1fr; }
}

.next-section {
  display: none !important;
  min-height: 0;
  position: relative;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12vh) scale(0.96);
  transform-origin: center center;
  background:
    radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.14), transparent 32%),
    radial-gradient(circle at 75% 60%, rgba(123, 47, 255, 0.18), transparent 36%),
    linear-gradient(180deg, #050508 0%, #090914 100%);
  will-change: opacity, transform;
}

.next-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 36vh;
  background: linear-gradient(180deg, #050508 0%, rgba(5, 5, 8, 0) 100%);
  pointer-events: none;
}

.next-section__inner {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 48px));
  opacity: 0;
  transform: translateY(56px) scale(0.94);
  filter: blur(14px);
  will-change: opacity, transform, filter;
}

.next-section__label {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

.next-section__title {
  font-family: var(--font-heading);
  font-size: clamp(42px, 8vw, 116px);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -0.05em;
  color: #fff;
  max-width: 12ch;
}

body.game-scroll-unlocked {
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .game-hero {
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  .hero-left {
    position: relative;
    width: 100%;
    height: auto;
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .hero-left__body {
    padding: 0.5rem 0 1rem;
    gap: 1.5rem;
  }

  .hero-left__title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .hero-stage__desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
  }

  .hero-right {
    margin-left: 0;
    width: 100%;
    height: 60vh;
    min-height: 320px;
  }

  .hero-stage__num {
    font-size: 56px;
  }
}
