/* APED — the FAQ and the footer after "Top markets" (editor/fx/faq-footer.js).
   Same type as the landing: Integral CF 800 for headings, the 9 px eyebrow,
   Neue Plak Extended for body; white on the red theme, #ff2a1f as the accent.
   Entrances: a parent gets `.is-in` from one IntersectionObserver and its
   children run CSS transitions staggered by `--i`.

   Cost: all of this scrolls over the live WebGL canvases (.site-hape and the
   hero overlay), so nothing here samples what is behind it. No backdrop-filter
   (it re-blurs the engine's frame under every card, every frame: measured as
   ~half the GPU time of a scroll through this area) and no large filter:blur;
   the cards are pre-tinted and the glow is a gradient that is already soft. */

.aped-tail-footer .site-footer__top,
.aped-tail-footer .site-footer__bottom {
  display: none;
}

.fx-faq,
.fx-foot {
  --fx-accent: #ff2a1f;
  --fx-ease-expo: cubic-bezier(.19, 1, .22, 1);
  --fx-muted: rgba(255, 255, 255, .62);
  color: #fff;
  font-family: 'Neue Plak Extended', Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------------- FAQ */

.fx-faq {
  position: relative;
  padding: 40px 0 120px;
  scroll-margin-top: 80px;
}

.fx-faq__head {
  position: relative;
  text-align: center;
}

.fx-faq__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(728px, 100%);
  height: 628px;
  transform: translate(-50%, -50%);
  /* what blur(64px) did to the old 600x500 gradient, drawn as the gradient
     itself: a wider, longer fall-off and no filter pass */
  background: radial-gradient(closest-side,
    rgba(255, 42, 31, .32),
    rgba(255, 42, 31, .2) 30%,
    rgba(255, 140, 120, .09) 58%,
    rgba(255, 255, 255, .03) 80%,
    transparent);
  pointer-events: none;
  z-index: 0;
}

.fx-faq__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .4);
  opacity: 0;
  transition: opacity .3s cubic-bezier(.165, .84, .44, 1);
}

.fx-faq__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: 'Integral CF', Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 11vw, 9.5rem);
  line-height: .9;
  letter-spacing: -.02em;
  text-transform: uppercase;
  perspective: 1500px;
}

.fx-rise {
  display: inline-block;
  opacity: 0;
  transform: rotate3d(1, .15, 0, -80deg) translate3d(0, 24px, 0);
  transform-origin: 0 100%;
  transform-style: preserve-3d;
  transition:
    opacity .7s var(--fx-ease-expo) calc(var(--i, 0) * 70ms + 80ms),
    transform .7s var(--fx-ease-expo) calc(var(--i, 0) * 70ms + 80ms);
}

.fx-faq__head.is-in .fx-faq__eyebrow { opacity: 1; }
.fx-faq__head.is-in .fx-rise { opacity: 1; transform: none; }

/* tabs */
.fx-faq__tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.fx-faq__tab {
  position: relative;
  overflow: hidden;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: transparent;
  color: var(--fx-muted);
  font: 400 .6875rem/1 'Integral CF', Helvetica, Arial, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(.94);
  transition:
    color .3s ease,
    border-color .3s ease,
    opacity .6s var(--fx-ease-expo) calc(var(--i, 0) * 60ms + 200ms),
    transform .6s var(--fx-ease-expo) calc(var(--i, 0) * 60ms + 200ms);
}
.fx-faq__tabs.is-in .fx-faq__tab { opacity: 1; transform: none; }
.fx-faq__tab:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.fx-faq__tab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* the selected fill slides up from below, backIn, and the label goes dark */
.fx-faq__tab-fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(101%);
  transition: transform .5s cubic-bezier(.31, .01, .67, -.53);
}
.fx-faq__tab-label { position: relative; }
.fx-faq__tab.is-selected { color: #6a0000; border-color: #fff; }
.fx-faq__tab.is-selected .fx-faq__tab-fill { transform: translateY(0); }

/* list */
.fx-faq__list {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-faq__item {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  /* pre-tinted instead of backdrop-filter: a touch denser than the old .42 so
     the text reads as well without the blur behind it */
  background: rgba(38, 0, 0, .56);
  contain: layout paint;
  transition: background-color .3s ease, border-color .3s ease;
}
.fx-faq__item.is-open {
  /* was rgba(255,255,255,.09) over the blur: the same lift, pre-mixed */
  background: rgba(72, 22, 22, .62);
  border-color: rgba(255, 255, 255, .28);
}

/* rows slide in one by one when the list first comes into view */
.fx-faq__list .fx-faq__item {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    background-color .3s ease,
    border-color .3s ease,
    opacity .7s var(--fx-ease-expo) calc(var(--i, 0) * 80ms),
    transform .7s var(--fx-ease-expo) calc(var(--i, 0) * 80ms);
}
.fx-faq__list.is-in .fx-faq__item { opacity: 1; transform: none; }

.fx-faq__q {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  background: none;
  color: var(--fx-muted);
  font: 600 1.0625rem/1.35 'Neue Plak Extended', Helvetica, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color .3s ease;
}
.fx-faq__q:hover,
.fx-faq__item.is-open .fx-faq__q { color: #fff; }
.fx-faq__q:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 12px; }
.fx-faq__q-text { flex: 1; }

.fx-faq__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}
.fx-faq__icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* the stroke draws itself as its row arrives */
.fx-faq__icon > * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .9s cubic-bezier(.42, 0, .58, 1) calc(var(--i, 0) * 80ms + 250ms);
}
.fx-faq__list.is-in .fx-faq__icon > * { stroke-dashoffset: 0; }

