/* The Trainer Profiles splash (look A, approved 2026-11-23). Used by the app and by the btwpvp.com home page, so every
   name starts with btws- and the fonts are its own (the app's files), whatever page loads it. */
/* The app's fonts under their real names: the live stamps (stamps/*.js) are drawn in Bebas Neue, DM Mono, Barlow and Saira
   Semi Condensed, wherever the splash shows (the app, btwpvp.com, a test page). Same files as the app's own app.css. */
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url("../fonts/bebas-neue-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url("../fonts/dm-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Saira Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/saira-semicondensed-700.woff2") format("woff2"); }

html.btws-on, html.btws-on body { overflow: hidden; }
.btws { --c: #00e5ff; --p: #ff3d71; --v: #a259ff; position: fixed; inset: 0; z-index: 1000; display: flex; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; background: #07070c; color: #f0f0f8; font-family: "Barlow", sans-serif; transition: opacity .5s ease, visibility 0s .5s; }
.btws.btws-out { opacity: 0; visibility: hidden; pointer-events: none; }
.btws *, .btws *::before { box-sizing: border-box; margin: 0; }

/* Background: sky, stars, moving grid floor, horizon, scan lines (as the old splash) */
.btws-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.btws-sky { position: absolute; inset: 0; background:
  radial-gradient(ellipse 55% 42% at 50% 58%, rgba(255,61,113,.30), transparent 70%),
  radial-gradient(ellipse 75% 46% at 50% 102%, rgba(162,89,255,.38), transparent 70%),
  radial-gradient(ellipse 50% 38% at 50% 22%, rgba(0,229,255,.12), transparent 70%); }
.btws-stars { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; opacity: .8;
  box-shadow: 8vw 9vh #fff, 17vw 22vh rgba(0,229,255,.9), 26vw 6vh #fff, 34vw 15vh rgba(255,255,255,.6), 61vw 8vh #fff, 72vw 19vh rgba(255,61,113,.9), 83vw 7vh #fff, 91vw 24vh rgba(255,255,255,.7), 12vw 34vh rgba(255,255,255,.5), 88vw 38vh rgba(0,229,255,.7), 47vw 4vh #fff, 55vw 27vh rgba(255,255,255,.5), 4vw 18vh rgba(255,255,255,.6), 96vw 12vh #fff;
  animation: btwsTwinkle 5s ease-in-out infinite; }
.btws-floor { position: absolute; left: -60%; right: -60%; bottom: 0; height: 32%; perspective: 360px;
  -webkit-mask-image: linear-gradient(to top, #000 25%, transparent 96%); mask-image: linear-gradient(to top, #000 25%, transparent 96%); }
.btws-floor::before { content: ""; position: absolute; inset: 0; transform-origin: 50% 100%; transform: rotateX(62deg);
  background-image: linear-gradient(rgba(0,229,255,.6) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(162,89,255,.6) 1.5px, transparent 1.5px);
  background-size: 72px 72px; animation: btwsGrid 2.2s linear infinite; }
.btws-horizon { position: absolute; left: 0; right: 0; bottom: calc(32% * .47); height: 2px; opacity: .7;
  background: linear-gradient(90deg, transparent, rgba(255,61,113,.9) 30%, rgba(0,229,255,.9) 70%, transparent); box-shadow: 0 0 28px 6px rgba(255,61,113,.35); }
.btws-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.022) 0 1px, transparent 1px 4px), radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }

.btws-inner { position: relative; z-index: 2; margin: auto; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 20px 16px; }
.btws-pill { display: inline-flex; align-items: center; gap: 9px; font-family: "DM Mono", monospace; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--p);
  padding: 6px 13px; border: 1px solid rgba(255,61,113,.45); border-radius: 999px; background: rgba(255,61,113,.08); box-shadow: 0 0 18px rgba(255,61,113,.18); animation: btwsUp .7s .1s both ease-out; }
.btws-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: btwsPulse 1.8s ease-in-out infinite; }

/* The card and the four stamps that slam down around it */
.btws-stage { position: relative; width: 340px; max-width: 100%; height: 282px; margin: 10px 0 8px; flex: none; }
.btws-card { position: absolute; left: 50%; top: 0; width: 214px; padding: 6px 6px 2px; border-radius: 16px; background: #0b0b10; border: 1px solid rgba(0,229,255,.55);
  box-shadow: 0 0 34px rgba(0,229,255,.28), 0 24px 50px rgba(0,0,0,.7); transform: translateX(-50%); z-index: 3;
  animation: btwsCardUp .9s .5s both cubic-bezier(.2,.9,.3,1.1), btwsFloat 6s 1.4s ease-in-out infinite; }
.btws-card img { display: block; width: 100%; height: auto; aspect-ratio: 642 / 827; border-radius: 10px; }
.btws-st { position: absolute; width: 70px; z-index: 2; transform: rotate(var(--r)); filter: drop-shadow(0 10px 16px rgba(0,0,0,.75)); animation: btwsSlam .45s both cubic-bezier(.3,1.6,.5,1); }
.btws-st img, .btws-st svg { display: block; width: 100%; height: auto; }
.btws-c2, .btws-c3 { display: none; } /* desktop only: the Wide fan */
.btws-l0 { left: 0; top: 14px; } .btws-r0 { right: 0; top: 14px; } .btws-l1 { left: 4px; top: 150px; } .btws-r1 { right: 4px; top: 150px; }

