/* Home only. In-flow copy lets longer translations grow without clipping. */
.xb-home-hero {
  --xb-home-font-script: "Nothing You Could Do", "Segoe Print", "Bradley Hand", cursive;
  position: relative;
  isolation: isolate;
  min-height: clamp(34rem, 40vw, 40rem);
}

.xb-home-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.xb-home-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}

/* Concentrate contrast behind the copy while preserving the open image at right. */
.xb-new-web.xb-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(0 0 0 / 78%) 0%, rgb(0 0 0 / 66%) 34%, rgb(0 0 0 / 28%) 58%, transparent 82%);
}

.xb-home-hero .xb-home-hero-content {
  max-width: 100rem;
  padding-block: clamp(3.75rem, 6vw, 5.5rem);
}

/* Keep the approved desktop flow intact while allowing mobile to split the copy. */
.xb-home-hero-overlay,
.xb-home-hero-details { display: contents; }

.xb-new-web.xb-home-hero .xb-home-hero-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.75rem, 5.2cqi, 4.5rem);
  line-height: .98;
  letter-spacing: -.015em;
  text-shadow: 0 2px 14px rgb(0 0 0 / 58%);
  text-wrap: balance;
}

.xb-home-hero .xb-home-hero-accent {
  display: block;
  width: fit-content;
  max-width: 28ch;
  margin: 1rem 0 0;
  color: var(--xb-accent-gold);
  font-family: var(--xb-home-font-script);
  font-size: clamp(1.5rem, 2.35vw, 2.25rem);
  line-height: 1.25;
  text-shadow: 0 2px 10px rgb(0 0 0 / 70%);
  text-wrap: balance;
}

/* Keep the brand treatment while allowing the longer supporting line to wrap. */
.xb-home-script-lead, .xb-home-script-brand, .xb-home-script-end {
  white-space: normal;
}
.xb-home-script-lead, .xb-home-script-end { display: inline; }
.xb-home-script-brand { display: inline-block; white-space: nowrap; transform: translateY(-.035em) rotate(-2deg); transform-origin: left bottom; }
.xb-home-script-x { display: inline-block; font-size: 1.6em; line-height: 0; vertical-align: -.08em; }

/* Keep the established Han scale and system fallback. */
.xb-home-hero:lang(zh) .xb-home-hero-accent {
  font-family: var(--xb-home-font-script), "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.1vw, 2rem);
  line-height: 1.3;
}

.xb-home-hero-accent::after {
  content: "";
  display: block;
  width: 62%;
  height: clamp(4px, .15em, 9px);
  margin-top: .18em;
  background: var(--xb-accent-gold);
  clip-path: var(--xb-painted-underline);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.xb-home-hero-description {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  font-size: clamp(.9375rem, 1.35vw, 1.125rem);
  line-height: 1.55;
  color: rgb(255 255 255 / 92%);
  text-shadow: 0 1px 8px rgb(0 0 0 / 78%);
  text-wrap: balance;
}

.xb-home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

.xb-home-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--xb-accent-gold);
  border-radius: 4px;
  font: 600 .8125rem/1.2 var(--xb-font-body);
  letter-spacing: .04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.xb-home-hero-cta--primary { color: var(--xb-background); background: var(--xb-accent-gold); }
.xb-home-hero-cta--secondary { color: var(--xb-accent-gold); background: rgb(0 0 0 / 24%); }
.xb-home-hero-cta:hover { filter: brightness(1.08); }
.xb-home-hero-cta:focus-visible { outline: 2px solid var(--xb-text-primary); outline-offset: 3px; }

@media (max-width: 767px) {
  .xb-home-hero {
    --xb-home-mobile-image-height: 30rem;
    min-height: 0;
    background: var(--xb-background);
  }
  .xb-home-hero-media {
    position: relative;
    display: block;
    height: var(--xb-home-mobile-image-height);
    z-index: 0;
  }
  .xb-home-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgb(0 0 0 / 60%) 0%, rgb(0 0 0 / 34%) 58%, rgb(0 0 0 / 10%) 100%);
  }
  .xb-home-hero-media img { object-position: 50% 58%; }
  .xb-new-web.xb-home-hero::before { display: none; }
  .xb-home-hero .xb-home-hero-content {
    position: relative;
    padding-block: 0;
  }
  .xb-home-hero-overlay {
    position: absolute;
    inset-inline: 0;
    top: calc(var(--xb-home-mobile-image-height) * -1);
    z-index: 1;
    display: block;
    padding: 2.25rem 1rem .75rem;
  }
  .xb-home-hero-details {
    display: block;
    padding: .85rem 1rem 1rem;
    background: var(--xb-background);
  }
  .xb-new-web.xb-home-hero .xb-home-hero-title { max-width: 18ch; font-size: clamp(1.8rem, 7.6vw, 2.35rem); line-height: .96; }
  .xb-home-hero .xb-home-hero-accent { max-width: 28ch; margin-top: .55rem; font-size: clamp(1.15rem, 4.8vw, 1.5rem); line-height: 1.15; }
  .xb-home-hero-description { max-width: 34ch; margin: 0 auto; font-size: clamp(.875rem, 3.4vw, .98rem); line-height: 1.42; text-align: center; text-wrap: pretty; }
  .xb-home-hero-actions { display: grid; width: min(100%, 20rem); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .85rem auto 0; }
  .xb-home-hero-cta { min-height: 2.75rem; padding-inline: .35rem; font-size: .75rem; }
}

@media (max-width: 350px) {
  .xb-home-hero-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1101px) {
  .xb-home-hero { min-height: clamp(34rem, 40vw, 40rem); }
}

@media (min-width: 1440px) {
  .xb-home-hero .xb-home-hero-content { max-width: 90rem; padding-inline: clamp(2rem, 4vw, 4rem); }
  .xb-new-web.xb-home-hero .xb-home-hero-title { max-width: 18ch; }
  .xb-home-hero .xb-home-hero-accent { max-width: 34ch; }
}
