/* 首页首屏关键样式：只负责 Hero 在完整样式表到达前保持最终布局。 */
body.home.home-directory .hero-bar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.home.home-directory .hero-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: image-set(
    url('/assets/home/hero-bg-layer.avif') type('image/avif'),
    url('/assets/home/hero-bg-layer.webp') type('image/webp'),
    url('/assets/home/hero-bg-layer.png') type('image/png')
  ) center center / cover no-repeat;
  opacity: .36;
  pointer-events: none;
  z-index: 0;
}

body.home.home-directory .hero-bar > .hero-split {
  position: relative;
  z-index: 1;
}

body.home.home-directory .hero-service-poster {
  display: none;
}

body.home.home-directory .hero-ad-panel {
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 15, .92);
  border-radius: 24px;
  background: #fffaf2;
  box-shadow: 0 18px 36px rgba(23, 18, 15, .06);
  text-decoration: none;
}

body.home.home-directory .hero-ad-panel picture,
body.home.home-directory .hero-ad-panel__image {
  display: block;
  width: 100%;
  height: 100%;
}

body.home.home-directory .hero-ad-panel__image {
  object-fit: fill;
  object-position: center top;
}

body.home.home-directory .hero-group-panel {
  display: none;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 15, .92);
  border-radius: 24px;
  background: #fffaf2;
  box-shadow: 0 18px 36px rgba(23, 18, 15, .06);
  text-decoration: none;
}

body.home.home-directory .hero-group-panel picture,
body.home.home-directory .hero-group-panel__image {
  display: block;
  width: 100%;
  height: 100%;
}

body.home.home-directory .hero-group-panel__image {
  object-fit: fill;
  object-position: center top;
}

@media (min-width: 961px) {
  body.home.home-directory .hero-split {
    display: block !important;
    position: relative !important;
    min-height: clamp(380px, 25vw, 512px) !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.home.home-directory .hero-headline {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    transform: translateX(-50%) !important;
    width: min(760px, 100%) !important;
    margin: 0 auto !important;
    z-index: 1 !important;
  }
}

@media (min-width: 1280px) {
  body.home.home-directory .hero-group-panel {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    width: clamp(240px, 20vw, 300px);
    height: auto;
    aspect-ratio: 640 / 1200;
  }
}

@media (max-width: 640px) {
  body.home.home-directory .hero-split {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "hero-title hero-title"
      "hero-left hero-right" !important;
    gap: 12px !important;
    align-items: start !important;
    padding: 0 16px !important;
    min-height: 0 !important;
  }

  body.home.home-directory .hero-headline {
    grid-area: hero-title !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.home.home-directory .hero-ad-panel,
  body.home.home-directory .hero-group-panel {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    aspect-ratio: 640 / 1200 !important;
    justify-self: stretch !important;
  }

  body.home.home-directory .hero-ad-panel {
    grid-area: hero-left !important;
    grid-column: 1 !important;
  }

  body.home.home-directory .hero-group-panel {
    display: block !important;
    grid-area: hero-right !important;
    grid-column: 2 !important;
    border-radius: 14px;
  }

  body.home.home-directory .hero-bar::before {
    display: none !important;
    content: none !important;
    background-image: none !important;
  }
}
