/* ===== Токены: премиальный neon (не кислотный) ===== */
:root {
  --void: #030208;
  --deep: #0a0620;
  --neon-blue: #6ec8ff;
  --neon-pink: #f0a8d8;
  --neon-blue-soft: rgba(110, 200, 255, 0.45);
  --neon-pink-soft: rgba(240, 168, 216, 0.4);
  --glass: rgba(12, 10, 28, 0.45);
  --glass2: rgba(18, 14, 36, 0.55);
  --line: rgba(255, 255, 255, 0.09);
  --text: rgba(252, 252, 255, 0.96);
  --muted: rgba(252, 252, 255, 0.5);
  --soft: rgba(252, 252, 255, 0.78);
  --glow-blue: 0 0 60px rgba(110, 200, 255, 0.22);
  --glow-pink: 0 0 50px rgba(240, 168, 216, 0.2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: clamp(20px, 2.2vw, 26px);
  --container: 1480px;
}

/* Свечение сильнее при включённой музыке (body.music-on) */
body.music-on {
  --glow-blue: 0 0 110px rgba(110, 200, 255, 0.48);
  --glow-pink: 0 0 95px rgba(240, 168, 216, 0.42);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--void);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== Фон: тёмный градиент + particles.js (без mesh-псевдоэлементов на .bg-base) ===== */
.page {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  isolation: isolate;
}

/*
 * Слои (снизу вверх): подложка → фото/неон → DotGrid (z2) → particles (z3) → контент (z4).
 * Раньше частицы были z-index:0 под .page-bg-over (2) — сеть рисовалась, но её почти не было видно
 * под затемнённым фото; казалось, что «нити не крепятся».
 */
.page-bg-under,
.page-bg-over {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-bg-under {
  z-index: 0;
}

.page-bg-over {
  z-index: 1;
  isolation: isolate;
}

/* Градиент + canvas: над DotGrid и фото, под .page; отдельный композитный слой — меньше рывков при скролле */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 3;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: background 0.5s ease;
  background: linear-gradient(to top right, #e3f2fd 0%, #90caf9 50%, #64b5f6 100%);
}

html:not(.theme-light):not([data-theme="light"]) #particles-js,
html.dark #particles-js,
html[data-theme="dark"] #particles-js {
  background: linear-gradient(to top right, #000814 0%, #003566 50%, #0077b6 100%);
}

#particles-js canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  transform: translateZ(0);
}

.bg-base {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(165deg, #040818 0%, #0d1638 32%, #0a0620 65%, #030208 100%);
}

/* Слои 1–3: крупные radial glow, разные направления + пульсация */
.bg-neon-lights {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  animation: neonLightsScalePulseIdle 18s ease-in-out infinite;
}

body.music-on .bg-neon-lights {
  animation: neonLightsScalePulseMusic 11s ease-in-out infinite;
}

.bg-neon-lights__orb {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

/* слой 1: cyan / blue — верх-лево */
.bg-neon-lights__orb--a {
  width: min(110vw, 1000px);
  height: min(110vw, 1000px);
  left: -28%;
  top: -18%;
  background: radial-gradient(
    circle at 40% 42%,
    rgba(110, 200, 255, 0.55) 0%,
    rgba(80, 140, 220, 0.2) 38%,
    transparent 68%
  );
  filter: blur(72px);
  opacity: 0.75;
  animation: orbDriftAIdle 36s ease-in-out infinite alternate;
}

/* слой 2: magenta / violet — низ-право, другое направление */
.bg-neon-lights__orb--b {
  width: min(100vw, 920px);
  height: min(100vw, 920px);
  right: -24%;
  bottom: -20%;
  background: radial-gradient(
    circle at 58% 48%,
    rgba(220, 120, 200, 0.45) 0%,
    rgba(147, 112, 219, 0.28) 42%,
    transparent 70%
  );
  filter: blur(88px);
  opacity: 0.58;
  animation: orbDriftBIdle 44s ease-in-out infinite alternate;
}

/* слой 3: центр — фиолетово-розовый, пульс opacity + scale */
.bg-neon-lights__orb--c {
  width: min(85vw, 780px);
  height: min(85vw, 780px);
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle at 40% 45%,
    rgba(180, 100, 220, 0.35) 0%,
    rgba(240, 168, 216, 0.18) 45%,
    transparent 72%
  );
  filter: blur(96px);
  opacity: 0.52;
  animation: orbPulseCIdle 22s ease-in-out infinite alternate;
}

body.music-on .bg-neon-lights__orb--a {
  animation: orbDriftAMusic 28s ease-in-out infinite alternate;
  opacity: 0.88;
  filter: blur(68px) brightness(1.08);
}

body.music-on .bg-neon-lights__orb--b {
  animation: orbDriftBMusic 34s ease-in-out infinite alternate;
  opacity: 0.72;
  filter: blur(82px) brightness(1.06);
}

body.music-on .bg-neon-lights__orb--c {
  animation: orbPulseCMusic 16s ease-in-out infinite alternate;
  opacity: 0.68;
  filter: blur(88px) brightness(1.1);
}

@keyframes orbDriftAIdle {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12%, 10%) scale(1.12); }
}

