:root {
  --bg: #06070a;
  --bg-soft: #0f1117;
  --panel: rgba(15, 18, 24, 0.62);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #f7f8fb;
  --muted: #9da3b6;
  --lime: #dfff6d;
  --cyan: #7ce7ff;
  --rose: #ff7db8;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 231, 255, 0.16), transparent 24%),
    radial-gradient(circle at 82% 24%, rgba(255, 125, 184, 0.14), transparent 24%),
    radial-gradient(circle at 52% 100%, rgba(223, 255, 109, 0.12), transparent 30%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.03), transparent 42%),
    linear-gradient(315deg, rgba(124, 231, 255, 0.04), transparent 35%);
  pointer-events: none;
}

.noise,
.mesh,
.grid-lines,
.orb {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.055;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

.mesh {
  opacity: 0.42;
  background:
    radial-gradient(circle at 20% 30%, rgba(124, 231, 255, 0.14), transparent 22%),
    radial-gradient(circle at 75% 25%, rgba(255, 125, 184, 0.14), transparent 22%),
    radial-gradient(circle at 55% 75%, rgba(223, 255, 109, 0.12), transparent 24%);
  filter: blur(36px);
  animation: meshShift 18s ease-in-out infinite alternate;
}

.grid-lines {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: min(18vw, 140px) min(18vw, 140px);
  mask-image: radial-gradient(circle at center, black 28%, transparent 78%);
}

.orb {
  filter: blur(70px);
  opacity: 0.6;
}

.orb--one {
  inset: auto auto 12% 10%;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(124, 231, 255, 0.18);
  animation: drift 12s ease-in-out infinite alternate;
}

.orb--two {
  inset: 8% 10% auto auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: rgba(255, 125, 184, 0.16);
  animation: drift 14s ease-in-out infinite alternate-reverse;
}

.enter-screen {
  --enter-shift-x: 0px;
  --enter-shift-y: 0px;
  position: fixed;
  inset: 0;
  z-index: 20;
  border: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(223, 255, 109, 0.1), transparent 18%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.36), rgba(5, 7, 10, 0.88));
  transform: translate3d(var(--enter-shift-x), var(--enter-shift-y), 0);
  transition: opacity 0.55s ease, transform 0.28s ease, visibility 0.55s ease;
}

.enter-screen__halo {
  position: absolute;
  width: min(70vw, 28rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(124, 231, 255, 0.12), transparent 50%),
    radial-gradient(circle at 60% 40%, rgba(223, 255, 109, 0.14), transparent 42%);
  filter: blur(12px);
  transform: translate3d(calc(var(--enter-shift-x) * -0.65), calc(var(--enter-shift-y) * -0.65), 0);
  animation: pulse 2.8s ease-in-out infinite;
}

.enter-screen__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.1) 50%, transparent 62%);
  transform: translateX(-120%);
  animation: enterShimmer 3.6s ease-in-out infinite;
  pointer-events: none;
}

.enter-screen__label,
.enter-screen__subtitle {
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  color: var(--muted);
}

.enter-screen__title {
  position: relative;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  line-height: 0.9;
  text-transform: lowercase;
  text-shadow: 0 0 32px rgba(255, 255, 255, 0.08);
  transform: translate3d(calc(var(--enter-shift-x) * 0.3), calc(var(--enter-shift-y) * 0.3), 0);
}

.enter-screen--hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.page--hidden {
  opacity: 0;
}

.page--visible {
  opacity: 1;
  transition: opacity 0.85s ease 0.12s;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 231, 255, 0.18), rgba(124, 231, 255, 0.04) 42%, transparent 70%);
  filter: blur(18px);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease;
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
}

.hero {
  width: min(100%, 1100px);
  display: grid;
  justify-items: center;
  gap: 18px;
  perspective: 1400px;
}

.card {
  --card-rotate-x: 0deg;
  --card-rotate-y: 0deg;
  --card-translate-y: 0px;
  --card-scale: 1;
  position: relative;
  width: min(100%, 820px);
  padding: clamp(26px, 5vw, 54px);
  border-radius: 32px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  transform: rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) translateY(var(--card-translate-y)) scale(var(--card-scale));
  transform-style: preserve-3d;
  transition: transform 0.16s ease-out, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  will-change: transform;
}

.card:hover {
  border-color: rgba(223, 255, 109, 0.22);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.52);
}

.card--hidden {
  opacity: 0;
  --card-translate-y: 34px;
  --card-scale: 0.96;
}

.card--visible {
  opacity: 1;
  --card-translate-y: 0px;
  --card-scale: 1;
}

