/* ====================
   БАЗОВЫЕ НАСТРОЙКИ И ШРИФТЫ
   ==================== */
@font-face {
  font-family: "TildaSans";
  src: url("fonts/TildaSans-Light.woff2") format("woff2");
  font-weight: 400; /* Light */
  font-style: normal;
}
@font-face {
  font-family: "TildaSans";
  src: url("fonts/TildaSans-Regular.woff2") format("woff2");
  font-weight: 700; /* Regular/Bold */
  font-style: normal;
}

:root {
  --brand-color: #80aaf2;
  --bg-color: #000000;
  --text-color: #ffffff;
}

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

body {
  font-family: "TildaSans", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

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

/* ====================
   БЛОК 1: ШАПКА МЕНЮ
   ==================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: 1;
  align-items: center;
}
.header-nav a {
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
}
.header-nav a:hover {
  color: var(--brand-color);
}

/* Синяя таблетка "Портфолио" с эффектом 3D-переворота */
.header-nav a[href="#portfolio"] {
  position: relative;
  padding: 8px 24px;
  font-weight: 700;
  line-height: 1;
  color: transparent !important; /* Прячем настоящий текст, он нужен только для удержания ширины кнопки */
  perspective: 1000px; /* Включаем 3D-пространство */
}

/* Общие стили для обеих сторон (лица и изнанки) */
.header-nav a[href="#portfolio"]::before,
.header-nav a[href="#portfolio"]::after {
  content: "Портфолио";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden; /* Скрываем "затылок" элемента при перевороте */
  color: #000;
}

/* Лицевая сторона (Фирменная синяя) */
.header-nav a[href="#portfolio"]::before {
  background-color: var(--brand-color);
  transform: rotateX(0deg);
}

/* Изнаночная сторона (Белая) */
.header-nav a[href="#portfolio"]::after {
  background-color: #fff;
  transform: rotateX(-180deg); /* Изначально перевернута назад */
}

/* Сама анимация переворота по вертикали при наведении */
.header-nav a[href="#portfolio"]:hover::before {
  transform: rotateX(180deg); /* Лицевая уходит назад */
}

.header-nav a[href="#portfolio"]:hover::after {
  transform: rotateX(0deg); /* Белая изнанка встает на место */
}

.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 30px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
.header-logo img {
  height: 100%;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
  justify-content: flex-end;
  font-size: 14px;
  text-transform: uppercase;
}
.btn-request {
  cursor: pointer;
  transition: color 0.3s;
}
.btn-request:hover {
  color: var(--brand-color);
}

.tg-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s;
}
.tg-icon:hover {
  opacity: 0.7;
}
.tg-img {
  width: 24px;
  height: 24px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 102;
}
.hamburger span {
  width: 25px;
  height: 2px;
  background-color: var(--text-color);
  transition: 0.3s;
}

