:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-soft: #0e111a;
  --text: #f6f1df;
  --muted: #a9adbb;
  --line: rgba(246, 241, 223, 0.16);
  --line-strong: rgba(246, 241, 223, 0.28);
  --cyan: #8df6ff;
  --gold: #ffd36d;
  --red: #ff5a76;
  --green: #58e6a1;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 211, 109, 0.1), transparent 26rem),
    radial-gradient(circle at 12% 88%, rgba(141, 246, 255, 0.09), transparent 24rem),
    linear-gradient(135deg, #07080d 0%, #0a0d14 52%, #050509 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 5px 5px;
  image-rendering: pixelated;
  mix-blend-mode: screen;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(14, 17, 26, 0.76);
  box-shadow: 0 14px 40px var(--shadow);
  color: var(--cyan);
  font-family: "Pixelify Sans", Inter, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-text,
.status,
.eyebrow,
.footer {
  font-family: "Pixelify Sans", Inter, sans-serif;
  letter-spacing: 0;
}

.brand-text {
  font-size: 1.15rem;
  color: var(--text);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 64px;
  padding: 44px 0 52px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--cyan);
  font-size: 1rem;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: 4.9rem;
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

.alias {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.25rem;
}

.alias span {
  color: var(--gold);
  font-family: "Pixelify Sans", Inter, sans-serif;
}

.intro {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.72;
}

.link-grid {
  width: 100%;
  max-width: 590px;
  margin-top: 38px;
  display: grid;
  gap: 12px;
}

.link-card {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 17, 26, 0.74);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  color: inherit;
  font: inherit;
  appearance: none;
  text-align: left;
  text-decoration: none;
  outline: none;
  cursor: pointer;
  transform: translateY(0);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--line-strong);
  background: rgba(18, 23, 34, 0.9);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}

.link-card:focus-visible {
  box-shadow:
    0 0 0 3px rgba(141, 246, 255, 0.2),
    0 22px 60px rgba(0, 0, 0, 0.34);
}

.copy-card {
  grid-template-columns: 48px minmax(0, 1fr) minmax(58px, auto);
}

.icon-pill {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--bg);
}

