/* ==========================================================================
   Just Play — Demo Page  (mobile-first)
   ========================================================================== */

:root {
  --bg:        #05070c;
  --gold:      #f5c451;
  --gold-deep: #b57a0a;
  --foil: linear-gradient(180deg, #fff8e0 0%, #f7d98a 20%, #f5c451 40%,
                                  #b07709 56%, #f0cf7c 74%, #fff3ce 100%);
  --chrome: linear-gradient(180deg, #ffffff 38%, #c3cede 78%, #97a5bb 100%);

  --text:      #eef2f8;
  --text-soft: #9fadc4;
  --text-dim:  #6b7a93;

  --pad:  clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #0a0a0a; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left:  max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

/* ==========================================================================
   Motion utilities
   ========================================================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.anim {
  animation: rise .85s var(--ease-out) both;
  animation-delay: var(--d, 0s);
}

/* scroll-triggered (JS adds .is-in) */
.reveal { opacity: 0; transform: translateY(32px); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg__pattern {
  position: absolute;
  inset: 0;
  background: url('../assets/pattern.svg') repeat;
  background-size: 130px 130px;
  animation: drift 90s linear infinite;
}
@keyframes drift {
  to { background-position: 130px 260px; }
}
.bg__spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 45% at 50% 8%, rgba(255, 232, 180, .07), transparent 70%);
}
.bg__glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.bg__glow--gold {
  width: min(760px, 120vw); height: 40vh;
  top: -12vh; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(245, 196, 81, .2), transparent 70%);
  animation: breathe 9s ease-in-out infinite;
}
.bg__glow--deep {
  width: min(700px, 120vw); height: 45vh;
  bottom: -20vh; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(60, 90, 190, .16), transparent 70%);
  animation: breathe 11s ease-in-out infinite reverse;
}
@keyframes breathe {
  0%, 100% { opacity: .8; }
  50%      { opacity: 1; }
}
.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 95% 65% at 50% 38%, transparent 30%, rgba(0, 0, 0, .82) 100%);
}

/* ---------- Brand lockup ---------- */
.top {
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: 20px;
  text-align: center;
}

.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: 22px;
}
.lockup__crown {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 18px rgba(245, 196, 81, .6));
  animation: crown-float 5s ease-in-out infinite;
}
.lockup__crown svg { width: 100%; height: 100%; }
@keyframes crown-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-7px) rotate(-2deg); }
}

.lockup__name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: .3em;
  text-indent: .3em;
  line-height: 1.1;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lockup__name span {
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Welcome headline ---------- */
.welcome { display: flex; flex-direction: column; align-items: center; }

.welcome__small {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .42em;
  text-indent: .42em;
  text-transform: uppercase;
  color: rgba(245, 196, 81, .78);
  margin-bottom: 10px;
}

/* moving light streak across the gold foil */
.welcome__brand {
  font-size: clamp(2.6rem, 12.5vw, 5.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.035em;
  background-image:
    linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .9) 50%, transparent 58%),
    var(--foil);
  background-size: 240% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 28px rgba(245, 196, 81, .35));
  animation: rise .85s var(--ease-out) both, sheen 6s ease-in-out infinite;
  animation-delay: var(--d, 0s), 1.5s;
}
@keyframes sheen {
  0%        { background-position: 150% 0, 0 0; }
  50%, 100% { background-position: -90% 0, 0 0; }
}

.welcome__big {
  font-size: clamp(1.16rem, 5.4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-top: 4px;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Ornamental divider ---------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto 0;
  max-width: 300px;
}
.ornament__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, .55));
  transform-origin: right;
  animation: line-in .9s var(--ease-out) both;
  animation-delay: calc(var(--d, 0s) + .1s);
}
.ornament__line:last-child {
  background: linear-gradient(90deg, rgba(245, 196, 81, .55), transparent);
  transform-origin: left;
}
@keyframes line-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.ornament__gem {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--foil);
  animation: gem-pulse 3.5s ease-in-out infinite;
}
@keyframes gem-pulse {
  0%, 100% { transform: rotate(45deg) scale(1);    box-shadow: 0 0 12px rgba(245, 196, 81, .65); }
  50%      { transform: rotate(45deg) scale(1.28); box-shadow: 0 0 22px rgba(245, 196, 81, .95); }
}

/* ---------- Bonus offers ---------- */
.offers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.offer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 20px 12px 18px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(245, 196, 81, .13), transparent 70%),
    linear-gradient(165deg, #191307 0%, #0c0b09 55%, #08080a 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 236, 190, .16);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.offer:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 236, 190, .28);
}