/* Выезжающее мобильное меню */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: #111;
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 70px 0 0 0;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}
.mobile-menu.active {
  right: 0;
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 20px 30px;
  flex: 1;
}
.mobile-menu-nav a,
.mobile-menu-nav .btn-request {
  font-size: 16px;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.mobile-menu-nav a[href="#portfolio"] {
  background-color: transparent;
  color: #fff;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
}
.mobile-menu-nav a[href="#portfolio"]:hover {
  color: var(--brand-color);
}
.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-menu-footer img {
  height: 24px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
  opacity: 0.75;
}
.mobile-menu-footer .legal-text {
  font-size: 10px;
  line-height: 1.25;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}
.mobile-menu-nav a.tg-mobile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mobile-menu-nav a.tg-mobile-link img {
  height: 1em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.floating-tg {
  display: none;
}

/* ====================
   БЛОК 2: ГЛАВНЫЙ ЭКРАН (HERO)
   ==================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: block;
  overflow: hidden;
}
#wave-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}
canvas {
  display: block;
  filter: blur(1px);
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}
.hero-content > * {
  pointer-events: auto;
  position: absolute;
}

.hero-top-left-text {
  display: none;
}
.hero-top-left-text .divider {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 5px;
}

.hero-text-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  height: max-content;
  width: 84%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.hero-design-by {
  width: auto;
  height: 40px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
}
.hero-bg-text {
  width: 100%;
  height: auto;
  opacity: 0.3;
  display: block;
  position: relative;
  z-index: 2;
}

.text-right {
  text-align: right;
  position: relative;
  z-index: 6;
}
.text-right h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand-color);
  margin-bottom: 5px;
  text-transform: uppercase;
}
.text-right p {
  font-size: 28px;
  font-weight: 700;
}

.hero-man {
  bottom: 0;
  left: 50%;
  transform: translateX(-85%);
  height: 85vh;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom right;
  z-index: 4;
  pointer-events: none;
}

.matryoshka-wrapper {
  bottom: 38vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mat-part {
  position: relative;
  z-index: 2;
}
.mat-part img {
  width: 18vh;
  height: auto;
  display: block;
}
.mat-top {
  animation: float-top 6s ease-in-out infinite;
  margin-bottom: 2vh;
}
.mat-bottom {
  animation: float-bottom 5s ease-in-out infinite alternate;
}
.mat-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float-blink 2s infinite;
}
.mat-flash img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes float-top {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}
@keyframes float-bottom {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-1deg);
  }
}
@keyframes float-blink {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 10px)) scale(1.2);
  }
}
@keyframes pulse-tg {
  0% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(128, 170, 242, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0);
  }
}

.text-bottom-left {
  bottom: 10%;
  left: 8%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.text-bottom-left h2 {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 8px;
}
.text-bottom-left ul {
  list-style: none;
  color: var(--brand-color);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0;
}

.portfolio-link {
  position: absolute;
  bottom: 10%;
  right: 8%;
  z-index: 10;
  display: block;
}
.btn-animated {
  position: relative;
  display: inline-block;
  cursor: pointer;
  outline: none;
  border: 0;
  vertical-align: middle;
  text-decoration: none;
  background: transparent;
  padding: 0;
  font-size: 16px;
  font-family: inherit;
  width: 300px;
  height: 54px;
}
.btn-animated .circle {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  margin: 0;
  width: 54px;
  height: 54px;
  background: var(--brand-color);
  border-radius: 100px;
}
.btn-animated .icon {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  background: #000;
}
.btn-animated .icon.arrow {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  left: 17px;
  width: 18px;
  height: 2px;
  background: none;
  animation: arrow-idle 3s infinite;
}
.btn-animated .icon.arrow::before {
  position: absolute;
  content: "";
  top: -4px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #000;
  border-right: 2px solid #000;
  transform: rotate(45deg);
}
.btn-animated .button-text {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0;
  margin: 0 0 0 35px;
  color: var(--brand-color);
  font-weight: 400;
  line-height: 54px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 1;
}

.btn-animated:hover .circle {
  width: 100%;
}
.btn-animated:hover .icon.arrow {
  background: #000;
  transform: translate(12px, 0);
  animation: none;
}
.btn-animated:hover .button-text {
  color: #000;
}

@keyframes arrow-idle {
  0%,
  80%,
  100% {
    margin-left: 0;
  }
  85% {
    margin-left: 4px;
  }
  90% {
    margin-left: 0;
  }
  95% {
    margin-left: 2px;
  }
}

/* ====================
   БЛОК 3: ФИЛОСОФИЯ (КАРУСЕЛЬ)
   ==================== */
.philosophy-section {
  position: relative;
  width: 100%;
  min-height: 800px;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 0;
}
.phi-bg {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}
.phi-content {
  position: relative;
  z-index: 10;
  width: 84%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px 1fr;
  align-items: center;
  gap: 20px;
}
.phi-slider-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.phi-side-text {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  color: #fff;
  z-index: 10;
}
.phi-side-text.text-left {
  text-align: right;
}
.phi-side-text.text-right {
  text-align: left;
}
.phi-side-text p {
  margin-bottom: 5px;
}
.phi-side-text .highlight {
  display: block;
  color: var(--brand-color);
  text-transform: uppercase;
  font-size: 32px;
  white-space: nowrap;
}

.matr-stage {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.matr-item {
  position: absolute;
  height: 280px;
  width: auto;
  transform-origin: bottom center;
  transition: all 0.5s cubic-bezier(0.45, 0, 0.55, 1);
  will-change: transform, filter, opacity;
}
.pos-center {
  transform: translate(0, 30px) scale(1.35);
  filter: blur(0);
  z-index: 100;
  opacity: 1;
}
.pos-right {
  transform: translate(160px, -30px) scale(0.55);
  filter: blur(5px);
  z-index: 20;
  opacity: 0.6;
  cursor: pointer;
}
.pos-left {
  transform: translate(-160px, -30px) scale(0.55);
  filter: blur(5px);
  z-index: 20;
  opacity: 0.6;
  cursor: pointer;
}

.nav-hint {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25%;
  pointer-events: none;
  z-index: 50;
  animation: hintPulse 3s infinite ease-in-out;
}
.nav-hint-left {
  left: 0;
  background: radial-gradient(
    ellipse at left center,
    rgba(128, 170, 242, 0.4) 0%,
    rgba(128, 170, 242, 0) 70%
  );
}
.nav-hint-right {
  right: 0;
  background: radial-gradient(
    ellipse at right center,
    rgba(128, 170, 242, 0.4) 0%,
    rgba(128, 170, 242, 0) 70%
  );
}

@keyframes hintPulse {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.2;
  }
}

.matr-info-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 150%;
  margin-top: 30px;
  gap: 20px;
}
.slider-arrow {
  background: var(--brand-color);
  color: #000;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.2s,
    opacity 0.2s;
  flex-shrink: 0;
  margin-top: 10px;
}
.slider-arrow:hover {
  transform: scale(1.1);
}
.slider-arrow:active {
  transform: scale(0.95);
}

.matr-texts {
  position: relative;
  width: 100%;
  min-height: 160px;
  text-align: center;
}
.matr-text-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.matr-text-item.text-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.5s ease 0.2s;
}
.matr-text-item h3 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.matr-text-item h4 {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-color);
  margin-bottom: 15px;
}
.matr-text-item p {
  font-size: 22px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  max-width: 700px;
  margin: 0 auto;
}

