/*! ASTRONSTAR 运行时镜像 — 请勿直接修改本文件 | 源文件: src/styles/components/legacy-patches.css | 重新生成: npm run prepare:runtime | 源码归属与修改边界见 docs/architecture.md */
/* Show the fixed header immediately when the home page first paints, instead
   of waiting for the legacy opening controller to reveal it after its delayed
   drop-in animation. The hero opening sequence is unaffected, and the existing
   body.is-MenuOpen rule still hides the header while the menu is open. */
#home .l-header {
  opacity: 1;
}

.l-hambergerMenu[aria-hidden="true"] {
  animation: none !important;
  pointer-events: none;
}

img[src="/assets/img/custom/rocket.gif"] {
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
  rotate: 90deg !important;
  transform-origin: center;
}

.local-rocket-motion {
  display: block;
}

.local-rocket-motion .local-rocket-visual {
  display: block;
  width: 100%;
  height: 100%;
}

/* Use the regular site typeface for the mission copy and its default label.
   The rocket animation remains unchanged. */
.p-home-kv__copyText.u-emoji,
.p-home-kv__introText.u-emoji,
.p-home-mission__lead.u-emoji {
  font-family: inherit;
}

.p-home-kv__copyBlock:first-child {
  isolation: isolate;
}

.p-home-kv__copyBlock:first-child .p-home-kv__copyText {
  position: relative;
  z-index: 1;
  clip-path: inset(0 100% 0 0);
}

.p-home-kv__copyBlock:first-child .p-home-kv__copyImg {
  z-index: 3;
  transform: translate(0);
}

.p-home-kv__introText {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding-left: calc(clamp(52px, 5.6rem, 62px) + 0.7rem);
  clip-path: inset(0 0 0 clamp(52px, 5.6rem, 62px));
  font-size: 18px;
  white-space: nowrap;
  pointer-events: none;
  will-change: clip-path;
}

@media screen and (max-width: 768px) {
  /* Align the rocket and mission label by their visual centers on real iPhones. */
  .p-home-kv__copyBlock:first-child .p-home-kv__copyImg {
    top: calc(50% - clamp(26px, 2.8rem, 31px));
  }

  .p-home-kv__copy .p-home-kv__introText {
    display: flex;
    align-items: center;
  }
}

@media screen and (min-width: 1680px) {
  .p-home-kv__introText {
    font-size: 20px;
  }
}

@media screen and (min-width: 769px) {
  /* Keep the mission label and lead copy on the same desktop grid in every locale. */
  .p-home-mission__head {
    grid-column: 1 / 4;
  }

  .p-home-mission__body {
    grid-column: 4 / 11;
    margin-left: 0;
  }

  .p-home-mission__lead {
    width: 100%;
    margin-inline: 0;
    text-align: left;
  }

}

/* Keep every emphasized phrase, including the closing signature, consistent
   with the surrounding mission copy. */
.p-home-missionStatement__copy .u-emoji {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  letter-spacing: inherit;
}

.p-home-missionStatement__copy [data-mission-signature] {
  font-size: 1.3em;
  font-weight: 600;
}

.p-home-kv__copyBlock:nth-child(2) .p-home-kv__copyImg {
  z-index: 3;
}

.local-shuffle-rocket-glyph {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  margin-inline: 0.02em;
  vertical-align: -0.28em;
  pointer-events: none;
}

/* Keep the home project CTA readable on the magenta project backdrop. */
.p-home-project .p-home-project__btn .c-button {
  background-color: #000;
  color: #fff;
}

.p-home-project .p-home-project__btn .c-button .dot {
  background-color: #fff;
}

/* Keep the first project cover fully visible; the later reveal layers retain cover cropping. */
.p-home-project .p-home-project__layersItem:first-child img {
  object-fit: contain;
  object-position: center;
}

@media screen and (min-width: 769px) {
  /* Add gray headroom without scaling the existing 1440 × 980 cover artwork. */
  .p-home-project .p-home-project__layers {
    aspect-ratio: 1440 / 1000;
    background-color: #808080;
  }

  .p-home-project .p-home-project__layersItem img {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 98%;
  }
}

/* Increase the project-area CTA labels while keeping their existing button sizes. */
.p-home-project .p-home-project-brnds__link .c-button .text,
.p-home-project .p-home-project-collabo__link .c-button .text,
.p-home-project .p-home-project-social__link .c-button .text,
.p-home-vision__body .c-button .text {
  font-size: clamp(14px, 1.6rem, 18px);
}

@media screen and (min-width: 769px) {
  #hambergerMenu [data-project-parent-menu].l-hambergerMenu__contentsInner {
    row-gap: 0.5rem !important;
  }
}

@media screen and (max-width: 768px) {
  .l-hambergerMenu__body {
    margin-top: 2.2rem !important;
  }

  .l-hambergerMenu__list {
    display: flex !important;
    flex-direction: column !important;
    row-gap: 0 !important;
  }

  .l-hambergerMenu__item {
    display: contents;
  }

  .l-hambergerMenu__page {
    order: var(--as-mobile-menu-order, 99);
    width: 100%;
    margin-top: 1.45rem !important;
  }

  .l-hambergerMenu__page[data-mobile-menu-order="0"] {
    margin-top: 0 !important;
  }

  .l-hambergerMenu__contentsInner,
  #home [data-home-menu-projects].l-hambergerMenu__contentsInner,
  [data-project-parent-menu].l-hambergerMenu__contentsInner,
  [data-world-resident-menu].l-hambergerMenu__contentsInner {
    margin-top: 0.55rem !important;
    row-gap: 0.55rem !important;
  }

  .l-hambergerMenu__contentsItem {
    margin: 0 !important;
    padding: 0 !important;
  }

  .l-hambergerMenu__contentsLink {
    line-height: 1.35 !important;
  }
}
