/*
  Jingyuan V40 hero polish draft — loaded after the existing hero styles.
  Scoped to existing hero markup; does not alter copy, layout, imagery, carousel,
  navigation, or any non-hero section. Review/integrate only after visual QA.
*/
:root {
  --v40-hero-ink: #1c3349;
  --v40-hero-red: #b8323b;
  --v40-hero-muted: #526779;
}

.v16-hero,
.v16-carousel { background-color: #f8fbfd; }
.v16-slide-copy { color: var(--v40-hero-ink); }
.v16-slide-copy > .v16-kicker {
  color: #9f2732;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .18em;
  line-height: 1.3;
}
.v16-slide-copy > .v16-kicker::before {
  width: 36px;
  height: 2px;
  flex: 0 0 36px;
  background: var(--v40-hero-red);
}
.v16-slide h1,
.v16-slide h2 {
  color: var(--v40-hero-ink);
  font-size: clamp(46px, 5.3vw, 72px);
  font-weight: 780;
  letter-spacing: -.048em;
  line-height: 1.13;
  text-wrap: balance;
}
.v16-slide h1 em,
.v16-slide h2 em {
  color: var(--v40-hero-red);
  font-style: normal;
  text-decoration: none;
}
.v16-slide-copy > p {
  max-width: 590px;
  color: var(--v40-hero-muted);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.75;
}
.v16-button-red {
  background: var(--v40-hero-red);
  box-shadow: 0 8px 20px rgb(184 50 59 / 18%);
}
.v16-button-red:hover { background: #982832; }
.v16-button-light {
  border-color: rgb(28 51 73 / 22%);
  color: var(--v40-hero-ink);
}
.v16-carousel-controls > button {
  border-color: rgb(28 51 73 / 22%);
  color: var(--v40-hero-ink);
}
.v16-carousel-dots button[aria-current="true"] { background: var(--v40-hero-red); }

/* Strong but restrained sequence: label, headline, supporting line, actions.
   No directional X motion, so Arabic RTL and English remain visually balanced. */
@media (prefers-reduced-motion: no-preference) {
  .v16-slide.is-active .v16-kicker {
    animation: v40-kicker-in 420ms cubic-bezier(.2,.7,.2,1) both;
  }
  .v16-slide.is-active .v32-motion-title {
    animation: v40-title-reveal 1100ms cubic-bezier(.18,.78,.2,1) 90ms both;
    will-change: opacity, transform, clip-path;
  }
  .v16-slide.is-active .v16-slide-copy > p {
    animation: v40-copy-in 520ms cubic-bezier(.2,.7,.2,1) 250ms both;
  }
  .v16-slide.is-active .v16-slide-actions {
    animation: v40-copy-in 520ms cubic-bezier(.2,.7,.2,1) 340ms both;
  }
}

@keyframes v40-kicker-in {
  from { opacity: .25; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes v40-title-reveal {
  0% { opacity: .35; transform: translateY(14px); clip-path: inset(0 0 88% 0); }
  72% { opacity: 1; transform: translateY(-1px); clip-path: inset(0); }
  100% { opacity: 1; transform: translateY(0); clip-path: inset(0); }
}
@keyframes v40-copy-in {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .v16-slide h1,
  .v16-slide h2 { font-size: clamp(40px, 6vw, 58px); }
}
@media (max-width: 700px) {
  .v16-slide-copy > .v16-kicker { font-size: 10px; letter-spacing: .14em; }
  .v16-slide-copy > .v16-kicker::before { width: 26px; flex-basis: 26px; }
  .v16-slide h1,
  .v16-slide h2 {
    max-width: 100%;
    font-size: clamp(32px, 8.5vw, 40px);
    line-height: 1.2;
    letter-spacing: -.035em;
  }
  .v16-slide-copy > p { max-width: 100%; font-size: 14px; line-height: 1.65; }
  .v16-slide-actions { gap: 9px; }
  .v16-button { min-height: 44px; padding-inline: 15px; font-size: 13px; }
  @media (prefers-reduced-motion: no-preference) {
    .v16-slide.is-active .v32-motion-title {
      animation-duration: 900ms;
      will-change: opacity, transform, clip-path;
    }
  }
}

/* Motion preference always wins; text stays fully visible without animation. */
@media (prefers-reduced-motion: reduce) {
  .v16-slide .v32-motion-title,
  .v16-slide .v16-kicker,
  .v16-slide-copy > p,
  .v16-slide-actions {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    will-change: auto !important;
  }
}

/* Keep the section headings and statistics consistent with the hero palette. */
.v16-section-intro h2,
.v23-adv-intro h2,
.v22-timeline-intro h2 { color: var(--v40-hero-ink); }
.v16-stat strong { color: var(--v40-hero-red); }

@media (prefers-reduced-motion: no-preference) {
  .v32-section-enter {
    animation: v40-section-enter 900ms cubic-bezier(.2,.72,.24,1) both;
  }
  @keyframes v40-section-enter {
    from { opacity: .3; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
/* Keep Chinese hero phrases together at desktop widths. */
@media (min-width: 701px) {
  html[lang="zh-CN"] .v16-slide h1,
  html[lang="zh-CN"] .v16-slide h2 {
    font-size: clamp(36px, 4vw, 60px);
    text-wrap: wrap;
  }
}