/* gold gradient hairline border */
.offer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg,
      rgba(245, 196, 81, .95) 0%,
      rgba(245, 196, 81, .15) 42%,
      rgba(245, 196, 81, .28) 60%,
      rgba(255, 243, 206, .8) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.offer__glow {
  position: absolute;
  z-index: 0;
  width: 80%; height: 60%;
  left: 10%; top: 18%;
  background: radial-gradient(ellipse, rgba(245, 196, 81, .22), transparent 70%);
  filter: blur(18px);
  animation: breathe 6s ease-in-out infinite;
}
.offer__shine {
  position: absolute;
  z-index: 2;
  top: -60%; left: -80%;
  width: 55%; height: 220%;
  transform: rotate(12deg);
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .16) 50%, transparent 60%);
  animation: offer-sweep 6s ease-in-out infinite;
}
@keyframes offer-sweep {
  0%        { left: -80%; }
  45%, 100% { left: 150%; }
}

.offer__edge {
  position: absolute;
  z-index: 2;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(245, 196, 81, .6);
  transition: width .45s var(--ease-out), height .45s var(--ease-out), border-color .45s var(--ease-out);
}
.offer__edge--tl {
  top: 9px; left: 9px;
  border-right: 0; border-bottom: 0;
  border-radius: 5px 0 0 0;
}
.offer__edge--br {
  bottom: 9px; right: 9px;
  border-left: 0; border-top: 0;
  border-radius: 0 0 5px 0;
}
.offer:hover .offer__edge {
  width: 24px; height: 24px;
  border-color: rgba(255, 240, 200, .95);
}

.offer__tag {
  position: relative;
  z-index: 2;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-indent: .2em;
  text-transform: uppercase;
  color: rgba(245, 196, 81, .82);
  line-height: 1.3;
}
.offer__num {
  position: relative;
  z-index: 2;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(3.1rem, 17vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.02em;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 20px rgba(245, 196, 81, .4));
}
.offer__num i {
  font-style: normal;
  font-size: .38em;
  vertical-align: .85em;
  margin-left: .04em;
}
/* count-up target — stays transparent so the parent's clipped foil
   shows through, and keeps a fixed width so the digits don't jitter */
.offer__val {
  color: inherit;
  font: inherit;
  display: inline-block;
  min-width: 1.15ch;
  text-align: center;
}
.offer__word {
  position: relative;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 2px;
}

/* ---------- Book tiles ---------- */
.books { padding: 26px 0 34px; }

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tile {
  --scr-bg: #ffffff;
  --scr-line: rgba(10, 20, 40, .14);
  --scr-head: rgba(10, 20, 40, .07);

  position: relative;
  display: flex;
  align-items: center;
  min-height: 152px;
  padding: 20px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55),
              inset 0 1px 0 rgba(255, 255, 255, .24);
  transition: transform .55s var(--ease-out),
              box-shadow .45s var(--ease-out),
              opacity .7s var(--ease-out);
}
.tiles .reveal:nth-child(2) { transition-delay: .1s; }
.tiles .reveal:nth-child(3) { transition-delay: .2s; }
.tile:active { transform: scale(.985); transition-duration: .12s; }

.tile--cric  { background: linear-gradient(118deg, #0a4fae 0%, #0070ed 46%, #05306e 100%); }
.tile--oexch { background: linear-gradient(118deg, #0d5b48 0%, #16a37b 46%, #073229 100%); }
.tile--777   {
  background: linear-gradient(118deg, #121419 0%, #262a33 46%, #06070a 100%);
  --scr-bg: #14161c;
  --scr-line: rgba(255, 255, 255, .16);
  --scr-head: rgba(255, 255, 255, .07);
}

/* gold hairline across the top of every tile */
.tile::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 190, .8), transparent);
}

.tile__shine {
  position: absolute;
  top: -60%; left: -70%;
  width: 60%; height: 220%;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .17) 50%, transparent 60%);
  transform: rotate(8deg);
  transition: left .9s var(--ease-out);
  z-index: 4;
  pointer-events: none;
}
.tile:hover .tile__shine { left: 120%; }

