/**
 * xuye/page-hero block styles — six hero variants, mirror of prototypes/xuye/styles.css.
 * 原型行号范围:
 *   industry  3952–3994 · company 1459–1510 · service 4460–4504
 *   product   1819–1983 · compound 3443–3521 · solution 4233–4275
 *   断点 set1:2545/2550/2605/2793–2811/2865–2894 · set2:4696–4708/4809–4855
 * Breakpoints:1080px / 680px(沿用原型,不新增)。
 */
@layer xuye-block {
  .xuye-x-page-hero {
    position: relative;
    overflow: hidden;
  }

  .xuye-x-page-hero--industry {
    padding: 146px 0 70px;
    background: linear-gradient(180deg, #f6fbfc 0%, #ffffff 100%);
  }

  .xuye-x-page-hero--company {
    padding: 136px 0 64px;
    background:
      linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.97) 46%, rgba(245, 250, 251, 0.7) 100%),
      #fff;
  }

  .xuye-x-page-hero--service {
    padding: 146px 0 66px;
    background:
      radial-gradient(circle at 78% 20%, rgba(0, 140, 145, 0.12), transparent 34%),
      linear-gradient(180deg, #f6fafb 0%, #fff 72%);
  }

  .xuye-x-page-hero--product {
    padding: 148px 0 54px;
    background:
      radial-gradient(circle at 82% 18%, rgba(0, 140, 145, 0.12), transparent 34%),
      linear-gradient(180deg, #f6fafb 0%, #ffffff 72%);
  }

  .xuye-x-page-hero--compound {
    padding: 146px 0 0;
    background:
      radial-gradient(circle at 78% 8%, rgba(0, 140, 145, 0.12), transparent 34%),
      linear-gradient(180deg, #f5fafb 0%, #fff 100%);
  }

  .xuye-x-page-hero--solution {
    padding: 146px 0 66px;
    background: linear-gradient(180deg, #f6fbfc 0%, #fff 100%);
  }

  .xuye-x-page-hero__grid {
    display: grid;
    align-items: center;
  }

  .xuye-x-page-hero--industry .xuye-x-page-hero__grid {
    grid-template-columns: minmax(320px, 0.72fr) minmax(380px, 0.9fr);
    gap: clamp(48px, 7vw, 104px);
  }

  .xuye-x-page-hero--company .xuye-x-page-hero__grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.12fr);
    gap: clamp(42px, 6vw, 84px);
  }

  .xuye-x-page-hero--service .xuye-x-page-hero__grid {
    grid-template-columns: minmax(320px, 0.82fr) minmax(380px, 0.86fr);
    gap: clamp(48px, 7vw, 104px);
  }

  .xuye-x-page-hero--product .xuye-x-page-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
    gap: 54px;
  }

  .xuye-x-page-hero--compound .xuye-x-page-hero__grid {
    grid-template-columns: minmax(300px, 0.74fr) minmax(420px, 0.9fr);
    gap: clamp(46px, 7vw, 110px);
  }

  .xuye-x-page-hero--solution .xuye-x-page-hero__grid {
    grid-template-columns: minmax(320px, 0.76fr) minmax(380px, 0.86fr);
    gap: clamp(48px, 7vw, 104px);
  }

  .xuye-x-page-hero__copy h1 {
    color: var(--wp--preset--color--ink, #0b131a);
  }

  .xuye-x-page-hero--industry .xuye-x-page-hero__copy h1 {
    max-width: 660px;
    /* Page-hero titles scaled down 25% (× 0.75) — were too large. */
    font-size: calc(clamp(2.65rem, 5.2vw, 5.5rem) * 0.75);
    font-weight: 700;
    line-height: 1;
  }

  .xuye-x-page-hero--company .xuye-x-page-hero__copy h1 {
    font-size: calc(clamp(3.3rem, 6.2vw, 6.8rem) * 0.75);
    font-weight: 800;
    line-height: 0.95;
  }

  .xuye-x-page-hero--service .xuye-x-page-hero__copy h1 {
    max-width: 760px;
    font-size: calc(clamp(2.8rem, 5.5vw, 5.7rem) * 0.75);
    font-weight: 700;
    line-height: 0.98;
  }

  .xuye-x-page-hero--product .xuye-x-page-hero__copy h1 {
    max-width: 820px;
    font-size: calc(clamp(2.65rem, 4.55vw, 5rem) * 0.75);
    font-weight: 700;
    line-height: 0.98;
  }

  .xuye-x-page-hero--compound .xuye-x-page-hero__copy h1 {
    max-width: 620px;
    font-size: calc(clamp(3.1rem, 6.4vw, 6.4rem) * 0.75);
    font-weight: 700;
    line-height: 0.98;
  }

  .xuye-x-page-hero--solution .xuye-x-page-hero__copy h1 {
    max-width: 700px;
    font-size: calc(clamp(2.45rem, 4.85vw, 5.15rem) * 0.75);
    font-weight: 700;
    line-height: 1.02;
  }

  /* The description renders as a .xuye-x-rich wrapper (xuye_site_richtext), not
     a bare <p>, so these must target that wrapper — otherwise the gap below the
     h1 and the per-variant text styling never apply. */
  .xuye-x-page-hero__copy > .xuye-x-rich {
    margin-top: 22px;
  }

  .xuye-x-page-hero--industry .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 590px;
    color: var(--wp--preset--color--muted, #60707b);
    font-size: clamp(1.02rem, 1.2vw, 1.16rem);
    line-height: 1.78;
  }

  .xuye-x-page-hero--company .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 580px;
    margin-top: 24px;
    color: #41535f;
    font-size: clamp(1.08rem, 1.4vw, 1.25rem);
    font-weight: 600;
    line-height: 1.7;
  }

  .xuye-x-page-hero--service .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 640px;
    color: #40525e;
    font-size: clamp(1.02rem, 1.18vw, 1.18rem);
    line-height: 1.78;
  }

  .xuye-x-page-hero--product .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 720px;
    color: #40525e;
    font-size: clamp(1.04rem, 1.35vw, 1.2rem);
    line-height: 1.72;
  }

  .xuye-x-page-hero--compound .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 560px;
    color: #40525e;
    font-size: clamp(1.02rem, 1.24vw, 1.18rem);
    line-height: 1.75;
  }

  .xuye-x-page-hero--solution .xuye-x-page-hero__copy > .xuye-x-rich {
    max-width: 620px;
    margin-top: 20px;
    color: var(--wp--preset--color--muted, #60707b);
    font-size: clamp(1.02rem, 1.16vw, 1.16rem);
    line-height: 1.78;
  }

  .xuye-x-page-hero--company .xuye-x-actions {
    margin-top: 30px;
  }

  .xuye-x-page-hero--product .xuye-x-actions {
    margin-top: 28px;
  }

  .xuye-x-page-hero__media {
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--line, #dfe8ec);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(10, 28, 38, 0.08);
  }

  .xuye-x-page-hero__media picture,
  .xuye-x-page-hero__stage picture {
    display: contents;
  }

  .xuye-x-page-hero__stage picture source {
    display: none;
  }

  .xuye-x-page-hero__media img {
    width: 100%;
    aspect-ratio: 1.38;
    object-fit: cover;
  }

  .xuye-x-page-hero--company .xuye-x-page-hero__media {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .xuye-x-page-hero--company .xuye-x-page-hero__media img {
    aspect-ratio: 1.48;
    border-radius: 8px;
    filter: brightness(1.24) contrast(1.08) saturate(1.12);
    box-shadow: 0 22px 54px rgba(10, 28, 38, 0.12);
  }

  .xuye-x-page-hero--compound .xuye-x-page-hero__media {
    box-shadow: 0 22px 58px rgba(10, 28, 38, 0.08);
  }

  .xuye-x-page-hero--compound .xuye-x-page-hero__media img {
    aspect-ratio: 1.5;
  }

  .xuye-x-page-hero--solution .xuye-x-page-hero__media img {
    aspect-ratio: 1.42;
  }

  .xuye-x-page-hero__visual {
    padding: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(223, 232, 236, 0.9);
    border-radius: 8px;
    box-shadow: var(--wp--preset--shadow--card, 0 18px 50px rgba(10, 28, 38, 0.12));
    backdrop-filter: blur(14px);
  }

  .xuye-x-page-hero__stage {
    position: relative;
    display: grid;
    /* Fixed frame (matches the ~1.4 ratio of the product art) that the image
       fills edge to edge — no more small image floating in whitespace. */
    aspect-ratio: 1.4;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8fa 100%);
    border: 1px solid var(--wp--preset--color--line, #dfe8ec);
    border-radius: 8px;
  }

  .xuye-x-page-hero__stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Product image carousel (≥2 images) — slides stack in one grid cell so the
     stage keeps a stable height; arrows/dots sit over the stage. */
  .xuye-x-page-hero__stage--carousel {
    position: relative;
  }

  /* Slides fill the fixed stage frame so every image covers it edge to edge. */
  .xuye-x-page-hero__slides {
    position: absolute;
    inset: 0;
    display: grid;
    width: 100%;
  }

  .xuye-x-page-hero__slide {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
  }

  .xuye-x-page-hero__slide.xuye-x-active {
    opacity: 1;
    visibility: visible;
  }

  .xuye-x-page-hero__nav {
    position: absolute;
    top: calc(50% - 20px);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--wp--preset--color--teal-dark, #045e64);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--wp--preset--color--line, #dfe8ec);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(10, 28, 38, 0.12);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .xuye-x-page-hero__nav:hover {
    color: #fff;
    background: var(--wp--preset--color--teal-dark, #045e64);
    box-shadow: 0 10px 24px rgba(10, 28, 38, 0.18);
  }

  .xuye-x-page-hero__nav--prev {
    left: 8px;
  }

  .xuye-x-page-hero__nav--next {
    right: 8px;
  }

  .xuye-x-page-hero__dots {
    position: absolute;
    right: 0;
    bottom: 16px;
    left: 0;
    display: flex;
    gap: 8px;
    justify-content: center;
  }

  .xuye-x-page-hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .xuye-x-page-hero__dot.xuye-x-active {
    background: rgba(255, 255, 255, 0.92);
    transform: scale(1.3);
  }

  .xuye-x-page-hero__caption {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    align-items: center;
    padding: 18px 4px 2px;
  }

  .xuye-x-page-hero__caption span {
    color: var(--wp--preset--color--red, #d71920);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .xuye-x-page-hero__caption strong {
    color: var(--wp--preset--color--ink, #0b131a);
    font-size: 1.2rem;
  }

  .xuye-x-page-hero__caption small {
    grid-column: 2;
    color: var(--wp--preset--color--muted, #60707b);
    font-size: 0.86rem;
  }

  .xuye-x-page-hero__proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin-top: 34px;
  }

  .xuye-x-page-hero__proof div {
    padding: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--wp--preset--color--line, #dfe8ec);
    border-radius: 8px;
    backdrop-filter: blur(10px);
  }

  .xuye-x-page-hero__proof strong {
    display: block;
    color: var(--wp--preset--color--ink, #0b131a);
    font-size: 1.5rem;
    line-height: 1;
  }

  .xuye-x-page-hero__proof span {
    display: block;
    margin-top: 8px;
    color: var(--wp--preset--color--muted, #60707b);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .xuye-x-page-hero__band {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: clamp(54px, 7vw, 84px);
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--line, #dfe8ec);
    border-radius: 8px 8px 0 0;
    background: var(--wp--preset--color--line, #dfe8ec);
  }

  .xuye-x-page-hero__band article {
    padding: clamp(22px, 3vw, 34px);
    background: rgba(255, 255, 255, 0.94);
  }

  .xuye-x-page-hero__band strong {
    display: block;
    color: var(--wp--preset--color--teal-dark, #045e64);
    font-size: clamp(1.22rem, 2vw, 1.86rem);
    line-height: 1;
  }

  .xuye-x-page-hero__band span {
    display: block;
    margin-top: 9px;
    color: var(--wp--preset--color--muted, #60707b);
    font-size: 0.88rem;
    font-weight: 700;
  }
}

@layer xuye-responsive {
  @media (max-width: 1080px) {
    .xuye-x-page-hero__grid {
      grid-template-columns: 1fr;
    }

    .xuye-x-page-hero--product {
      padding-top: 120px;
    }
  }

  @media (max-width: 680px) {
    .xuye-x-page-hero--company {
      padding-top: 98px;
      padding-bottom: 42px;
    }

    .xuye-x-page-hero--company .xuye-x-page-hero__copy > .xuye-x-rich {
      max-width: 96%;
    }

    .xuye-x-page-hero--company .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.7rem, 12vw, 4.25rem) * 0.75);
    }

    .xuye-x-page-hero--company .xuye-x-page-hero__media img {
      aspect-ratio: 1.18;
    }

    .xuye-x-page-hero--product {
      padding-top: 92px;
      padding-bottom: 38px;
    }

    .xuye-x-page-hero--product .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.3rem, 10vw, 3.4rem) * 0.75);
    }

    .xuye-x-page-hero__proof {
      grid-template-columns: 1fr;
    }

    .xuye-x-page-hero__stage {
      /* Keep the filled-frame behaviour on mobile — the base aspect-ratio
         governs height; no inner padding so the image still covers the box. */
      padding: 0;
    }

    .xuye-x-page-hero__caption {
      grid-template-columns: 1fr;
    }

    .xuye-x-page-hero__caption small {
      grid-column: auto;
    }

    .xuye-x-page-hero--industry {
      padding-top: 116px;
    }

    .xuye-x-page-hero--industry .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.45rem, 12vw, 3.75rem) * 0.75);
    }

    .xuye-x-page-hero--compound {
      padding-top: 116px;
    }

    .xuye-x-page-hero--compound .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.75rem, 15vw, 4.35rem) * 0.75);
    }

    .xuye-x-page-hero--compound .xuye-x-page-hero__media img {
      aspect-ratio: 1.18;
    }

    .xuye-x-page-hero__band {
      border-radius: 8px;
    }

    .xuye-x-page-hero--solution {
      padding-top: 116px;
    }

    .xuye-x-page-hero--solution .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.35rem, 11vw, 3.55rem) * 0.75);
    }

    .xuye-x-page-hero--service {
      padding-top: 116px;
    }

    .xuye-x-page-hero--service .xuye-x-page-hero__copy h1 {
      font-size: calc(clamp(2.45rem, 12vw, 3.75rem) * 0.75);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .xuye-x-page-hero__slide {
      transition: none;
    }
  }
}
