/* BlackFrost games showcase: fortnite.com-style hero carousel + tile rows.
   Injected into the homepage by scripts/inject-games.py. Tiles don't link anywhere yet. */

.bf-games {
  --bf-pad: clamp(16px, 3.5vw, 64px);
  --bf-ink: #0c090c;
  --bf-yellow: #f7ff19;
  position: relative;
  z-index: 3;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(64px, 8vw, 120px);
  /* Webflow's smooth-scroll wrapper sets pointer-events:none for its whole tree. */
  pointer-events: auto;
  background: var(--bf-ink);
  color: #fff;
  font-family: Montserrat, Karla, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.bf-games *,
.bf-games *::before,
.bf-games *::after {
  box-sizing: border-box;
}
.bf-games img {
  display: block;
  max-width: none;
}
.bf-games button {
  font: inherit;
  cursor: pointer;
}

/* "Deadly Partnerships" is hidden (brand.css), so the section simply ends in ink
   and runs into the CTA; only the top edge fades (desktop, below). */
.section_projects {
  /* Above Webflow's About/showreel wrapper (z 5) where the two overlap, so the
     About ground can't paint a hard edge across the top of the carousel. */
  position: relative;
  z-index: 6;
}
/* Desktop: the About section's ground art runs ~30vw past the crew as near-black.
   Pull the games section up over most of that dead space (25vw, leaving a little air) and fade its top edge in, so
   the ground melts straight into the carousel. */
@media (min-width: 992px) {
  .section_projects {
    margin-top: calc(-1 * min(25vw, 470px));
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 clamp(160px, 13vw, 240px));
    mask-image: linear-gradient(180deg, transparent 0, #000 clamp(160px, 13vw, 240px));
  }
}

/* Page tint follows the active slide, fading to ink under the rows. */
.bf-glows {
  position: absolute;
  inset: 0 0 auto;
  height: clamp(980px, 78vw, 1500px);
  z-index: -1;
  pointer-events: none;
}
.bf-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  /* Top layer fades in from the dark of the section above so there's no seam. */
  background:
    linear-gradient(180deg, var(--bf-ink) 0px, rgba(12, 9, 12, 0) clamp(180px, 16vw, 300px)),
    radial-gradient(70% 55% at 72% 30%, var(--bf-glow) 0%, transparent 62%),
    linear-gradient(180deg, var(--bf-bg) 0%, var(--bf-bg) 40%, var(--bf-ink) 100%);
}
.bf-glow.is-active {
  opacity: 1;
}