.tile__body {
  position: relative;
  z-index: 3;
  width: 58%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.tile__word {
  font-size: clamp(1.75rem, 8vw, 3.7rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.035em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .45);
  transition: transform .5s var(--ease-out);
}
.tile__word em { font-style: normal; display: block; opacity: .82; }

/* single-line wordmark — scaled up so it carries the same weight
   as the two-line names on the other tiles */
.tile__word--solo {
  font-size: clamp(2.9rem, 14vw, 5.4rem);
  letter-spacing: -.04em;
}

.tile__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: clamp(.75rem, 3vw, .96rem);
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  color: #fff;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out),
              color .3s var(--ease-out), transform .4s var(--ease-out);
}
.tile:hover .tile__link,
.tile:active .tile__link {
  background: rgba(255, 255, 255, .95);
  border-color: #fff;
  color: #111;
}
.tile__link b { font-weight: 800; transition: transform .35s var(--ease-out); }
.tile:hover .tile__link b { transform: translate(2px, -2px); }

/* Angled screenshot frame */
.tile__frame {
  position: absolute;
  z-index: 2;
  right: -7%;
  top: 50%;
  width: 40%;
  max-width: 330px;
  aspect-ratio: 4 / 3;
  transform: translateY(-50%) skewX(-11deg);
  border-left: 3px solid rgba(255, 255, 255, .92);
  border-top: 3px solid rgba(255, 255, 255, .92);
  border-radius: 6px 0 0 0;
  overflow: hidden;
  box-shadow: -16px 20px 44px rgba(0, 0, 0, .45);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.tile:hover .tile__frame {
  transform: translateY(-50%) skewX(-11deg) translateX(-14px);
  box-shadow: -22px 26px 56px rgba(0, 0, 0, .55);
}
.tile__screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--scr-bg);
}
.scr__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--scr-head);
  border-bottom: 1px solid var(--scr-line);
}
.scr__bar i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--scr-line);
}
.scr__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
}
.scr__mark {
  width: 38%; height: 8px;
  border-radius: 3px;
  background: var(--scr-line);
  margin-bottom: 3px;
}
.scr__field {
  height: 11px;
  border-radius: 4px;
  border: 1px solid var(--scr-line);
}
.scr__field--short { width: 70%; }
.scr__btn {
  height: 13px;
  width: 58%;
  border-radius: 4px;
  margin-top: 4px;
  background: linear-gradient(90deg, var(--gold), #d99f1c);
}
.tile--cric  .scr__btn { background: linear-gradient(90deg, #2f8bff, #0057c4); }
.tile--oexch .scr__btn { background: linear-gradient(90deg, #2fd3a3, #0c7a5c); }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 25%; right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 196, 81, .5), transparent);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  padding-top: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--text-dim);
}
.footer__age { display: inline-flex; align-items: center; gap: 8px; }
.footer__age span {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 196, 81, .45);
  color: rgba(245, 196, 81, .85);
  font-size: .66rem;
  font-weight: 800;
}

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 560px) {
  .offer { padding: 26px 18px 22px; border-radius: 20px; }
  .offer__tag { font-size: .66rem; }
  .offer__word { font-size: .76rem; }
  .tile { min-height: 178px; padding: 26px; }
  .tile__body { width: 56%; gap: 16px; }
  .books { padding: 32px 0 44px; }
}

@media (min-width: 760px) {
  .top { padding-top: 48px; padding-bottom: 30px; }
  .lockup { margin-bottom: 26px; }
  .lockup__crown { width: 50px; height: 50px; }
  .lockup__name { font-size: 1.6rem; }
  .welcome__small { font-size: .92rem; margin-bottom: 14px; }
  .ornament { max-width: 420px; margin-top: 28px; }
  .offers { gap: 20px; margin-top: 28px; max-width: 720px; margin-inline: auto; }
  .offer__num { font-size: 4.6rem; }
  .footer__inner { justify-content: space-between; font-size: .82rem; padding-block: 20px; }
}

@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 24px); }
  .tile--777 { grid-column: 1 / -1; }
  .tile { min-height: clamp(200px, 24vw, 250px); padding: clamp(28px, 3.4vw, 40px); border-radius: 24px; }
  .tile__body { width: 54%; gap: 20px; }
  .tile__frame { right: -4%; width: 30%; }
  .tile:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(0, 0, 0, .65); }
  .tile:hover .tile__word { transform: translateX(4px); }
  .books { padding: 44px 0 70px; }
}

/* ---------- Very narrow phones ---------- */
@media (max-width: 370px) {
  .tile__frame { display: none; }
  .tile__body { width: 100%; }
  .offers { gap: 9px; }
  .offer { padding: 18px 8px 16px; }
  .offer__tag { letter-spacing: .14em; text-indent: .14em; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