@keyframes orbDriftBIdle {
  0% { transform: translate(0, 0) scale(1.02); }
  100% { transform: translate(-14%, -12%) scale(1.14); }
}

@keyframes orbPulseCIdle {
  0% { opacity: 0.42; transform: translate(-50%, -50%) scale(0.96); }
  100% { opacity: 0.62; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes orbDriftAMusic {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12%, 10%) scale(1.12); }
}

@keyframes orbDriftBMusic {
  0% { transform: translate(0, 0) scale(1.02); }
  100% { transform: translate(-14%, -12%) scale(1.14); }
}

@keyframes orbPulseCMusic {
  0% { opacity: 0.52; transform: translate(-50%, -50%) scale(0.97); }
  100% { opacity: 0.78; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes neonLightsScalePulseIdle {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes neonLightsScalePulseMusic {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Фото — глубина */
.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-photo::before {
  content: "";
  position: absolute;
  inset: -12%;
  background-image: url("https://i.imgur.com/vCUrq9r.jpeg");
  background-size: cover;
  background-position: center 20%;
  filter: blur(36px) saturate(1.06) brightness(0.38);
  transform: scale(1.1);
  opacity: 0.75;
}

.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 2, 8, 0.88) 0%, rgba(8, 6, 22, 0.45) 45%, rgba(3, 2, 10, 0.9) 100%);
}

/* Параллакс-orb под курсор (тонкие, поверх фото, под неоном) */
.bg-mouse-orbs {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.bg-orb-1 {
  width: min(90vw, 920px);
  height: min(90vw, 920px);
  left: -28%;
  top: -24%;
  background: radial-gradient(circle at 38% 40%, rgba(168, 85, 247, 0.95) 0%, rgba(100, 60, 180, 0.25) 45%, transparent 68%);
}

.bg-orb-2 {
  width: min(85vw, 860px);
  height: min(85vw, 860px);
  right: -26%;
  bottom: -26%;
  background: radial-gradient(circle at 55% 48%, rgba(236, 72, 153, 0.9) 0%, rgba(180, 80, 160, 0.22) 48%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .bg-neon-lights,
  .bg-neon-lights__orb {
    animation: none !important;
  }
  .bg-neon-lights { transform: none; }
  .bg-neon-lights__orb--a,
  .bg-neon-lights__orb--b { transform: none !important; opacity: 0.55; }
  .bg-neon-lights__orb--c {
    transform: translate(-50%, -50%) !important;
    opacity: 0.5;
  }
  .bg-mouse-orbs .bg-orb {
    transition: none !important;
  }
  .stagger-init .stagger-top-controls,
  .stagger-init .hero-head .eyebrow,
  .stagger-init .name-reveal,
  .stagger-init .hero-head .sub-title,
  .stagger-init .stagger-portrait,
  .stagger-init .stagger-card-1,
  .stagger-init .stagger-card-2,
  .stagger-init .stagger-card-3,
  .stagger-init .stagger-card-4,
  .stagger-init .stagger-actions {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .name {
    animation: nameCrystalShimmer 15s ease-in-out infinite;
    text-shadow: none;
    will-change: auto;
    filter:
      drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.48))
      drop-shadow(0 2px 3px rgba(0, 0, 0, 0.48))
      drop-shadow(0 0 12px rgba(125, 211, 252, 0.2));
  }

}

/* ===== Панель: звук + язык ===== */
.top-controls {
  position: fixed;
  top: max(clamp(10px, 2vh, 18px), env(safe-area-inset-top, 0px));
  right: max(clamp(12px, 3vw, 24px), env(safe-area-inset-right, 0px));
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ctrl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-family: inherit;
  color: var(--soft);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 6, 20, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), var(--glow-blue);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

.ctrl-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 200, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), var(--glow-blue), var(--glow-pink);
}