/* ---------- Hero carousel ---------- */
.bf-hero {
  position: relative;
  height: clamp(600px, 46vw, 880px);
  touch-action: pan-y;
}
.bf-hero__track {
  position: absolute;
  inset: 0;
}
/* Soft dark vignette over the whole hero so no image edge reads as a border. */
.bf-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--bf-ink) 0%, rgba(12, 9, 12, 0) 26%),
    radial-gradient(120% 90% at 62% 48%, rgba(12, 9, 12, 0) 55%, rgba(12, 9, 12, 0.7) 100%);
}
.bf-slide__copy {
  z-index: 2;
}
.bf-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s ease,
    visibility 0.7s;
}
.bf-slide.is-active {
  opacity: 1;
  visibility: visible;
}
.bf-slide__art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 66%;
  /* Vignette: fades in from the left, the top (seam with the section above) and the bottom. */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 32%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 38%, #000 66%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 32%, #000 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 38%, #000 66%, transparent 100%);
  mask-composite: intersect;
}
.bf-slide__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.bf-slide.is-active .bf-slide__art img {
  transform: scale(1);
}
.bf-slide__copy {
  position: absolute;
  top: 50%;
  left: calc(var(--bf-pad) + 2.5vw);
  width: min(34%, 520px);
  transform: translateY(-56%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 1.6vw, 28px);
  text-align: center;
}
.bf-slide__logo {
  width: 100%;
  max-width: 460px;
  max-height: clamp(110px, 11vw, 200px);
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s,
    opacity 0.7s ease 0.15s;
}
.bf-slide__tag,
.bf-slide .bf-cta {
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.28s,
    opacity 0.7s ease 0.28s,
    background-color 0.15s ease;
}
.bf-slide.is-active .bf-slide__logo,
.bf-slide.is-active .bf-slide__tag,
.bf-slide.is-active .bf-cta {
  transform: none;
  opacity: 1;
}
.bf-slide__tag {
  margin: 0;
  max-width: 30rem;
  font-size: clamp(15px, 1.12vw, 20px);
  font-weight: 800;
  line-height: 1.28;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.bf-cta {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--bf-yellow);
  color: #000;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.bf-cta:hover,
.bf-cta:focus-visible {
  background: #fff;
  outline: none;
}

.bf-arrow,
.bf-row__arrow {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color 0.15s ease;
}
.bf-arrow:hover,
.bf-row__arrow:hover {
  background: rgba(255, 255, 255, 0.38);
}
.bf-arrow svg,
.bf-row__arrow svg {
  width: 22px;
  height: 22px;
}
.bf-arrow {
  top: 50%;
  transform: translateY(-50%);
}
.bf-arrow--prev {
  left: 0;
  border-radius: 0 8px 8px 0;
}
.bf-arrow--next {
  right: calc(var(--bf-pad) * 0.5);
}

.bf-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 3vw, 44px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}
.bf-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.35s ease;
}
.bf-dot.is-active {
  width: 48px;
  background: rgba(255, 255, 255, 0.35);
}
.bf-dot span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.bf-dot.is-active span {
  animation: bf-progress var(--bf-interval, 7s) linear forwards;
}
.bf-hero.is-paused .bf-dot.is-active span {
  animation-play-state: paused;
}
@keyframes bf-progress {
  to {
    transform: scaleX(1);
  }
}
.bf-pause {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
}
.bf-pause svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.bf-pause .bf-ico-play,
.bf-hero.is-paused .bf-pause .bf-ico-pause {
  display: none;
}
.bf-hero.is-paused .bf-pause .bf-ico-play {
  display: block;
}

/* ---------- Tile rows ---------- */
.bf-rows {
  position: relative;
  margin-top: clamp(4px, 1vw, 16px);
}
.bf-row + .bf-row {
  margin-top: clamp(24px, 2.6vw, 44px);
}
.bf-row__title {
  margin: 0 0 12px;
  padding: 0 var(--bf-pad);
  font-family: inherit;
  font-size: clamp(20px, 1.4vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}
.bf-row__viewport {
  position: relative;
}
.bf-row__track {
  display: flex;
  gap: 16px;
  padding: 4px var(--bf-pad) 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--bf-pad);
  scrollbar-width: none;
}
.bf-row__track::-webkit-scrollbar {
  display: none;
}
.bf-row__arrow {
  top: calc(50% - 16px);
  opacity: 0;
  transform: translateY(-50%);
  transition:
    opacity 0.2s ease,
    background-color 0.15s ease;
}
.bf-row__arrow--prev {
  left: 8px;
}
.bf-row__arrow--next {
  right: 8px;
}
.bf-row:hover .bf-row__arrow:not([disabled]) {
  opacity: 1;
}
.bf-row__arrow[disabled] {
  pointer-events: none;
}

.bf-tile {
  flex: 0 0 218px;
  min-width: 0;
  scroll-snap-align: start;
  cursor: pointer;
  outline: none;
}
.bf-tile__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #1d1922;
  box-shadow: 0 0 0 0 #fff;
  transition: box-shadow 0.15s ease;
}
.bf-tile:hover .bf-tile__media,
.bf-tile:focus-visible .bf-tile__media {
  box-shadow: 0 0 0 3px #fff;
}
.bf-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.bf-tile:hover .bf-tile__img,
.bf-tile:hover .bf-tile__phone {
  transform: scale(1.06);
}
.bf-tile__blur {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(14px) brightness(0.55) saturate(1.2);
}
.bf-tile__phone {
  position: absolute;
  top: 0;
  left: 50%;
  width: 64%;
  height: 100%;
  margin-left: -32%;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s ease;
}
.bf-tile__logo {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  width: 84%;
  height: 46%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}
