/* ==========================================================================
   lostinthepast.ru — V3 "Digital Archive"
   Glassmorphism • Zero-G • Content sections • Accessible motion
   ========================================================================== */

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

:root {
  --bg-color: #040407;
  --pink-neon: #eb055a;
  --pink-glow: rgba(235, 5, 90, 0.45);
  --blue-neon: #4632f0;
  --blue-glow: rgba(70, 50, 240, 0.45);
  --cyan-accent: #00f2fe;
  --emerald-accent: #00ffaa;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: 28px;

  --text-main: #fcfcfd;
  --text-muted: rgba(245, 245, 250, 0.66);
  --text-dim: rgba(245, 245, 250, 0.36);

  --font-grotesk: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-syne: 'Syne', sans-serif;
  --font-josefin: 'Josefin Sans', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --nav-h: 76px;
  --ease-out: cubic-bezier(0.2, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  min-height: 100%;
}

body.is-loading {
  overflow: hidden;
}

a { color: inherit; }
img, svg { display: block; }

/* ==========================================================================
   Custom Cyber Cursor (fine pointers)
   ========================================================================== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  box-shadow: 0 0 10px #ffffff, 0 0 20px var(--cyan-accent);
}

.cursor-ring {
  z-index: 9998;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(1px);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  opacity: 1;
}

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

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: var(--pink-neon);
  background-color: rgba(235, 5, 90, 0.08);
  box-shadow: 0 0 25px var(--pink-glow);
}

body.cursor-glitch .cursor-ring {
  width: 74px;
  height: 74px;
  border-color: var(--cyan-accent);
  border-style: dashed;
  animation: cursorSpin 2s linear infinite;
}

@keyframes cursorSpin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Background: Canvas, Aurora, Blobs, Grain
   ========================================================================== */
#space-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.55;
}

.beam {
  position: absolute;
  width: 42vw;
  height: 140vh;
  filter: blur(70px);
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.beam-1 {
  top: -30%;
  left: 8%;
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.16), transparent 70%);
  transform: rotate(18deg);
  animation: beamDrift 26s ease-in-out infinite alternate;
}

.beam-2 {
  top: -20%;
  left: 46%;
  background: linear-gradient(180deg, rgba(235, 5, 90, 0.14), transparent 70%);
  transform: rotate(-14deg);
  animation: beamDrift 31s ease-in-out infinite alternate-reverse;
}

.beam-3 {
  top: -35%;
  right: 4%;
  background: linear-gradient(180deg, rgba(70, 50, 240, 0.18), transparent 72%);
  transform: rotate(8deg);
  animation: beamDrift 37s ease-in-out infinite alternate;
}

@keyframes beamDrift {
  0% { transform: translateX(-4%) rotate(12deg) scaleY(1); }
  100% { transform: translateX(6%) rotate(-10deg) scaleY(1.15); }
}

.blob-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  filter: blur(85px);
  transform: translateZ(0);
}

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

.blob-1 {
  width: 620px; height: 620px;
  background: radial-gradient(circle at 30% 30%, #ff1c7a, #eb055a 60%, transparent 80%);
  top: 8%; left: 12%;
  animation: floatBlob1 22s var(--ease-out) infinite alternate, morphBlob1 12s ease-in-out infinite alternate;
}

.blob-2 {
  width: 700px; height: 700px;
  background: radial-gradient(circle at 65% 35%, #6350ff, #4632f0 55%, transparent 80%);
  bottom: 2%; right: 8%;
  animation: floatBlob2 26s var(--ease-out) infinite alternate, morphBlob2 15s ease-in-out infinite alternate;
}

.blob-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(142, 21, 216, 0.85), rgba(235, 5, 90, 0.45) 50%, rgba(70, 50, 240, 0) 75%);
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  animation: floatBlob3 18s var(--ease-out) infinite alternate, morphBlob1 16s ease-in-out infinite alternate;
}

.blob-4 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.4), rgba(70, 50, 240, 0.3) 60%, transparent 80%);
  top: -6%; right: 26%;
  opacity: 0.4;
  animation: floatBlob1 30s var(--ease-out) infinite reverse;
}

.blob-5 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(235, 5, 90, 0.4), rgba(142, 21, 216, 0.2) 60%, transparent 80%);
  bottom: -12%; left: 18%;
  opacity: 0.45;
  animation: floatBlob2 24s var(--ease-out) infinite reverse;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(160px, -110px) scale(1.15) rotate(50deg); }
  66% { transform: translate(-90px, 140px) scale(0.9) rotate(100deg); }
  100% { transform: translate(120px, 90px) scale(1.08) rotate(150deg); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  33% { transform: translate(-170px, 80px) scale(0.88) rotate(-45deg); }
  66% { transform: translate(110px, -120px) scale(1.18) rotate(-95deg); }
  100% { transform: translate(-110px, -70px) scale(1.04) rotate(-150deg); }
}