/* ====================
   БЛОК 4: ПОРТФОЛИО (ГАЛЕРЕЯ)
   ==================== */
.portfolio-section {
  position: relative;
  width: 100%;
  padding: 100px 0;
  background-color: var(--bg-color);
  overflow: visible;
  z-index: 20;
}

.port-container {
  position: relative;
  width: 84%;
  max-width: 1200px;
  margin: 0 auto;
}
.port-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 15px;
  grid-auto-flow: dense;
}

.port-bg-grid {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 84vw;
  max-width: none;
  height: auto;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
.port-text,
.port-item {
  position: relative;
  z-index: 2;
}
.size-large {
  grid-column: span 2;
  grid-row: span 2;
}
.size-tall {
  grid-column: span 1;
  grid-row: span 2;
}
.size-wide {
  grid-column: span 2;
  grid-row: span 1;
}
.size-small {
  grid-column: span 1;
  grid-row: span 1;
}

.port-text {
  grid-column: span 2;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}
.port-text h3 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  line-height: 1.2;
}
.port-text p {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-color);
}

.port-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.port-img-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.port-item.is-zooming .port-img-bg {
  transform: scale(1.08);
}

.port-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  z-index: 2;
  pointer-events: none;
}
.port-item.is-shining::after {
  animation: shine 0.8s ease-in-out;
}
@keyframes shine {
  100% {
    left: 200%;
  }
}

/* ====================
   БЛОК 5: ОБО МНЕ (ИНТЕРАКТИВНЫЙ)
   ==================== */
.about-interactive {
  position: relative;
  width: 100%;
  min-height: 800px;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 0;
  z-index: 20;
}

.about-bg-img {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.board-wrapper {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 1400px;
}

.interactive-board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  transform: rotate(-1deg);
}

.board-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8));
}

.board-prop {
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s;
}

.prop-card {
  left: 18%;
  bottom: 12%;
  width: 25%;
  z-index: 12;
  border-radius: 8px;
  overflow: hidden;
  transform: rotate(-6deg);
}
.prop-card img {
  width: 100%;
  display: block;
}
.prop-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  z-index: 2;
  pointer-events: none;
}
.prop-card.anim-shine::after {
  animation: shine 0.8s ease-in-out;
}