.bf-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}
.bf-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bf-flag,
.bf-pill {
  position: absolute;
  background: rgba(10, 8, 12, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.bf-flag {
  top: 8px;
  right: 8px;
  padding: 6px 7px;
  border-radius: 6px;
}
.bf-pill {
  left: 8px;
  bottom: 8px;
  padding: 6px 9px;
  border-radius: 999px;
}
.bf-tile__name {
  margin: 8px 0 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
}

/* Row variants */
.bf-row--games .bf-tile {
  flex-basis: clamp(260px, 22vw, 400px);
}
.bf-row--games .bf-tile__name {
  font-size: 18px;
}
.bf-tile--card {
  flex-basis: 158px;
}
.bf-tile--card .bf-tile__media {
  aspect-ratio: 720 / 990;
  background: transparent;
  overflow: visible;
}
.bf-tile--card .bf-tile__img {
  object-fit: contain;
  border-radius: 10px;
}
.bf-tile--card:hover .bf-tile__media {
  box-shadow: none;
}
.bf-tile--card:hover .bf-tile__img {
  transform: translateY(-6px) rotate(-2deg) scale(1.04);
}
.bf-tile--phone {
  flex-basis: 150px;
}
.bf-tile--phone .bf-tile__media {
  aspect-ratio: 9 / 19.5;
  border-radius: 18px;
}
/* Narrow tiles: let captions wrap to two lines instead of cutting off. */
.bf-tile--phone .bf-tile__name,
.bf-tile--card .bf-tile__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  white-space: normal;
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  .bf-hero {
    height: min(138vw, 640px);
  }
  .bf-slide__art {
    width: 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 40%, transparent 90%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 40%, transparent 90%);
  }
  .bf-slide__copy {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 76px;
    width: auto;
    transform: none;
    gap: 14px;
  }
  .bf-slide__logo {
    max-width: 300px;
    max-height: 110px;
  }
  .bf-slide__tag {
    font-size: 14px;
  }
  .bf-cta {
    height: 44px;
    font-size: 15px;
  }
  .bf-arrow {
    display: none;
  }
  .bf-dots {
    bottom: 18px;
  }
  .bf-tile {
    flex-basis: 180px;
  }
  .bf-row--games .bf-tile {
    flex-basis: 78vw;
  }
  .bf-tile--card {
    flex-basis: 132px;
  }
  .bf-tile--phone {
    flex-basis: 128px;
  }
  .bf-row__arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-slide,
  .bf-slide__art img,
  .bf-slide__logo,
  .bf-slide__tag,
  .bf-slide .bf-cta,
  .bf-glow {
    transition: none !important;
  }
}

