/* Home hero tweaks (section.hero-v2.home-factory-banner in legacy-static/index.html).
   Buttons follow the feichuang hero buttons (.btn--bright / .btn--ghost-d): a bright filled button plus an
   outlined ghost button, square corners, small uppercase tracked label, lift + glow on hover.
   Colors follow this site's palette. Loaded by functions.php only on pages that contain .ym-hero-btn. */
.ym-hero-btn {
  --btn-glow: rgba(11, 95, 165, .45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  max-width: 100%;
  padding: .95em 1.9em;
  position: relative;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: all .35s cubic-bezier(.22, .61, .36, 1);
}
/* Bright on dark: white fill, brand-blue label */
.ym-hero-btn--bright {
  background: #fff;
  border-color: #fff;
  color: var(--ym-blue, #0b5fa5);
}
.ym-hero-btn--bright:hover { filter: brightness(1.04); }
/* Ghost on dark: transparent fill, 35% white hairline */
.ym-hero-btn--ghost-d {
  --btn-glow: rgba(11, 95, 165, .3);
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.ym-hero-btn--ghost-d:hover {
  border-color: #9fd4ff;
  color: #9fd4ff;
}
/* Hover layer shared by both: lift 2px + soft glow under the button */
.ym-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--btn-glow);
}
@media (prefers-reduced-motion: reduce) {
  .ym-hero-btn:hover { transform: none; }
}
.ym-hero-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Same gap between the two buttons as feichuang's hero */
section.hero-v2 .btn-row { gap: 16px; }

/* breadcrumb-global.js adds the text-link class to links whose label starts with "Explore " (it skips .btn,
   which these buttons no longer carry). That class sets the label color with !important; keep the button colors. */
section.hero-v2 .btn-row > a.ym-hero-btn { color: #fff !important; text-decoration: none !important; font-weight: 500; gap: .7em; transition: all .35s cubic-bezier(.22, .61, .36, 1); }
section.hero-v2 .btn-row > a.ym-hero-btn--bright { color: var(--ym-blue, #0b5fa5) !important; }
section.hero-v2 .btn-row > a.ym-hero-btn--ghost-d:hover { color: #9fd4ff !important; }
/* The text-link class also draws a gold underline (::before) that slides in on hover: not wanted on a button */
section.hero-v2 .btn-row > a.ym-hero-btn::before,
section.hero-v2 .btn-row > a.ym-hero-btn::after { content: none !important; }

/* Very narrow screens: the longer label must not overflow the column */
@media (max-width: 370px) {
  .ym-hero-btn { white-space: normal; line-height: 1.5; text-align: center; }
}

/* Eyebrow: no gold rule before the label (defined in home-visual-refinement.css for this hero only) */
section.hero-v2 .eyebrow::before { content: none; display: none; }

/* Wide screens: home-visual-refinement.css shifts the heading and the paragraph left by
   clamp(-64px, -3vw, -18px) (min-width 1200px). Move the eyebrow and the button row with them so every line
   of the copy column shares one left edge. Below 1200px nothing is shifted and the column is already aligned.
   The shift also gets a floor of 16px from the viewport edge: between 1200 and ~1300px the plain shift is wider
   than the side gutter and pushes the column onto the edge (x = -5px at 1232px, measured). Above ~1300px the
   floor never applies and the positions are unchanged. */
@media (min-width: 1200px) {
  body.home-editorial main section.hero-v2.home-factory-banner .eyebrow,
  body.home-editorial main section.hero-v2.home-factory-banner h1:has(.ym-hero-title-primary),
  body.home-editorial main section.hero-v2.home-factory-banner h1 + .subtext,
  body.home-editorial main section.hero-v2.home-factory-banner .btn-row {
    position: relative;
    inset-inline-start: max(clamp(-64px, -3vw, -18px), calc(16px - max(32px, (100vw - 1180px) / 2)));
  }
}