.prop-pencil {
  left: 5%;
  bottom: 15%;
  width: 16%;
  z-index: 14;
  transform-origin: bottom center;
  cursor: default;
}

.prop-eraser {
  left: 7%;
  bottom: 5%;
  width: 9%;
  z-index: 15;
}

@keyframes eraser-rub {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(20px, -10px);
  }
  40% {
    transform: translate(-10px, 5px);
  }
  60% {
    transform: translate(20px, -10px);
  }
  80% {
    transform: translate(-5px, 2px);
  }
  100% {
    transform: translate(0, 0);
  }
}
.anim-eraser {
  animation: eraser-rub 0.7s ease-in-out;
}

.photos-group {
  position: absolute;
  right: 8%;
  top: 20%;
  width: 25%;
  height: 50%;
  cursor: pointer;
  z-index: 14;
}
.board-photo {
  position: absolute;
  width: 100%;
  height: auto;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
}
.photo-back {
  top: 10%;
  right: -25%;
  transform: rotate(12deg) scale(0.9);
  z-index: 1;
}
.photo-front {
  top: 0;
  right: 0;
  transform: rotate(-5deg);
  z-index: 2;
}
.photos-group.swapped .photo-back {
  z-index: 3;
  transform: rotate(-2deg) scale(1.05) translate(-10px, -10px);
}
.photos-group.swapped .photo-front {
  z-index: 1;
  transform: rotate(15deg) scale(0.9) translate(20px, 10px);
}

.connecting-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 18;
}
.connecting-lines polyline {
  fill: none;
  stroke: var(--brand-color);
  stroke-width: 0.3;
}

.interact-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--brand-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
  transition:
    transform 0.2s,
    background 0.3s;
  animation: idle-pulse 2s infinite;
  outline: none;
}
.interact-dot[data-index="0"] {
  animation-delay: 0s;
}
.interact-dot[data-index="1"] {
  animation-delay: 0.4s;
}
.interact-dot[data-index="2"] {
  animation-delay: 0.8s;
}
.interact-dot[data-index="3"] {
  animation-delay: 1.2s;
}

.interact-dot:hover {
  transform: translate(-50%, -50%) scale(1.3);
}
.interact-dot.active {
  background: #fff;
  animation: pulse-dot 1.5s infinite;
}

@keyframes idle-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0.8);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(128, 170, 242, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0);
  }
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0.9);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(128, 170, 242, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(128, 170, 242, 0);
  }
}

.tooltip-box {
  position: absolute;
  width: 320px;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(128, 170, 242, 0.4);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  z-index: 30;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    left 0.4s ease,
    top 0.4s ease;
  transform: translate(-50%, calc(-100% + 10px));
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  top: 0;
  left: 0;
}
.tooltip-box.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, calc(-100% - 15px));
}

.tooltip-close {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
  outline: none;
}
.tooltip-close:hover {
  color: var(--brand-color);
}

.tooltip-text {
  font-size: 17px;
  line-height: 1.5;
  margin: 15px 0 25px;
  color: #ddd;
  transition: opacity 0.2s ease;
}

.tooltip-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}
.tt-arrow {
  background: none;
  border: none;
  color: var(--brand-color);
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: transform 0.2s;
  outline: none;
}
.tt-arrow:hover {
  transform: scale(1.2);
}
.tt-arrow svg {
  width: 100%;
  height: 100%;
}

.tt-dots-indicator {
  display: flex;
  gap: 6px;
}

.tt-ind-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition:
    background 0.3s,
    transform 0.2s;
  cursor: pointer;
  outline: none;
}
.tt-ind-dot:hover {
  transform: scale(1.5);
}
.tt-ind-dot.active {
  background: var(--brand-color);
}

/* ====================
   БЛОК 6: ДРУГИЕ ПРОДУКТЫ
   ==================== */
.other-products-section {
  width: 100%;
  padding: 100px 0 60px;
  background-color: var(--bg-color);
  position: relative;
  z-index: 20;
}

.products-container {
  width: 84%;
  margin: 0 auto;
}