.ctrl-btn[aria-pressed="true"] {
  border-color: rgba(240, 168, 216, 0.35);
}

/* ===== Layout ===== */
.container {
  width: min(calc(100% - 16px), var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.hero {
  position: relative;
  z-index: 6;
  min-height: 100vh;
  min-height: 100dvh;
  /* запас под фиксированные кнопки + без обрезания при высоком контенте */
  padding: calc(env(safe-area-inset-top, 0px) + clamp(64px, 9vh, 96px)) 0 clamp(16px, 3vh, 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 14px);
  flex: 1;
  min-height: 0;
}

.hero-head {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
  flex-shrink: 0;
}

/* ===== Stagger появления (WOW) ===== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-init .stagger-top-controls {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.2s;
}

.stagger-init .hero-head .eyebrow {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.1s;
}

.stagger-init .name-reveal {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.25s;
}

.stagger-init .hero-head .sub-title {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.4s;
}

.stagger-init .stagger-portrait {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.5s;
}

.stagger-init .stagger-card-1 {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.6s;
}

.stagger-init .stagger-card-2 {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.7s;
}

.stagger-init .stagger-card-3 {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.8s;
}

.stagger-init .stagger-card-4 {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 0.9s;
}

.stagger-init .stagger-actions {
  opacity: 0;
  animation-name: fadeSlideUp;
  animation-delay: 1.1s;
}

.stagger-init .stagger-top-controls,
.stagger-init .hero-head .eyebrow,
.stagger-init .name-reveal,
.stagger-init .hero-head .sub-title,
.stagger-init .stagger-portrait,
.stagger-init .stagger-card-1,
.stagger-init .stagger-card-2,
.stagger-init .stagger-card-3,
.stagger-init .stagger-card-4,
.stagger-init .stagger-actions {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Обёртка: stagger без конфликта с анимацией градиента на .name */
.name-reveal {
  display: block;
  width: 100%;
  margin-bottom: 8px;
}

/* Имя: Unbounded + «хрустальный» объём + переливающийся градиент */
.name {
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(2.85rem, 8.2vw, 5.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  background: linear-gradient(
    125deg,
    #f0f9ff 0%,
    #bae6fd 12%,
    #a5b4fc 26%,
    #c4b5fd 38%,
    #f0abfc 50%,
    #fda4af 62%,
    #7dd3fc 74%,
    #e9d5ff 86%,
    #f0f9ff 100%
  );
  background-size: 280% 280%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: nameCrystalShimmer 12s ease-in-out infinite;
  will-change: background-position;
  filter:
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 36px rgba(125, 211, 252, 0.28));
}

@keyframes nameCrystalShimmer {
  0%,
  100% {
    background-position: 0% 45%;
  }
  50% {
    background-position: 100% 55%;
  }
}

.sub-title {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--soft);
  margin-bottom: 8px;
}

/* CTA: glass + neon */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 clamp(1.2rem, 2.8vw, 1.6rem);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-blue-soft), rgba(255, 255, 255, 0.08), var(--neon-pink-soft));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.btn span { position: relative; z-index: 1; }

/* Шапка: обе CTA в одинаковом outlined-стиле */
.btn-primary,
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.btn:active { transform: translateY(0); transition-duration: 0.1s; }