.card--tap {
  --card-translate-y: -6px;
  --card-scale: 0.99;
}

.card__shine,
.card__edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card__sweep {
  position: absolute;
  inset: -20%;
  background: linear-gradient(105deg, transparent 44%, rgba(124, 231, 255, 0.14) 50%, transparent 56%);
  transform: translateX(-135%) rotate(8deg);
  pointer-events: none;
  opacity: 0;
  animation: cardSweep 8.5s ease-in-out infinite;
}

.card__content {
  --inner-shift-x: 0px;
  --inner-shift-y: 0px;
  position: relative;
  z-index: 1;
  transform: translate3d(var(--inner-shift-x), var(--inner-shift-y), 0);
  transition: transform 0.16s ease-out;
}

.card__shine {
  background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.16), transparent 30%);
  opacity: 0.55;
}

.card__edge {
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 28%, transparent 72%, rgba(124, 231, 255, 0.22));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.card__eyebrow {
  position: relative;
  margin: 0 0 18px;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
}

.card__title {
  position: relative;
  margin: 0;
  max-width: 10.5ch;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.3rem, 8vw, 5.9rem);
  line-height: 0.92;
  text-transform: lowercase;
}

.card__text {
  position: relative;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.08rem);
  letter-spacing: 0.06em;
}

.card__actions {
  position: relative;
  margin-top: 28px;
  display: flex;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, padding 0.22s ease, gap 0.22s ease;
  overflow: hidden;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 231, 255, 0.34);
  background: rgba(124, 231, 255, 0.08);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.social-link--pulse {
  animation: telegramPulse 3.4s ease-in-out infinite;
}

.social-link__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.22s ease, opacity 0.18s ease;
}

.social-link__ripple {
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(124, 231, 255, 0.28);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.social-link--rippling .social-link__ripple {
  animation: socialRipple 0.5s ease-out forwards;
}

.social-link:hover,
.social-link:focus-visible {
  gap: 10px;
  padding-right: 18px;
}

.social-link:hover .social-link__label,
.social-link:focus-visible .social-link__label {
  max-width: 120px;
  opacity: 1;
}

.footer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(11, 14, 18, 0.58);
  backdrop-filter: blur(18px);
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.footer:hover {
  transform: translateX(-50%) translateY(-2px);
  color: var(--text);
  border-color: rgba(124, 231, 255, 0.28);
  box-shadow: 0 0 22px rgba(124, 231, 255, 0.12);
}

.footer__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 14, 18, 0.78);
  color: var(--text);
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.footer:hover .footer__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

@keyframes enterShimmer {
  0%,
  70%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }

  16% {
    opacity: 1;
  }

  34% {
    transform: translateX(120%);
    opacity: 1;
  }

  38% {
    opacity: 0;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(24px, -18px, 0);
  }
}

@keyframes meshShift {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.08) translate3d(2%, -2%, 0);
  }

  100% {
    transform: scale(1.02) translate3d(-2%, 3%, 0);
  }
}

@keyframes telegramPulse {
  0%,
  72%,
  100% {
    box-shadow: 0 0 0 rgba(124, 231, 255, 0);
    border-color: rgba(255, 255, 255, 0.12);
  }

  82% {
    box-shadow: 0 0 0 10px rgba(124, 231, 255, 0);
    border-color: rgba(124, 231, 255, 0.38);
  }

  88% {
    box-shadow: 0 0 0 0 rgba(124, 231, 255, 0.24);
    border-color: rgba(124, 231, 255, 0.28);
  }
}

@keyframes socialRipple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.55;
  }

  100% {
    transform: translate(-50%, -50%) scale(16);
    opacity: 0;
  }
}

@keyframes cardSweep {
  0%,
  78%,
  100% {
    transform: translateX(-135%) rotate(8deg);
    opacity: 0;
  }

  82% {
    opacity: 0.7;
  }

  92% {
    transform: translateX(135%) rotate(8deg);
    opacity: 0.7;
  }

  96% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px;
  }

  .enter-screen__title {
    font-size: clamp(2.4rem, 15vw, 4.5rem);
  }

  .hero {
    gap: 14px;
  }

  .card {
    border-radius: 26px;
    padding: 24px 20px;
  }

  .card__title {
    max-width: 100%;
  }

  .card__actions {
    margin-top: 22px;
  }

  .social-link {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }

  .social-link__label {
    max-width: 120px;
    opacity: 1;
  }

  .card--tap .card__content {
    --inner-shift-x: 0px;
    --inner-shift-y: -8px;
  }

  .footer {
    bottom: 14px;
    width: calc(100% - 24px);
    text-align: center;
  }
}
