:root {
  --accent: #ff2038;

  --bg: #06111f;
  --text: #ffffff;

  --maxw: 480px;

  --hero-top: 1.5%;
  --hero-h: 30%;

  --carousel-top: 33.5%;
  --carousel-h: 34.5%;

  --cta-top: 70%;
  --cta-h: 10%;
}


/* =========================================
   RESET
   ========================================= */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}


html,
body {
  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  overflow: hidden;

  background: #000;

  font-family:
    Arial,
    Helvetica,
    sans-serif;
}


body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}


button {
  font-family: inherit;
}


/* =========================================
   APP
   ========================================= */

.app {
  position: relative;

  width: 100%;
  max-width: var(--maxw);

  height: 100vh;
  height: 100dvh;

  overflow: hidden;

  background: var(--bg);

  isolation: isolate;
}


/* =========================================
   BACKGROUND
   ========================================= */

.bg {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  opacity: 0;

  transition:
    opacity 0.55s ease;

  z-index: 0;

  pointer-events: none;
}


.bg.is-visible {
  opacity: 1;
}


/* =========================================
   SCRIM
   ========================================= */

.scrim {
  position: absolute;

  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.10) 0%,
      rgba(0, 0, 0, 0.02) 22%,
      rgba(0, 0, 0, 0.04) 45%,
      rgba(0, 0, 0, 0.08) 68%,
      rgba(0, 0, 0, 0.15) 100%
    );
}


/* =========================================
   HERO
   ========================================= */

.hero-overlay {
  position: absolute;

  top: var(--hero-top);
  left: 50%;

  width: 93%;
  height: var(--hero-h);

  transform:
    translateX(-50%);

  object-fit: contain;

  z-index: 5;

  pointer-events: none;

  user-select: none;
}


/* =========================================
   CAROUSEL
   ========================================= */

.carousel-zone {
  position: absolute;

  top: var(--carousel-top);
  left: 0;

  width: 100%;
  height: var(--carousel-h);

  z-index: 10;

  overflow: visible;
}


.carousel {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: visible;

  touch-action: pan-y;
}


/* =========================================
   CLUB CARD
   ========================================= */

.club-card {
  position: absolute;

  top: 50%;

  aspect-ratio: 3 / 4;

  transform:
    translateY(-50%);

  border-radius: 24px;

  overflow: visible;

  transition:
    opacity 0.3s ease,
    filter 0.3s ease,
    transform 0.3s ease;

  user-select: none;
}


/* =========================================
   CLUB VISUAL
   ========================================= */

.club-card__visual {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  border-radius: 24px;

  overflow: hidden;

  z-index: 2;

  pointer-events: none;
}


/* =========================================
   CLUB IMAGE
   ========================================= */

.club-card__image {
  position: absolute;

  inset: 0;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  border-radius: 24px;

  z-index: 1;

  pointer-events: none;

  user-select: none;

  transform: none;
}


/* =========================================
   CLUB SHINE
   ========================================= */

.club-card__shine {
  position: absolute;

  top: -35%;
  left: -80%;

  width: 34%;
  height: 170%;

  z-index: 3;

  opacity: 0;

  pointer-events: none;

  transform:
    rotate(18deg);

  background:
    linear-gradient(
      90deg,

      rgba(255,255,255,0) 0%,

      rgba(255,255,255,0.02) 14%,

      rgba(255,255,255,0.12) 32%,

      rgba(255,255,255,0.40) 47%,

      rgba(255,255,255,0.72) 52%,

      rgba(255,255,255,0.38) 58%,

      rgba(255,255,255,0.10) 72%,

      rgba(255,255,255,0) 100%
    );

  filter:
    blur(5px);

  mix-blend-mode:
    screen;
}


.club-card.active .club-card__shine {
  animation:
    clubShine 4.2s ease-in-out infinite;
}


.club-card.side-left .club-card__shine,
.club-card.side-right .club-card__shine {
  display: none;
}


/* =========================================
   ACTIVE CARD
   ========================================= */

.club-card.active {
  left: 50%;

  height: 100%;

  transform:
    translate(-50%, -50%);

  z-index: 4;

  opacity: 1;

  filter:
    brightness(1)
    saturate(1);
}


/* =========================================
   PORTAL BORDER
   ========================================= */

.club-card.active::before {
  content: "";

  position: absolute;

  inset: -6px;

  border-radius: 31px;

  padding: 6px;

  background:
    linear-gradient(
      120deg,
      var(--portal-a),
      var(--portal-b),
      var(--portal-c),
      var(--portal-a)
    );

  background-size:
    300% 300%;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);

  -webkit-mask-composite:
    xor;

  mask-composite:
    exclude;

  animation:
    portalFlow 4s linear infinite;

  pointer-events: none;

  z-index: 5;
}