.fx-faq__badge--logos {
  width: auto;
  min-width: 40px;
  padding: 0 7px;
  border-radius: 999px;
}
.fx-faq__logo {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #3a0303;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
.fx-faq__logo + .fx-faq__logo { margin-left: -7px; }
.fx-faq__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fx-faq__logo img[src$='.svg'] { width: 64%; height: 64%; }

.fx-faq__plus {
  flex: 0 0 auto;
  display: inline-flex;
  width: 22px;
  height: 22px;
  transition: transform .2s ease;
}
.fx-faq__plus svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.fx-faq__item.is-open .fx-faq__plus { transform: rotate(45deg); }

.fx-faq__a { overflow: hidden; }
.fx-faq__a-text {
  margin: 0;
  padding: 0 22px 0 78px;
  color: rgba(255, 255, 255, .78);
  font-size: .875rem;
  line-height: 1.75;
  max-width: 40rem;
}

/* ----------------------------------------------------------------- footer */

.fx-foot {
  position: relative;
  overflow: hidden;
  margin: 0 0 50px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: radial-gradient(125% 125% at 50% 10%, #1c0303 50%, rgba(255, 42, 31, .42) 100%);
  /* it already clips (overflow + radius): say so, and keep its relayouts in */
  contain: layout paint;
}

.fx-foot__inner {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  margin: 0 auto;
  padding: 56px;
}

.fx-foot__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px 40px;
}

.fx-in-item {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity .7s var(--fx-ease-expo) calc(var(--i, 0) * 80ms),
    transform .7s var(--fx-ease-expo) calc(var(--i, 0) * 80ms);
}
.fx-foot__grid.is-in .fx-in-item { opacity: 1; transform: none; }

.fx-foot__lockup { display: block; height: 42px; width: auto; }
.fx-foot__pitch {
  margin: 20px 0 0;
  max-width: 22rem;
  color: rgba(255, 255, 255, .7);
  font-size: .875rem;
  line-height: 1.7;
}

.fx-foot__h {
  margin: 0 0 22px;
  font: 800 1rem/1 'Integral CF', Helvetica, Arial, sans-serif;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.fx-foot__links { list-style: none; margin: 0; padding: 0; }
.fx-foot__links li + li { margin-top: 14px; }
.fx-foot__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .72);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .25s ease;
}
.fx-foot__link:hover,
.fx-foot__link:focus-visible { color: var(--fx-accent); }

.fx-foot__built-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .72);
  font-size: .875rem;
  line-height: 1.4;
}
.fx-foot__logos { display: inline-flex; }
.fx-foot__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #1c0303;
  overflow: hidden;
  opacity: 0;
  transform: scale(.6);
  transition:
    opacity .5s var(--fx-ease-expo) calc(var(--k, 0) * 60ms + 320ms),
    transform .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--k, 0) * 60ms + 320ms);
}
.fx-foot__logo + .fx-foot__logo { margin-left: -6px; }
.fx-foot__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fx-foot__logo img[src$='.svg'] { width: 62%; height: 62%; }
.fx-foot__grid.is-in .fx-foot__logo { opacity: 1; transform: none; }

.fx-foot__x-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.fx-foot__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-accent);
}
.fx-foot__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--fx-accent);
  animation: fx-foot-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes fx-foot-ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}
.fx-foot__note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .45);
  font-size: .75rem;
  line-height: 1.6;
}

