/* 宣传页独立样式：颜色与圆角沿用现有视觉值，仅收录本页面实际使用的变量。 */
:root {
  /* 独立部署时无需加载业务主题CSS，下面的变量供本文件直接使用。 */
  --ctc-text: #363433;
  --ctc-bg: #ffffff;
  --ctc-inverse: #ffffff;
  --ctc-brand: #c21f30;
  --ctc-focus: #8e1723;
  --ctc-title: #5c4033;
  --ctc-muted: #6d625a;
  --ctc-card-border: #c8b8a6;
  --ctc-radius-control: 10px;
  --ctc-on-strong: #ffffff;
  --ctc-brand-hover: #a51a28;
  --ctc-brand-active: #8e1723;
  --ctc-hover: #fff7e5;
  --ctc-radius-card: 16px;
  --ctc-surface: #ffffff;
  --ctc-surface-soft: #fff1d1;
  --ctc-disabled-bg: #eeeae1;
  --ctc-disabled-border: #d7d0c3;
  --ctc-control-border: #998b7d;
  --ctc-selected: #fff1d1;

  --page-width: 1160px;
  --space: 24px;
  --section-space: 96px;
  --text-small: 0.875rem;
  --text-body: 1rem;
  --text-lead: 1.125rem;
  --text-heading: clamp(1.85rem, 3.2vw, 2.75rem);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  color: var(--ctc-text);
  background: var(--ctc-bg);
  font:
    var(--text-body) / 1.8 "Microsoft YaHei",
    "PingFang SC",
    sans-serif;
}
::selection {
  color: var(--ctc-inverse);
  background: var(--ctc-brand);
}
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 5px;
}
a:hover {
  color: var(--ctc-brand);
}
a:focus-visible {
  outline: 3px solid var(--ctc-focus);
  outline-offset: 5px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  color: var(--ctc-title);
  line-height: 1.3;
  text-wrap: balance;
}
h2 {
  font-size: var(--text-heading);
  font-weight: 650;
}
h3 {
  font-size: 1.25rem;
  line-height: 1.5;
}
p {
  color: var(--ctc-muted);
}
.wrap {
  width: min(var(--page-width), calc(100% - 96px));
  margin-inline: auto;
}
.header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 4%;
  border-bottom: 1px solid var(--ctc-card-border);
}