/* =========================================
   PORTAL GLOW
   ========================================= */

.club-card.active::after {
  content: "";

  position: absolute;

  inset: -11px;

  border-radius: 35px;

  border:
    3px solid
    var(--portal-a);

  opacity: 0.50;

  filter:
    blur(9px);

  animation:
    portalPulse 2.3s ease-in-out infinite;

  pointer-events: none;

  z-index: 0;
}


/* =========================================
   SIDE CARDS
   ========================================= */

.club-card.side-left,
.club-card.side-right {
  height: 84.05%;

  z-index: 2;

  opacity: 0.62;

  filter:
    brightness(0.68)
    saturate(0.92);
}


.club-card.side-left {
  left: -6%;

  transform:
    translateY(-50%);
}


.club-card.side-right {
  right: -6%;

  transform:
    translateY(-50%);
}


/* =========================================
   NAV
   ========================================= */

.nav {
  position: absolute;

  top: 50%;

  width: 46px;
  height: 46px;

  transform:
    translateY(-50%);

  z-index: 20;

  border:
    1px solid
    rgba(255, 255, 255, 0.65);

  border-radius: 50%;

  background:
    rgba(16, 0, 5, 0.72);

  color: #ffffff;

  font-size: 42px;
  font-weight: 300;
  line-height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    0 0 4px;

  cursor: pointer;

  backdrop-filter:
    blur(7px);

  -webkit-backdrop-filter:
    blur(7px);

  box-shadow:
    0 4px 16px
    rgba(0, 0, 0, 0.28);

  transition:
    transform 0.15s ease,
    background 0.15s ease;
}


.nav:active {
  transform:
    translateY(-50%)
    scale(0.92);
}


.nav.prev {
  left: 1.2%;
}


.nav.next {
  right: 1.2%;
}


/* =========================================
   CTA WRAP
   ========================================= */

.cta-wrap {
  position: absolute;

  top: var(--cta-top);
  left: 50%;

  width: 82%;
  height: var(--cta-h);

  transform:
    translateX(-50%);

  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}


/* =========================================
   BUTTON

   Сам контейнер может быть большим.
   Это больше не влияет на блик,
   потому что блик маскируется PNG.
   ========================================= */

.club-button {
  position: relative;

  width: 100%;
  height: 100%;

  border: 0;
  padding: 0;

  background: transparent;

  cursor: pointer;

  pointer-events: auto;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;

  transform-origin:
    center center;

  animation:
    ctaBreath 2.05s ease-in-out infinite;

  filter:
    drop-shadow(
      0 8px 14px
      rgba(0, 0, 0, 0.34)
    )
    drop-shadow(
      0 0 7px
      color-mix(
        in srgb,
        var(--accent) 55%,
        transparent
      )
    );

  transition:
    transform 0.14s ease,
    filter 0.14s ease;
}


/* =========================================
   PNG BUTTON
   ========================================= */

.club-button__bg {
  position: relative;

  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  z-index: 1;

  pointer-events: none;

  user-select: none;
}


/* =========================================
   BUTTON SHINE

   КЛЮЧЕВОЕ ИЗМЕНЕНИЕ:

   слой занимает всю CTA-область,
   НО виден только внутри
   непрозрачных пикселей PNG.
   ========================================= */

.club-button__shine {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 4;

  pointer-events: none;


  /* =====================================
     PNG КАК МАСКА
     ===================================== */

  -webkit-mask-image:
    var(--button-mask);

  mask-image:
    var(--button-mask);


  -webkit-mask-repeat:
    no-repeat;

  mask-repeat:
    no-repeat;


  -webkit-mask-position:
    center;

  mask-position:
    center;


  -webkit-mask-size:
    contain;

  mask-size:
    contain;


  /* =====================================
     САМ СВЕТОВОЙ БЛИК
     ===================================== */

  background:
    linear-gradient(
      108deg,

      rgba(255,255,255,0) 0%,

      rgba(255,255,255,0) 38%,

      rgba(255,255,255,0.05) 42%,

      rgba(255,255,255,0.22) 46%,

      rgba(255,255,255,0.62) 49%,

      rgba(255,255,255,0.95) 50%,

      rgba(255,255,255,0.58) 52%,

      rgba(255,255,255,0.18) 55%,

      rgba(255,255,255,0.04) 59%,

      rgba(255,255,255,0) 64%,

      rgba(255,255,255,0) 100%
    );


  background-size:
    280% 100%;


  background-position:
    140% 0;


  mix-blend-mode:
    screen;


  animation:
    buttonMaskedShine
    4.5s
    ease-in-out
    infinite;
}