/* ---------- Crew modal (opened from "Meet the Crew" cards) ---------- */
.bf-modal {
  --bf-rarity: #8a8f98;
  position: fixed;
  inset: 0;
  /* above Webflow's fixed corner nav */
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(6, 4, 8, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: Montserrat, Karla, system-ui, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  pointer-events: auto;
}
.bf-modal.is-open {
  opacity: 1;
}
.bf-modal *,
.bf-modal *::before,
.bf-modal *::after {
  box-sizing: border-box;
}
.bf-modal[data-rarity='rare'] { --bf-rarity: #3d9eff; }
.bf-modal[data-rarity='epic'] { --bf-rarity: #b05cff; }
.bf-modal[data-rarity='legendary'] { --bf-rarity: #f5a623; }
.bf-modal[data-rarity='crew'] { --bf-rarity: #f7ff19; }

.bf-modal__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  width: min(1120px, 100%);
  height: min(720px, 100%);
  overflow: hidden;
  border-radius: 20px;
  background: #0c090c;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 2px color-mix(in srgb, var(--bf-rarity) 45%, transparent),
    0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bf-modal.is-open .bf-modal__panel {
  transform: none;
}
.bf-modal__stage {
  position: relative;
  min-height: 0;
  background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--bf-rarity) 22%, transparent), transparent 70%), #0c090c;
}
.bf-modal__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.bf-modal__stage.is-loaded iframe {
  opacity: 1;
}
.bf-modal__placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(46%, 240px);
  transform: translate(-50%, -50%) rotate(-4deg);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
  transition: opacity 0.4s ease;
}
.bf-modal__stage.is-loaded .bf-modal__placeholder {
  opacity: 0;
}
.bf-modal__info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 3vw, 40px);
  background: radial-gradient(90% 50% at 100% 0%, color-mix(in srgb, var(--bf-rarity) 18%, transparent), transparent 70%), #110d12;
}
.bf-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.bf-modal__close:hover,
.bf-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}
.bf-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 44px;
}
.bf-modal__thumb {
  width: 64px;
  flex: none;
  border-radius: 8px;
  transform: rotate(-4deg);
}
.bf-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.bf-chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bf-chip--rarity {
  background: var(--bf-rarity);
  color: #0c090c;
}
.bf-modal__name {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bf-modal__role {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
}
.bf-modal__bio {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}
.bf-power {
  padding: 16px 18px;
  border-left: 4px solid var(--bf-rarity);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.bf-power__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.bf-power__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}
.bf-power__name {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.bf-power__short {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f7ff19;
  color: #000;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.bf-power__blurb {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.bf-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bf-stat {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.bf-stat dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}
.bf-stat dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 800;
}
.bf-modal__h {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.bf-tips {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bf-tips li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.bf-tips li::before {
  content: '';
  position: absolute;
  top: 0.45em;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--bf-rarity);
  transform: rotate(45deg);
}
.bf-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.bf-modal__game {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}
.bf-modal__game img {
  height: 26px;
  width: auto;
}
.bf-modal__nav {
  display: flex;
  gap: 8px;
}
.bf-modal__nav button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}
.bf-modal__nav button:hover,
.bf-modal__nav button:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}
.bf-modal__nav svg {
  width: 20px;
  height: 20px;
}
html.bf-modal-open,
html.bf-modal-open body {
  overflow: hidden !important;
}

@media (max-width: 819px) {
  .bf-modal {
    padding: 0;
  }
  .bf-modal__panel {
    grid-template-columns: 1fr;
    grid-template-rows: 44svh minmax(0, 1fr);
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .bf-modal__name {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bf-modal,
  .bf-modal__panel,
  .bf-modal__stage iframe {
    transition: none;
  }
}

/* Text wordmark + badge for games without final logo art yet (Gravity Run). */
.bf-wordmark {
  display: block;
  font-family: Montserrat, Karla, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.03em;
  text-align: center;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(90deg, #ff4d6d, #ffb020 22%, #ffe14d 40%, #3ddc84 58%, #3d9eff 78%, #b05cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}
.bf-wordmark--hero {
  width: auto;
  max-height: none;
  font-size: clamp(56px, 6.2vw, 112px);
}
.bf-wordmark--tile {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 22%;
  font-size: clamp(26px, 2.6vw, 44px);
}
.bf-badge--text {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff4d6d, #ffb020 35%, #3ddc84 65%, #3d9eff);
  color: #fff;
  font-family: Montserrat, Karla, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
@media (max-width: 767px) {
  .bf-wordmark--hero {
    font-size: 58px;
  }
}

/* ---------- Crew modal, right side: text-only, Fortnite-style ---------- */
.bf-modal__info {
  gap: 22px;
}
.bf-hd {
  padding-right: 48px;
}
.bf-hd__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.bf-hd__rarity {
  color: var(--bf-rarity);
}
.bf-hd__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.bf-hd__name {
  margin: 10px 0 0;
  font-size: clamp(40px, 4.4vw, 64px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.bf-hd__role {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bf-rarity);
}

/* power-up tile */
.bf-pu {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bf-rarity) 26%, transparent), transparent 62%),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bf-rarity) 40%, transparent);
}
.bf-pu::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--bf-rarity);
}
.bf-pu__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.bf-pu__row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.bf-pu__value {
  flex: none;
  font-size: clamp(48px, 5vw, 72px);
  font-style: italic;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 24px color-mix(in srgb, var(--bf-rarity) 65%, transparent);
}
.bf-pu__unit {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bf-rarity);
}
.bf-pu__unit--big {
  font-size: clamp(26px, 2.4vw, 36px);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
}
.bf-pu__name {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}
.bf-pu__desc {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

/* hired-crew stat tiles */
.bf-st {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}
.bf-st > div {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}
.bf-st dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.bf-st dd {
  margin: 6px 0 0;
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}
.bf-st small {
  margin-left: 6px;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* numbered explainer */
.bf-how ol {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.bf-how li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.bf-how li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bf-how__n {
  font-size: 14px;
  font-style: italic;
  font-weight: 900;
  color: var(--bf-rarity);
}
.bf-modal__game {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.bf-modal__game strong {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
@media (max-width: 819px) {
  .bf-hd__name {
    font-size: 40px;
  }
}
/* the info column scrolls; don't let flex squeeze (and clip) its blocks */
.bf-modal__info > * {
  flex-shrink: 0;
}

/* ---------- Page order: hero -> games -> About/trees (scripts/inject-games.py ABOUT_AFTER_GAMES) ---------- */
html[data-bf-order='bf-about-after'] body {
  background: #0c090c; /* never let the white page show through a gap */
}
@media (min-width: 992px) {
  /* hero -> games: no pull-up; the hero clouds drift over the top of the games
     section, which starts in the hero's sky blue and fades to ink before the carousel */
  html[data-bf-order='bf-about-after'] .section_projects {
    margin-top: 0 !important;
    /* bottom fades out so the trees rise out of the dark */
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16vw), transparent 100%) !important;
    mask-image: linear-gradient(180deg, #000 calc(100% - 16vw), transparent 100%) !important;
  }
  html[data-bf-order='bf-about-after'] .bf-games {
    padding-top: 15vw;
    padding-bottom: 16vw;
    background: linear-gradient(180deg, #2b63c9 0, #173a7c 6vw, #0c090c 14vw);
  }
  html[data-bf-order='bf-about-after'] .bf-glows {
    top: 14vw;
  }
  /* games -> trees: room for the canopy, with a night-to-day sky behind it */
  html[data-bf-order='bf-about-after'] .showreel-about-wrapper {
    margin-top: 12vw !important;
  }
  html[data-bf-order='bf-about-after'] .showreel-about-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 28vw;
    background: linear-gradient(#0c090c 0%, #123a8c 55%, #7ec8ff 100%);
    pointer-events: none;
  }
}
@media (min-width: 992px) {
  /* trees -> CTA: the About ground runs ~30vw past the crew as near-black; pull the CTA up
     over it and fade its top edge in, so the ground melts into the CTA's dark-to-blue */
  html[data-bf-order='bf-about-after'] .home-bg_wrapper {
    position: relative;
    z-index: 6;
    margin-top: -30vw !important;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16vw);
    mask-image: linear-gradient(180deg, transparent 0, #000 16vw);
  }
}
@media (max-width: 991px) {
  /* phones: games fades out at the bottom over the About sky, which stays dark for its
     first stretch (hidden under the games section) and then lightens downwards */
  html[data-bf-order='bf-about-after'] .section_projects {
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 140px), transparent 100%);
    mask-image: linear-gradient(180deg, #000 calc(100% - 140px), transparent 100%);
  }
  html[data-bf-order='bf-about-after'] .bf-games {
    padding-bottom: 140px;
  }
  html[data-bf-order='bf-about-after'] .about-tree-wrapper {
    background: linear-gradient(#0c090c 0%, #0c090c 16%, #102f72 30%, #2563d4 52%, #3d8bea 100%) !important;
  }
}

/* ---------- Crew modal v3: premium (Epic Games Store) polish, fits without scrolling ---------- */
.bf-modal__panel {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: min(680px, 100%);
  border-radius: 16px;
  background: #101014;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 40px 100px rgba(0, 0, 0, 0.7);
}
.bf-modal__stage {
  background:
    radial-gradient(60% 50% at 50% 42%, color-mix(in srgb, var(--bf-rarity) 14%, transparent), transparent 72%),
    #0b0b0e;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.bf-modal__info {
  gap: 0;
  padding: 36px 40px 28px;
  background: #121216;
  scrollbar-width: none;
}
.bf-modal__info::-webkit-scrollbar {
  display: none;
}
.bf-modal__close {
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.08);
}

/* header */
.bf-hd__meta {
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
}
.bf-hd__rarity {
  padding: 4px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bf-rarity) 18%, transparent);
  color: var(--bf-rarity);
}
.bf-hd__dot {
  width: 3px;
  height: 3px;
}
.bf-hd__name {
  margin: 14px 0 0;
  font-size: clamp(34px, 3.4vw, 46px);
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.025em;
}
.bf-hd__role {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.55);
}
.bf-modal__bio {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

/* power-up: one clean row */
.bf-pu {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #18181d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.bf-pu::before {
  inset: 0 auto 0 0;
  width: 3px;
  height: auto;
}
.bf-pu__label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
}
.bf-pu__row {
  align-items: flex-start;
  gap: 18px;
  margin-top: 10px;
}
.bf-pu__value {
  min-width: 2.6em;
  font-size: 44px;
  font-style: normal;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--bf-rarity);
  text-shadow: none;
}
.bf-pu__unit {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
}
.bf-pu__unit--big {
  font-size: 22px;
  font-style: normal;
  letter-spacing: -0.01em;
  color: var(--bf-rarity);
}
.bf-pu__name {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 800;
}
.bf-pu__desc {
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
}