/* ===== Scene: сетка 3 колонки × 2 ряда, портрет в центре на 2 ряда ===== */
.scene {
  width: 100%;
  margin-inline: auto;
  padding-block: 4px;
}

.scene--quad {
  display: grid;
  grid-template-columns: 1fr minmax(220px, min(34vw, 400px)) 1fr;
  grid-template-rows: minmax(200px, 1fr) minmax(200px, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  align-items: stretch;
  justify-items: stretch;
  flex: 1 1 auto;
  min-height: min(46vh, 500px);
  max-height: min(74vh, calc(100dvh - 190px));
  width: 100%;
  max-width: 100%;
}

.scene--quad > .card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.scene--quad > .quad-portrait-wrap {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: min(100%, 400px);
  max-height: min(100%, 430px);
  aspect-ratio: 1;
  margin: auto;
  justify-self: center;
  align-self: center;
  pointer-events: none;
}

.scene--quad > .card:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.scene--quad > .card:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}

.scene--quad > .card:nth-child(5) {
  grid-column: 3;
  grid-row: 2;
}

.quad-portrait-wrap .portrait-card {
  pointer-events: auto;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45)) drop-shadow(var(--glow-blue));
}

.quad-portrait-wrap .portrait-front {
  background: linear-gradient(165deg, var(--glass) 0%, rgba(8, 6, 22, 0.75) 100%);
}

.quad-portrait-wrap .portrait-front img {
  object-fit: cover;
  object-position: top center;
}

/* Портрет: скругление как карточки + glow */
.portrait-card {
  width: min(270px, 26vw);
  aspect-ratio: 3 / 4;
  max-height: min(42vh, 400px);
  perspective: 1400px;
  cursor: pointer;
  filter: drop-shadow(var(--glow-blue)) drop-shadow(var(--glow-pink));
  transition: transform 0.35s var(--ease), filter 0.5s var(--ease);
}

.portrait-card--quad {
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 430px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.portrait-card:not(.is-flipped):hover {
  transform: translateY(-4px);
}

body.music-on .portrait-card {
  filter: drop-shadow(0 0 70px rgba(110, 200, 255, 0.35)) drop-shadow(0 0 55px rgba(240, 168, 216, 0.28));
}

.portrait-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease);
}

.portrait-card.is-flipped .portrait-inner { transform: rotateY(180deg); }

.portrait-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  transform: translateZ(0.1px);
}

.portrait-front {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(110, 200, 255, 0.15) inset,
    0 24px 50px rgba(0, 0, 0, 0.5),
    var(--glow-blue);
}

.portrait-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portrait-back {
  transform: rotateY(180deg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  background: linear-gradient(165deg, var(--glass2) 0%, rgba(6, 4, 16, 0.92) 100%);
  backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), var(--glow-pink);
}

.portrait-back--rich {
  padding: 24px 22px 22px;
  gap: 14px;
}

.portrait-back::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(110, 200, 255, 0.5), rgba(240, 168, 216, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.portrait-flip-back {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: inherit;
  color: var(--soft);
  background: rgba(4, 2, 12, 0.55);
  border: 1px solid var(--line);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.about-name {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #b8e8ff, #f5d0f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.portrait-back--rich .about-name {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.about-kicker {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.portrait-back--rich .about-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
}

.about-lead {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--soft);
  position: relative;
  z-index: 1;
}

.portrait-back--rich .about-lead {
  font-size: 1rem;
  line-height: 1.55;
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.role-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.25s, transform 0.25s;
}

.role-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 168, 216, 0.45);
}

.mini-btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0618;
  background: linear-gradient(135deg, #a8e8ff, #f0c0e8);
  border: none;
  box-shadow: 0 8px 24px rgba(110, 200, 255, 0.3);
  margin-top: auto;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.mini-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(240, 168, 216, 0.35);
}

