/* Beta-test pages (beta.html): each game brings its own world. The layout is
   the Kingshot page's; these rules only repaint the ground and the accent in
   the game's colours and place its art. */

/* Last Beacon Survival: a drowned world, deep sea blue, the lighthouse lamp. */
:root.beta-bcn,:root[data-theme].beta-bcn{--paper:#0A1430;--surface:#111E42;--raised:#192A57;--sunk:#0D1838;--line:#24376A;--line-soft:#1D2E5B;--paper-rgb:10,20,48;
  --ink-2:#AFC0E4;--ink-3:#8698C2;--faint:#5D6E9A;
  --ember:#F79A3A;--ember-ink:#FFB25C;--ember-fill:#F79A3A;--ember-fill-hover:#FFB25C;--on-ember:#1F0F02;
  --ember-shadow:rgba(247,154,58,.45);--ember-edge:rgba(247,154,58,.42);--ember-ring:rgba(247,154,58,.22);--ember-tint:rgba(247,154,58,.1);
  --ember-wash:#1F1A1C;--ember-wash-2:#2A2220;--ember-deep:#C97620;--ember-spark:#FFE0B0}
.beta-bcn .ks-hero-art{object-position:78% 45%;background:#0A1430}

/* Age of Spirits: ink-black forest, the campfire, red eyes in the dark. */
:root.beta-aos,:root[data-theme].beta-aos{--paper:#0A0806;--surface:#15100C;--raised:#201811;--sunk:#0F0C09;--line:#33271B;--line-soft:#281F16;--paper-rgb:10,8,6;
  --ink:#F3E7D3;--ink-2:#BCAD97;--ink-3:#93856F;--faint:#685C4B;
  --ember:#F39A2B;--ember-ink:#FFB347;--ember-fill:#F39A2B;--ember-fill-hover:#FFB347;--on-ember:#1C0E02;
  --ember-shadow:rgba(243,154,43,.45);--ember-edge:rgba(243,154,43,.42);--ember-ring:rgba(243,154,43,.22);--ember-tint:rgba(243,154,43,.1);
  --ember-wash:#211709;--ember-wash-2:#2B1E0C;--ember-deep:#C4741A;--ember-spark:#FFE2A8}
.beta-aos .eyebrow{color:#E5483A}
.beta-aos .ks-hero-art{object-position:76% 50%;background:#0A0806}

@media (max-width:760px){
  .beta-bcn .ks-hero-art{object-position:80% 30%}
  .beta-aos .ks-hero-art{object-position:74% 40%}
}

/* ── things that move ───────────────────────────────────────────────────── */
.bt-main{position:relative;isolation:isolate}
.bt-job{flex-direction:row;align-items:center;gap:14px;padding:18px 20px;transition:transform .2s ease,box-shadow .2s ease}
.bt-job h3{margin:0;font-size:1.2rem}
.bt-job:hover{transform:translateY(-3px);box-shadow:inset 0 0 0 1px var(--ember-edge),0 12px 30px -16px var(--ember-shadow)}
.bt-job:hover .ks-ic{background:var(--ember-fill);color:var(--on-ember)}

/* sparks rising through the hero */
.bt-sparks{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.bt-sparks i{position:absolute;bottom:-10px;width:5px;height:5px;border-radius:50%;background:var(--ember-spark);
  box-shadow:0 0 8px 2px var(--ember-shadow);opacity:0;animation:bt-rise 9s linear infinite}
.bt-sparks i:nth-child(1){left:58%;animation-delay:0s}
.bt-sparks i:nth-child(2){left:66%;animation-delay:1.3s;width:3px;height:3px}
.bt-sparks i:nth-child(3){left:72%;animation-delay:2.9s}
.bt-sparks i:nth-child(4){left:79%;animation-delay:4.1s;width:4px;height:4px}
.bt-sparks i:nth-child(5){left:85%;animation-delay:5.6s;width:3px;height:3px}
.bt-sparks i:nth-child(6){left:62%;animation-delay:6.4s;width:4px;height:4px}
.bt-sparks i:nth-child(7){left:91%;animation-delay:7.2s}
.bt-sparks i:nth-child(8){left:75%;animation-delay:.7s;width:3px;height:3px}
.bt-sparks i:nth-child(9){left:69%;animation-delay:3.6s;width:4px;height:4px}
.bt-sparks i:nth-child(10){left:82%;animation-delay:8.1s;width:3px;height:3px}
@keyframes bt-rise{0%{transform:translate(0,0) scale(.6);opacity:0}12%{opacity:.9}
  60%{opacity:.7}100%{transform:translate(-46px,-520px) scale(1.1);opacity:0}}

/* the closing block looks into the game */
.bt-close{position:relative;overflow:hidden;min-height:300px;align-content:center}
.bt-close>*{position:relative;z-index:1}
.bt-close::before{content:"";position:absolute;inset:0 0 0 38%;background-size:cover;background-position:50% 35%;
  -webkit-mask-image:linear-gradient(to right,transparent,#000 55%);mask-image:linear-gradient(to right,transparent,#000 55%)}
.beta-bcn .bt-close::before{background-image:url(/assets/img/beacon/card.webp)}
.beta-aos .bt-close::before{background-image:url(/assets/img/spirits/card.webp)}

/* Last Beacon: the lamp breathes, lanterns drift on the water down the page */
.beta-bcn .ks-hero::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(42% 46% at 72% 22%,rgba(255,178,92,.34),rgba(255,178,92,0) 70%);animation:bt-breathe 5s ease-in-out infinite}
@keyframes bt-breathe{0%,100%{opacity:.35}50%{opacity:1}}
.bt-fx{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.bt-fx i{position:absolute;display:block}
.beta-bcn .bt-fx i{width:10px;height:10px;border-radius:50%;background:#ffc98a;box-shadow:0 0 18px 6px rgba(247,154,58,.45),0 18px 22px -4px rgba(247,154,58,.25);
  animation:bt-bob 6s ease-in-out infinite}
@keyframes bt-bob{0%,100%{transform:translateY(0);opacity:.55}50%{transform:translateY(-10px);opacity:1}}

/* Age of Spirits: eyes open in the dark at the edges, and blink */
.beta-aos .bt-fx i{width:34px;height:10px;
  background:radial-gradient(5px 4px at 6px 50%,#ff4a3a 60%,transparent 62%),radial-gradient(5px 4px at 28px 50%,#ff4a3a 60%,transparent 62%);
  filter:drop-shadow(0 0 6px rgba(255,60,40,.8));transform-origin:50% 50%;animation:bt-blink 7s ease-in-out infinite}
@keyframes bt-blink{0%,8%{transform:scaleY(0);opacity:0}14%,44%{transform:scaleY(1);opacity:.9}47%{transform:scaleY(.1)}50%,78%{transform:scaleY(1);opacity:.9}86%,100%{transform:scaleY(0);opacity:0}}
.beta-aos .ks-hero::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(36% 40% at 76% 52%,rgba(255,150,40,.3),rgba(255,150,40,0) 70%);animation:bt-flicker 2.6s ease-in-out infinite}
@keyframes bt-flicker{0%,100%{opacity:.5}22%{opacity:.95}41%{opacity:.6}63%{opacity:1}80%{opacity:.7}}

.bt-fx i:nth-child(1){top:24%;left:2.2%;animation-delay:0s}
.bt-fx i:nth-child(2){top:33%;right:2.6%;animation-delay:2.2s}
.bt-fx i:nth-child(3){top:45%;left:1.4%;animation-delay:4.1s}
.bt-fx i:nth-child(4){top:54%;right:1.8%;animation-delay:1.1s}
.bt-fx i:nth-child(5){top:65%;left:3%;animation-delay:5.3s}
.bt-fx i:nth-child(6){top:73%;right:3.2%;animation-delay:3.3s}
.bt-fx i:nth-child(7){top:84%;left:1.8%;animation-delay:6.2s}
.bt-fx i:nth-child(8){top:91%;right:2.2%;animation-delay:.6s}

@media (max-width:1100px){.bt-fx{display:none}}
@media (max-width:760px){
  .bt-close{min-height:0}
  .bt-close::before{inset:0;opacity:.28;-webkit-mask-image:none;mask-image:none}
  .bt-sparks i{left:auto}
  .bt-sparks i:nth-child(odd){right:12%}.bt-sparks i:nth-child(even){right:38%}
  .bt-sparks i:nth-child(3n){right:62%}
  @keyframes bt-rise{0%{transform:translate(0,0);opacity:0}15%{opacity:.9}100%{transform:translate(-20px,-380px);opacity:0}}
}
@media (prefers-reduced-motion:reduce){
  .bt-sparks,.bt-fx{display:none}
  .beta-bcn .ks-hero::before,.beta-aos .ks-hero::before{animation:none;opacity:.6}
  .bt-job,.bt-job:hover{transition:none;transform:none}
}
