/* Shared hero scaffolding */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* A · 云上蓝图 */
body[data-theme="sky"] {
  --page: #f4f7fb;
  --paper: #ffffff;
  --ink: #07172f;
  --muted: #5b687a;
  --accent: #1268f3;
  --accent-2: #6844d8;
  --dark: #071832;
}

.hero-sky {
  min-height: calc(100vh - var(--header-height));
  max-height: 940px;
  background:
    linear-gradient(90deg, rgba(10, 42, 88, .04) 1px, transparent 1px) 0 0 / 90px 90px,
    linear-gradient(rgba(10, 42, 88, .04) 1px, transparent 1px) 0 0 / 90px 90px,
    #f7faff;
  display: grid;
  grid-template-columns: minmax(420px, .83fr) minmax(620px, 1.17fr);
  grid-template-rows: 1fr auto;
}

.hero-sky::before {
  content: "";
  position: absolute;
  left: -8vw;
  bottom: 8%;
  width: 54vw;
  height: 54vw;
  border: 1px solid rgba(18, 104, 243, .13);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(18, 104, 243, .025),
    0 0 0 160px rgba(18, 104, 243, .018);
}

.hero-sky .hero-copy {
  position: relative;
  z-index: 3;
  padding: clamp(90px, 10vh, 140px) 6vw 70px max(64px, calc((100vw - 2000px) / 2));
  align-self: center;
}

.hero-sky h1 {
  margin: 0;
  font: 760 clamp(76px, 7.2vw, 128px)/.9 var(--heading);
  letter-spacing: -.025em;
  white-space: nowrap;
}

.hero-sky h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-lede {
  max-width: 600px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-sky .button.ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.hero-sky .hero-visual {
  position: relative;
  min-height: 660px;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 88%);
}

.hero-sky .hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(11, 41, 82, .22), transparent 45%);
}

.hero-sky .hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.altitude {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  border-left: 2px solid rgba(255, 255, 255, .75);
  color: white;
  background: rgba(6, 24, 49, .32);
  backdrop-filter: blur(8px);
}

.altitude b,
.altitude span { display: block; }
.altitude b { font: 650 18px/1 var(--display); }
.altitude span { margin-top: 4px; font-size: 10px; opacity: .7; }
.altitude-1 { left: 22%; bottom: 26%; }
.altitude-2 { right: 16%; top: 19%; }

.hero-facts {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  min-height: 96px;
  padding: 0 max(32px, calc((100vw - var(--max)) / 2));
  color: white;
  background: var(--dark);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.hero-facts span {
  min-height: 44px;
  padding: 0 28px;
  border-right: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  gap: 18px;
  align-items: center;
  color: #5f8fd4;
  font: 650 11px/1 var(--display);
}

.hero-facts span:first-child { padding-left: 0; }
.hero-facts span:last-child { border-right: 0; }
.hero-facts b { color: white; font: 650 15px/1 var(--body); }

/* B · 长安天际 */
body[data-theme="qin"] {
  --page: #f4efe6;
  --paper: #fbf8f1;
  --ink: #29231f;
  --muted: #6f665d;
  --faint: #91857a;
  --line: rgba(63, 48, 37, .18);
  --accent: #a44928;
  --accent-2: #c88b42;
  --dark: #2a231e;
  --display: "STZhongsong", "Songti SC", "Source Han Serif CN", "Microsoft YaHei", serif;
  --heading: "Source Han Serif CN", "Songti SC", "STZhongsong", "Microsoft YaHei", serif;
}

body[data-theme="qin"] .site-header { background: rgba(40, 32, 27, .97); }
body[data-theme="qin"] .brand img { filter: sepia(.18); }

.hero-qin {
  min-height: 850px;
  padding: 0 max(28px, calc((100vw - 1520px) / 2));
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 36%, rgba(170, 77, 42, .08), transparent 24%),
    linear-gradient(115deg, rgba(80, 57, 41, .035) 1px, transparent 1px) 0 0 / 64px 64px,
    #f5efe4;
  display: grid;
  grid-template-columns: minmax(430px, .88fr) minmax(520px, 1.12fr);
  gap: clamp(36px, 5vw, 90px);
  align-items: stretch;
}