/* 语言选择在桌面与手机都可直接操作；较长英文允许换行，不挤压内容。 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#language-select {
  min-height: 48px;
  max-width: 100%;
  font: inherit;
  padding: 8px 12px;
  color: var(--ctc-text);
  background: var(--ctc-surface);
  border: 1px solid var(--ctc-card-border);
  border-radius: var(--ctc-radius-control);
  cursor: pointer;
}
#language-select:focus-visible {
  outline: 3px solid var(--ctc-focus);
  outline-offset: 4px;
}
html[lang="en"] h1 {
  font-size: clamp(2.2rem, 4.2vw, 4rem);
}
html[lang="en"] .family-card {
  flex-wrap: wrap;
}
html[lang="en"] .family-action {
  white-space: normal;
}
@media (min-width: 768px) and (max-width: 1100px) {
  .header {
    flex-wrap: wrap;
  }
  .header nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }
}
@media (max-width: 767px) {
  .header {
    flex-wrap: wrap;
    gap: 16px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  html[lang="en"] .header .brand {
    white-space: normal;
  }
  html[lang="en"] .mobile-nav a {
    overflow-wrap: anywhere;
  }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ctc-title);
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}
.seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ctc-radius-control);
  background: var(--ctc-brand);
  color: white;
  font-family: "STSong", "SimSun", serif;
}
.header nav,
.actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--ctc-brand);
  border-radius: var(--ctc-radius-control);
  background: var(--ctc-brand);
  color: var(--ctc-on-strong);
  font-weight: 600;
  transition:
    background 180ms,
    transform 180ms;
}
.button:hover {
  background: var(--ctc-brand-hover);
  color: white;
}
.button:active {
  transform: translateY(2px);
  background: var(--ctc-brand-active);
}
.button.secondary {
  background: transparent;
  color: var(--ctc-brand);
}
.button.secondary:hover {
  background: var(--ctc-hover);
}
.small {
  padding: 8px 20px;
}
.side {
  position: fixed;
  right: 12px;
  top: 42%;
  display: grid;
  gap: 16px;
  font-size: var(--text-small);
  writing-mode: vertical-rl;
  z-index: 2;
}
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 76px;
}
h1 {
  font-size: clamp(2.7rem, 4.8vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
h1 span {
  color: var(--ctc-brand);
}
.lead {
  font-size: var(--text-lead);
  max-width: 48ch;
  margin-block: 24px 32px;
}
.actions {
  gap: 16px;
}
.hero-note {
  margin-top: 24px;
  font-size: var(--text-small);
}
.tree-preview {
  background: var(--ctc-hover);
  border-radius: var(--ctc-radius-card);
  padding: 24px 32px;
}
.preview-top,
.preview-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--text-small);
}
.preview-top {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ctc-card-border);
}
.tree {
  padding: 32px 16px;
}
.person {
  width: 112px;
  min-height: 76px;
  padding: 8px 16px;
  text-align: center;
  background: var(--ctc-surface);
  border: 1px solid var(--ctc-card-border);
  border-radius: var(--ctc-radius-control);
  margin: auto;
}
.person span {
  display: block;
  font-size: var(--text-small);
  color: var(--ctc-muted);
}
.person strong {
  font-size: 1.25rem;
  color: var(--ctc-title);
}
.ancestor {
  border-color: var(--ctc-brand);
}
.stem {
  width: 1px;
  height: 24px;
  background: var(--ctc-card-border);
  margin: auto;
}
.branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ctc-card-border);
  padding-top: 24px;
  position: relative;
}
.branches::before,
.branches::after {
  content: "";
  height: 24px;
  width: 1px;
  position: absolute;
  top: 0;
  background: var(--ctc-card-border);
}
.branches::before {
  left: 25%;
}
.branches::after {
  right: 25%;
}
.preview-bottom {
  border-top: 1px solid var(--ctc-card-border);
  padding-top: 16px;
}
.mini-seal {
  color: var(--ctc-brand);
  border: 1px solid;
  padding: 0 7px;
  font-family: serif;
}
.family-section {
  background: var(--ctc-surface-soft);
  padding-block: 48px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head p {
  margin-top: 12px;
}
.text-link {
  color: var(--ctc-brand);
  white-space: nowrap;
  text-decoration: underline;
}
.family-empty,
.family-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--ctc-surface);
  border-radius: var(--ctc-radius-card);
  padding: 24px 32px;
}
.family-empty .button {
  margin-left: auto;
}
.surname {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  font:
    2.5rem "SimSun",
    serif;
  color: var(--ctc-brand);
  background: var(--ctc-hover);
  border-radius: var(--ctc-radius-control);
}
.family-list {
  display: grid;
  gap: 16px;
}

/* 更多按钮不触发网络请求，禁用态表示已展示完整名单。 */
.family-more {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 24px;
}
.view-button:disabled {
  cursor: default;
  background: var(--ctc-disabled-bg);
  color: var(--ctc-muted);
  border-color: var(--ctc-disabled-border);
}
[hidden] {
  display: none !important;
}
.family-card {
  justify-content: space-between;
}
.section {
  padding-block: var(--section-space);
}
.feature-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  margin-top: 48px;
}
.large-word {
  color: var(--ctc-brand);
  font:
    4.5rem/1.3 "STSong",
    "SimSun",
    serif;
}
.feature-title p {
  margin-top: 24px;
}
.feature-rows article {
  padding-block: 24px;
  border-bottom: 1px solid var(--ctc-card-border);
}
.feature-rows article:first-child {
  padding-top: 0;
}
.feature-rows p,
.platform-grid p {
  margin-top: 12px;
}
.chart-section {
  background: var(--ctc-hover);
}
.chart-layout,
.print-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.check-list {
  padding-left: 24px;
  margin: 0 0 32px;
}
.check-list li {
  padding-block: 4px;
}
.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
  margin-block: 40px 32px;
}
.platform-grid article {
  border-top: 1px solid var(--ctc-card-border);
  padding-top: 24px;
}
.fine {
  font-size: var(--text-small);
}
.print-section {
  background: var(--ctc-surface-soft);
  padding-block: 72px;
}
.steps {
  margin: 0;
  padding-left: 24px;
}
.steps li {
  padding: 16px 0 16px 12px;
}
.steps li::marker {
  color: var(--ctc-brand);
  font-weight: 700;
}
.steps p {
  margin-top: 8px;
}
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact > div > p {
  margin-top: 24px;
}
.contact-box {
  display: flex;
  align-items: center;
  gap: 24px;
}
.qr-slot {
  width: 160px;
  min-height: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px dashed var(--ctc-control-border);
  border-radius: var(--ctc-radius-control);
  padding: 12px;
  text-align: center;
}
.qr-slot p {
  font-size: var(--text-small);
}
.qr-slot img {
  display: block;
  width: 100%;
  height: auto;
}
.contact-box h3 {
  margin-bottom: 12px;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
  border-top: 1px solid var(--ctc-card-border);
  font-size: var(--text-small);
}
.mobile-nav {
  display: none;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
@media (max-width: 1100px) {
  .side {
    display: none;
  }
  .hero,
  .chart-layout,
  .print-layout {
    gap: 32px;
  }
  .contact {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  :root {
    --section-space: 56px;
  }
  html {
    scroll-padding-top: 24px;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .wrap {
    width: calc(100% - 40px);
  }
  .header {
    padding: 16px 20px;
  }
  .header nav {
    display: none;
  }
  .brand {
    font-size: 1.25rem;
  }
  .small {
    padding: 8px 12px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-block: 48px;
    gap: 40px;
  }
  .hero-copy {
    min-width: 0;
  }
  h1 {
    font-size: clamp(2.2rem, 8.5vw, 3.8rem);
  }
  .tree-preview {
    padding: 20px;
  }
  .tree {
    padding-inline: 0;
  }
  .person {
    width: 104px;
  }
  .section-head {
    display: block;
  }
  .section-head .text-link {
    display: inline-block;
    margin-top: 16px;
  }
  .family-empty,
  .family-card {
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
  }
  .family-empty .button {
    margin: 0;
  }
  .feature-layout,
  .chart-layout,
  .print-layout,
  .platform-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-title {
    display: none;
  }
  .feature-layout {
    margin-top: 32px;
  }
  .contact-box {
    flex-wrap: wrap;
  }
  .footer {
    flex-wrap: wrap;
  }
  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ctc-surface);
    border-top: 1px solid var(--ctc-card-border);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    z-index: 5;
  }
  .mobile-nav a {
    min-height: 52px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: var(--text-small);
    padding: 4px;
  }
  .mobile-nav a:active {
    background: var(--ctc-selected);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
}
/* 产品实景增强：保持原主题颜色，桌面与手机截图形成双端层次。 */
.hero {
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  min-height: 720px;
}
.hero-product {
  position: relative;
  padding: 36px 40px 80px 0;
  min-width: 0;
}
.desktop-shot {
  overflow: hidden;
  border-radius: var(--ctc-radius-card);
  background: var(--ctc-surface);
  box-shadow: 0 24px 60px rgb(65 48 36 / 18%);
  transform: perspective(1100px) rotateY(-7deg) rotateX(3deg);
  animation: product-arrive 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.desktop-shot img {
  width: 100%;
  height: auto;
  display: block;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: var(--ctc-hover);
}
.browser-bar > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ctc-card-border);
}
.browser-bar b {
  margin-left: 8px;
  font-size: var(--text-small);
  color: var(--ctc-muted);
  font-weight: normal;
}
.phone-shot {
  position: absolute;
  right: 0;
  bottom: 36px;
  width: 31%;
  padding: 5px;
  background: var(--ctc-title);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgb(65 48 36 / 24%);
  animation: phone-arrive 1400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.phone-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 19px;
}
.product-caption {
  margin-top: 28px;
  color: var(--ctc-muted);
  font-size: var(--text-small);
}
.family-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.family-card {
  padding: 24px;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: start;
  transition:
    transform 240ms,
    background 240ms;
}
.family-card:hover {
  transform: translateY(-5px);
  background: var(--ctc-hover);
}
.family-card h3 {
  font-size: 1.375rem;
}
.family-card p {
  font-size: var(--text-small);
}
.family-action {
  color: var(--ctc-brand);
  font-weight: 600;
}
.family-card .surname {
  width: 56px;
  height: 56px;
}
.showcase {
  padding-top: 80px;
}
.showcase-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.view-button {
  font: inherit;
  min-height: 48px;
  cursor: pointer;
  padding: 10px 20px;
  border: 1px solid var(--ctc-card-border);
  border-radius: var(--ctc-radius-control);
  background: var(--ctc-surface);
  color: var(--ctc-text);
  transition:
    background 180ms,
    color 180ms,
    transform 180ms;
}
.view-button[aria-pressed="true"] {
  background: var(--ctc-brand);
  color: var(--ctc-on-strong);
  border-color: var(--ctc-brand);
}
.view-button:hover {
  border-color: var(--ctc-brand);
}
.view-button:active {
  transform: scale(0.97);
}
.view-button:focus-visible {
  outline: 3px solid var(--ctc-focus);
  outline-offset: 4px;
}
.showcase-stage {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 32px;
  border-radius: var(--ctc-radius-card);
  background: var(--ctc-hover);
}
.showcase-stage > a {
  display: flex;
  justify-content: center;
  min-width: 0;
}
#showcase-image {
  display: block;
  max-width: 100%;
  width: auto;
  height: 480px;
  object-fit: contain;
  border-radius: var(--ctc-radius-control);
}
.showcase-description h3 {
  font-size: 1.75rem;
  color: var(--ctc-title);
}
.showcase-description p {
  margin-top: 16px;
}
.switching #showcase-image {
  animation: image-switch 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.resource-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
  margin-block: 48px;
}
.resource-feature h3 {
  color: var(--ctc-title);
  font-size: 1.75rem;
}
.resource-feature p {
  margin-block: 20px 24px;
}
.resource-feature img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--ctc-radius-card);
}
.qr-slot {
  width: 180px;
  border-style: solid;
  background: white;
  padding: 12px;
}
.phone-number {
  display: block;
  width: min(280px, 100%);
  height: auto;
}
.contact-label {
  font-size: var(--text-small);
  margin-top: 12px;
}
.reveal {
  opacity: 0.4;
  transform: translateY(22px);
  transition:
    opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}