.mini-btn--contact {
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px;
  min-height: 3rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: #0a0618;
  background: linear-gradient(to right, #e8a0bf, #a8d8ea);
  border: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.mini-btn--contact:hover {
  box-shadow: 0 12px 36px rgba(232, 160, 191, 0.45);
}

/* ===== Карточки услуг: крупнее, читабельнее, кликабельно ===== */
[data-card] {
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-opacity: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 292px;
  height: 276px;
  flex-shrink: 0;
  perspective: 1100px;
  cursor: pointer;
  transition: transform 0.35s var(--ease), filter 0.35s;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

.card-tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.card.is-flipped { z-index: 12; }

.card:not(.is-flipped):hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.45)) drop-shadow(var(--glow-blue));
}

body.music-on .card:not(.is-flipped):hover {
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 45px rgba(110, 200, 255, 0.35));
}

.scene--quad .card {
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.scene--quad .card-front {
  padding: 0;
}

.scene--quad .flip-btn {
  height: 100%;
  min-height: 100%;
  justify-content: space-between;
  padding: clamp(14px, 2vw, 32px) clamp(16px, 2.5vw, 40px);
  text-align: center;
}

.scene--quad .card-label {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.scene--quad .card-title {
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: auto;
  padding-inline: 0.2em;
  max-width: 100%;
}

.scene--quad .card-tap-hint {
  margin-top: 0;
  font-size: clamp(14px, 1.2vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}

.card.is-flipped .card-inner { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  transform: translateZ(0.1px);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(12, 10, 28, 0.42) 42%,
    rgba(8, 6, 22, 0.72) 100%
  );
  backdrop-filter: blur(26px) saturate(1.12);
  -webkit-backdrop-filter: blur(26px) saturate(1.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(110, 200, 255, 0.06) inset,
    0 16px 48px rgba(0, 0, 0, 0.35);
}

.card-front {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
}

.card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(168, 85, 247, 0.15),
    transparent 70%
  );
  opacity: var(--glow-opacity, 0);
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(110, 200, 255, 0.45), rgba(255, 255, 255, 0.06), rgba(240, 168, 216, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.card-tap-hint {
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.card-back {
  transform: rotateY(180deg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  overflow: hidden;
}

.scene--quad .card-back {
  padding: clamp(14px, 1.8vw, 20px) clamp(16px, 2vw, 24px);
  gap: 8px;
}

.card-flip-back {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 2, 12, 0.5);
  cursor: pointer;
  z-index: 2;
  flex-shrink: 0;
}

.card-flip-back::before,
.card-flip-back::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-flip-back::after { transform: translate(-50%, -50%) rotate(-45deg); }

.flip-btn {
  appearance: none;
  width: 100%;
  flex: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  position: relative;
  z-index: 2;
}

.card-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-title {
  font-size: clamp(1.35rem, 2.3vw, 1.72rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-transform: uppercase;
}

.card-back-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-back-title {
  font-family: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  color: #fff;
}

.scene--quad .card-back-title {
  font-size: clamp(14px, 1.5vw, 18px);
}

.card-back-price {
  font-size: clamp(13px, 1.1vw, 15px);
  color: #c084fc;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-back-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-height: 0;
  align-content: center;
  justify-content: flex-start;
  overflow: hidden;
  max-height: calc(2 * (0.8125rem + 12px + 2px) + 8px);
}

.scene--quad .card-back-tags {
  max-height: calc(2 * (0.8125rem + 11px + 2px) + 6px);
}

.card-back-tag {
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0eef6;
  white-space: nowrap;
  line-height: 1.25;
}

.scene--quad .card-back-tag {
  font-size: 13px;
  padding: 5px 12px;
}

.card-back-bottom {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

.card-back-cta {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  padding: 12px 16px;
  border-radius: 30px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.card-back-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.35);
}

.mini-btn--card {
  align-self: stretch;
  margin-top: auto;
  flex-shrink: 0;
}

/* ===== Адаптив ===== */
@media (max-width: 960px) {
  .scene--quad {
    display: flex;
    flex-direction: column;
    max-height: none;
    min-height: 0;
    gap: 14px;
  }
  .scene--quad > .card:nth-child(1),
  .scene--quad > .card:nth-child(3),
  .scene--quad > .card:nth-child(4),
  .scene--quad > .card:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
  .quad-portrait-wrap {
    order: -1;
    width: min(300px, 88vw);
    max-width: 360px;
    max-height: min(360px, 70vw);
    margin: 0 auto 8px;
    aspect-ratio: 1;
  }
  .scene--quad .card {
    min-height: 220px;
    height: auto;
    aspect-ratio: auto;
  }
  .scene--quad .card-title {
    font-size: clamp(22px, 5vw, 30px);
  }
}

/* Мобильные: имя без «моргания» GPU — только если не включено «уменьшить движение» */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .name {
    animation: nameCrystalShimmer 36s ease-in-out infinite;
    will-change: auto;
    filter:
      drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.45))
      drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45))
      drop-shadow(0 0 14px rgba(125, 211, 252, 0.22)) !important;
  }
}

