/* The ecosystem showcase: scoped so the approved hero and other sections stay intact. */
#ecosystem { position: relative; isolation: isolate; padding-block: 95px 100px; }
#ecosystem::before {
  content: ''; position: absolute; z-index: -2; top: 0; bottom: -40px;
  left: -30px; right: -30px;
  background: url('/token/assets/ecosystem-nebula.webp') center/cover no-repeat;
  opacity: .65; pointer-events: none;
  mask-image: linear-gradient(transparent,#000 10%,#000 90%,transparent);
}
#ecosystem .aft-section-head { position: relative; align-items: flex-start; margin-bottom: 43px; }
#ecosystem .aft-eyebrow { color: #dfbd77; margin-bottom: 21px; font-size: 10px; letter-spacing: .2em; }
#ecosystem h2 { font: 400 clamp(44px,4.5vw,62px)/1.06 Georgia,serif; letter-spacing: -.035em; }
#ecosystem h2 em { display: inline-block; margin-top: .04em; color: #e5bf73; font-weight: 400; }
#ecosystem .aft-games { gap: 22px; }
#ecosystem .aft-game {
  position: relative; min-height: 0; overflow: visible; border: 0;
  background: transparent; transition: filter .35s ease,transform .35s ease;
  display: flex; flex-direction: column;
}
#ecosystem .aft-game::before { display: none; }
#ecosystem .aft-game::after { inset: 0; z-index: -1; background: #100c16; clip-path: polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px); }
.aft-game-frame { position: absolute; z-index: 6; inset: 0; width: 100%; height: 100%; fill: none; pointer-events: none; }
.aft-game-frame path { vector-effect: non-scaling-stroke; }
.aft-game-frame .aft-game-frame-edge { stroke: #c8a36aba; stroke-width: .8; transition: stroke .3s ease; }
.aft-game-frame .aft-game-frame-inner { stroke: #dfb86a20; stroke-width: .6; }
.aft-game-glint { position: absolute; z-index: 7; width: 42%; height: 2px; left: 29%; top: 0; background: linear-gradient(90deg,transparent,#e9c180 35%,#fff0ca 50%,#e9c180 65%,transparent); box-shadow: 0 0 9px 1px #e1a05b40; pointer-events: none; }
.aft-game-glint--bottom { top: auto; bottom: 0; }
#ecosystem .aft-game-top { position: absolute; z-index: 4; inset: 0 0 auto; padding: 19px 25px; font-size: 9px; font-weight: 500; letter-spacing: .16em; color: #f1e3c9; text-shadow: 0 1px 8px #05030a; }
#ecosystem .aft-game-mark { color: #ebcf94; font-size: 21px; line-height: 1; }
.aft-game-scene { position: relative; height: 326px; overflow: hidden; clip-path: polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%,0 12px); }
.aft-game-scene::after { content: ''; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(180deg,#09061250,transparent 25%,transparent 48%,#100c1650 70%,#100c16 100%); }
#ecosystem .aft-game-back { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 1; }
#ecosystem .aft-game-star .aft-game-back { object-position: 50% 30%; }
#ecosystem .aft-game-tide .aft-game-back { object-position: 53% 28%; }
#ecosystem .aft-game-rift .aft-game-back { object-position: 50% 27%; }
#ecosystem .aft-canonical-star { z-index: 1; width: 75%; max-width: 295px; height: auto; left: 50%; top: 38px; transform: translateX(-50%); filter: drop-shadow(0 0 19px #805ac84a); }
#ecosystem .aft-game-copy { position: relative; z-index: 3; inset: auto; margin-top: -69px; padding: 0 26px 20px; display: flex; flex: 1; flex-direction: column; }
#ecosystem h3.aft-game-logo { display: flex; align-items: center; justify-content: center; height: 114px; margin: 0 -10px; line-height: 1; }
.aft-game-logo img { display: block; width: 100%; max-width: 385px; max-height: 114px; object-fit: contain; filter: drop-shadow(0 2px 9px #08040c); }
#ecosystem .aft-game-rift .aft-game-logo img { max-height: 124px; }
.aft-game-divider { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 15px auto 17px; width: 58%; height: 8px; }
.aft-game-divider::before,.aft-game-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#c5a465); }
.aft-game-divider::after { transform: scaleX(-1); }
.aft-game-divider span { display: block; width: 8px; height: 8px; background: #e6c081; clip-path: polygon(50% 0,64% 36%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 36%); }
#ecosystem .aft-game p { margin: 0; min-height: 74px; color: #e1d7e5; font: 400 14px/1.7 var(--sans); text-align: center; text-wrap: pretty; }
#ecosystem .aft-game button { margin-top: 19px; padding: 17px 1px 0; min-height: 47px; border-top: 1px solid #d0b17838; color: #eccc8b; font: 400 18px/1.3 Georgia,serif; }
#ecosystem .aft-game button .aft-arrow { width: 21px; height: 21px; transition: transform .25s ease; }
#ecosystem .aft-ecosystem-footer { margin-top: 30px; font-size: 12px; line-height: 1.7; color: #b4a6c2; }
#ecosystem .aft-ecosystem-footer > span:first-child { color: #cfc1d6; }
#ecosystem .aft-ecosystem-footer > span:last-child { font-style: italic; }
@media (hover:hover) and (pointer:fine) {
  #ecosystem .aft-game:hover { transform: translateY(-4px); filter: drop-shadow(0 10px 20px #0004); }
  #ecosystem .aft-game:hover .aft-game-frame-edge { stroke: #ebce91; }
  #ecosystem .aft-game:hover .aft-game-back { transform: scale(1.035); }
  #ecosystem .aft-game button:hover { color: #ffe5ae; }
  #ecosystem .aft-game button:hover .aft-arrow { transform: translate(2px,-2px); }
}
@media (min-width:1500px) {
  #ecosystem { width: min(1480px,calc(100% - 104px)); }
  #ecosystem::before { left: -45px; right: -45px; }
  #ecosystem .aft-games { gap: 26px; }
  .aft-game-scene { height: 352px; }
  #ecosystem .aft-game-top { padding: 22px 30px; font-size: 10px; }
  #ecosystem .aft-game-copy { padding-inline: 30px; margin-top: -67px; }
  #ecosystem .aft-canonical-star { max-width: 320px; }
  #ecosystem .aft-game p { font-size: 15px; min-height: 64px; }
  #ecosystem .aft-game button { font-size: 19px; }
}
@media (max-width:1180px) and (min-width:1051px) {
  #ecosystem .aft-game-copy { padding-inline: 21px; }
  #ecosystem .aft-game-top { padding-inline: 21px; font-size: 8px; }
  #ecosystem .aft-game p { font-size: 13px; min-height: 89px; }
  #ecosystem .aft-game button { font-size: 16px; }
  .aft-game-scene { height: 302px; }
  #ecosystem h3.aft-game-logo { height: 104px; }
}
@media (min-width:761px) and (max-width:1050px) {
  #ecosystem .aft-games { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 27px; }
  #ecosystem .aft-game:last-child { grid-column: 1 / -1; width: calc((100% - 27px)/2); justify-self: center; }
  #ecosystem .aft-section-head { margin-bottom: 38px; }
}
@media (max-width:760px) {
  #ecosystem { width: calc(100% - 40px); padding-block: 70px 75px; }
  #ecosystem::before { left: -20px; right: -20px; opacity: .45; background-size: auto 100%; }
  #ecosystem .aft-section-head { margin-bottom: 32px; }
  #ecosystem .aft-eyebrow { font-size: 9px; margin-bottom: 18px; }
  #ecosystem h2 { font-size: clamp(34px,7.8vw,52px); line-height: 1.09; }
  #ecosystem .aft-games { grid-template-columns: 1fr; gap: 28px; max-width: 470px; margin-inline: auto; }
  #ecosystem .aft-game-top { padding: 20px 25px; font-size: 9px; }
  .aft-game-scene { height: 330px; }
  #ecosystem .aft-canonical-star { max-width: 290px; }
  #ecosystem .aft-game-copy { padding-inline: 25px; margin-top: -69px; }
  #ecosystem h3.aft-game-logo { height: 112px; }
  #ecosystem .aft-game p { font-size: 14px; min-height: 0; line-height: 1.8; }
  #ecosystem .aft-game button { margin-top: 24px; font-size: 18px; min-height: 48px; }
  #ecosystem .aft-ecosystem-footer { max-width: 470px; margin: 25px auto 0; display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
  #ecosystem .aft-ecosystem-footer > span:last-child { padding-left: 16px; margin-top: 0; }
}
@media (max-width:360px) {
  #ecosystem { width: calc(100% - 32px); }
  #ecosystem::before { left: -16px; right: -16px; }
  #ecosystem .aft-game-top { padding-inline: 20px; font-size: 8px; }
  .aft-game-scene { height: 285px; }
  #ecosystem .aft-game-copy { padding-inline: 20px; margin-top: -58px; }
  #ecosystem h3.aft-game-logo { height: 100px; }
  #ecosystem .aft-game p { font-size: 13px; }
  #ecosystem .aft-game button { font-size: 17px; }
}
@media (prefers-reduced-motion:reduce) {
  #ecosystem .aft-game,#ecosystem .aft-game-back,#ecosystem .aft-game button .aft-arrow { transition: none; }
  #ecosystem .aft-game:hover,#ecosystem .aft-game:hover .aft-game-back,#ecosystem .aft-game button:hover .aft-arrow { transform: none; }
}
body[data-motion="paused"] #ecosystem .aft-game,body[data-motion="paused"] #ecosystem .aft-game-back { transition: none; }
@media (forced-colors:active) {
  #ecosystem::before,.aft-game-frame,.aft-game-glint { display: none; }
  #ecosystem .aft-game { border: 1px solid CanvasText; }
  #ecosystem .aft-game p,#ecosystem .aft-game-top,#ecosystem h2 em { color: CanvasText; }
}