@keyframes product-arrive {
  from {
    opacity: 0.5;
    transform: perspective(1100px) rotateY(-12deg) translateY(28px);
  }
  to {
    opacity: 1;
    transform: perspective(1100px) rotateY(-7deg) rotateX(3deg);
  }
}
@keyframes phone-arrive {
  from {
    opacity: 0.4;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes image-switch {
  from {
    opacity: 0.3;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-product {
    width: min(700px, 100%);
    margin: auto;
  }
  .family-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .showcase-stage {
    grid-template-columns: 1fr;
  }
  .resource-feature {
    gap: 32px;
  }
}
@media (max-width: 767px) {
  .hero {
    min-height: auto;
  }
  .hero-product {
    padding: 32px 24px 56px 0;
  }
  .phone-shot {
    bottom: 20px;
    width: 29%;
    border-radius: 16px;
  }
  .phone-shot img {
    border-radius: 12px;
  }
  .desktop-shot {
    transform: none;
  }
  .browser-bar b {
    font-size: 0.875rem;
  }
  .family-list,
  .resource-feature {
    grid-template-columns: 1fr;
  }
  .family-card {
    flex-wrap: nowrap;
  }
  .family-card > div {
    min-width: 0;
  }
  .family-action {
    margin-left: auto;
    white-space: nowrap;
  }
  .showcase-stage {
    padding: 20px;
    gap: 24px;
  }
  #showcase-image {
    height: auto;
    max-height: 520px;
    max-width: 100%;
  }
  .showcase-controls {
    gap: 8px;
  }
  .view-button {
    padding: 10px 12px;
    flex: 1 0 40%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 吊线谱按原始比例缩放，不裁切竖排信息；手机可打开原图放大阅读。 */
.pedigree-sample {
  margin: 0;
  min-width: 0;
}
.pedigree-sample a {
  display: block;
  background: white;
  border-radius: var(--ctc-radius-control);
  overflow: hidden;
}
.pedigree-sample img {
  display: block;
  width: 100%;
  height: auto;
}
.pedigree-sample figcaption {
  margin-top: 12px;
  color: var(--ctc-muted);
  text-align: center;
  font-size: var(--text-small);
}