/* =========================================
   BUTTON TAP
   ========================================= */

.club-button:active {
  animation: none;

  transform:
    scale(0.96);

  filter:
    drop-shadow(
      0 4px 8px
      rgba(0, 0, 0, 0.28)
    )
    drop-shadow(
      0 0 8px
      color-mix(
        in srgb,
        var(--accent) 70%,
        transparent
      )
    );
}


/* =========================================
   DOTS
   ========================================= */

.dots {
  position: absolute;

  top: 81.3%;
  left: 50%;

  transform:
    translateX(-50%);

  z-index: 30;

  width: 88%;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 5px;

  pointer-events: none;
}


.dot {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.38);

  box-shadow:
    0 1px 4px
    rgba(0, 0, 0, 0.4);

  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    background 0.25s ease;
}


.dot.active {
  transform:
    scale(1.65);

  background:
    #ffffff;

  opacity: 1;
}


/* =========================================
   LOADING
   ========================================= */

.loading {
  position: absolute;

  left: 50%;
  bottom: 4%;

  transform:
    translateX(-50%);

  z-index: 100;

  padding:
    9px 14px;

  border-radius:
    999px;

  background:
    rgba(0, 0, 0, 0.65);

  color:
    #ffffff;

  font-size:
    13px;

  white-space:
    nowrap;

  backdrop-filter:
    blur(8px);

  -webkit-backdrop-filter:
    blur(8px);
}


.loading.hidden {
  display: none;
}


/* =========================================
   CLUB SHINE
   ========================================= */

@keyframes clubShine {

  0% {
    left: -80%;
    opacity: 0;
  }


  7% {
    opacity: 0;
  }


  15% {
    opacity: 0.75;
  }


  32% {
    opacity: 0.95;
  }


  48% {
    left: 145%;
    opacity: 0.55;
  }


  56% {
    left: 145%;
    opacity: 0;
  }


  100% {
    left: 145%;
    opacity: 0;
  }

}


/* =========================================
   PNG-MASKED BUTTON SHINE

   Маска стоит неподвижно.

   Двигается только свет ВНУТРИ неё.
   ========================================= */

@keyframes buttonMaskedShine {

  0% {
    background-position:
      140% 0;

    opacity:
      0;
  }


  9% {
    background-position:
      140% 0;

    opacity:
      0;
  }


  14% {
    opacity:
      0.7;
  }


  22% {
    opacity:
      1;

    background-position:
      85% 0;
  }


  38% {
    opacity:
      1;

    background-position:
      20% 0;
  }


  48% {
    background-position:
      -35% 0;

    opacity:
      0.65;
  }


  55% {
    background-position:
      -55% 0;

    opacity:
      0;
  }


  100% {
    background-position:
      -55% 0;

    opacity:
      0;
  }

}


/* =========================================
   PORTAL FLOW
   ========================================= */

@keyframes portalFlow {

  0% {
    background-position:
      0% 50%;
  }


  50% {
    background-position:
      100% 50%;
  }


  100% {
    background-position:
      0% 50%;
  }

}


/* =========================================
   PORTAL PULSE
   ========================================= */

@keyframes portalPulse {

  0%,
  100% {

    opacity:
      0.34;

    transform:
      scale(0.99);
  }


  50% {

    opacity:
      0.62;

    transform:
      scale(1.018);
  }

}


/* =========================================
   BUTTON BREATH
   ========================================= */

@keyframes ctaBreath {

  0%,
  100% {

    transform:
      scale(1);

    filter:
      drop-shadow(
        0 8px 14px
        rgba(0, 0, 0, 0.34)
      )
      drop-shadow(
        0 0 6px
        color-mix(
          in srgb,
          var(--accent) 42%,
          transparent
        )
      );
  }


  50% {

    transform:
      scale(1.025);

    filter:
      drop-shadow(
        0 10px 17px
        rgba(0, 0, 0, 0.42)
      )
      drop-shadow(
        0 0 17px
        color-mix(
          in srgb,
          var(--accent) 80%,
          transparent
        )
      );
  }

}


/* =========================================
   SMALL PHONES
   ========================================= */

@media
(max-width: 390px) {

  .club-card.active {
    height:
      98%;
  }


  .club-card.side-left,
  .club-card.side-right {
    height:
      82%;
  }


  .nav {
    width:
      42px;

    height:
      42px;

    font-size:
      38px;
  }


  .cta-wrap {
    width:
      84%;
  }

}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media
(prefers-reduced-motion: reduce) {

  .club-button,
  .club-button__shine,
  .club-card.active::before,
  .club-card.active::after,
  .club-card__shine {

    animation:
      none !important;
  }

}