.btws-title { font-family: "Bebas Neue", sans-serif; font-weight: 400; line-height: .9; letter-spacing: .04em; color: #fff; animation: btwsUp .7s .25s both ease-out; }
.btws-title small { display: block; font-size: 16px; letter-spacing: .34em; color: #9999b0; margin-bottom: 4px; padding-left: .34em; }
.btws-title span { display: block; font-size: 54px; white-space: nowrap; }
.btws-title em { font-style: normal; color: var(--c); text-shadow: 0 0 30px rgba(0,229,255,.5), 0 0 70px rgba(0,229,255,.25); }
.btws-line { margin-top: 10px; max-width: 340px; font-size: 15px; line-height: 1.45; color: #c4c4d8; text-shadow: 0 1px 14px rgba(0,0,0,.9); animation: btwsUp .7s .45s both ease-out; }
.btws-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; animation: btwsUp .7s .55s both ease-out; }
.btws-btn { font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 15px 20px; border-radius: 6px; border: 1px solid transparent;
  display: flex; justify-content: center; align-items: center; gap: 10px; line-height: 1; text-decoration: none; transition: transform .18s, box-shadow .18s, background .18s; }
.btws-primary { background: var(--c); color: #031219; box-shadow: 0 0 26px rgba(0,229,255,.38); }
.btws-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,229,255,.6); }
.btws-ghost { background: rgba(162,89,255,.08); color: #f0f0f8; border-color: rgba(162,89,255,.55); }
.btws-ghost:hover { transform: translateY(-2px); background: rgba(162,89,255,.2); }
.btws-btn:active { transform: scale(.97); }
.btws-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btws-tag { margin-top: 14px; font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #c4c4d8; text-shadow: 0 1px 10px rgba(0,0,0,.9); }

/* Narrow phones (320 wide) and short ones (Safari bars showing): the card and stamps shrink first, then the tag goes. */
@media (max-width: 340px) {
  .btws-inner { padding: 14px 14px 12px; }
  .btws-stage { height: 250px; }
  .btws-card { width: 190px; }
  .btws-st { width: 60px; }
  .btws-l1, .btws-r1 { top: 132px; }
  .btws-title span { font-size: 46px; }
  .btws-line { font-size: 14px; }
}
@media (max-height: 600px) {
  .btws-inner { padding-top: 10px; padding-bottom: 10px; }
  .btws-stage { height: 222px; margin: 6px 0 4px; }
  .btws-card { width: 168px; }
  .btws-st { width: 56px; }
  .btws-l1, .btws-r1 { top: 118px; }
  .btws-title small { font-size: 13px; }
  .btws-title span { font-size: 46px; }
  .btws-line { margin-top: 6px; font-size: 14px; line-height: 1.4; }
  .btws-actions { margin-top: 10px; gap: 8px; }
  .btws-btn { padding: 13px 18px; }
  .btws-tag { display: none; }
}

/* Desktop: the Wide fan (Matthew, 2026-11-23). The card grows and the stamps fan out to both sides from the card's centre.
   The fans follow the window: the outer column sits near the window's edge (max(545px, 50vw - 110px)) and the middle one
   halfway to the inner, so a wider window spreads them out and a narrower one brings them in; the outer column drops
   off below 1240px wide and the middle below 1000px, leaving the phone's four. A column that appears lands then. */
@media (min-width: 760px) {
  .btws-inner { max-width: 680px; }
  .btws-stage { --ys: 1; width: 300px; height: 386px; margin: 18px 0 14px; }
  .btws-card { width: 300px; padding: 8px 8px 3px; border-radius: 20px; }
  .btws-card img { border-radius: 13px; }
  .btws-st { left: 50%; top: 50%; width: calc(var(--w) * var(--ys)); translate: calc(-50% + var(--side) * var(--dx)) calc(-50% + var(--y) * var(--ys)); }
  .btws-c1 { --dx: calc(225px + (50vw - 380px) * 0.06); }
  .btws-c2 { --dx: calc((225px + max(545px, 50vw - 110px)) / 2); }
  .btws-c3 { --dx: max(545px, 50vw - 110px); }
  .btws-pill { font-size: 12px; padding: 7px 15px; }
  .btws-title small { font-size: 20px; }
  .btws-title span { font-size: 78px; }
  .btws-line { max-width: 520px; font-size: 17px; }
  .btws-actions { flex-direction: row; justify-content: center; max-width: 600px; gap: 14px; margin-top: 22px; }
  .btws-btn { padding: 18px 30px; font-size: 13px; white-space: nowrap; }
  .btws-tag { display: block; margin-top: 18px; font-size: 13px; }
}
@media (min-width: 1000px) { .btws-c2 { display: block; } }
@media (min-width: 1240px) { .btws-c3 { display: block; } }
/* Short desktop windows (a laptop at 720px tall): everything a fifth smaller so the buttons stay on screen. */
@media (min-width: 760px) and (max-height: 820px) {
  .btws-stage { --ys: .8; width: 240px; height: 309px; margin: 10px 0 8px; }
  .btws-card { width: 240px; }
  .btws-title span { font-size: 64px; }
  .btws-line { font-size: 16px; margin-top: 8px; }
  .btws-actions { margin-top: 16px; }
  .btws-tag { margin-top: 12px; }
}

@keyframes btwsUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes btwsCardUp { from { opacity: 0; transform: translateX(-50%) translateY(40px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes btwsFloat { 0%, 100% { translate: 0 -4px; } 50% { translate: 0 4px; } }
@keyframes btwsSlam { from { opacity: 0; transform: rotate(var(--r)) scale(2.2); } to { opacity: 1; transform: rotate(var(--r)) scale(1); } }
@keyframes btwsPulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes btwsTwinkle { 0%, 100% { opacity: .4; } 50% { opacity: .9; } }
@keyframes btwsGrid { to { background-position: 0 72px; } }
@media (prefers-reduced-motion: reduce) { .btws *, .btws *::before { animation: none !important; } }
