/**
 * 首页 H5 专用样式（仅 index.html 引入）
 * 与 styles.css 中的 PC 规则分离，全部写在 max-width:768px 内。
 */

body[data-page='home'] .hero-banner__pager {
  display: none;
}

@media (max-width: 768px) {
  /* ---------- 全局 / 版心 ---------- */
  html:has(body[data-page='home']) {
    font-size: calc(100vw / 3.9);
    min-width: 0;
  }

  body[data-page='home'] {
    min-width: 0;
    --header-bar-height: 0.8rem;
  }

  body[data-page='home'] .container {
    max-width: none;
    width: 100%;
    padding-left: 0.16rem;
    padding-right: 0.16rem;
  }

  body[data-page='home'] .section-anchor {
    scroll-margin-top: calc(var(--header-bar-height) + 0.08rem);
  }

  /* ---------- 顶栏（H5：移动端 logo / 菜单见 styles.css；此处仅首页 rem 缩放下的 logo 尺寸） ---------- */
  body[data-page='home'] .site-header__logo {
    width: 1.48rem;
    height: auto;
    min-height: 0.27rem;
  }

  body[data-page='home'] .site-header__logo--mobile {
    max-width: none;
    width: 1.98rem;
    height: auto;
    min-height: 0.27rem;
  }

  /* ---------- Hero（H5：顶栏 fixed 下为轮播留出安全区+顶栏高度；轮播区仍 3.8rem；PC 见 styles.css） ---------- */
  body[data-page='home'] .hero-banner {
    --hero-banner-image-height: 3.8rem;
    --hero-banner-header-offset: calc(var(--header-bar-height) + env(safe-area-inset-top, 0px));
    min-height: calc(var(--hero-banner-image-height) + var(--hero-banner-header-offset));
    height: calc(var(--hero-banner-image-height) + var(--hero-banner-header-offset));
    max-height: calc(var(--hero-banner-image-height) + var(--hero-banner-header-offset));
    box-shadow: none;
  }

  body[data-page='home'] .hero-banner__slides {
    position: absolute;
    top: var(--hero-banner-header-offset);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--hero-banner-image-height);
    min-height: var(--hero-banner-image-height);
  }

  body[data-page='home'] .hero-banner__slide .hero-banner__slide-img {
    min-height: var(--hero-banner-image-height);
    height: 100%;
  }

  body[data-page='home'] .hero-banner__slide-img {
    min-height: var(--hero-banner-image-height);
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  body[data-page='home'] .hero-banner__overlay {
    display: none;
  }

  body[data-page='home'] .hero-banner__content {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--hero-banner-header-offset);
    width: 100%;
    max-width: none;
    height: var(--hero-banner-image-height);
    min-height: var(--hero-banner-image-height);
    max-height: var(--hero-banner-image-height);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    box-shadow: none;
  }

  body[data-page='home'] .hero-banner__copy {
    width: 100%;
    padding-left: 0.08rem;
  }

  body[data-page='home'] .hero-banner__title {
    font-size: 0.36rem;
    font-weight: 600;
    line-height: 1.28;
    margin: 0 0 0.12rem;
  }

  /* 日语 H5：第 1 / 3 张主标题过长，限制版心宽度便于换行 */
  html[lang='ja'] body[data-page='home'] .hero-banner[data-hero-active-slide='0'] .hero-banner__title,
  html[lang='ja'] body[data-page='home'] .hero-banner[data-hero-active-slide='2'] .hero-banner__title {
    max-width: 2.9rem;
  }

  body[data-page='home'] .hero-banner__sub {
    font-size: 0.14rem;
    font-weight: 400;
    line-height: 0.24rem;
    max-width: 3.2rem;
  }

  /* H5 不展示滚动提示区（DOM 保留，仅隐藏；PC 见 styles.css） */
  body[data-page='home'] .hero-banner__scroll-cluster {
    display: none;
  }

  /* H5 不展示轮播缩略图条（DOM 保留，仅隐藏；PC 见 styles.css） */
  body[data-page='home'] .hero-banner__thumbs {
    display: none;
  }

  body[data-page='home'] .hero-banner__pager {
    position: absolute;
    left: 50%;
    bottom: 0.2rem;
    z-index: 6;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    width: auto;
  }

  body[data-page='home'] .hero-banner__pager-dot {
    position: relative;
    width: 0.08rem;
    height: 0.08rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0;
    overflow: hidden;
    transition: width 0.35s ease;
    cursor: pointer;
  }

  body[data-page='home'] .hero-banner__pager-dot--active {
    width: 0.4rem;
  }

  body[data-page='home'] .hero-banner__pager-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #378aff 0%, #58bff7 60%);
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
  }

  body[data-page='home'] .hero-banner__pager-dot--active .hero-banner__pager-fill {
    opacity: 1;
    animation: hero-banner-pager-fill 5s linear forwards;
  }

  @keyframes hero-banner-pager-fill {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }

  /* ---------- Philosophy（Figma 847:6051 H5 About，不影响 PC） ---------- */
  body[data-page='home'] .philosophy {
    padding: 0.32rem 0;
    background: #ffffff;
  }

  body[data-page='home'] .philosophy__outer.container {
    padding-left: 0.16rem;
    padding-right: 0.16rem;
  }

  body[data-page='home'] .philosophy__card {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: 3.5rem;
    margin-left: auto;
    margin-right: auto;
    min-height: 0;
    background: #f1f7ff;
    border-radius: 0.24rem;
    padding-left: 0;
    overflow: visible;
    position: relative;
    z-index: 0;
  }

  /* 文案在上、底部插在下（与 Figma 节点顺序一致） */
  body[data-page='home'] .philosophy__copy {
    order: 1;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0.24rem 0.16rem 0.32rem;
    gap: 0.32rem;
    align-items: center;
    text-align: center;
  }

  body[data-page='home'] .philosophy__intro {
    align-items: center;
    gap: 0.16rem;
    width: 100%;
  }

  body[data-page='home'] .philosophy__label {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    margin: 0 auto;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.08rem;
  }

  body[data-page='home'] .philosophy__label-text {
    font-size: 0.16rem;
    font-weight: 400;
    line-height: normal;
    color: #1f6fdb;
    text-align: left;
  }

  body[data-page='home'] .philosophy__label-line {
    display: none;
  }

  body[data-page='home'] .philosophy__label-rule {
    display: inline-block;
    width: 0.6rem;
    height: 0.08rem;
    margin: 0;
    background-image: url('../images/label_divider.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
  }

  body[data-page='home'] .philosophy__label-rule::before {
    content: none;
  }

  body[data-page='home'] .philosophy__label-rule::after {
    content: none;
  }

  body[data-page='home'] .philosophy__title {
    font-size: 0.3rem;
    font-weight: 700;
    line-height: normal;
    color: #181818;
    text-align: center;
    margin: 0;
    max-width: 100%;
  }

  body[data-page='home'] .philosophy__body {
    width: 100%;
    max-width: 3.18rem;
    margin: 0 auto;
    text-align: left;
    align-items: stretch;
  }

  body[data-page='home'] .philosophy__body > :first-child {
    margin-bottom: 0;
  }

  body[data-page='home'] .philosophy__para {
    font-size: 0.16rem;
    font-weight: 400;
    line-height: 0.28rem;
    color: #181818;
    margin: 0;
  }

  body[data-page='home'] .philosophy__para:first-child {
    margin-bottom: 0.16rem;
  }

  body[data-page='home'] .philosophy__para + .philosophy__para {
    margin-top: 0;
  }

  body[data-page='home'] .philosophy__btn {
    min-height: 0.48rem;
    padding: 0.12rem 0.24rem;
    font-size: 0.18rem;
    font-weight: 500;
    line-height: normal;
    border-radius: 0.08rem;
    gap: 0.02rem;
    background: linear-gradient(90deg, #378aff 0%, #4ea4ff 100%);
    box-shadow: none;
    align-self: center;
  }

  body[data-page='home'] .philosophy__btn-icon {
    width: 0.24rem;
    height: 0.24rem;
  }

  body[data-page='home'] .philosophy__visual {
    order: 2;
    position: relative;
    z-index: 0;
    left: auto;
    top: auto;
    bottom: auto;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    display: block;
    justify-content: flex-start;
    pointer-events: auto;
  }

  body[data-page='home'] .philosophy__img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    display: block;
  }

  body[data-page='home'] .philosophy__img--pc {
    display: none;
  }

  body[data-page='home'] .philosophy__img--mobile {
    display: block;
    width: calc(100% + 0.24rem);
    max-width: none;
    margin: 0 0 0 -0.12rem;
  }

  /* ---------- Services：Figma 847:5991 见 styles.css §5b（≤768px 全站） ---------- */

  /* ---------- Careers（Figma 847:5956 H5） ---------- */
  body[data-page='home'] .careers {
    padding: 0 0 0.32rem;
    background: #ffffff;
  }

  body[data-page='home'] .careers__intro {
    align-items: center;
    text-align: center;
    gap: 0.14rem;
    margin-bottom: 0.24rem;
    margin-top: 0.32rem;
  }

  body[data-page='home'] .careers__label {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    margin: 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    gap: 0.08rem;
  }

  body[data-page='home'] .careers__kicker {
    width: auto;
    text-align: left;
    font-size: 0.16rem;
    font-weight: 400;
    color: #1f6fdb;
  }

  body[data-page='home'] .careers__label-line {
    display: none;
  }

  body[data-page='home'] .careers__label-rule {
    display: inline-block;
    width: 0.6rem;
    height: 0.08rem;
    background-image: url('../images/label_divider.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
  }

  body[data-page='home'] .careers__label-rule::before {
    content: none;
  }

  body[data-page='home'] .careers__label-rule::after {
    content: none;
  }

  body[data-page='home'] .careers__title {
    font-size: 0.3rem;
    font-weight: 700;
    line-height: normal;
    color: #181818;
    max-width: 3.5rem;
    margin: 0 auto;
    padding: 0;
  }

  /* H5 首页标题使用连续文案，不跟随全站移动端的强制换行 */
  body[data-page='home'] .careers__title-br {
    display: none;
  }

  body[data-page='home'] .careers__shell {
    max-width: 3.5rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    padding-inline: 0;
    border-radius: 0.24rem;
    box-shadow: 0 0 0.8rem rgba(24, 24, 24, 0.05);
    overflow: hidden;
    background: #ffffff;
  }

  body[data-page='home'] .careers__shell.container {
    padding-left: 0;
    padding-right: 0;
    padding-inline: 0;
  }

  body[data-page='home'] .careers__layout {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 0;
  }

  body[data-page='home'] .careers__tabs {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    margin: 0;
    padding: 0;
    background: #ffffff;
  }

  body[data-page='home'] .careers__tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 1.24rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.08rem;
    padding: 0.16rem 0.1rem;
    border: none;
    border-radius: 0;
    border-right: 1px solid #efefef;
    border-bottom: none;
    text-align: center;
    font-size: 0.14rem;
    font-weight: 500;
    line-height: 0.18rem;
    color: #181818;
    opacity: 1;
  }

  body[data-page='home'] .careers__tab:last-child {
    border-right: none;
  }

  body[data-page='home'] .careers__tab--active {
    background:
      linear-gradient(90deg, #378aff 0%, #58bff7 55%, #4ea4ff 100%) top / 100% 0.06rem no-repeat,
      linear-gradient(
        -1.81deg,
        rgba(124, 202, 251, 0) 1.24%,
        rgba(109, 169, 250, 0.1) 59.75%,
        rgba(91, 139, 249, 0.2) 98.76%
      );
    color: #1f6fdb;
    font-weight: 700;
  }

  body[data-page='home'] .careers__tab--active::before {
    content: none;
  }

  body[data-page='home'] .careers__tab-icon-wrap {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 0.24rem;
    overflow: hidden;
    flex-shrink: 0;
  }

  body[data-page='home'] .careers__tab-icon-wrap {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  body[data-page='home'] .careers__tab-icon {
    width: 0.48rem;
    height: 0.48rem;
    object-fit: contain;
  }

  body[data-page='home'] .careers__panels {
    flex: none;
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid #efefef;
    padding: 0.24rem 0.16rem;
    background: #ffffff;
  }

  body[data-page='home'] .careers__block {
    margin-bottom: 0.24rem;
  }

  body[data-page='home'] .careers__block:last-child {
    margin-bottom: 0;
  }

  body[data-page='home'] .careers__block-title {
    font-size: 0.18rem;
    font-weight: 700;
    line-height: normal;
    color: #181818;
    margin: 0 0 0.16rem;
  }

  body[data-page='home'] .careers__list {
    margin: 0;
    padding-left: 0.21rem;
    list-style: disc;
    list-style-position: outside;
  }

  body[data-page='home'] .careers__list li {
    display: list-item;
    list-style: disc;
    margin: 0;
    padding: 0;
    font-size: 0.14rem;
    font-weight: 400;
    line-height: 0.26rem;
    color: rgba(17, 17, 17, 0.8);
  }

  body[data-page='home'] .careers__list li::before {
    content: none;
    display: none;
  }

  body[data-page='home'] .careers__list li::marker {
    font-size: 0.11rem;
  }

  body[data-page='home'] .careers__list li + li {
    margin-top: 0;
  }

  body[data-page='home'] .careers__cta {
    margin-top: 0;
    padding: 0 0.16rem;
  }

  body[data-page='home'] .careers__btn {
    min-height: 0.48rem;
    padding: 0.12rem 0.24rem;
    font-size: 0.18rem;
    font-weight: 500;
    line-height: normal;
    border-radius: 0.08rem;
    gap: 0.02rem;
    background: linear-gradient(90deg, #378aff 0%, #4ea4ff 100%);
    box-shadow: none;
  }

  body[data-page='home'] .careers__btn-icon {
    width: 0.24rem;
    height: 0.24rem;
  }

  /* ---------- CTA（Figma 847:5947 H5） ---------- */
  body[data-page='home'] .cta-banner {
    min-height: 3.04rem;
    padding: 0.4rem 0.2rem 0.44rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
  }

  body[data-page='home'] .cta-banner__inner {
    gap: 0;
    max-width: 3.5rem;
    margin: 0 auto;
    padding-left: 0.16rem;
    padding-right: 0.16rem;
  }

  body[data-page='home'] .cta-banner__title {
    font-size: 0.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #181818;
    margin: 0 0 0.14rem;
    text-align: center;
  }

  body[data-page='home'] .cta-banner__title-accent {
    background: linear-gradient(90deg, #378aff 0%, #58bff7 60%, #4ea4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body[data-page='home'] .cta-banner__title-br {
    display: none;
  }

  body[data-page='home'] .cta-banner__sub-br {
    display: none;
  }

  body[data-page='home'] .cta-banner__sub {
    font-size: 0.16rem;
    font-weight: 400;
    line-height: 0.24rem;
    color: #181818;
    opacity: 1;
    margin: 0 0 0.32rem;
    max-width: 3.5rem;
    text-align: center;
  }

  body[data-page='home'] .cta-banner__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.24rem;
    width: auto;
    max-width: none;
  }

  body[data-page='home'] .cta-banner__btn {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    min-height: 0.48rem;
    padding: 0.12rem 0.24rem;
    font-size: 0.18rem;
    font-weight: 500;
    border-radius: 0.08rem;
    font-family: var(--font-hero-cn);
  }

  body[data-page='home'] .cta-banner__btn--primary {
    background: linear-gradient(90deg, #378aff 0%, #4ea4ff 100%);
    color: #ffffff;
  }

  body[data-page='home'] .cta-banner__btn--ghost {
    background: #ffffff;
    color: #1f6fdb;
    box-shadow: none;
  }
}
