/* Start screen (log in / register / forgot password): a game splash in the casino lounge. */
.splash {
  min-height: 100dvh; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; overflow: hidden; position: relative;
  background:
    radial-gradient(ellipse at 38% 70%, rgba(255,120,60,.18), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 30%, rgba(0,0,0,.6) 100%),
    linear-gradient(180deg, rgba(8,6,14,.2), rgba(8,6,14,.55)),
    url(/img/tables/lounge.webp) center 30% / cover no-repeat, #0b0710;
}
.splash__stage { position: relative; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 22px; min-width: 0; }

/* logo */
.splash__brand { display: flex; align-items: center; gap: 16px; translate: 0 var(--ay, 0px); z-index: 3; }
.splash__logo {
  width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; font-size: 46px; color: #1b1206;
  background: linear-gradient(135deg, #fff1b8, #f4c762 45%, #d48c12); box-shadow: 0 12px 34px rgba(235,181,79,.45), inset 0 2px 0 rgba(255,255,255,.7);
}
.splash__name { display: flex; flex-direction: column; line-height: .9; }
.splash__name b {
  font: 900 64px/0.95 var(--font-display); letter-spacing: .02em;
  background: linear-gradient(180deg, #fff8dc 0%, #ffd56a 45%, #d48c12 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.6));
}
.splash__name i { font: 800 22px var(--font-display); font-style: normal; letter-spacing: .5em; color: #fff; text-shadow: 0 3px 10px rgba(0,0,0,.8); margin-top: 6px; }

/* the scene: dealer behind a red table, a royal flush and chip stacks */
.splash__scene { position: relative; width: min(640px, 100%); aspect-ratio: 16 / 11; margin-top: 6px; }
.splash__dealer {
  position: absolute; left: 50%; top: 0; height: 64%; transform: translateX(-50%); scale: var(--pop, 1); z-index: 1;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.7));
}
.splash__felt {
  position: absolute; left: -12%; right: -12%; bottom: -34%; height: 82%; border-radius: 50%; z-index: 2;
  background:
    radial-gradient(ellipse at 50% 40%, #e0283f 0%, #a8102a 45%, #6e0819 75%);
  box-shadow: 0 0 0 10px #241014, 0 0 0 16px #120709, 0 0 0 18px rgba(240,200,120,.5), inset 0 0 0 4px rgba(255,160,80,.85), inset 0 0 50px rgba(255,140,60,.6), 0 -10px 60px rgba(255,90,60,.35);
}
.splash__cards { position: absolute; left: 50%; bottom: 14%; z-index: 4; height: 0; }
.splash__cards .pcard {
  --c: 76px; --fan: 1; position: absolute; left: calc(var(--c) / -2); bottom: 0; transform-origin: 50% 120%;
  transform: translateX(calc((var(--i) - 2) * var(--fan) * 58px)) rotate(calc((var(--i) - 2) * var(--fan) * 8deg));
}
.splash__cards .pcard:nth-child(1) { --i: 0; } .splash__cards .pcard:nth-child(2) { --i: 1; } .splash__cards .pcard:nth-child(3) { --i: 2; }
.splash__cards .pcard:nth-child(4) { --i: 3; } .splash__cards .pcard:nth-child(5) { --i: 4; }
.splash__cards .pcard.win { box-shadow: 0 10px 22px rgba(0,0,0,.6), 0 0 0 2px #ffd34a, 0 0 18px rgba(255,211,74,.45); }
.splash__chips { position: absolute; left: 0; right: 0; bottom: 6%; z-index: 3; display: flex; justify-content: space-between; padding: 0 9%; pointer-events: none; }
.splash__chips span { display: flex; flex-direction: column-reverse; align-items: center; }
.splash__chips span:nth-child(2) { margin-right: auto; margin-left: 10px; }
.splash__chips span:nth-child(3) { margin-left: auto; margin-right: 10px; }
.splash__chips i {
  display: block; width: 46px; height: 14px; border-radius: 50%; margin-top: -8px; translate: 0 var(--drop, 0px);
  background: repeating-linear-gradient(90deg, var(--cc) 0 7px, #fff 7px 11px);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.35), 0 2px 3px rgba(0,0,0,.5);
}
.splash__chips i:last-child { background: radial-gradient(ellipse at 50% 50%, #fff 0 18%, var(--cc) 19% 55%, transparent 56%), repeating-conic-gradient(var(--cc) 0 20deg, #fff 20deg 30deg); }
.splash__tag { margin: 18px 0 0; font: 600 15px var(--font-ui); color: rgba(255,255,255,.82); text-shadow: 0 2px 8px #000; z-index: 3; text-align: center; }

/* login card */
.splash__panel { display: flex; justify-content: center; padding: 24px; position: relative; z-index: 5; }
.splash .auth { margin: 0; width: min(420px, 100%); translate: 0 var(--ay, 0px); background: linear-gradient(180deg, rgba(40,16,28,.9), rgba(18,10,20,.92)); border: 1px solid rgba(255,214,120,.25); box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.splash .auth h2 { font-size: 30px; }
.splash .auth .btn.block { min-height: 54px; font-size: 18px; border-radius: 16px; }

/* phones held sideways */
@media (orientation: landscape) and (max-height: 500px) {
  .splash { grid-template-columns: 1.05fr 1fr; }
  .splash__stage { padding: 10px 10px 6px; }
  .splash__logo { width: 44px; height: 44px; font-size: 26px; border-radius: 14px; }
  .splash__name b { font-size: 34px; }
  .splash__name i { font-size: 12px; margin-top: 3px; }
  .splash__scene { width: min(420px, 100%); aspect-ratio: 16 / 10; margin-top: 2px; }
  .splash__cards .pcard { --c: 44px; transform: translateX(calc((var(--i) - 2) * var(--fan) * 34px)) rotate(calc((var(--i) - 2) * var(--fan) * 8deg)); }
  .splash__chips i { width: 30px; height: 9px; margin-top: -5px; }
  .splash__tag { display: none; }
  .splash__panel { padding: 8px 12px; }
  .splash .auth { padding: 14px 18px; border-radius: 20px; }
  .splash .auth h2 { font-size: 20px; margin-bottom: 0; }
  .splash .auth label { margin: 6px 0 3px; font-size: 11px; }
  .splash .auth input { min-height: 36px; font-size: 14px; }
  .splash .auth .btn.block { min-height: 40px; font-size: 15px; margin-top: 10px; }
  .splash .auth .links { margin-top: 8px; font-size: 12px; }
  .splash .auth .check { margin-top: 6px; font-size: 11px; }
}
/* phones held upright: logo and scene on top, the card below */
@media (orientation: portrait) and (max-width: 760px) {
  .splash { grid-template-columns: 1fr; align-content: start; }
  .splash__stage { padding: 26px 16px 0; }
  .splash__logo { width: 56px; height: 56px; font-size: 34px; }
  .splash__name b { font-size: 46px; }
  .splash__name i { font-size: 15px; }
  .splash__scene { width: 100%; }
  .splash__cards .pcard { --c: 54px; transform: translateX(calc((var(--i) - 2) * var(--fan) * 40px)) rotate(calc((var(--i) - 2) * var(--fan) * 8deg)); }
  .splash__chips i { width: 34px; height: 10px; margin-top: -6px; }
  .splash__tag { font-size: 13px; margin-top: 10px; }
  .splash__panel { padding: 14px 16px 30px; }
}

/* resting values for the entrance animation (GSAP animates from its start values to these) */
.splash__dealer { --pop: 1; }
.splash__brand, .splash .auth { --ay: 0px; }
.splash__chips i { --drop: 0px; }
.splash__name b { text-transform: uppercase; }
.splash__name i { text-transform: uppercase; }

/* tall forms (register) never get cut: the page scrolls instead */
.splash { overflow-x: hidden; overflow-y: visible; }
@media (orientation: landscape) and (max-height: 500px) {
  .splash { align-items: start; }
  .splash__stage { position: sticky; top: 0; }
}