.products-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 50px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--brand-color);
  transform: translateY(-5px);
}

.product-icon {
  margin-bottom: 40px;
}
.product-icon img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  transition: transform 0.5s ease;
}
.product-card:hover:not(.disabled) .product-icon img {
  transform: scale(1.15);
}

.product-info {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.product-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  transition: color 0.3s;
}
.product-card:hover:not(.disabled) .product-info h3 {
  color: var(--brand-color);
}

.product-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.product-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}
.product-card:hover:not(.disabled) .product-arrow {
  background: var(--brand-color);
  border-color: var(--brand-color);
  color: #000;
}
.product-card:hover:not(.disabled) .product-arrow svg {
  transform: translateX(4px);
}

.product-card.disabled {
  opacity: 0.5;
  cursor: default;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}
.product-card.disabled .product-icon img {
  filter: grayscale(100%);
}
.product-badge {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ====================
   ПОДВАЛ ПОРТФОЛИО
   ==================== */
.site-footer {
  width: 84%;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 20;
}

.footer-legal {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}
.footer-logo img {
  height: 20px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.footer-logo img:hover {
  opacity: 1;
}

/* ====================
   ПОПАП ОСТАВИТЬ ЗАЯВКУ
   ==================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.popup-content {
  background: #0a0a0a;
  padding: 40px 30px;
  width: 90%;
  max-width: 420px;
  border: 1px solid rgba(128, 170, 242, 0.3);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(128, 170, 242, 0.1);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  border-radius: 28px;
}
.popup-overlay.active .popup-content {
  transform: translateY(0) scale(1);
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: transparent !important;
  border: none;
  opacity: 0.5;
  transition:
    opacity 0.2s,
    color 0.2s;
  padding: 0 !important;
  width: 30px !important;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.close-btn:hover {
  opacity: 1;
  color: var(--brand-color);
}
.popup-content h3 {
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.popup-content input,
.popup-content textarea {
  width: 100%;
  padding: 15px 18px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition:
    border-color 0.3s,
    background 0.3s;
  outline: none;
  border-radius: 14px;
}
.popup-content input:focus,
.popup-content textarea:focus {
  border-color: var(--brand-color);
  background: rgba(255, 255, 255, 0.06);
}
.popup-content textarea {
  resize: none;
  height: 110px;
}
.popup-content button[type="submit"] {
  width: 100%;
  padding: 16px;
  background: var(--brand-color);
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    background-color 0.3s,
    transform 0.2s;
  margin-top: 10px;
  border-radius: 100px;
  outline: none;
}
.popup-content button[type="submit"]:hover {
  background: #6a95e0;
}

/* ====================
   ПОПАП КАРТОЧКИ ПРОЕКТА
   ==================== */
.project-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.project-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.project-popup-content {
  background: transparent;
  border: none;
  width: 90%;
  max-width: 1000px;
  position: relative;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.project-popup-overlay.active .project-popup-content {
  transform: translateY(0);
}
.project-popup-header {
  position: absolute;
  top: -75px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cat-divider {
  margin: 0 5px;
  color: rgba(255, 255, 255, 0.4);
}
.close-project-btn {
  position: absolute;
  top: -75px;
  right: 0;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    color 0.2s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
}
.close-project-btn:hover {
  opacity: 1;
  color: var(--brand-color);
}
.project-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  padding: 0;
}
.project-media {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.main-media {
  width: 100%;
  background: #000;
  overflow: hidden;
  position: relative;
}
.thumb-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.thumb-media img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #111;
}

.video-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand-color);
  border-radius: 50%;
  animation: spin-loader 1s linear infinite;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.video-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes spin-loader {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.project-info {
  display: flex;
  flex-direction: column;
}
.project-title-box {
  border: 1px solid rgba(128, 170, 242, 0.5);
  padding: 10px 15px;
  text-align: center;
  margin-bottom: 25px;
}
.project-title-box h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
}
.info-block {
  margin-bottom: 18px;
}
.info-block h4 {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
  font-weight: 400;
}
.info-block p {
  font-size: 16px;
  color: #fff;
  line-height: 1.5;
}
.project-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: var(--brand-color);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}
.colors {
  display: flex;
  gap: 5px;
}
.color-swatch {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-color);
  color: #000;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 3010;
  outline: none;
}
.nav-arrow:hover {
  transform: translateY(-50%) scale(1.1);
}
.nav-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.prev-arrow {
  left: 4%;
}
.next-arrow {
  right: 4%;
}