.hero-qin::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 9%;
  height: 120px;
  opacity: .22;
  background:
    linear-gradient(160deg, transparent 46%, #7d4a32 47% 48%, transparent 49%) 0 0 / 210px 100%,
    linear-gradient(200deg, transparent 46%, #7d4a32 47% 48%, transparent 49%) 105px 0 / 210px 100%;
}

.qin-hero-copy {
  position: relative;
  z-index: 2;
  padding: 150px 6vw 100px;
  align-self: center;
}

.qin-hero-copy h1 {
  margin: 0;
  font-size: clamp(64px, 6.2vw, 106px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

.qin-hero-copy > p:not(.section-kicker) {
  max-width: 640px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 2;
}

.qin-hero-copy .qin-whisper {
  width: fit-content;
  margin-top: 64px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 14px;
  line-height: 1.6;
}

.qin-image {
  position: relative;
  margin: 70px 0;
  overflow: hidden;
}

.qin-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(117, 66, 39, .04), rgba(77, 38, 23, .23));
  mix-blend-mode: multiply;
}

.qin-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) sepia(.12);
}

body[data-theme="qin"] .capability-steps::before { background: var(--accent); }
body[data-theme="qin"] .product-section {
  color: #f9f2e8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--dark);
}

body[data-theme="qin"] .brand-visual img { filter: saturate(.72) sepia(.1); }

body[data-theme="qin"] .careers-cta {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 60px 60px,
    var(--accent);
}

/* C · 工程速度 */
body[data-theme="engine"] {
  --page: #efefec;
  --paper: #f8f8f4;
  --ink: #11110f;
  --muted: #5e5e59;
  --faint: #85857f;
  --line: rgba(17, 17, 15, .2);
  --accent: #ff4d2e;
  --accent-2: #ffc400;
  --dark: #11110f;
  --display: Bahnschrift, "DIN Alternate", "Arial Narrow", "Source Han Sans CN", sans-serif;
}

body[data-theme="engine"] .site-header {
  color: var(--ink);
  background: rgba(243, 243, 238, .97);
  border-bottom-color: rgba(17, 17, 15, .18);
}

