/* Forgeflight showcase: one sticky tab bar after the hero, one panel at a time
   (gameplay, realms, bosses, forever, squad, the build), plus the boss picker. */

/* ---------- Tab bar ----------
   The tabs read as buttons: each one is a lit pill with a brass edge. Until a visitor picks one,
   the bar breathes and a sheen runs across the tabs one after another. */
.fft { position: relative; z-index: 30; margin-top: clamp(24px, 4vw, 48px); pointer-events: none; }
.fft .wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fft-hint { pointer-events: none; display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 6px 13px; border-radius: 999px;
  font: 800 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #ffd9a8;
  background: rgba(31, 12, 24, .72); border: 1px solid rgba(255, 176, 102, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: opacity .4s, transform .4s; }
.fft-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff9a3d; box-shadow: 0 0 0 0 rgba(255, 154, 61, .7); animation: fft-ping 1.6s ease-out infinite; }
.fft.seen .fft-hint { opacity: 0; transform: translateY(6px); height: 0; padding: 0; border: 0; margin-bottom: -10px; overflow: hidden; }
.fft-bar { pointer-events: auto; display: flex; gap: 6px; width: max-content; max-width: 100%; margin: 0 auto; padding: 6px; border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  background: rgba(31, 12, 24, .82); border: 1px solid rgba(255, 176, 102, .35); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 26px -8px rgba(255, 130, 50, .55); }
.fft:not(.seen) .fft-bar { animation: fft-breathe 2.4s ease-in-out infinite; }
.fft-bar::-webkit-scrollbar { display: none; }
/* On narrow screens the bar scrolls sideways: fade the edge that has more tabs behind it. */
.fft-bar.more-r { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.fft-bar.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
.fft-bar.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.fft-t { position: relative; overflow: hidden; isolation: isolate; flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; color: #ffe6cf; text-decoration: none; white-space: nowrap; cursor: pointer;
  font: 400 17px/1 "Lilita One", "Rubik", sans-serif; letter-spacing: .02em;
  background: linear-gradient(180deg, rgba(255, 190, 120, .16), rgba(255, 120, 50, .06)); border: 1px solid rgba(255, 186, 112, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 0 rgba(0, 0, 0, .35);
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .15s; }
.fft-t::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 236, 200, .5) 50%, transparent 70%); transform: translateX(-130%); }
.fft:not(.seen) .fft-t:not([aria-selected="true"])::after { animation: fft-sheen 5.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .45s + 1s); }
.fft-t:hover { color: #fff; border-color: rgba(255, 200, 130, .8); background: linear-gradient(180deg, rgba(255, 190, 120, .28), rgba(255, 120, 50, .14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 0 rgba(0, 0, 0, .35), 0 0 20px -4px rgba(255, 140, 60, .8); transform: translateY(-2px); }
.fft-t:active { transform: translateY(1px); }
.fft-t:focus-visible { outline: 2px solid #ffe27a; outline-offset: 2px; }
.fft-t[aria-selected="true"] { color: #fff; text-shadow: 0 2px 0 rgba(90, 20, 10, .5); border-color: rgba(255, 220, 160, .7);
  background: linear-gradient(180deg, #ffb066, #ff6a2b 55%, #e2431c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #8f2410, 0 0 22px -4px rgba(255, 120, 40, .8); }
@keyframes fft-sheen { 0% { transform: translateX(-130%); } 22%, 100% { transform: translateX(130%); } }
@keyframes fft-breathe { 0%, 100% { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 22px -8px rgba(255, 130, 50, .45); border-color: rgba(255, 176, 102, .35); }
  50% { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 38px -4px rgba(255, 150, 60, .85); border-color: rgba(255, 210, 140, .75); } }
@keyframes fft-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 154, 61, .7); } 80%, 100% { box-shadow: 0 0 0 9px rgba(255, 154, 61, 0); } }

/* "Up next" at the end of each panel, so scrolling down leads into the next tab. */
.fft-next { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: clamp(48px, 6vw, 80px); }
.fft-bar-b { margin: 0; }
.fft-t.on { color: #fff; text-shadow: 0 2px 0 rgba(90, 20, 10, .5); border-color: rgba(255, 220, 160, .7);
  background: linear-gradient(180deg, #ffb066, #ff6a2b 55%, #e2431c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #8f2410, 0 0 22px -4px rgba(255, 120, 40, .8); }
.fft-next a { display: inline-flex; align-items: center; gap: 16px; padding: 14px 16px 14px 24px; border-radius: 20px; text-decoration: none; color: var(--paper);
  background: linear-gradient(180deg, rgba(255, 190, 120, .14), rgba(255, 120, 50, .05)); border: 1px solid rgba(255, 186, 112, .45);
  box-shadow: 0 0 30px -10px rgba(255, 130, 50, .7); transition: transform .15s, border-color .2s, box-shadow .2s; }
.fft-next a:hover { transform: translateY(-2px); border-color: rgba(255, 210, 140, .85); box-shadow: 0 0 36px -6px rgba(255, 140, 60, .9); }
.fft-next a:focus-visible { outline: 2px solid #ffe27a; outline-offset: 4px; }
.fft-next small { display: block; font: 800 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #ffb066; margin-bottom: 6px; }
.fft-next b { font: 400 26px/1 "Lilita One", sans-serif; letter-spacing: .01em; }
.fft-next i { font-style: normal; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, #ffb066, #ff6a2b 55%, #e2431c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #8f2410; transition: transform .3s; }
.fft-next a:hover i { transform: translateX(3px); }

/* Panels: all visible without script; one at a time with it. */
.fft-js .fft-p[hidden] { display: none; }
.fft-js .fft-p { animation: fft-in .45s var(--ease-out, ease-out); scroll-margin-top: 150px; }
@keyframes fft-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fft-p > .wrap + .wrap { margin-top: clamp(56px, 7vw, 96px); }
.fft-js .fft-p .rv { opacity: 1; transform: none; }

/* ---------- Bosses ---------- */
.bx { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: clamp(28px, 4vw, 48px); }
.bx-stage { position: sticky; top: 160px; }
.bx-stage .dev { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 90px -20px var(--acc, #ff8a3d); transition: box-shadow .5s; }
.bx-img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.bx-img.on { opacity: 1; }
.bx-cap { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  font: 800 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #160912; background: var(--acc, #ffcf5a); box-shadow: 0 8px 20px -8px var(--acc, #ffcf5a); }

.bx-pick { box-shadow: 0 0 16px -8px var(--acc); border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.bx-roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 26px; }
.bx-pick { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border-radius: 14px; cursor: pointer; text-align: left; color: var(--paper);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font: 600 13px/1.15 var(--sans); transition: background .2s, border-color .2s, transform .2s; }
.bx-pick:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); }
.bx-pick:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.bx-pick[aria-selected="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent); box-shadow: 0 0 24px -8px var(--acc); }
.bx-n { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--acc); color: #160912; font: 400 16px/1 "Lilita One", sans-serif; }
.bx-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.bx-card { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius, 24px); border: 1px solid var(--line); margin-bottom: 26px;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 60%), rgba(255, 255, 255, .04); }
.bx-card:not([hidden]) { animation: fft-in .4s ease-out; }
.bx-eb { font: 800 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.bx-name { margin: 10px 0 18px; font: 400 clamp(30px, 3.6vw, 46px)/1 "Lilita One", sans-serif; text-shadow: var(--outline); }
.bx-ph { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.bx-ph li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: baseline; color: #e7cfc6; font-size: 15px; line-height: 1.5; }
.bx-ph b { font: 800 11px/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.bx-ph strong { color: var(--paper); }
.bx-ph li.sig b { color: var(--acc); }
.bx-ph li.sig strong { color: var(--acc); }
.bx-song { margin: 0; color: var(--dim); font-size: 14px; }
.bx-bpm { margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .3); color: var(--acc); font-weight: 700; font-size: 12px; }

/* ---------- Boss arena page ---------- */
.bxa { padding-top: clamp(112px, 15vh, 150px); }
.bxa-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 72px); align-items: center; }
.bxa-copy .rl-back { display: table; margin-bottom: 22px; color: var(--dim); text-decoration: none; font-weight: 700; }
.bxa-copy .rl-back:hover { color: var(--g2); }
.bxa-ctl { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; color: #e7cfc6; }
.bxa-ctl li { display: flex; gap: 12px; align-items: baseline; }
.bxa-ctl b { flex: 0 0 auto; min-width: 92px; color: var(--g2); font-weight: 800; }
.bxa-dev { position: relative; padding: 10px; border-radius: 44px; background: linear-gradient(160deg, #2a2d35, #0c0d11 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 90px -20px #ff8a3d; }
.bxa-dev iframe { display: block; border: 0; border-radius: 35px; background: #07040c;
  height: min(844px, calc(100vh - 150px)); height: min(844px, calc(100svh - 150px)); width: auto; aspect-ratio: 390 / 844; }

@media (max-width: 900px) {

  .fft .wrap { gap: 8px; }
  .fft-t { padding: 9px 14px; font-size: 15px; }
  .fft-bar { gap: 5px; padding: 5px; }
  .fft-bar-b { flex-wrap: wrap; justify-content: center; width: auto; border-radius: 26px; overflow: visible; }
  .bx { grid-template-columns: minmax(0, 1fr); }
  .bx-stage { position: relative; top: 0; width: min(250px, 64vw); margin: 0 auto 18px; order: 2; }
  .bx-info { display: contents; }
  .bx-tap { order: 0; justify-self: start; margin-bottom: 4px; }
  .bx-roster { order: 1; display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--gutter, 18px)) 4px; padding: 4px var(--gutter, 18px) 8px; scrollbar-width: none; }
  .bx-roster::-webkit-scrollbar { display: none; }
  .bx-pick { flex: 0 0 auto; scroll-snap-align: start; }
  .bx-card { order: 3; margin: 8px 0 0; }
  .bx .rl-glow { order: 4; margin-top: 18px; }
  .bx-ph li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bxa-grid { grid-template-columns: minmax(0, 1fr); }
  .bxa { padding-top: 92px; }
  .bxa-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .bxa-copy .rl-back { margin: 0; }
  .bxa-copy h1, .bxa-copy .lede, .bxa-ctl { display: none; }
  .bxa-grid { gap: 14px; }
  .fft-p .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: calc(-1 * var(--gutter, 18px)); padding: 6px var(--gutter, 18px) 18px; scrollbar-width: none; }
  .fft-p .shots::-webkit-scrollbar { display: none; }
  .fft-p .shots > .shot { flex: 0 0 min(80%, 320px); scroll-snap-align: center; }
  #bosses .shead .lede { display: none; }
  .bxa-dev { padding: 6px; border-radius: 30px; justify-self: center; width: 100%; max-width: 440px; }
  .bxa-dev iframe { width: 100%; height: calc(100svh - 150px); min-height: 520px; aspect-ratio: auto; border-radius: 25px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .bx-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html[data-calm] .bx-img, html[data-calm] .fft-p, html[data-calm] .bx-card, html[data-calm] .fft-bar, html[data-calm] .fft-t::after, html[data-calm] .fft-dot { transition: none; animation: none !important; }
@media (prefers-reduced-motion: reduce) { .bx-img, .fft-p, .bx-card, .fft-bar, .fft-t::after, .fft-dot { transition: none; animation: none !important; } }

/* ---------- Docked: once the bar scrolls past, it moves to the side and never covers the page ---------- */
.fft-fab { display: none; }
.fft.docked .fft-hint { display: none; }
.fft.docked .wrap { position: fixed; z-index: 45; left: 12px; top: 50%; width: auto; transform: translateY(-50%); animation: fft-dock .45s var(--ease-out, ease-out); }
@keyframes fft-dock { from { opacity: 0; transform: translate(-24px, -50%); } }
.fft.docked .fft-bar { flex-direction: column; align-items: stretch; width: auto; max-width: none; border-radius: 26px; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.fft.docked .fft-t { text-align: left; font-size: 14px; padding: 10px 14px; }
.fft.docked .fft-t:hover { transform: translateX(3px); }
/* Medium screens: a slimmer rail of numbers that opens out to the names on hover. */
@media (min-width: 1101px) and (max-width: 1519px) {
  .fft.docked .wrap { left: 8px; }
  .fft.docked .fft-bar { counter-reset: fft; padding: 5px; gap: 5px; }
  .fft.docked .fft-t { counter-increment: fft; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; font-size: 0; transition: width .25s, font-size .2s, padding .2s; }
  .fft.docked .fft-t::before { content: counter(fft, decimal-leading-zero); font: 600 12px/1 var(--mono, monospace); letter-spacing: 0; }
  .fft.docked .fft-bar:hover .fft-t, .fft.docked .fft-bar:focus-within .fft-t { width: auto; font-size: 14px; padding: 0 14px; place-items: center start; }
  .fft.docked .fft-bar:hover .fft-t::before, .fft.docked .fft-bar:focus-within .fft-t::before { content: none; }
}
/* Phones and tablets: a small Sections button in the corner that opens the tabs, and tucks away while scrolling. */
@media (max-width: 1100px) {
  .fft.docked .wrap { left: auto; top: auto; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: none; flex-direction: column; align-items: flex-end; gap: 10px;
    transition: transform .35s var(--ease-out, ease-out), opacity .3s; animation: fft-pop .4s var(--ease-out, ease-out); }
  @keyframes fft-pop { from { opacity: 0; transform: translateY(20px); } }
  .fft.docked.tuck .wrap { transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
  .fft.docked .fft-bar { display: none; }
  .fft.docked.open .fft-bar { display: flex; animation: fft-in .3s var(--ease-out, ease-out); max-height: calc(100vh - 140px); overflow-y: auto; }
  .fft.docked .fft-fab { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 999px; cursor: pointer; color: #fff;
    font: 600 14px/1 var(--sans, system-ui); border: 1px solid rgba(255, 220, 160, .7);
    background: linear-gradient(180deg, #ffb066, #ff6a2b 55%, #e2431c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 #8f2410, 0 12px 30px -10px rgba(0, 0, 0, .7); }
  .fft-fab-i { display: grid; gap: 3px; width: 26px; height: 26px; place-content: center; border-radius: 50%; background: rgba(0, 0, 0, .18); }
  .fft-fab-i i { display: block; width: 12px; height: 2px; border-radius: 2px; background: currentColor; }
  .fft-fab-l { display: none; }
  .fft-fab b { font-weight: 700; }
  .fft.docked .fft-fab:active { transform: translateY(2px); }
  .fft.docked .fft-fab:focus-visible { outline: 2px solid #ffe27a; outline-offset: 3px; }
}
html[data-calm] .fft.docked .wrap { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .fft.docked .wrap { animation: none; transition: none; } }
/* App pages keep their app switcher at the bottom on phones, so the Sections button sits just above it. */
@media (max-width: 900px) {
  body:has(.app-rail) .fft.docked .wrap { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