@keyframes floatBlob3 {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -65%) scale(1.25) rotate(70deg); }
  100% { transform: translate(-65%, -35%) scale(0.85) rotate(-70deg); }
}

@keyframes morphBlob1 {
  0% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  50% { border-radius: 70% 30% 46% 54% / 30% 29% 71% 70%; }
  100% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
}

@keyframes morphBlob2 {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 35% 65% 60% 40% / 55% 45% 55% 45%; }
  100% { border-radius: 50% 50% 70% 30% / 40% 60% 40% 60%; }
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
  opacity: 0.4;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Scroll Progress
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 9000;
  pointer-events: none;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-neon), var(--pink-neon), var(--cyan-accent));
  box-shadow: 0 0 14px var(--pink-glow);
  transition: width 0.1s linear;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(6, 6, 12, 0.35);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.scrolled {
  background: rgba(6, 6, 12, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.nav-logo {
  font-family: var(--font-josefin);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
}

.nav-logo:hover {
  animation: ft-glitch 1s steps(4, end) infinite;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
}

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--cyan-accent);
  box-shadow: 0 0 8px var(--cyan-accent);
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Sound toggle */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.sound-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.audio-icon { width: 14px; height: 14px; }

.sound-wave { opacity: 0.3; transition: opacity 0.3s ease; }

.sound-toggle.sound-active {
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 0 22px -4px rgba(0, 242, 254, 0.5);
}

.sound-toggle.sound-active .sound-wave { opacity: 1; stroke: var(--cyan-accent); }
.sound-toggle.sound-active .sound-label { color: var(--cyan-accent); }

/* ==========================================================================
   Section scaffolding
   ========================================================================== */
.section {
  position: relative;
  z-index: 10;
  padding: clamp(90px, 14vh, 160px) clamp(20px, 5vw, 56px);
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

.section-index {
  color: var(--pink-neon);
  text-shadow: 0 0 14px var(--pink-glow);
}

.section-kicker { text-transform: uppercase; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  perspective: 1400px;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
}

.card-float-wrapper {
  animation: levitationFloat 7.8s ease-in-out infinite;
  will-change: transform;
}

@keyframes levitationFloat {
  0% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-20px) rotate(-0.6deg); }
  70% { transform: translateY(14px) rotate(0.8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.glass-card {
  position: relative;
  width: 100%;
  max-width: 780px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(190%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(190%);
  border-radius: 32px;
  border: 1px solid var(--glass-border);
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  box-shadow:
    0 35px 90px -15px rgba(0, 0, 0, 0.8),
    0 0 60px -10px rgba(70, 50, 240, 0.22),
    0 0 45px -10px rgba(235, 5, 90, 0.18),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s var(--ease-out), box-shadow 0.4s ease, border-color 0.4s ease;
  transform-style: preserve-3d;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 45px 110px -20px rgba(0, 0, 0, 0.9),
    0 0 80px -5px rgba(70, 50, 240, 0.32),
    0 0 60px -5px rgba(235, 5, 90, 0.28),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.45);
}

.prismatic-border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  padding: 1.5px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0deg,
    var(--pink-neon) 45deg,
    transparent 90deg,
    var(--blue-neon) 180deg,
    var(--cyan-accent) 225deg,
    transparent 270deg,
    var(--pink-neon) 360deg
  );
  opacity: 0.6;
}

.glass-reflection {
  position: absolute;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 30%), rgba(255, 255, 255, 0.12) 0%, transparent 45%);
  opacity: 0.85;
  z-index: 2;
}

.scanline-sweeper {
  position: absolute;
  top: -100%; left: -100%;
  width: 300%; height: 20px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.15), rgba(235, 5, 90, 0.25), transparent);
  transform: rotate(-35deg);
  pointer-events: none;
  z-index: 2;
  animation: scanlineSweep 9s linear infinite;
}

@keyframes scanlineSweep {
  0% { transform: translateY(0) rotate(-35deg); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translateY(1200px) rotate(-35deg); opacity: 0.8; }
  55%, 100% { opacity: 0; }
}

.glass-crack-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  mix-blend-mode: overlay;
  background: linear-gradient(135deg, transparent 35%, rgba(255, 255, 255, 0.5) 49%, rgba(235, 5, 90, 0.7) 50%, rgba(70, 50, 240, 0.7) 51%, transparent 65%);
  transition: opacity 0.1s ease;
}