body[data-theme="engine"] .desktop-nav a { color: rgba(17, 17, 15, .64); }
body[data-theme="engine"] .desktop-nav a:hover,
body[data-theme="engine"] .desktop-nav a.active { color: var(--ink); }
body[data-theme="engine"] .prototype-badge { border-color: var(--line); color: var(--muted); }
body[data-theme="engine"] .menu-button { color: var(--ink); }
body[data-theme="engine"] .mobile-nav { background: #f3f3ee; }
body[data-theme="engine"] .mobile-nav a { color: var(--ink); }

.hero-engine {
  min-height: 850px;
  padding: 50px max(32px, calc((100vw - var(--max)) / 2)) 42px;
  background: #efefec;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  grid-template-rows: auto 1fr auto;
  gap: 32px 50px;
}

.engine-grid {
  position: absolute;
  inset: 0;
  opacity: .7;
  background:
    linear-gradient(90deg, rgba(17, 17, 15, .08) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(rgba(17, 17, 15, .08) 1px, transparent 1px) 0 0 / 80px 80px;
}

.engine-hero-head {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
}

.engine-hero-head .section-kicker { margin: 0; }
.engine-hero-head > span { font-size: 12px; font-weight: 700; }

.engine-main {
  position: relative;
  z-index: 2;
  align-self: center;
}

.engine-code {
  margin: 0;
  color: var(--accent);
  font: 760 42px/1 var(--display);
}

.engine-main h1 {
  margin: -8px 0 0;
  font: 820 clamp(128px, 16vw, 250px)/.78 var(--display);
  letter-spacing: -.085em;
}

.engine-caption {
  max-width: 570px;
  margin: 42px 0 0;
  font-size: 20px;
  font-weight: 720;
  line-height: 1.45;
}

.engine-image {
  position: relative;
  z-index: 2;
  margin-top: 34px;
  min-height: 450px;
  overflow: hidden;
  border: 2px solid var(--ink);
}

.engine-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(1.06);
}

.engine-specs {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.engine-specs > * {
  min-height: 90px;
  padding: 18px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
}

.engine-specs > *:last-child { border-right: 0; }
.engine-specs small { margin-bottom: 8px; color: var(--accent); font: 700 10px/1 var(--display); }
.engine-specs b { font-size: 14px; }
.engine-specs a { padding-inline: 32px; color: white; background: var(--accent); font-weight: 700; }

body[data-theme="engine"] .section-head h2,
body[data-theme="engine"] .flight-copy h2,
body[data-theme="engine"] .brand-story-copy h2,
body[data-theme="engine"] .careers-cta h2 {
  text-transform: uppercase;
}

body[data-theme="engine"] .capability-step {
  min-height: 280px;
  border-right: 1px solid var(--ink);
}

body[data-theme="engine"] .product-section {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 80px 80px,
    #11110f;
}

body[data-theme="engine"] .product-row { min-height: 102px; }
body[data-theme="engine"] .product-name b { text-transform: uppercase; }
body[data-theme="engine"] .flight-section { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
body[data-theme="engine"] .brand-characters { color: var(--ink); background: var(--accent); }
body[data-theme="engine"] .brand-characters i { background: rgba(17, 17, 15, .35); }
body[data-theme="engine"] .careers-cta { background: var(--accent); }
body[data-theme="engine"] .page-hero {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 17, 15, .08) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(rgba(17, 17, 15, .08) 1px, transparent 1px) 0 0 / 80px 80px,
    #efefec;
}
body[data-theme="engine"] .page-hero > div > p:last-child { color: var(--muted); }
body[data-theme="engine"] .page-code { color: rgba(17, 17, 15, .07); }

/* D · 空天序章 */
body[data-theme="horizon"] {
  --page: #f1f4f8;
  --paper: #ffffff;
  --ink: #06152e;
  --muted: #59677c;
  --accent: #3158d6;
  --accent-2: #ff6a35;
  --dark: #06142c;
}

body[data-theme="horizon"] .site-header { background: rgba(4, 14, 31, .97); }

.hero-horizon {
  min-height: calc(100vh - var(--header-height));
  max-height: 940px;
  color: white;
  background: var(--dark);
}

.horizon-image,
.horizon-shade {
  position: absolute;
  inset: 0;
}

.horizon-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.horizon-shade {
  background:
    linear-gradient(90deg, rgba(2, 11, 26, .94) 0%, rgba(3, 13, 30, .63) 44%, rgba(3, 13, 30, .08) 74%),
    linear-gradient(0deg, rgba(3, 12, 28, .5), transparent 48%);
}

.horizon-copy {
  position: relative;
  z-index: 2;
  width: min(100% - 64px, var(--max));
  margin: 0 auto;
  padding-top: clamp(130px, 19vh, 200px);
}

.horizon-copy h1 {
  max-width: 1180px;
  margin: 0;
  font: 720 clamp(64px, 7.7vw, 120px)/1.02 var(--heading);
  letter-spacing: -.022em;
  text-wrap: balance;
  white-space: nowrap;
}

.horizon-copy > p:not(.section-kicker) {
  max-width: 690px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 17px;
  line-height: 1.9;
}

.round-play {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  color: white;
  background: rgba(5, 18, 40, .18);
  cursor: pointer;
}

.horizon-note {
  position: absolute;
  left: max(32px, calc((100vw - var(--max)) / 2));
  right: max(32px, calc((100vw - var(--max)) / 2));
  bottom: 32px;
  z-index: 2;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .32);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.horizon-note span { font-weight: 700; letter-spacing: .1em; }
.horizon-note small { color: rgba(255, 255, 255, .5); }

body[data-theme="horizon"] .capability-section {
  position: relative;
}

body[data-theme="horizon"] .capability-section::before {
  content: "";
  position: absolute;
  right: 0;
  top: 40px;
  width: 38vw;
  height: 260px;
  opacity: .55;
  background: radial-gradient(ellipse at center, rgba(49, 88, 214, .14), transparent 70%);
}

body[data-theme="horizon"] .product-section {
  background:
    radial-gradient(circle at 72% 20%, rgba(49, 88, 214, .18), transparent 22%),
    var(--dark);
}

body[data-theme="horizon"] .flight-section {
  margin: 60px auto;
  width: min(100% - 64px, 1500px);
  box-shadow: 0 40px 100px rgba(7, 24, 55, .12);
}

body[data-theme="horizon"] .brand-characters {
  background:
    linear-gradient(140deg, rgba(49, 88, 214, .9), rgba(5, 19, 43, .94)),
    var(--dark);
}

body[data-theme="horizon"] .media-cover { border-radius: 2px; }
body[data-theme="horizon"] .careers-cta {
  background:
    linear-gradient(120deg, #2448bd, #3158d6 55%, #4b74ec);
}

/* Theme-specific inner page character */
body[data-theme="qin"] .page-hero {
  color: #fffaf2;
  background:
    linear-gradient(100deg, rgba(43, 33, 27, .97), rgba(79, 43, 28, .82)),
    url("hero-changan-direction-v1.png") center / cover;
}

body[data-theme="qin"] .catalog-card,
body[data-theme="qin"] .talent-card { background: #fbf8f1; }

body[data-theme="qin"] .leadership-portrait {
  background:
    radial-gradient(circle at 65% 32%, rgba(199, 139, 66, .32), transparent 30%),
    linear-gradient(135deg, #8f3f25, #2b231e);
}

body[data-theme="horizon"] .page-hero {
  background:
    linear-gradient(100deg, rgba(4, 17, 39, .96), rgba(17, 43, 91, .72)),
    url("hero-horizon-direction-v1.png") center / cover;
}

@media (max-width: 1120px) {
  .hero-sky { grid-template-columns: .9fr 1.1fr; }
  .hero-sky .hero-copy { padding-left: 44px; padding-right: 40px; }
  .hero-sky h1 { font-size: 88px; }
  .hero-qin {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 30px;
  }
  .qin-hero-copy { padding-inline: 40px; }
  .hero-engine { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .hero-actions { align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .hero-sky {
    min-height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .hero-sky .hero-copy { padding: 88px 20px 54px; }
  .hero-sky h1 { font-size: 76px; }
  .hero-sky .hero-visual { min-height: 440px; clip-path: none; }
  .hero-facts { padding: 0 18px; min-height: 84px; }
  .hero-facts span { padding: 0 10px; gap: 6px; flex-direction: column; align-items: flex-start; justify-content: center; }
  .hero-facts span:first-child { padding-left: 0; }
  .hero-facts b { font-size: 12px; }
  .altitude-2 { right: 8%; }

  .hero-qin {
    min-height: auto;
    padding: 0;
    grid-template-columns: 1fr;
  }
  .qin-hero-copy { padding: 90px 20px 60px; }
  .qin-hero-copy h1 { font-size: 56px; }
  .qin-image { min-height: 500px; margin: 0; }

  .hero-engine {
    min-height: auto;
    padding: 40px 18px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .engine-hero-head { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .engine-main h1 { font-size: 138px; }
  .engine-image { min-height: 360px; }
  .engine-specs {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .engine-specs > * { border-right: 0; border-bottom: 1px solid var(--ink); }
  .engine-specs > *:last-child { border-bottom: 0; }

  .hero-horizon { min-height: 760px; max-height: none; }
  .horizon-copy { width: calc(100% - 36px); padding-top: 100px; }
  .horizon-copy h1 { font-size: 38px; }
  .horizon-note { left: 18px; right: 18px; flex-direction: column; }
  body[data-theme="horizon"] .flight-section { width: 100%; margin: 0; }
}
