@font-face {
  font-family: changaone-regular;
  src: url("font/ChangaOne-Regular.ttf");
}

@font-face {
  font-family: boogaloo-regular;
  src: url("font/Boogaloo-Regular.ttf");
}

.changa-reg {
  font-family: changaone-regular;
}

.boog-reg {
  font-family: boogaloo-regular;
}

.yellow-color {
  color: #e9c12d;
}

.title {
  font-family: "Bangers";
  font-weight: 400;
}

/* Page shell: exactly one viewport, never scrolls */

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

body {
  overflow: hidden;
  overscroll-behavior: none;
}

.btn-close {
  background-color: white;
  border-radius: 20px;
}

.btn-custom-primary {
  display: flex;
  justify-content: space-between;
  position: relative;
  font-size: clamp(1rem, 0.3vw + 2vh, 1.6rem);
  padding: clamp(0.35rem, 1.1vh, 0.7rem) clamp(0.5rem, 1vw, 1rem);
  color: white;
  font-family: "boogaloo-regular";
  border: 1px solid #fff;
  background: linear-gradient(90deg, #48CEE0 0%, #005A66 100%);
  border-radius: 39px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Hero */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: url('./assets/main-bg.png');
  background-position: center;
  background-size: cover;
  padding: 2vh 0;
  display: flex;
  flex-direction: column;
}

.hero__container {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero__logo {
    position: absolute;
    flex: 0 0 auto;
    width: 100%;
}

.hero__logo-img {
  height: clamp(26px, 8vh, 58px);
  width: auto;
}

.hero__wrapper {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 2vw, 2.5rem);
}

.hero__left {
  flex: 0 1 34%;
  min-width: 0;
}

.sp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.25rem, 1vh, 0.75rem);
}

.sp img {
  width: min(320px, 24vw, 30vh);
  height: auto;
}

.hero__tagline {
  font-size: clamp(0.9rem, 0.8vw + 0.9vh, 1.65rem);
  margin: clamp(0.5rem, 1.8vh, 1.25rem) 0 0;
}

.hero__cta {
  width: 150px;
  max-width: 100%;
  margin: clamp(0.5rem, 1.8vh, 1.25rem) auto 0;
}

.hero__right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  /* keep the wheel clear of the figure standing at the right edge */
}

/* Wheel + frame scale together as one unit.
   Offsets below align each wheel disc's centre with the frame's centre. */

.hero__wheelbox {
  position: relative;
  flex: 0 0 auto;
  max-width: 100%;
  width: min(42vw, 76vh);
  width: min(42vw, 76dvh);
  aspect-ratio: 1616 / 1645;
}

.hero__roulet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__wheel {
  position: absolute;
  height: auto;
}

.hero__wheel--web {
  width: 81.14%;
  left: 9.06%;
  top: 7.16%;
  transform-origin: 50.46% 52.57%;
}

.hero__wheel--mob {
  width: 94.28%;
  left: 3.09%;
  top: 0.86%;
  transform-origin: 49.75% 51.78%;
}

.pp {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  line-height: 0;
  pointer-events: none;
}

/* Capped by width as well as height so the figure never swamps a narrow screen */
.pp img {
  height: min(70vh, 34vw, 720px);
  height: min(70dvh, 34vw, 720px);
  width: auto;
}

/* Roulete animation */

.firstRotate {
  transform: rotate(705deg);
  transition: transform 3s ease-in-out;
}

.secondRotate {
  transform: rotate(1160deg);
}

.thirdRotate {
  transform: rotate(2150deg);
  transition: transform 3s ease-in-out;
}

/* Button arrow animation */

@keyframes scale {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.arrow-right,
.arrow-left {
  animation: 3s ease-in-out 1s infinite both running scale;
}

/* Winner modal */

.modal-content {
  background-color: #17185c;
  border: 1px solid white;
  border-radius: 25px;
}

.cont {
  background: url('./assets/wow-box.png');
  background-size: contain;
  border: none;
  background-position: center;
  background-repeat: no-repeat;
}

.modal-dialog {
  max-width: min(92vw, 520px);
}

.modal-content.cont {
  max-height: 94vh;
  max-height: 94dvh;
}

.modal-header {
  padding: clamp(0.5rem, 2vh, 1.5rem) 1rem;
}

/* star.png is a wide 263x43 strip, so size it by width */
.modal__star {
  width: min(150px, 40vw);
  height: auto;
  margin: clamp(0.25rem, 1.5vh, 1rem) 0 clamp(0.5rem, 2vh, 1.25rem);
}

.ft {
  font-size: clamp(1rem, 1vw + 1.6vh, 2.25rem);
}

.modal-footer {
  padding: clamp(0.75rem, 2.5vh, 1.5rem) 0 clamp(0.5rem, 2vh, 1.25rem);
}

/* Portrait tablet and phone: stack the two columns, still one screen */

@media (max-width: 1024px) and (orientation: portrait) {
  .hero__wrapper {
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.5rem, 2vh, 1.5rem);
  }

  .hero__left {
    flex: 0 0 auto;
    width: 100%;
  }

  .hero__right {
    flex: 0 1 auto;
    min-height: 0;
    padding-right: 0;
  }

  .sp img {
    width: min(280px, 52vw, 22vh);
  }

  .hero__tagline {
    font-size: clamp(0.9rem, 2.8vw, 1.5rem);
  }

  .hero__wheelbox {
    width: min(74vw, 50vh);
    width: min(74vw, 50dvh);
  }

  .pp img {
    height: min(44vh, 50vw, 500px);
    height: min(44dvh, 50vw, 500px);
  }
}

@media (max-width: 767.98px) and (orientation: portrait) {
  .hero {
    background-image: url('./assets/mob-bg.png');
  }

  .sp img {
    width: min(240px, 58vw, 22vh);
  }

  .hero__tagline {
    font-size: clamp(0.85rem, 3.6vw, 1.4rem);
  }

  .hero__wheelbox {
    width: min(86vw, 46vh);
    width: min(86vw, 46dvh);
  }

  .pp img {
    height: min(36vh, 70vw, 360px);
    height: min(36dvh, 70vw, 360px);
  }

  .btn-custom-primary {
    font-size: clamp(1rem, 4.5vw, 1.5rem);
  }

  .ft {
    font-size: clamp(1rem, 5vw, 1.6rem);
  }
}

/* Short landscape viewports (e.g. phone rotated): keep two columns, just tighter */

@media (orientation: landscape) and (max-height: 560px) {
  .hero {
    padding: 1.5vh 0;
  }

  .hero__logo-img {
    height: clamp(20px, 7vh, 40px);
  }

  .sp img {
    width: min(220px, 20vw, 26vh);
  }

  .hero__wheelbox {
    width: min(38vw, 74vh);
    width: min(38vw, 74dvh);
  }

  .pp img {
    height: min(64vh, 26vw, 330px);
    height: min(64dvh, 26vw, 330px);
  }
}
