/* ==========================================================
   AIKCU — ABOUT v6
   Изменения только в:
   - позиции сцены;
   - DOM-порядке сцены;
   - растворении сцены в фоне.
   Текст и принципы не менялись.
   ========================================================== */

#about-anchor {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
}

.about-step {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--text, #faf8f5);
  background:
    linear-gradient(
      180deg,
      #0a344c 0%,
      #092f46 24%,
      #082a3e 74%,
      #071f30 100%
    );
}

.about-step::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -6;
  pointer-events: none;
  opacity: .20;
  background:
    linear-gradient(
      28deg,
      transparent 49.75%,
      rgba(99, 200, 238, .034) 50%,
      transparent 50.25%
    ),
    linear-gradient(
      152deg,
      transparent 49.75%,
      rgba(255, 126, 34, .020) 50%,
      transparent 50.25%
    );
  background-size: 30rem 24rem, 35rem 28rem;
}

.about-step::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  opacity: .24;
  background-image:
    radial-gradient(circle, rgba(255,126,34,.64) 0 1px, transparent 1.55px),
    radial-gradient(circle, rgba(90,198,238,.42) 0 1px, transparent 1.55px);
  background-size: 23rem 25rem, 29rem 31rem;
  background-position: 4rem 7rem, 13rem 2rem;
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0, black 4rem, black calc(100% - 3rem), transparent 100%);
  mask-image:
    linear-gradient(180deg, transparent 0, black 4rem, black calc(100% - 3rem), transparent 100%);
}

.about-step__atmosphere {
  position: absolute;
  z-index: -4;
  width: 78rem;
  height: 34rem;
  left: 68%;
  top: 3rem;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse,
      rgba(82, 195, 236, .13),
      rgba(38, 128, 166, .07) 42%,
      rgba(255, 123, 34, .03) 58%,
      transparent 78%
    );
  filter: blur(32px);
}

.about-step__inner {
  position: relative;
  z-index: 2;
  min-height: 38rem;
  padding-block: 4.25rem 3.3rem;
  display: flex;
  flex-direction: column;
}

.about-step__main {
  position: relative;
  min-height: 23.5rem;
  display: block;
}

.about-step__copy {
  position: relative;
  z-index: 4;
  max-width: 29rem;
  padding-top: .8rem;
}

