:root {
  --bg: #05060B;
  --panel: #0A0C14;
  --cyan: #35E6FF;
  --blue: #2C6BFF;
  --violet: #8B4BFF;
  --text: #F2F5FF;
  --muted: #8E97B3;
  --pad-x: clamp(20px, 4.2vw, 72px);
  --pad-y: clamp(18px, 3.8vh, 42px);
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(53, 230, 255, 0.28);
  color: #FFFFFF;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 16% 4%, rgba(44, 107, 255, 0.12), transparent 56%),
    radial-gradient(95% 85% at 90% 96%, rgba(139, 75, 255, 0.14), transparent 62%);
}

/* Тонкая зернистость поверх фонового градиента: только CSS, без внешних запросов. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.6;
  will-change: transform;
}

.ambient::before {
  width: 62vmax;
  height: 62vmax;
  left: -24vmax;
  top: -28vmax;
  background: radial-gradient(circle, rgba(53, 230, 255, 0.17) 0%, rgba(44, 107, 255, 0.06) 44%, transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.ambient::after {
  width: 58vmax;
  height: 58vmax;
  right: -22vmax;
  bottom: -26vmax;
  background: radial-gradient(circle, rgba(139, 75, 255, 0.19) 0%, rgba(44, 107, 255, 0.06) 48%, transparent 72%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(4vmax, 3vmax, 0); }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-4vmax, -3vmax, 0); }
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: var(--pad-y) var(--pad-x);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.46em;
  text-indent: 0.1em;
  background: linear-gradient(90deg, #F2F5FF 0%, #35E6FF 62%, #8B4BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(53, 230, 255, 0.42), rgba(44, 107, 255, 0.16) 38%, transparent 78%);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 52fr) clamp(76px, 9.6vw, 172px) minmax(0, 48fr);
  align-items: center;
  align-content: center;
  column-gap: clamp(8px, 1.4vw, 28px);
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(10px, 2vh, 26px) 0;
}

.intro {
  min-width: 0;
  max-width: 780px;
}

.title {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: clamp(64px, min(7vw, 13.2vh), 120px);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.title-line {
  display: block;
  width: max-content;
  padding-right: 0.06em;
  margin-right: -0.06em;
  background: linear-gradient(96deg, #F2F5FF 0%, #A8E9FF 34%, #7FB5FF 62%, #A98CFF 84%, #8B4BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 47ch;
  margin: clamp(18px, 2.6vh, 30px) 0 0;
  color: var(--muted);
  font-size: clamp(14.5px, 1.1vw, 17px);
  line-height: 1.6;
  letter-spacing: 0.002em;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 470px;
  margin: clamp(20px, 3vh, 34px) 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(142, 151, 179, 0.12);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(10, 12, 20, 0.88), rgba(10, 12, 20, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.step-num {
  min-width: 24px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.step-text {
  color: #D9E0F2;
  font-size: clamp(14px, 1vw, 15.5px);
  line-height: 1.35;
}

.arrow-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.arrow-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.arrow {
  width: clamp(80px, 9.6vw, 180px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(44, 107, 255, 0.5));
  animation: arrow-nudge 2.7s ease-in-out infinite;
}

@keyframes arrow-nudge {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.66;
  }
  50% {
    transform: translateX(8px);
    opacity: 1;
  }
}

.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: end;
  width: 100%;
  min-width: 0;
}

.qr-reveal {
  position: relative;
  width: clamp(320px, 32vw, 420px);
  max-width: 100%;
}

/* Декоративные угловые скобки вокруг карточки: вне активной области кода. */
.qr-corners {
  --corner-arm: 26px;
  --corner-offset: 10px;
  position: absolute;
  inset: calc(-1 * var(--corner-offset));
  z-index: 0;
  pointer-events: none;
}

.qr-corner {
  position: absolute;
  display: block;
  width: var(--corner-arm);
  height: var(--corner-arm);
  opacity: 0.72;
  animation: corner-breathe 5.2s ease-in-out infinite;
}

.qr-corner::before,
.qr-corner::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(53, 230, 255, 0.9) 0%, rgba(44, 107, 255, 0.85) 52%, rgba(139, 75, 255, 0.9) 100%);
}

.qr-corner::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.qr-corner::after {
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
}