.fx-foot__rule {
  margin: 48px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.1s var(--fx-ease-expo) .2s;
}
.fx-foot__rule.is-in { transform: none; }

.fx-foot__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity .7s var(--fx-ease-expo) .3s, transform .7s var(--fx-ease-expo) .3s;
}
.fx-foot__bottom.is-in { opacity: 1; transform: none; }
.fx-foot__bx {
  display: inline-flex;
  color: #fff;
  transition: color .25s ease, transform .25s ease;
}
.fx-foot__bx:hover { color: var(--fx-accent); transform: scale(1.12); }
.fx-foot__bx .fx-foot__x-icon { width: 20px; height: 20px; }
.fx-foot__copy {
  margin: 0;
  color: rgba(255, 255, 255, .5);
  font: 400 .5625rem/1.6 'Integral CF', Helvetica, Arial, sans-serif;
  letter-spacing: .3em;
  text-transform: uppercase;
}

/* the huge outlined word, desktop only: it overlaps the card's bottom rows,
   sits under them, and takes no pointer events (the card drives its lens) */
.fx-foot__word {
  position: relative;
  z-index: 1;
  display: none;
  height: 24rem;
  margin: -7.5rem 0 -5rem;
  pointer-events: none;
}
.fx-word { width: 100%; height: 100%; display: block; overflow: visible; }
.fx-word__t {
  fill: transparent;
  stroke-width: .3;
  font: 800 64px 'Integral CF', Helvetica, Arial, sans-serif;
  letter-spacing: -1px;
}
.fx-word__ghost {
  stroke: rgba(255, 255, 255, .45);
  opacity: 0;
  transition: opacity .4s ease;
}
.fx-foot__word.is-hover .fx-word__ghost { opacity: .7; }
.fx-word__draw {
  stroke: rgba(255, 255, 255, .55);
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}
.fx-foot__word.is-in .fx-word__draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 4s cubic-bezier(.42, 0, .58, 1);
}
.fx-word__lens { stroke-width: .45; opacity: 0; transition: opacity .4s ease; }
.fx-foot__word.is-hover .fx-word__lens { opacity: 1; }

@media (min-width: 1024px) {
  .fx-foot__word { display: block; }
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 1023px) {
  .fx-foot__grid { grid-template-columns: 1fr 1fr; }
  .fx-foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .fx-faq { padding: 24px 0 80px; }
  .fx-faq__tabs { gap: 10px; margin-top: 32px; }
  .fx-faq__tab { padding: 10px 14px; letter-spacing: .16em; }
  .fx-faq__list { margin-top: 32px; }
  .fx-faq__q { gap: 12px; padding: 16px; font-size: .9375rem; }
  .fx-faq__a-text { padding: 0 16px; }
  .fx-foot { margin-bottom: 30px; border-radius: 20px; }
  .fx-foot__inner { padding: 36px 24px; }
  .fx-foot__grid { grid-template-columns: 1fr; gap: 36px; }
  .fx-foot__bottom { flex-direction: row; }
  .fx-foot__copy { letter-spacing: .18em; text-align: right; }
}

/* ------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  .fx-faq__eyebrow,
  .fx-rise,
  .fx-faq__tab,
  .fx-faq__list .fx-faq__item,
  .fx-in-item,
  .fx-foot__logo,
  .fx-foot__rule,
  .fx-foot__bottom {
    opacity: 1;
    transform: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
  }
  .fx-faq__icon > *,
  .fx-word__draw { stroke-dashoffset: 0; transition: none; }
  .fx-faq__tab-fill,
  .fx-faq__plus { transition: none; }
  .fx-foot__dot::after { animation: none; }
}

/* ------------------------------------------------ the toolbar's X (faq-footer.js)
   Bottom-right of the toolbar: the X link takes the sound toggle's place. */
.site-toolbar__sound[data-aped-x] .sound-toggle { display: none; }
.site-toolbar__sound[data-aped-x] { display: flex; justify-content: flex-end; align-items: center; }
.fx-tbx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -6px -6px -6px 0;
  color: inherit;
  pointer-events: auto;
  transition: opacity .25s ease, transform .25s ease;
}
.fx-tbx:hover, .fx-tbx:focus-visible { opacity: .7; transform: scale(1.12); }
.fx-tbx__icon { width: 15px; height: 15px; display: block; }
@media (prefers-reduced-motion: reduce) { .fx-tbx { transition: none; } .fx-tbx:hover { transform: none; } }