/* hired-crew stats */
.bf-st {
  margin-top: 12px;
  gap: 12px;
}
.bf-st > div {
  padding: 12px 16px;
  border-radius: 10px;
  background: #18181d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.bf-st dt {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
}
.bf-st dd {
  margin-top: 4px;
  font-size: 22px;
  font-style: normal;
}
.bf-st small {
  font-size: 11px;
}

/* how to play */
.bf-how {
  margin-top: 24px;
}
.bf-modal__h {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.45);
}
.bf-how ol {
  margin-top: 8px;
}
.bf-how li {
  grid-template-columns: 28px 1fr;
  padding: 9px 0;
  border-top-color: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}
.bf-how li:last-child {
  border-bottom: 0;
}
.bf-how__n {
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

/* footer */
.bf-modal__foot {
  padding-top: 16px;
  border-top-color: rgba(255, 255, 255, 0.06);
}
.bf-modal__game strong {
  font-size: 11px;
  letter-spacing: 0.14em;
}
.bf-modal__game span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.bf-modal__nav button {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

/* shorter screens: tighten further so it still fits without scrolling */
@media (min-width: 820px) and (max-height: 760px) {
  .bf-modal__info {
    padding: 26px 32px 20px;
  }
  .bf-hd__name {
    font-size: 34px;
  }
  .bf-pu,
  .bf-how {
    margin-top: 16px;
  }
  .bf-how li {
    padding: 7px 0;
  }
}
@media (max-width: 819px) {
  .bf-modal__info {
    padding: 24px 20px 20px;
  }
  .bf-modal__stage {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}
@media (max-width: 991px) {
  /* phones: trees -> CTA, same soft hand-off as desktop */
  html[data-bf-order='bf-about-after'] .home-bg_wrapper {
    position: relative;
    z-index: 6;
    margin-top: -120px !important;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 160px);
    mask-image: linear-gradient(180deg, transparent 0, #000 160px);
  }
}
.bf-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
