/* Welcome-back pop-up. Every class starts with "wp-" so nothing clashes with main.css.
   Markup is built by /js/welcome-popup.js (source: build/welcome-popup.js). */

.wp-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(6, 16, 40, .78); /* navy-tinted, matches --ink */
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .35s ease;
}
.wp-overlay.wp-is-open { opacity: 1; }
.wp-overlay[hidden] { display: none; }

.wp-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 48px 40px 40px;
  border-radius: 16px;
  border: 1px solid rgba(245, 182, 35, .35);
  /* BK8 brand: cobalt glow top-left fading into navy (--cobalt #0054d1, --cobalt-ink #062a6b, --ink #0c1630) */
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(0, 84, 209, .85) 0%, rgba(0, 84, 209, 0) 60%),
    linear-gradient(160deg, #003a96 0%, #062a6b 45%, #0c1630 100%);
  box-shadow: 0 24px 80px rgba(3, 10, 30, .65), 0 0 40px rgba(0, 84, 209, .25);
  color: #eaeaea; text-align: center;
  font-family: var(--font-body, system-ui, sans-serif);
  transform: scale(.95); transition: transform .35s cubic-bezier(.2, .8, .3, 1);
}
.wp-is-open .wp-card { transform: scale(1); }
.wp-card:focus { outline: none; }

/* gold swoosh from the top-left corner */
.wp-streak {
  position: absolute; top: 0; left: 0; z-index: 0;
  width: 78%; height: auto; pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(245, 215, 122, .55));
}
.wp-card::after { /* faint court lines, the same device as the homepage hero */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .09;
  background:
    radial-gradient(circle at 100% 100%, transparent 0 139px, #fff 140px 141px, transparent 142px),
    radial-gradient(circle at 100% 100%, #fff 0 4px, transparent 5px),
    linear-gradient(#fff, #fff) 100% 0 / 1px 100% no-repeat;
}
.wp-card::before { /* soft glow behind the swoosh */
  content: ""; position: absolute; top: -120px; left: -120px; z-index: 0;
  width: 320px; height: 320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(245, 215, 122, .22) 0%, rgba(201, 162, 39, .08) 40%, transparent 70%);
}

/* twinkling sparkles */
.wp-sparkle {
  position: absolute; z-index: 1; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff3c4;
  box-shadow: 0 0 6px 2px rgba(245, 215, 122, .8);
  animation: wp-twinkle 2.4s ease-in-out infinite;
}
.wp-sparkle:nth-child(2) { top: 22px; left: 120px; animation-delay: 0s; }
.wp-sparkle:nth-child(3) { top: 58px; left: 64px;  width: 4px; height: 4px; animation-delay: .6s; }
.wp-sparkle:nth-child(4) { top: 30px; left: 196px; width: 3px; height: 3px; animation-delay: 1.2s; }
.wp-sparkle:nth-child(5) { top: 92px; left: 28px;  width: 5px; height: 5px; animation-delay: 1.8s; }
.wp-sparkle:nth-child(6) { top: 12px; left: 250px; width: 3px; height: 3px; animation-delay: .9s; }
@keyframes wp-twinkle {
  0%, 100% { opacity: .15; transform: scale(.6); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

.wp-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff;
  font: 400 26px/1 system-ui, sans-serif; cursor: pointer;
  transition: background .2s, color .2s;
}
.wp-close:hover { background: rgba(245, 215, 122, .16); color: #f5d77a; }
.wp-close:focus-visible, .wp-btn:focus-visible { outline: 2px solid #f5d77a; outline-offset: 3px; }

.wp-content { position: relative; z-index: 1; }

/* the BK8 mark is blue, so it sits on a white chip to stay readable on the cobalt card */
.wp-logo { display: block; width: auto; height: auto; max-height: 46px; max-width: 60%; margin: 0 auto 24px;
  padding: 12px 22px; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(3, 10, 30, .35); }

.wp-title {
  margin: 0 0 16px;
  font: 800 36px/1.15 var(--font-display, system-ui, sans-serif);
  letter-spacing: .01em; color: #f5d77a; text-wrap: balance;
}
.wp-title-text {
  background: linear-gradient(90deg, #f5d77a 0%, #c9a227 50%, #f5d77a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.wp-title-emoji { -webkit-text-fill-color: initial; } /* keep the emoji in colour */

.wp-body { margin: 0 0 28px; font-size: 17px; line-height: 1.5; color: #eaeaea; }
.wp-body p { margin: 0 0 8px; }
.wp-body p:last-child { margin-bottom: 0; }

.wp-btn {
  display: inline-block; min-width: 180px; padding: 14px 32px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, #f5d77a 0%, #c9a227 50%, #f5d77a 100%);
  background-size: 200% 100%; background-position: 0 0;
  color: #111; text-decoration: none;
  font: 700 17px/1.2 var(--font-body, system-ui, sans-serif); letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(201, 162, 39, .3);
  transition: box-shadow .25s, background-position .4s, transform .2s;
}
.wp-btn:hover {
  background-position: 100% 0;
  box-shadow: 0 0 0 4px rgba(245, 215, 122, .15), 0 0 28px rgba(245, 215, 122, .55);
  transform: translateY(-1px);
}

html.wp-lock, html.wp-lock body { overflow: hidden; }

@media (max-width: 479px) {
  .wp-card { width: 90%; padding: 44px 20px 28px; }
  .wp-title { font-size: 26px; }
  .wp-body { font-size: 16px; }
  .wp-logo { max-height: 38px; padding: 10px 18px; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .wp-sparkle { animation: none; opacity: .7; }
  .wp-card, .wp-is-open .wp-card { transform: none; transition: none; }
  .wp-btn, .wp-btn:hover { transform: none; }
}