.glass-card.ruptured .glass-crack-effect {
  opacity: 0.95;
  animation: glassFracturePulse 0.35s steps(2, start) infinite;
}

@keyframes glassFracturePulse {
  0% { clip-path: polygon(0% 18%, 100% 28%, 100% 48%, 0% 38%); transform: translate(-4px, 2px); }
  50% { clip-path: polygon(0% 58%, 100% 48%, 100% 78%, 0% 88%); transform: translate(4px, -2px); }
  100% { clip-path: polygon(0% 32%, 100% 22%, 100% 62%, 0% 72%); transform: translate(-2px, 1px); }
}

/* ---- Card content ---- */
.card-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--emerald-accent);
  box-shadow: 0 0 10px var(--emerald-accent), 0 0 20px var(--emerald-accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.header-badges { display: flex; gap: 8px; }

.cyber-badge {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  white-space: nowrap;
}

.neon-badge {
  background: rgba(235, 5, 90, 0.12);
  border-color: rgba(235, 5, 90, 0.4);
  color: var(--pink-neon);
}

.card-body {
  position: relative;
  z-index: 5;
  margin-bottom: 36px;
}

.category-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--cyan-accent);
  margin-bottom: 14px;
}

.meta-divider { opacity: 0.35; }

.title-container {
  display: inline-flex;
  flex-direction: column;
  cursor: pointer;
  margin-bottom: 20px;
  position: relative;
}

/* ft-glitch — chromatic RGB text-shadow (pink #eb055a + blue #4632f0) */
@keyframes ft-glitch {
  0% { text-shadow: none; }
  25% { text-shadow: -2px -2px 0 var(--pink-neon), 2px 2px 0 var(--blue-neon); }
  50% { text-shadow: 2px -2px 0 var(--pink-neon), -2px 2px 0 var(--blue-neon); }
  75% { text-shadow: -2px 2px 0 var(--pink-neon), 2px -2px 0 var(--blue-neon); }
  100% { text-shadow: 2px 2px 0 var(--pink-neon), -2px -2px 0 var(--blue-neon); }
}

.glitch-title {
  font-family: var(--font-josefin);
  font-size: clamp(38px, 6.2vw, 66px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: #ffffff;
  position: relative;
  display: inline-block;
  user-select: none;
}

/* Trigger 1: hover. Trigger 2: .is-glitching, added by JS at random intervals */
.title-container:hover .glitch-title,
.glitch-title.is-glitching {
  animation: ft-glitch 1s steps(4, end) infinite;
}

.title-hint {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 6px;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.title-container:hover .title-hint {
  color: var(--pink-neon);
  opacity: 1;
}

.glitch-char {
  display: inline-block;
  position: relative;
  white-space: pre;
  will-change: transform, text-shadow;
  transition: transform 0.08s ease;
}

.title-container:hover .glitch-char,
.glitch-char.active-glitch {
  animation: charJitter var(--dur, 0.28s) var(--del, 0s) steps(1) infinite;
}

@keyframes charJitter {
  0% { transform: translate(0, 0); }
  20% { transform: translate(var(--jitter-x1, -2px), var(--jitter-y1, 1px)); }
  40% { transform: translate(var(--jitter-x2, 2px), var(--jitter-y2, -2px)); }
  60% { transform: translate(var(--jitter-x1, -1px), var(--jitter-y2, 2px)); }
  80% { transform: translate(var(--jitter-x2, 1px), var(--jitter-y1, -1px)); }
  100% { transform: translate(0, 0); }
}

.description {
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-muted);
  max-width: 580px;
  font-weight: 300;
}

/* ---- Buttons ---- */
.card-actions {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 9999px;
  font-family: var(--font-grotesk);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  will-change: transform;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5), 0 0 25px -2px rgba(255, 255, 255, 0.15);
}