.qr-corner--tl { top: 0; left: 0; }
.qr-corner--tr { top: 0; right: 0; transform: rotate(90deg); }
.qr-corner--br { right: 0; bottom: 0; transform: rotate(180deg); }
.qr-corner--bl { bottom: 0; left: 0; transform: rotate(270deg); }

@keyframes corner-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.92; }
}

.qr-card {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: clamp(18px, 1.4vw, 20px);
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #0A0C14 0%, #080A11 100%) padding-box,
    linear-gradient(135deg, #35E6FF 0%, #2C6BFF 52%, #8B4BFF 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, 0.06),
    0 0 34px rgba(44, 107, 255, 0.22),
    0 0 90px rgba(139, 75, 255, 0.13);
  text-decoration: none;
  transition: transform 0.35s ease;
  animation: qr-pulse 3.8s ease-in-out infinite;
}

.qr-card:hover {
  transform: translateY(-3px);
}

.qr-card:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 9px;
}

.qr-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: #FFFFFF;
}

@keyframes qr-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(53, 230, 255, 0.06),
      0 0 34px rgba(44, 107, 255, 0.22),
      0 0 90px rgba(139, 75, 255, 0.13);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(53, 230, 255, 0.16),
      0 0 54px rgba(44, 107, 255, 0.34),
      0 0 118px rgba(139, 75, 255, 0.23);
  }
}

.qr-caption {
  margin: clamp(18px, 2.4vh, 26px) 0 0;
  color: var(--text);
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

.footer {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.copyright {
  margin: 0;
  color: rgba(142, 151, 179, 0.8);
  font-size: 12px;
  letter-spacing: 0.16em;
}

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

.js-ready .reveal {
  animation: reveal-up 0.62s cubic-bezier(0.22, 0.75, 0.28, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.d1 { --reveal-delay: 60ms; }
.d2 { --reveal-delay: 150ms; }
.d3 { --reveal-delay: 240ms; }
.d4 { --reveal-delay: 330ms; }
.d5 { --reveal-delay: 420ms; }
.d6 { --reveal-delay: 510ms; }
.d7 { --reveal-delay: 600ms; }

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .title-line,
  .wordmark {
    background: none;
    color: var(--text);
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .title {
    font-size: clamp(64px, min(7vw, 12vh), 110px);
  }

  .lede {
    margin-top: 16px;
  }

  .steps {
    gap: 8px;
    margin-top: 20px;
  }

  .step {
    padding: 8px 14px;
  }

  .qr-caption {
    margin-top: 16px;
  }
}

@media (max-width: 1023px) {
  .page {
    padding: clamp(18px, 4vw, 26px) clamp(18px, 5vw, 30px) 18px;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    row-gap: 0;
    padding-top: clamp(24px, 5vh, 48px);
  }

  .intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
  }

  .title {
    align-items: center;
    font-size: clamp(64px, 11.6vw, 104px);
  }

  .lede {
    max-width: 52ch;
  }

  .steps {
    width: 100%;
    max-width: 440px;
    text-align: left;
  }

  .arrow-cell {
    margin: 36px 0 44px;
  }

  .arrow-wrap {
    width: 84px;
    transform: rotate(90deg);
  }

  .arrow {
    width: 84px;
  }

  .qr-panel {
    justify-self: center;
  }

  .qr-reveal {
    width: clamp(300px, 46vw, 400px);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .page {
    padding: 18px 16px 16px;
  }

  .wordmark {
    font-size: 11px;
    letter-spacing: 0.4em;
  }

  .title {
    font-size: clamp(46px, 14.5vw, 64px);
    letter-spacing: -0.03em;
  }

  .lede {
    font-size: 14.5px;
  }

  .steps {
    max-width: 100%;
  }

  .step {
    padding: 9px 12px;
  }

  .qr-reveal {
    width: min(100%, 320px);
  }

  .qr-corners {
    --corner-arm: 18px;
    --corner-offset: 7px;
  }

  .qr-card {
    padding: 14px;
    border-radius: 22px;
  }

  .qr-image {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal,
  .arrow,
  .qr-card,
  .qr-corner,
  .ambient::before,
  .ambient::after {
    animation: none;
  }

  .js-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .arrow {
    opacity: 0.9;
  }

  .qr-corner {
    opacity: 0.8;
  }

  .qr-card {
    transition: none;
  }
}