/* ВЕРСТКА 2: WEB-ПОРТФОЛИО */
.layout-web {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.monitor-mockup-img {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
.monitor-bg-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 5;
  pointer-events: none;
}
.monitor-screen-area {
  position: absolute;
  z-index: 2;
  background: #000;
  aspect-ratio: 16 / 9;
  width: 99%;
  top: 2%;
  left: 0%;
  border-radius: 4px;
  overflow: hidden;
}
.monitor-screen-area iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.web-info {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.layout-web .project-title-box {
  margin-top: 0px;
}
.web-desc-text {
  font-size: 16px;
  color: #fff;
  line-height: 1.6;
  margin-top: 25px;
}
.web-desc-text p {
  margin-bottom: 15px;
}
.web-tech-icons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: auto;
  margin-bottom: 15px;
}
.tech-icon {
  background: #222;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: monospace;
  border: 1px solid #444;
}
.web-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 280px;
  margin-left: auto;
}

/* ====================
   АДАПТАЦИЯ (МЕДИА-ЗАПРОСЫ)
   ==================== */
@media (max-width: 1100px) {
  header {
    padding: 0 5%;
    justify-content: space-between;
  }
  .header-nav,
  .header-actions {
    display: none;
  }
  .header-logo {
    position: relative;
    left: 0;
    transform: none;
  }
  .hamburger {
    display: flex;
  }
  .phi-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 40px;
  }
  .phi-side-text.text-left {
    display: none;
  }
  .phi-side-text.text-right {
    order: 1;
    text-align: center;
    position: relative;
    z-index: 60;
  }
  .phi-slider-container {
    order: 2;
    margin-top: -20px;
  }
  .br-desk {
    display: none;
  }
  .phi-side-text p,
  .phi-side-text .highlight {
    white-space: nowrap;
  }
  .phi-bg {
    top: 160px;
  }
  .nav-hint {
    display: block;
  }
  .slider-arrow {
    display: none;
  }
  .port-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
  }

  /* Планшеты: Обо мне */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-photo {
    max-width: 350px;
    margin: 0 auto;
  }
  .about-info h2,
  .about-subtitle,
  .about-intro,
  .about-statement {
    text-align: center;
  }
  .about-intro {
    max-width: 100%;
  }

  /* Планшеты: Другие продукты */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .floating-tg {
    display: flex;
    position: fixed;
    bottom: 110px;
    right: 5%;
    width: 55px;
    height: 55px;
    background-color: rgba(128, 170, 242, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 99;
    animation: pulse-tg 2s infinite;
  }
  .floating-tg img {
    width: 28px;
    height: 28px;
  }
  .hero-man,
  .text-bottom-left,
  .hero-design-by,
  .hero-bg-text {
    display: none !important;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 30px;
    gap: 40px;
  }
  .hero-top-left-text {
    display: block;
    position: absolute;
    top: 85px;
    left: 5%;
    z-index: 10;
    font-size: 14px;
    white-space: nowrap;
  }
  .matryoshka-wrapper {
    position: relative;
    order: 1;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
  }
  .mat-part img {
    width: 200px;
  }
  .hero-text-container {
    position: relative;
    order: 2;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0;
    transform: none;
    height: auto;
    width: 90%;
  }
  .hero-top-row {
    justify-content: center;
  }
  .text-right {
    text-align: center;
    margin-bottom: 0;
  }
  .text-right h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 10px;
  }
  .text-right p {
    font-size: 22px;
  }
  .portfolio-link {
    position: relative;
    order: 3;
    left: auto;
    right: auto;
    bottom: auto;
    width: 60%;
    margin-top: 10px;
  }
  .btn-animated {
    width: 100%;
  }
  .btn-animated .circle {
    width: 100%;
  }
  .btn-animated .icon.arrow {
    animation: none;
    transform: none;
    margin-left: 0;
    left: 25px;
    background: #000;
  }
  .btn-animated .button-text {
    color: #000;
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
  }

  .philosophy-section {
    padding: 50px 0;
    min-height: auto;
  }
  .phi-bg {
    top: 170px;
  }
  .phi-slider-container {
    margin-top: 0px;
  }
  .matr-stage {
    height: 320px;
  }
  .matr-item {
    height: 200px;
  }
  .pos-center {
    transform: translate(0, 25px) scale(1.25);
    filter: blur(0);
    opacity: 1;
  }
  .pos-right {
    transform: translate(105px, -15px) scale(0.6);
    filter: blur(4px);
    opacity: 0.6;
  }
  .pos-left {
    transform: translate(-105px, -15px) scale(0.6);
    filter: blur(4px);
    opacity: 0.6;
  }
  .matr-info-wrapper {
    width: 100%;
    align-items: center;
    margin-top: 10px;
  }
  .phi-side-text {
    font-size: min(18px, 4.5vw);
  }
  .phi-side-text .highlight {
    font-size: 28px;
  }
  .matr-text-item h3,
  .matr-text-item h4 {
    font-size: 22px;
    margin-bottom: 10px;
  }
  .matr-text-item p {
    font-size: 16px;
    width: 95%;
  }

  .portfolio-section {
    padding: 60px 0 50px;
  }
  .port-bg-grid {
    top: 120px;
  }
  .port-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
  }
  .size-large,
  .size-tall,
  .size-wide,
  .size-small {
    grid-column: span 1;
    grid-row: span 1;
  }
  .port-text {
    grid-column: span 2;
    grid-row: span 1;
    text-align: center;
    height: auto;
    padding: 20px 0 10px;
  }
  .port-text h3,
  .port-text p {
    font-size: 22px;
  }
  .text-g1 {
    order: 1;
  }
  .img-g1 {
    order: 2;
  }
  .text-g2 {
    order: 3;
  }
  .img-g2 {
    order: 4;
  }
  .text-g3 {
    order: 5;
  }
  .img-g3 {
    order: 6;
  }

  /* Телефоны: Обо мне Интерактив */
  .interactive-board {
    aspect-ratio: auto;
    height: 500px;
  }
  .board-bg {
    object-fit: cover;
  }
  .tooltip-box {
    width: 90%;
    max-width: 300px;
  }
  .tooltip-box.active {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Телефоны: Другие продукты */
  .other-products-section {
    padding: 60px 0 40px;
  }
  .products-title {
    font-size: 22px;
    margin-bottom: 30px;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .product-card {
    padding: 20px;
    border-radius: 16px;
  }
  .product-icon {
    margin-bottom: 25px;
  }
  .product-icon img {
    width: 35px;
    height: 35px;
  }
  .product-info h3 {
    font-size: 14px;
  }
  .product-arrow {
    width: 30px;
    height: 30px;
  }
  .product-arrow svg {
    width: 14px;
    height: 14px;
  }

  /* Телефоны: Подвал */
  .site-footer {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  /* Телефоны: Попапы */
  .project-popup-header {
    position: relative;
    top: 0;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 20px;
    padding: 0 30px;
  }
  .project-layout {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 20px;
  }
  .project-popup-content {
    width: 90%;
    height: 85vh;
    overflow-y: auto;
    margin-top: 20px;
    padding-bottom: 40px;
  }
  .close-project-btn {
    position: absolute;
    top: 0px;
    right: 0;
    width: 26px;
    height: 26px;
    color: var(--brand-color);
    z-index: 3002;
    padding: 0;
  }
  .close-project-btn svg {
    width: 100%;
    height: 100%;
  }
  .nav-arrow {
    display: none;
  }
  .cat-divider {
    display: none !important;
  }
  .project-popup-header span:last-child {
    display: block;
    margin-top: 4px;
  }
  .layout-web {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .layout-web .project-title-box {
    margin-top: 0;
  }
  .web-desc-text {
    font-size: 15px;
  }
  .web-tags,
  .web-tech-icons {
    justify-content: flex-start;
    margin-left: 0;
    max-width: 100%;
  }
}