.about-step__eyebrow {
  margin: 0 0 .78rem;
  color: var(--orange, #f46c10);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.about-step__copy h2 {
  max-width: 26rem;
  margin: 0 0 1rem;
  color: var(--text, #faf8f5);
  font-size: clamp(2.1rem, 2.85vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.05em;
  font-weight: 500;
}

.about-step__copy > p:not(.about-step__eyebrow) {
  max-width: 27.5rem;
  margin: 0;
  color: var(--secondary, #a9b5bb);
  font-size: .95rem;
  line-height: 1.72;
}

.about-step__copy > p + p {
  margin-top: .72rem;
}

/* ----------------------------------------------------------
   Scene — desktop
   DOM: после текста.
   CSS: absolute внутри about-step__main.
   ---------------------------------------------------------- */

.about-step__scene {
  position: absolute;
  z-index: 1;
  right: -4rem;
  top: 50%;
  width: min(70rem, 68vw);
  aspect-ratio: 1916 / 821;
  transform: translateY(-48%);
  pointer-events: none;

  background:
    url("../images/about/about-workspace-v6.png")
    center / contain no-repeat;

  filter:
    saturate(1.03)
    contrast(1.03)
    brightness(1.02);

  /*
    Сам PNG уже имеет прозрачные края.
    Дополнительной маски здесь НЕТ — поэтому нет овала/карточки.
  */
}

.about-step__scene::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 10%;
  right: 0;
  top: 12%;
  bottom: 7%;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 58% 52%,
      rgba(86, 198, 237, .15),
      rgba(38, 126, 164, .07) 45%,
      rgba(255, 126, 34, .025) 62%,
      transparent 80%
    );
  filter: blur(30px);
}

/* ----------------------------------------------------------
   Principles — slightly larger and closer to master
   ---------------------------------------------------------- */

.about-principles {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding-top: 1.45rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(152, 220, 245, .13);
}

.about-principle {
  min-width: 0;
  padding: .36rem 1.1rem .18rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .72rem;
}

.about-principle:first-child {
  padding-left: 0;
}

.about-principle + .about-principle {
  border-left: 1px solid rgba(152, 220, 245, .12);
}

.about-principle__icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  color: var(--orange, #f46c10);
  border: 1px solid rgba(255, 126, 35, .64);
  border-radius: .56rem;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 1.02rem;
  line-height: 1;
  box-shadow:
    inset 0 0 15px rgba(255, 120, 27, .035),
    0 0 12px rgba(255, 120, 27, .025);
}

.about-principle__icon--code {
  font-size: .68rem;
}

.about-principle h3 {
  margin: .04rem 0 .34rem;
  color: #f3f6f6;
  font-size: .86rem;
  line-height: 1.2;
  font-weight: 650;
}

.about-principle p {
  margin: 0;
  color: #91a4ad;
  font-size: .71rem;
  line-height: 1.55;
}



/* ----------------------------------------------------------
   Tablet — только позиция сцены.
   ---------------------------------------------------------- */

@media (max-width: 1180px) and (min-width: 761px) {
  .about-step__inner {
    min-height: 35rem;
    padding-block: 3.8rem 3rem;
  }

  .about-step__main {
    min-height: 22rem;
  }

  .about-step__scene {
    right: -7rem;
    width: min(62rem, 72vw);
    transform: translateY(-47%);
  }

  .about-principles {
    grid-template-columns: repeat(5, minmax(9rem, 1fr));
    overflow-x: auto;
  }
}

/* ----------------------------------------------------------
   Mobile 390
   ПОРЯДОК: текст → сцена → принципы.
   ---------------------------------------------------------- */

@media (max-width: 760px) {
  .about-step__atmosphere {
    width: 34rem;
    height: 22rem;
    left: 56%;
    top: 11rem;
  }

  .about-step__inner {
    min-height: 0;
    padding-block: 3rem 2.7rem;
  }

  .about-step__main {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .about-step__copy {
    max-width: 100%;
    padding-top: 0;
  }

  .about-step__copy h2 {
    max-width: 19rem;
    font-size: 2rem;
    line-height: 1.07;
  }

  .about-step__copy > p:not(.about-step__eyebrow) {
    max-width: 20rem;
    font-size: .88rem;
    line-height: 1.62;
  }

  .about-step__scene {
    position: relative;
    z-index: 1;
    right: auto;
    top: auto;
    width: calc(100% + 3rem);
    aspect-ratio: 1916 / 821;
    margin: 1.15rem -1.5rem .15rem;
    transform: none;
    background-size: contain;
    background-position: center;
  }

  .about-step__scene::before {
    left: 2%;
    right: 2%;
    top: 8%;
    bottom: 5%;
    filter: blur(22px);
  }

  .about-principles {
    margin-top: 1rem;
    padding-top: .95rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-principle {
    padding: .9rem .6rem;
    gap: .52rem;
    border-bottom: 1px solid rgba(152, 220, 245, .09);
  }

  .about-principle:first-child {
    padding-left: .6rem;
  }

  .about-principle + .about-principle {
    border-left: 0;
  }

  .about-principle:nth-child(even) {
    border-left: 1px solid rgba(152, 220, 245, .10);
  }

  .about-principle:last-child {
    grid-column: 1 / -1;
    max-width: 52%;
    justify-self: center;
    border-left: 0;
    border-bottom: 0;
  }

  .about-principle__icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .about-principle h3 {
    font-size: .72rem;
  }

  .about-principle p {
    font-size: .6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-step__scene,
  .about-step__scene::before {
    filter: none;
  }
}


/* ==========================================================
   ABOUT v12 — ZOOM SCALING FIX
   Один финальный desktop override без цепочки v7/v8/v9/v10.
   Mobile и tablet остаются из v6.
   ========================================================== */

@media (min-width: 1181px) {
  .about-step {
    overflow: visible;
  }

  .about-step__inner {
    min-height: 38.5rem;
  }

  .about-step__main {
    position: static;
    min-height: 24rem;
  }

  .about-step__copy {
    position: relative;
    z-index: 5;
  }

  .about-step__scene {
    position: absolute;
    z-index: 1;

    /*
      ВАЖНО: width/right больше не зависят от viewport.
      Поэтому browser zoom теперь уменьшает сцену вместе со страницей.
    */
    top: -1.1rem;
    right: -13.5rem;
    width: 78rem;

    transform: none;
    background-position: right center;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
  }

  .about-step__scene::before {
    left: 18%;
    right: -3%;
    top: 12%;
    bottom: 5%;
    filter: blur(30px);
    background:
      radial-gradient(
        ellipse at 63% 54%,
        rgba(86, 198, 237, .15),
        rgba(38, 126, 164, .065) 44%,
        rgba(255, 126, 34, .023) 60%,
        transparent 79%
      );
  }

  .about-step__atmosphere {
    left: 78%;
    top: .5rem;
    width: 80rem;
    height: 35rem;
  }

  .about-principles {
    position: relative;
    z-index: 6;
    margin-top: 1rem;
  }
}



/* v13 tweak: desktop scene shifted 3rem further right. Width, top, text, principles, tablet and mobile unchanged. */
