/* ============================================================
   India Ka #1 Book — 50% Mega Xtraa banner
   One fixed-ratio composition (331 x 540) that scales as a single
   unit, so the desktop view is identical to the mobile view.
   All inner sizing uses cqw = 1% of the stage width.
   ============================================================ */

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

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

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* page background — deliberately different from the banner area */
  background-color: #0c1a44;
  background-image:
    radial-gradient(
      70% 55% at 50% 0%,
      rgba(45, 84, 178, 0.55) 0%,
      rgba(45, 84, 178, 0) 70%
    ),
    radial-gradient(
      60% 50% at 50% 100%,
      rgba(255, 170, 32, 0.14) 0%,
      rgba(255, 170, 32, 0) 70%
    ),
    linear-gradient(180deg, #14275f 0%, #0d1a42 55%, #070f2a 100%);
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

a {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   STAGE
   ============================================================ */

.stage {
  --navy: #16307c;
  --navy-2: #1b3c92;
  --stage-h: 100dvh;

  position: relative;

  /* fills the screen on mobile; a full-height portrait card on desktop */
  height: var(--stage-h);
  width: min(100vw, calc(var(--stage-h) * (331 / 540)));

  overflow: hidden;
  background-color: #ffffff;
  background-image:
    radial-gradient(
      70% 45% at 66% 6%,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(196deg, #ffffff 0%, #fdfdfe 55%, #eceef2 100%);
  isolation: isolate;
}

/* once the viewport is wider than the banner ratio there is spare room,
   so the banner reads as a card floating on the page background */
@media (min-aspect-ratio: 331 / 540) {
  .stage {
    --stage-h: calc(100dvh - 3.2rem);
    border-radius: 1.25rem;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 1.75rem 4rem rgba(3, 8, 26, 0.55);
  }
}

/* ============================================================
   ARTBOARD — the fixed 331 x 540 composition
   ============================================================ */

.art {
  position: absolute;
  inset: 0;
  z-index: 1;
  container-type: inline-size;
  /* the artboard fills the stage. On a 331 x 540 frame that reproduces the
     design exactly; on a taller phone the pieces anchor to the edges so the
     composition stretches to the screen instead of leaving a blank band. */
}

/* soft diagonal light streaks */
.bg-streaks {
  position: absolute;
  inset: -15% -25%;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    108deg,
    rgba(255, 255, 255, 0) 0 2.4%,
    rgba(255, 255, 255, 0.9) 2.4% 3.8%,
    rgba(196, 202, 214, 0.28) 3.8% 4.3%,
    rgba(255, 255, 255, 0) 4.3% 8.6%
  );
  opacity: 0.5;
  mask-image: radial-gradient(
    75% 60% at 38% 62%,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.3) 58%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: radial-gradient(
    75% 60% at 38% 62%,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.3) 58%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* ============================================================
   LOGO
   ============================================================ */

.logo {
  position: absolute;
  z-index: 4;
  top: 3.5cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 30cqw;
  height: auto;
}

/* ============================================================
   PLAYER
   ============================================================ */

.player {
  position: absolute;
  z-index: 2;
  /* nudged off the left edge so the raised bat clears the headline.
     In cqw, not px, so the shift scales with the banner */
  left: -6cqw;
  bottom: 0;
  /* height-driven so any cut-out keeps its proportions: locked to the design
     on a 331 x 540 frame, taller on phones, capped so the bat clears the copy */
  height: clamp(150cqw, 75%, 168cqw);
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left bottom;
  animation: player-float 6s ease-in-out infinite;
}

@keyframes player-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -0.6cqw, 0);
  }
}

/* ============================================================
   COPY BLOCK (right column)
   ============================================================ */

.copy {
  position: absolute;
  z-index: 3;
  right: 1cqw;
  width: 52cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--navy);
  pointer-events: none;
}

/* Headline. 28cqw from the top on a 331 x 540 frame (the design position);
   on a taller screen it drifts up by a quarter of the spare height so it
   stays clear of the bat and closes the gap at the top. */
.copy--top {
  top: clamp(8cqw, calc(88.75cqw - 25%), 28cqw);
}

/* offer block hangs off the bottom, just above the button */
.copy--main {
  bottom: 47cqw;
}

/* every child sets its own vertical rhythm explicitly */
.copy > * {
  margin: 0;
}

/* --- INDIA KA --- */
.kicker {
  font-size: 4.4cqw;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
  text-indent: 0.2em;
  transform: translateX(1.5cqw);
}

/* --- #1 BOOK --- */
.rank {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 4cqw;
  font-family: "Anton", "Poppins", Impact, sans-serif;
  font-weight: 400;
  line-height: 0.74;
  color: var(--navy);
  transform: translateX(1.5cqw);
}

.rank__hash {
  font-size: 17cqw;
  transform: translateY(1.4cqw);
}

.rank__one {
  font-size: 32cqw;
  margin-left: 1cqw;
}