/* Мобильные: компактнее верстка */
@media (max-width: 768px) {
  .container {
    width: min(calc(100% - 12px), var(--container));
  }

  .hero {
    padding: calc(env(safe-area-inset-top, 0px) + clamp(48px, 7vh, 72px)) 0 clamp(8px, 1.5vh, 16px);
  }

  .hero-inner {
    gap: clamp(4px, 1vh, 10px);
  }

  .hero-head {
    max-width: 100%;
  }

  .eyebrow {
    margin-bottom: 4px;
    letter-spacing: 0.22em;
  }

  .name-reveal {
    margin-bottom: 4px;
  }

  .sub-title {
    margin-bottom: 4px;
    line-height: 1.35;
    font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  }

  .actions {
    gap: 8px;
  }

  .btn {
    min-height: 2.5rem;
    padding: 0 clamp(1rem, 3vw, 1.35rem);
  }

  .scene {
    padding-block: 2px;
  }

  .scene--quad {
    gap: 10px;
    min-height: 0;
    max-height: none;
  }

  .quad-portrait-wrap {
    width: min(260px, 82vw);
    max-width: 300px;
    max-height: min(280px, 56vw);
    margin: 0 auto 6px;
  }

  .scene--quad .card {
    min-height: 168px;
    max-width: 100%;
  }

  .scene--quad .flip-btn {
    padding: clamp(10px, 2.5vw, 20px) clamp(12px, 3vw, 24px);
  }

  .scene--quad .card-back {
    padding: clamp(10px, 1.6vw, 16px) clamp(12px, 2vw, 18px);
    gap: 6px;
  }

  .scene--quad .card-back-tags {
    max-height: calc(2 * (0.75rem + 10px + 2px) + 4px);
  }

  .scene--quad .card-back-tag {
    font-size: 12px;
    padding: 4px 10px;
  }

  .scene--quad .card-title {
    font-size: clamp(18px, 4.8vw, 26px);
  }

  .top-controls {
    gap: 6px;
  }

  .ctrl-btn {
    padding: 6px 12px;
    font-size: 0.625rem;
  }

  .portrait-card--quad {
    max-height: 300px;
  }

  .portrait-back--rich {
    padding: 16px 14px 14px;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .top-controls { top: 8px; right: 8px; }
  .name { font-size: clamp(1.75rem, 8.5vw, 2.25rem); }
  .actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .scene--quad .card {
    min-height: 156px;
  }
}

@media (max-width: 380px) and (prefers-reduced-motion: no-preference) {
  .name {
    animation: nameCrystalShimmer 40s ease-in-out infinite;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(calc(100% - 8px), var(--container));
  }

  .hero {
    padding: calc(env(safe-area-inset-top, 0px) + 44px) 0 6px;
  }

  .hero-inner {
    gap: 3px;
  }

  .name {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .quad-portrait-wrap {
    width: min(220px, 78vw);
    max-height: min(240px, 52vw);
    margin-bottom: 4px;
  }

  .scene--quad {
    gap: 8px;
  }

  .scene--quad .card {
    min-height: 142px;
  }

  .scene--quad .card-title {
    font-size: clamp(16px, 4.5vw, 22px);
  }

  .btn {
    min-height: 2.35rem;
    font-size: 0.65rem;
  }

  .ctrl-btn {
    padding: 5px 10px;
    font-size: 0.58rem;
  }
}