.icon-pill svg,
.arrow {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.youtube-icon {
  fill: currentColor;
  stroke: none;
}

.youtube .icon-pill {
  background: var(--red);
}

.telegram .icon-pill {
  background: var(--cyan);
}

.mail .icon-pill {
  background: var(--gold);
}

.link-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.link-text strong,
.link-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-text strong {
  font-size: 1.08rem;
}

.link-text small {
  color: var(--muted);
  font-size: 0.9rem;
}

.link-text .email-address {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.link-note {
  color: rgba(169, 173, 187, 0.72);
  font-size: 0.78rem;
  line-height: 1.15;
}

.arrow {
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.link-card:hover .arrow,
.link-card:focus-visible .arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

.copy-state {
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.copy-state svg {
  width: 18px;
  height: 18px;
}

.copy-card:hover .copy-state,
.copy-card:focus-visible .copy-state,
.copy-card.is-copied .copy-state {
  color: var(--text);
}

.copy-card.is-copied .copy-state svg {
  color: var(--green);
}

.visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.pixel-moon {
  position: relative;
  width: 252px;
  height: 252px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 35%),
    radial-gradient(circle at 37% 32%, #fff2bf 0 6px, transparent 7px),
    radial-gradient(circle at 61% 42%, #d6bd82 0 9px, transparent 10px),
    radial-gradient(circle at 45% 68%, #c9b27a 0 12px, transparent 13px),
    #f2d88b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 70px rgba(255, 211, 109, 0.22),
    0 46px 90px rgba(0, 0, 0, 0.38);
  image-rendering: pixelated;
}

.pixel-moon::before,
.pixel-moon::after {
  content: "";
  position: absolute;
  image-rendering: pixelated;
}

.pixel-moon::before {
  inset: 22px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 75%, rgba(8, 9, 14, 0.14) 75% 100%),
    linear-gradient(transparent 0 75%, rgba(8, 9, 14, 0.1) 75% 100%);
  background-size: 18px 18px;
  opacity: 0.6;
}

.pixel-moon::after {
  width: 64px;
  height: 64px;
  right: 18px;
  top: 34px;
  background: rgba(7, 8, 13, 0.1);
  box-shadow:
    -116px 46px 0 -20px rgba(7, 8, 13, 0.14),
    -52px 126px 0 -24px rgba(7, 8, 13, 0.15);
}

.moon-shade {
  position: absolute;
  background: rgba(7, 8, 13, 0.13);
  image-rendering: pixelated;
}

.shade-one {
  width: 18px;
  height: 18px;
  left: 70px;
  top: 64px;
}

.shade-two {
  width: 28px;
  height: 28px;
  right: 72px;
  bottom: 58px;
}

.shade-three {
  width: 12px;
  height: 12px;
  right: 92px;
  top: 92px;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(246, 241, 223, 0.14);
  border-radius: 50%;
}

.ring-one {
  width: 388px;
  height: 388px;
  transform: rotate(-18deg) scaleY(0.68);
}

.ring-two {
  width: 480px;
  height: 480px;
  transform: rotate(26deg) scaleY(0.48);
}

.satellite {
  position: absolute;
  width: 18px;
  height: 18px;
  right: 52px;
  top: 118px;
  background: var(--cyan);
  box-shadow:
    18px 0 0 rgba(141, 246, 255, 0.42),
    -18px 0 0 rgba(141, 246, 255, 0.28),
    0 18px 0 rgba(255, 211, 109, 0.5);
  animation: satellite-float 5s ease-in-out infinite;
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--text);
  box-shadow: 0 0 20px rgba(246, 241, 223, 0.4);
}

.spark-one {
  left: 74px;
  top: 88px;
}

.spark-two {
  right: 86px;
  bottom: 98px;
  background: var(--gold);
}

.spark-three {
  left: 128px;
  bottom: 138px;
  background: var(--green);
}

.planet-scroll {
  --planet-x: 31vw;
  --planet-y: -2vh;
  --planet-scale: 1;
  --orbit-opacity: 1;
  --message-opacity: 0;
  --message-y: 34px;
  position: relative;
  z-index: 2;
  height: 330vh;
}

.planet-scroll::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 65%, rgba(176, 214, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, transparent 0%, rgba(7, 8, 13, 0.8) 15%, rgba(7, 8, 13, 0.25) 100%);
  pointer-events: none;
}

.planet-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.scroll-space {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  display: grid;
  place-items: center;
  transform:
    translate(calc(-50% + var(--planet-x)), calc(-50% + var(--planet-y)))
    scale(var(--planet-scale));
  transform-origin: center;
  will-change: transform;
}

.scroll-moon {
  width: 252px;
  height: 252px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 30%),
    radial-gradient(circle at 31% 28%, #f4fbff 0 7px, transparent 8px),
    radial-gradient(circle at 68% 33%, #8fa0b1 0 13px, transparent 14px),
    radial-gradient(circle at 43% 62%, #758797 0 18px, transparent 19px),
    radial-gradient(circle at 72% 74%, #aab8c5 0 9px, transparent 10px),
    #cfd9e1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 80px rgba(141, 246, 255, 0.16),
    0 46px 90px rgba(0, 0, 0, 0.42);
}

.scroll-moon::before {
  inset: 18px;
  background:
    linear-gradient(90deg, transparent 0 68%, rgba(18, 27, 38, 0.13) 68% 100%),
    linear-gradient(transparent 0 78%, rgba(18, 27, 38, 0.12) 78% 100%);
  background-size: 22px 18px;
  opacity: 0.54;
}

.scroll-moon::after {
  width: 78px;
  height: 78px;
  right: 34px;
  top: 24px;
  background: rgba(18, 27, 38, 0.1);
  box-shadow:
    -126px 80px 0 -22px rgba(18, 27, 38, 0.18),
    -56px 144px 0 -18px rgba(18, 27, 38, 0.16),
    -18px 74px 0 -30px rgba(18, 27, 38, 0.22);
}

.scroll-moon .moon-shade {
  background: rgba(18, 27, 38, 0.16);
}

.scroll-moon .shade-one {
  width: 22px;
  height: 22px;
  left: 56px;
  top: 72px;
}

.scroll-moon .shade-two {
  width: 36px;
  height: 36px;
  right: 54px;
  bottom: 74px;
}

.scroll-moon .shade-three {
  width: 16px;
  height: 16px;
  right: 104px;
  top: 112px;
}

.scroll-orbit {
  position: absolute;
  border: 1px solid rgba(246, 241, 223, 0.16);
  border-radius: 50%;
  opacity: var(--orbit-opacity);
  transition: opacity 120ms linear;
}

.scroll-orbit-one {
  width: 390px;
  height: 390px;
  transform: rotate(-18deg) scaleY(0.67);
}

.scroll-orbit-two {
  width: 480px;
  height: 480px;
  transform: rotate(24deg) scaleY(0.48);
}

.scroll-satellite {
  position: absolute;
  right: 52px;
  top: 118px;
  width: 18px;
  height: 18px;
  background: var(--cyan);
  box-shadow:
    18px 0 0 rgba(141, 246, 255, 0.42),
    -18px 0 0 rgba(141, 246, 255, 0.28),
    0 18px 0 rgba(255, 211, 109, 0.5);
  opacity: var(--orbit-opacity);
}

.scroll-message {
  position: relative;
  z-index: 3;
  width: min(840px, calc(100% - 40px));
  display: grid;
  justify-items: center;
  gap: 20px;
  opacity: var(--message-opacity);
  transform: translateY(var(--message-y));
  text-align: center;
  color: #07080d;
  pointer-events: none;
  will-change: opacity, transform;
}

.planet-scroll.is-final .scroll-message {
  pointer-events: auto;
}

.scroll-message p {
  margin: 0;
  color: rgba(7, 8, 13, 0.64);
  font-family: "Pixelify Sans", Inter, sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.scroll-message h2 {
  position: relative;
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7.8vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}

.pixel-heart {
  --heart-size: clamp(5px, 0.07em, 9px);
  position: relative;
  display: inline-block;
  width: calc(var(--heart-size) * 7);
  height: calc(var(--heart-size) * 6);
  margin-left: 0.12em;
  filter: drop-shadow(0 0 10px rgba(255, 47, 85, 0.32));
  transform: translateY(-0.08em) rotate(-5deg);
  vertical-align: middle;
}

.pixel-heart::before {
  content: "";
  position: absolute;
  left: var(--heart-size);
  top: 0;
  width: var(--heart-size);
  height: var(--heart-size);
  background: #ff2f55;
  box-shadow:
    calc(var(--heart-size) * 1) 0 0 #ff2f55,
    calc(var(--heart-size) * 3) 0 0 #ff2f55,
    calc(var(--heart-size) * 4) 0 0 #ff2f55,
    calc(var(--heart-size) * -1) calc(var(--heart-size) * 1) 0 #ff2f55,
    0 calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * 1) calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * 2) calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * 3) calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * 4) calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * 5) calc(var(--heart-size) * 1) 0 #ff2f55,
    calc(var(--heart-size) * -1) calc(var(--heart-size) * 2) 0 #ff2f55,
    0 calc(var(--heart-size) * 2) 0 #ff2f55,
    calc(var(--heart-size) * 1) calc(var(--heart-size) * 2) 0 #ff2f55,
    calc(var(--heart-size) * 2) calc(var(--heart-size) * 2) 0 #ff2f55,
    calc(var(--heart-size) * 3) calc(var(--heart-size) * 2) 0 #ff2f55,
    calc(var(--heart-size) * 4) calc(var(--heart-size) * 2) 0 #ff2f55,
    calc(var(--heart-size) * 5) calc(var(--heart-size) * 2) 0 #ff2f55,
    0 calc(var(--heart-size) * 3) 0 #ff2f55,
    calc(var(--heart-size) * 1) calc(var(--heart-size) * 3) 0 #ff2f55,
    calc(var(--heart-size) * 2) calc(var(--heart-size) * 3) 0 #ff2f55,
    calc(var(--heart-size) * 3) calc(var(--heart-size) * 3) 0 #ff2f55,
    calc(var(--heart-size) * 4) calc(var(--heart-size) * 3) 0 #ff2f55,
    calc(var(--heart-size) * 1) calc(var(--heart-size) * 4) 0 #ff2f55,
    calc(var(--heart-size) * 2) calc(var(--heart-size) * 4) 0 #ff2f55,
    calc(var(--heart-size) * 3) calc(var(--heart-size) * 4) 0 #ff2f55,
    calc(var(--heart-size) * 2) calc(var(--heart-size) * 5) 0 #ff2f55;
}

.telegram-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(7, 8, 13, 0.28);
  border-radius: 8px;
  background: rgba(7, 8, 13, 0.9);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(7, 8, 13, 0.18);
  font-weight: 800;
  text-decoration: none;
  pointer-events: auto;
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.telegram-button:hover,
.telegram-button:focus-visible {
  background: #0f1520;
  box-shadow: 0 22px 52px rgba(7, 8, 13, 0.28);
  transform: translateY(-2px);
}

.telegram-button svg {
  width: 20px;
  height: 20px;
  color: var(--cyan);
}

.footer {
  position: relative;
  z-index: 2;
  width: min(1160px, 100%);
  min-height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(246, 241, 223, 0.1);
  color: rgba(246, 241, 223, 0.56);
  font-size: 0.94rem;
}

@keyframes satellite-float {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-8px, 10px);
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(680px, 100%);
    padding: 0 16px;
  }

  .topbar {
    min-height: 76px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0 38px;
  }

  .visual {
    order: -1;
    min-height: 240px;
  }

  .visual .pixel-moon {
    width: 166px;
    height: 166px;
  }

  .ring-one {
    width: 264px;
    height: 264px;
  }

  .ring-two {
    width: 320px;
    height: 320px;
  }

  .satellite {
    right: calc(50% - 142px);
    top: 72px;
  }

  .spark-one {
    left: calc(50% - 138px);
    top: 54px;
  }

  .spark-two {
    right: calc(50% - 136px);
    bottom: 56px;
  }

  .spark-three {
    left: calc(50% - 90px);
    bottom: 84px;
  }

  h1 {
    font-size: 3.2rem;
    line-height: 1;
  }
}