.rank__book {
  position: absolute;
  left: 0;
  bottom: 3.4cqw;
  font-family: "Poppins", sans-serif;
  font-size: 4.2cqw;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}

/* --- 50% --- */
.offer {
  position: relative;
  font-family: "Anton", "Poppins", Impact, sans-serif;
  font-weight: 400;
  font-size: 21cqw;
  letter-spacing: -0.015em;
  line-height: 0.78;
  transform: skewX(-6deg);
}

.offer span {
  position: relative;
  display: inline-block;
  background-image: linear-gradient(
    177deg,
    #fff8d8 3%,
    #ffe285 22%,
    #ffc62f 46%,
    #f2960f 66%,
    #ffd455 84%,
    #fff2bd 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.25cqw rgba(122, 62, 4, 0.4);
  text-shadow:
    0 0.35cqw 0 #b25b06,
    0 0.7cqw 0 #a15005,
    0 1.05cqw 0 #8d4403,
    0 1.4cqw 0 #733502,
    0 1.9cqw 1.4cqw rgba(105, 52, 4, 0.32);
  filter: drop-shadow(0 0.4cqw 0.9cqw rgba(255, 176, 32, 0.3));
}

/* travelling highlight across the gold */
.offer span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.9);
  -webkit-text-stroke: 0;
  text-shadow: none;
  mask-image: linear-gradient(
    100deg,
    transparent 40%,
    #000 48%,
    #000 52%,
    transparent 60%
  );
  -webkit-mask-image: linear-gradient(
    100deg,
    transparent 40%,
    #000 48%,
    #000 52%,
    transparent 60%
  );
  mask-size: 260% 100%;
  -webkit-mask-size: 260% 100%;
  animation: gold-sweep 3.6s ease-in-out infinite;
}

@keyframes gold-sweep {
  0% {
    mask-position: 130% 0;
    -webkit-mask-position: 130% 0;
  }
  55%,
  100% {
    mask-position: -45% 0;
    -webkit-mask-position: -45% 0;
  }
}

/* --- MEGA XTRAA --- */
.mega {
  margin-top: 4cqw;
  font-family: "Anton", "Poppins", Impact, sans-serif;
  font-weight: 400;
  font-size: 8.6cqw;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  color: var(--navy);
}

/* --- WIDRAW WITHIN 2 MIN --- */
.withdraw {
  margin-top: 3.2cqw;
  padding: 1.4cqw 4cqw;
  border: 0.45cqw solid var(--navy-2);
  border-radius: 1.4cqw;
  font-size: 3.2cqw;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  color: var(--navy-2);
}

/* ============================================================
   CTA — continuously animated
   ============================================================ */

.cta {
  position: absolute;
  z-index: 4;
  left: 36.9cqw;
  right: 7.9cqw;
  bottom: 20.5cqw;
  height: 11.5cqw;
  display: block;
  border-radius: 2.4cqw;
  color: #fff;
  animation: cta-pulse 1.8s ease-in-out infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* radiating halo */
.cta__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #1fc35a;
  opacity: 0.5;
  animation: cta-ring 1.8s ease-out infinite;
}

.cta__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.2cqw;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-image: linear-gradient(180deg, #2ed365 0%, #14b74d 55%, #0d9a3f 100%);
  box-shadow:
    inset 0 0.35cqw 0 rgba(255, 255, 255, 0.32),
    inset 0 -0.45cqw 0 rgba(0, 0, 0, 0.13),
    0 1cqw 2cqw rgba(13, 122, 52, 0.32);
}

.cta__wa {
  width: 7cqw;
  height: 7cqw;
  flex: none;
  color: #fff;
  filter: drop-shadow(0 0.25cqw 0.35cqw rgba(0, 0, 0, 0.2));
}

.cta__text {
  font-family: "Anton", "Poppins", Impact, sans-serif;
  font-weight: 400;
  font-size: 7.2cqw;
  letter-spacing: 0.015em;
  line-height: 1;
  transform: skewX(-8deg);
  text-shadow: 0 0.3cqw 0.4cqw rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

/* diagonal shine sweeping across the button */
.cta__shine {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.cta__shine::before {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  width: 26%;
  left: -40%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(18deg);
  animation: cta-shine 2.8s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.055);
  }
}

@keyframes cta-ring {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  70%,
  100% {
    transform: scale(1.17);
    opacity: 0;
  }
}

@keyframes cta-shine {
  0% {
    left: -40%;
  }
  55%,
  100% {
    left: 125%;
  }
}

.cta:active .cta__inner {
  transform: translateY(0.3cqw);
}

.cta:focus-visible {
  outline: 0.6cqw solid #16307c;
  outline-offset: 0.6cqw;
}

/* ============================================================
   MOTION PREFERENCES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .player,
  .cta,
  .cta__glow,
  .cta__shine::before,
  .offer span::after {
    animation: none !important;
  }
}