.btn-glow {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.glass-btn:hover .btn-glow { transform: translateX(120%); }

.primary-btn {
  background: rgba(235, 5, 90, 0.14);
  border-color: rgba(235, 5, 90, 0.45);
  box-shadow: 0 0 25px -5px rgba(235, 5, 90, 0.35);
}

.primary-btn:hover {
  background: rgba(235, 5, 90, 0.28);
  border-color: rgba(235, 5, 90, 0.8);
  box-shadow: 0 12px 35px -5px rgba(235, 5, 90, 0.55), 0 0 30px rgba(70, 50, 240, 0.4);
}

.btn-icon { width: 13px; height: 13px; transition: transform 0.25s ease; }
.primary-btn:hover .btn-icon { transform: translate(2px, -2px); }

/* ---- Card footer ---- */
.card-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.telemetry-item { display: flex; gap: 6px; align-items: center; }
.tel-val { color: var(--text-muted); }
.link-v1 { gap: 12px; }

.v1-link {
  color: var(--cyan-accent);
  text-decoration: none;
  font-weight: 500;
  transition: text-shadow 0.2s ease;
}

.v1-link:hover { text-shadow: 0 0 10px var(--cyan-accent); }

/* ---- Orbital satellites ---- */
.satellite {
  position: absolute;
  z-index: 15;
  pointer-events: auto;
  will-change: transform;
}

.sat-top-right { top: 16%; right: 10%; animation: satFloat1 8s ease-in-out infinite; }
.sat-bottom-left { bottom: 16%; left: 9%; animation: satFloat2 9s ease-in-out infinite; }
.sat-top-left { top: 18%; left: 10%; animation: satFloat3 8.5s ease-in-out infinite; }

@keyframes satFloat1 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(1.2deg); } }
@keyframes satFloat2 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(18px) rotate(-1.5deg); } }
@keyframes satFloat3 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(-1deg); } }

.glass-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  box-shadow:
    0 15px 35px -5px rgba(0, 0, 0, 0.6),
    0 0 25px -5px rgba(70, 50, 240, 0.15),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);
  user-select: none;
}

.sat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--emerald-accent);
  box-shadow: 0 0 10px var(--emerald-accent), 0 0 20px var(--emerald-accent);
  animation: pulseDot 2s ease-in-out infinite;
}

.sat-glyph { color: var(--pink-neon); font-size: 13px; text-shadow: 0 0 10px var(--pink-glow); }

.sat-info { display: flex; flex-direction: column; }

.sat-label { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.16em; color: var(--text-dim); }
.sat-val { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--text-main); }

.equalizer { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.eq-bar { width: 3px; background: var(--pink-neon); border-radius: 2px; animation: eqBounce 1.2s ease-in-out infinite alternate; }
.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { height: 100%; animation-delay: 0.5s; }
.eq-bar:nth-child(5) { height: 50%; animation-delay: 0.4s; }

@keyframes eqBounce { 0% { transform: scaleY(0.3); } 100% { transform: scaleY(1); } }

/* ---- Scroll cue ---- */
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 12;
}

.scroll-cue-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, transparent, var(--cyan-accent));
  position: relative;
  overflow: hidden;
}

.scroll-cue-line::after {
  content: '';
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--cyan-accent);
  animation: cueDrop 2.2s ease-in-out infinite;
}

@keyframes cueDrop {
  0% { top: -50%; opacity: 0; }
  40% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.scroll-cue-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}

/* ==========================================================================
   Quote section
   ========================================================================== */
.quote-glass {
  position: relative;
  margin: 0;
  padding: clamp(34px, 6vw, 68px) clamp(28px, 6vw, 72px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  overflow: hidden;
  box-shadow:
    0 30px 80px -25px rgba(0, 0, 0, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.14);
}

.quote-glass::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 140%;
  background: radial-gradient(circle, rgba(70, 50, 240, 0.22), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
}

.quote-mark {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(80px, 14vw, 150px);
  line-height: 0.7;
  color: transparent;
  background: linear-gradient(140deg, var(--pink-neon), var(--blue-neon));
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.5;
  margin-bottom: 6px;
}

.quote-text {
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 4.2vw, 52px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #ffffff;
  max-width: 20ch;
  margin: 0;
  text-wrap: balance;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  font-family: var(--font-mono);
}

.quote-rule {
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, var(--pink-neon), transparent);
}

.quote-author cite {
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-main);
}