@media (max-width: 540px) {
  .page-shell {
    width: 100%;
    padding: 0 20px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 18px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .brand-text {
    font-size: 1rem;
  }

  .status {
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 18px;
  }

  .visual {
    min-height: 176px;
  }

  .visual .pixel-moon {
    width: 112px;
    height: 112px;
  }

  .ring-one {
    width: 184px;
    height: 184px;
  }

  .ring-two {
    width: 224px;
    height: 224px;
  }

  .satellite {
    width: 14px;
    height: 14px;
    right: calc(50% - 100px);
    top: 42px;
    box-shadow:
      14px 0 0 rgba(141, 246, 255, 0.42),
      -14px 0 0 rgba(141, 246, 255, 0.28),
      0 14px 0 rgba(255, 211, 109, 0.5);
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: 0.92rem;
  }

  h1 {
    font-size: 2.42rem;
  }

  .alias {
    font-size: 1.05rem;
  }

  .intro {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.62;
  }

  .link-grid {
    margin-top: 22px;
  }

  .link-card {
    grid-template-columns: 42px minmax(0, 1fr) 48px;
    gap: 12px;
    min-height: 68px;
    padding: 14px;
  }

  .copy-card {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
  }

  .icon-pill {
    width: 42px;
    height: 42px;
  }

  .icon-pill svg,
  .arrow {
    width: 20px;
    height: 20px;
  }

  .planet-scroll {
    height: 300vh;
  }

  .scroll-space {
    width: 330px;
    height: 330px;
  }

  .scroll-moon {
    width: 172px;
    height: 172px;
  }

  .scroll-orbit-one {
    width: 260px;
    height: 260px;
  }

  .scroll-orbit-two {
    width: 320px;
    height: 320px;
  }

  .scroll-satellite {
    right: 36px;
    top: 72px;
  }

  .scroll-message {
    width: min(100% - 28px, 520px);
    gap: 16px;
  }

  .scroll-message p {
    font-size: 0.98rem;
  }

  .scroll-message h2 {
    font-size: clamp(2.8rem, 13vw, 4.5rem);
    line-height: 0.94;
  }

  .telegram-button {
    min-height: 48px;
    padding: 0 16px;
  }

  .link-text strong {
    font-size: 1rem;
  }

  .link-text small {
    font-size: 0.84rem;
  }

  .link-note {
    font-size: 0.74rem;
  }

  .copy-state span {
    display: none;
  }

  .copy-state {
    min-width: 20px;
  }

  .copy-card.is-copied::after {
    content: "Copied";
    position: absolute;
    right: 14px;
    top: 9px;
    color: var(--green);
    font-family: "Pixelify Sans", Inter, sans-serif;
    font-size: 0.74rem;
    line-height: 1;
  }

  .footer {
    min-height: 58px;
    font-size: 0.86rem;
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding: 0 14px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .link-card {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
  }

  .arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
