:root {
  --page-max: 800px;
  --content-max: 560px;
  --hero-max: 430px;
  --blue: #0672b8;
  --blue-2: #0567ad;
  --panel: #080111;
  --panel-soft: #12051f;
  --white: #fff;
  --muted: rgba(255,255,255,.72);
  --stroke: rgba(255,255,255,.92);
  --shadow: 0 24px 68px rgba(0,0,0,.32);
  --image-radius: clamp(16px, 2.2vw, 26px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #15b9d4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  border-radius: var(--image-radius);
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

@keyframes main-button-pulse {
  0%,
  100% {
    scale: 1;
  }

  50% {
    scale: 1.045;
  }
}

/* BACKGROUND */

.background,
.background::before,
.background::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background {
  z-index: 0;
  background: #11bdd3;
}

.background::before {
  content: "";
  z-index: 0;
  background-image: url("assets/profile_towerrush.play.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(2.1) blur(clamp(6px, 1.1vw, 16px));
  transform: scale(1.18);
  opacity: .94;
}

.background::after {
  content: "";
  z-index: 1;
  background:
    radial-gradient(circle at 16% 12%, rgba(137,248,248,.72), transparent 28%),
    radial-gradient(circle at 84% 82%, rgba(0,181,232,.7), transparent 35%),
    linear-gradient(180deg, rgba(90,218,220,.66), rgba(0,111,180,.45));
}

/* PAGE */

.page {
  position: relative;
  z-index: 2;

  width: min(100%, var(--page-max));
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(40px, env(safe-area-inset-top))
    clamp(22px, 6vw, 92px)
    max(50px, env(safe-area-inset-bottom));

  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  box-shadow: var(--shadow);
  border-radius: 14px;
  overflow: hidden;
}

@supports not (min-height: 100svh) {
  .page {
    min-height: 100vh;
  }
}

.hero,
.stack {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
}

.hero-cover {
  width: min(100%, var(--hero-max));
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--image-radius);
  box-shadow: 0 24px 36px rgba(0,0,0,.15);
  -webkit-mask-image: linear-gradient(#000 70%, transparent 100%);
  mask-image: linear-gradient(#000 70%, transparent 100%);
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: clamp(-48px, -5vw, -34px) 0 20px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: clamp(34px, 5.1vw, 54px);
  line-height: .95;
  letter-spacing: -.01em;
  font-weight: 400;
  text-shadow: 0 4px 16px rgba(0,0,0,.32);
}

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 24px);
  margin-bottom: clamp(34px, 4.4vw, 54px);
}

.socials a {
  width: clamp(28px, 3.1vw, 38px);
  height: clamp(28px, 3.1vw, 38px);
  display: grid;
  place-items: center;
  transition: transform .18s ease, opacity .18s ease;
}

.socials svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.socials a:hover {
  transform: translateY(-2px) scale(1.06);
}

.stack {
  display: grid;
  gap: clamp(20px, 2.7vw, 28px);
}

.main-button,
.howto-trigger,
.telegram {
  background: var(--panel);
  border: clamp(2px, .28vw, 4px) solid var(--stroke);
  box-shadow:
    0 clamp(6px, .9vw, 10px) 0 rgba(0,0,0,.72),
    inset 0 0 0 1px rgba(255,255,255,.06);
}

.main-button {
  min-height: clamp(62px, 5.8vw, 76px);
  padding: 14px 24px 12px;
  border-radius: clamp(20px, 2.2vw, 28px);
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  transform-origin: center;
  will-change: scale;
  animation: main-button-pulse 1.55s ease-in-out infinite;
  transition: translate .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.main-button:hover {
  translate: 0 -2px;
  border-color: #ffe7fb;
  box-shadow:
    0 clamp(8px, 1.1vw, 12px) 0 rgba(0,0,0,.72),
    0 0 28px rgba(255,255,255,.16);
}

.main-button:active {
  scale: .985;
}

.main-button__title {
  font-size: clamp(17px, 2.05vw, 24px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: .01em;
}

.main-button__subtitle {
  margin-top: 4px;
  color: rgba(255,255,255,.77);
  font-size: clamp(10px, 1.15vw, 14px);
  font-weight: 850;
}

.howto {
  display: block;
}

.howto-trigger {
  width: 100%;
  min-height: clamp(50px, 5vw, 62px);
  padding: 0 clamp(18px, 2.8vw, 30px);
  appearance: none;
  color: inherit;
  font: inherit;
  border-radius: clamp(18px, 2vw, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 950;
}

.howto-trigger::-webkit-details-marker {
  display: none;
}

.howto-trigger span {
  flex: 1;
  text-align: center;
}

.howto-trigger svg {
  width: clamp(22px, 2.7vw, 30px);
  height: clamp(22px, 2.7vw, 30px);
  fill: currentColor;
  flex: 0 0 auto;
  transition: transform .2s ease;
}

.howto.is-open .howto-trigger svg {
  transform: rotate(180deg);
}

.howto-content {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    height .46s cubic-bezier(.22, 1, .36, 1),
    opacity .28s ease;
}

.howto-list {
  display: grid;
  gap: clamp(16px, 2.2vw, 24px);
  padding-top: clamp(16px, 2.4vw, 24px);
}

.howto-list img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--image-radius);
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

.demo {
  border-radius: var(--image-radius);
  overflow: hidden;
  background: transparent;
}

.demo img,
.demo-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: var(--image-radius);
  box-shadow: 0 16px 34px rgba(0,0,0,.18);
}

.telegram {
  min-height: clamp(68px, 6.5vw, 86px);
  padding: clamp(12px, 1.8vw, 18px);
  border-radius: clamp(20px, 2.2vw, 28px);
  display: grid;
  grid-template-columns: clamp(48px, 5.2vw, 62px) 1fr clamp(24px, 3vw, 34px);
  align-items: center;
  gap: clamp(16px, 2.4vw, 26px);
  text-decoration: none;
  background: var(--panel-soft);
}

.telegram__avatar {
  width: clamp(48px, 5.2vw, 62px);
  height: clamp(48px, 5.2vw, 62px);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.86);
  display: grid;
  place-items: center;
  background: #f2a51b;
  font-size: clamp(24px, 3vw, 34px);
}

.telegram__text {
  min-width: 0;
}

.telegram strong {
  display: block;
  font-size: clamp(17px, 1.75vw, 23px);
  line-height: 1.1;
  font-weight: 850;
}

.telegram small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: clamp(11px, 1.1vw, 14px);
  line-height: 1.2;
  font-weight: 700;
}

.telegram__arrow {
  justify-self: end;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1;
  opacity: .9;
}

/* DESKTOP */

@media (min-width: 1100px) {
  .page {
    margin-block: clamp(20px, 3vh, 44px);
    min-height: calc(100svh - clamp(40px, 6vh, 88px));
    border-radius: 14px;
    overflow: hidden;
  }
}

/* TABLET / MOBILE */

@media (max-width: 1024px) {
  :root {
    --page-max: 100%;
    --content-max: 620px;
    --hero-max: 390px;
  }

  .page {
    padding-inline: clamp(22px, 8vw, 96px);

    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
}

/* MOBILE — увеличенный контент */

@media (max-width: 720px) {
  :root {
    --content-max: 100%;
    --hero-max: 390px;
    --image-radius: 24px;
  }

  .page {
    padding: 28px clamp(16px, 4.6vw, 28px) 38px;
  }

  .hero-cover {
    width: min(100%, 365px);
    box-shadow: 0 22px 36px rgba(0,0,0,.18);
  }

  .hero h1 {
    margin: -38px 0 22px;
    font-size: clamp(42px, 11.5vw, 58px);
    line-height: .9;
  }

  .socials {
    gap: 22px;
    margin-bottom: 34px;
  }

  .socials a {
    width: 38px;
    height: 38px;
  }

  .stack {
    gap: 24px;
  }

  .main-button {
    min-height: 76px;
    padding: 16px 22px 14px;
    border-radius: 26px;
  }

  .main-button__title {
    font-size: clamp(21px, 5.8vw, 26px);
    line-height: 1.05;
  }

  .main-button__subtitle {
    margin-top: 5px;
    font-size: clamp(13px, 3.6vw, 15px);
  }

  .howto-trigger {
    min-height: 66px;
    padding-inline: 22px;
    border-radius: 24px;
    font-size: clamp(20px, 5.3vw, 24px);
  }

  .howto-trigger svg {
    width: 30px;
    height: 30px;
  }

  .howto-list {
    gap: 22px;
    padding-top: 22px;
  }

  .telegram {
    min-height: 86px;
    padding: 16px;
    grid-template-columns: 62px 1fr 32px;
    gap: 16px;
    border-radius: 26px;
  }

  .telegram__avatar {
    width: 62px;
    height: 62px;
    font-size: 34px;
  }

  .telegram strong {
    font-size: clamp(20px, 5.2vw, 24px);
  }

  .telegram small {
    font-size: clamp(13px, 3.4vw, 15px);
  }

  .telegram__arrow {
    font-size: 44px;
  }
}

@media (max-width: 430px) {
  .page {
    padding-inline: 16px;
  }

  .hero-cover {
    width: min(100%, 345px);
  }

  .hero h1 {
    margin-top: -36px;
    font-size: clamp(40px, 12vw, 52px);
  }

  .socials a {
    width: 36px;
    height: 36px;
  }

  .main-button {
    min-height: 74px;
  }

  .main-button__title {
    font-size: clamp(20px, 5.9vw, 24px);
  }

  .main-button__subtitle {
    font-size: 13px;
  }

  .howto-trigger {
    min-height: 64px;
    font-size: 20px;
  }

  .telegram {
    min-height: 84px;
    grid-template-columns: 60px 1fr 30px;
  }

  .telegram__avatar {
    width: 60px;
    height: 60px;
  }

  .telegram strong {
    font-size: 20px;
  }

  .telegram small {
    font-size: 13px;
  }
}

@media (max-width: 350px) {
  .page {
    padding-inline: 12px;
  }

  .hero-cover {
    width: min(100%, 310px);
  }

  .hero h1 {
    font-size: 38px;
  }

  .main-button {
    min-height: 68px;
  }

  .main-button__title {
    font-size: 18px;
  }

  .main-button__subtitle {
    font-size: 12px;
  }

  .howto-trigger {
    min-height: 58px;
    font-size: 18px;
  }

  .telegram {
    min-height: 76px;
    grid-template-columns: 54px 1fr 26px;
    gap: 12px;
  }

  .telegram__avatar {
    width: 54px;
    height: 54px;
    font-size: 30px;
  }

  .telegram strong {
    font-size: 18px;
  }

  .telegram small {
    font-size: 12px;
  }
}

@media (orientation: landscape) and (max-height: 620px) and (max-width: 980px) {
  .page {
    padding-top: 24px;
  }

  .hero-cover {
    width: min(44vh, 330px);
  }

  .hero h1 {
    margin-top: -28px;
    font-size: 34px;
  }

  .socials {
    margin-bottom: 24px;
  }

  .main-button {
    min-height: 62px;
  }

  .howto-trigger {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-button {
    animation: none;
  }

  .howto-content,
  .howto-trigger svg,
  .socials a,
  .main-button {
    transition: none;
  }
}