.quote-source {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ==========================================================================
   Archive grid
   ========================================================================== */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.archive-card {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 26px 26px 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.archive-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    0 30px 60px -25px rgba(0, 0, 0, 0.8),
    0 0 45px -10px rgba(70, 50, 240, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.archive-card .prismatic-border {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.archive-card:hover .prismatic-border {
  opacity: 0.7;
}

.archive-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.archive-num { color: var(--pink-neon); }
.archive-tag { color: var(--text-dim); }

.archive-title {
  font-family: var(--font-grotesk);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.archive-desc {
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.archive-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cyan-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.archive-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--card-x, 50%) var(--card-y, 50%), rgba(255, 255, 255, 0.1), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.archive-card:hover .archive-shine { opacity: 1; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-glass {
  position: relative;
  text-align: center;
  padding: clamp(44px, 8vw, 84px) clamp(24px, 6vw, 72px);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  overflow: hidden;
  box-shadow:
    0 35px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 60px -20px rgba(235, 5, 90, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.16);
}

.contact-glass::before {
  content: '';
  position: absolute;
  top: -60%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 160%;
  background: radial-gradient(circle, rgba(235, 5, 90, 0.2), rgba(70, 50, 240, 0.16) 45%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.contact-title {
  position: relative;
  font-family: var(--font-grotesk);
  font-size: clamp(26px, 4.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 18px auto 18px;
  max-width: 16ch;
}

.contact-desc {
  position: relative;
  max-width: 520px;
  margin: 0 auto 36px;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--text-muted);
}

.contact-actions {
  position: relative;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 32px clamp(20px, 5vw, 56px);
  background: rgba(4, 4, 7, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.footer-brand {
  font-family: var(--font-syne);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.footer-brand span {
  background: linear-gradient(90deg, var(--pink-neon), var(--blue-neon));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .satellite { display: none; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }

  .nav-links { display: none; }

  .glass-card { border-radius: 24px; }

  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  .section { padding-left: 18px; padding-right: 18px; }

  .glass-reflection { display: none; }

  .archive-grid { grid-template-columns: 1fr; }

  .quote-text { max-width: 100%; }
}

/* ==========================================================================
   Reduced motion & touch
   ========================================================================== */
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

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

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .card-float-wrapper,
  .satellite,
  .blob,
  .beam,
  .scanline-sweeper { animation: none !important; }

  .reveal { opacity: 1; transform: none; }

  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ==========================================================================
   Mobile / touch performance profile — class .perf-lite
   Вешается из script.js на телефонах и тач-устройствах. Убирает самые
   дорогие для мобильного GPU эффекты, сохраняя общий вид:
     • все backdrop-filter (стекло) -> полупрозрачная заливка
     • полноэкранный filter: blur(85px) у контейнера блобов
     • тяжёлые filter: blur(70-85px) у лучей и свечений
     • mix-blend-mode и лишний will-change
   Полный режим для проверки: добавь ?full=1 к адресу.
   Убрать совсем — удалить этот блок и блок "performance profile" в script.js.
   ========================================================================== */
html.perf-lite *, html.perf-lite *::before, html.perf-lite *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.perf-lite {
  --glass-bg: rgba(18, 18, 30, 0.62);
  --glass-blur: 0px;
}

html.perf-lite .nav { background: rgba(6, 6, 12, 0.72); }
html.perf-lite .quote-glass,
html.perf-lite .contact-glass { background: rgba(18, 18, 30, 0.6); }
html.perf-lite .footer { background: rgba(4, 4, 7, 0.82); }

/* ключевой фикс: полноэкранный blur(85px) контейнера блобов */
html.perf-lite .blob-container {
  filter: none !important;
  transform: none;
}

html.perf-lite .blob {
  mix-blend-mode: normal !important;
  will-change: auto;
}

/* только плавное всплытие — без перекраски border-radius (morph) */
html.perf-lite .blob-1 { animation: floatBlob1 22s var(--ease-out) infinite alternate; }
html.perf-lite .blob-2 { animation: floatBlob2 26s var(--ease-out) infinite alternate; }
html.perf-lite .blob-3 { animation: floatBlob3 18s var(--ease-out) infinite alternate; }
html.perf-lite .blob-4 { animation: floatBlob1 30s var(--ease-out) infinite reverse; }
html.perf-lite .blob-5 { animation: floatBlob2 24s var(--ease-out) infinite reverse; }

/* декоративные лучи (три filter: blur(70px)) на мобиле не нужны */
html.perf-lite .aurora { display: none; }

/* Свечения карточек: без blur, но растянуты на всю карточку — иначе
   по краям (например, в разделе "Open channel") остаются тёмные полосы. */
html.perf-lite .contact-glass::before {
  filter: none !important;
  top: -55%;
  width: 160%;
  height: 200%;
  background: radial-gradient(ellipse at center,
    rgba(235, 5, 90, 0.22),
    rgba(70, 50, 240, 0.17) 45%,
    transparent 80%);
}

html.perf-lite .quote-glass::before {
  filter: none !important;
  top: -35%;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 160%;
  height: 180%;
  background: radial-gradient(ellipse at center,
    rgba(70, 50, 240, 0.22),
    transparent 80%);
}

/* blend-режимы мешают чисто-GPU композитингу */
html.perf-lite .scanline-sweeper { mix-blend-mode: normal !important; }

/* меньше слоёв в видеопамяти */
html.perf-lite .card-float-wrapper,
html.perf-lite .glass-card,
html.perf-lite .archive-card { will-change: auto; }
