/* CranioSwift /zh/ Chinese-page styles
 * Layers over /styles.css for shared color tokens + base layout.
 * Overrides font-family for CJK-first stack; adjusts line-height and letter-spacing for CJK rendering.
 * New layout classes: .zh-hero, .zh-module-grid, .zh-demo-inner, .zh-audience-grid, .zh-about-layout, .zh-about-card, .zh-contact-layout, .zh-contact-card, .lang-toggle, .zh-hero-stats.
 */

/* ---------- CJK-first typography overrides ---------- */

.zh-page,
.zh-page body,
.zh-page h1,
.zh-page h2,
.zh-page h3,
.zh-page p,
.zh-page button,
.zh-page input,
.zh-page select,
.zh-page textarea {
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei",
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

.zh-page p,
.zh-page li {
  line-height: 1.75;
}

.zh-page h1 {
  font-weight: 800;
  letter-spacing: -0.005em;
}

.zh-page h2 {
  font-weight: 760;
  letter-spacing: -0.005em;
}

.zh-page h3 {
  font-weight: 760;
}

/* Keep Latin eyebrows / brand / labels in Inter for consistency */
.zh-page .brand,
.zh-page .eyebrow,
.zh-page code,
.zh-page .stat-foot,
.zh-page .card-eyebrow,
.zh-page .card-foot,
.zh-page .zh-audience-tag {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- Language toggle ---------- */

.lang-toggle {
  margin-left: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.06em;
  color: rgba(247, 251, 250, 0.86) !important;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  border-color: var(--teal);
  color: #ffffff !important;
}

/* ---------- Page-wide spacing ---------- */

.zh-page main {
  display: block;
}

.zh-page .section {
  padding: clamp(64px, 8vw, 104px) 0;
}

.zh-page .section-inner {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.zh-page .section-heading {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.zh-page .section-heading h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.25;
  color: var(--ink);
}

.zh-page .section-intro {
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.8;
  max-width: 48em;
}

.zh-page .section-intro.inverted {
  color: rgba(248, 251, 251, 0.78);
}

/* Dark section base */
.zh-page .zh-demo,
.zh-page .zh-contact {
  color: #f1f5f4;
  background: var(--charcoal);
}

.zh-page .zh-demo .eyebrow,
.zh-page .zh-contact .eyebrow {
  color: var(--teal);
}

.zh-page .zh-demo h2,
.zh-page .zh-contact h2 {
  color: #ffffff;
}

/* ---------- Hero ---------- */

.zh-hero {
  position: relative;
  color: #f8fbfb;
  background: var(--charcoal);
  overflow: hidden;
}

.zh-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(33, 199, 184, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(55, 109, 244, 0.1), transparent 65%),
    linear-gradient(180deg, rgba(7, 16, 20, 0.0), rgba(7, 16, 20, 0.5));
  pointer-events: none;
}

.zh-hero-content {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(84px, 10vw, 136px) 0 clamp(64px, 8vw, 96px);
}

.zh-hero-content h1 {
  max-width: 14em;
  margin-bottom: 22px;
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.1;
  font-weight: 800;
  color: #ffffff;
}

.zh-hero-copy {
  max-width: 38em;
  margin-bottom: 36px;
  color: rgba(248, 251, 251, 0.86);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.85;
}

.zh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

.zh-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 920px;
  margin: 0;
}

.zh-hero-stats > div {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(8, 21, 25, 0.62);
  backdrop-filter: blur(14px);
}

.zh-hero-stats dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.zh-hero-stats dd {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.zh-hero-stats dd.stat-foot {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ---------- Modules (light, 4-card grid) ---------- */

.zh-modules {
  background: var(--paper);
}

.zh-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.zh-module-grid article {
  display: grid;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.zh-module-tag {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--charcoal);
  font-weight: 820;
  font-size: 15px;
  margin-bottom: 4px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.zh-module-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.zh-module-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- Demo (dark, single col) ---------- */

.zh-demo-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.zh-demo h2 {
  margin: 14px 0 18px;
}

.zh-demo-copy {
  color: rgba(248, 251, 251, 0.82);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.85;
  margin: 0 auto 28px;
  max-width: 42em;
}

.zh-demo-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.zh-demo-fallback {
  margin: 0;
  color: rgba(248, 251, 251, 0.6);
  font-size: 14px;
}

.zh-demo-fallback a {
  color: var(--teal);
  border-bottom: 1px solid rgba(33, 199, 184, 0.4);
}

/* ---------- Audience (light, 3-card grid) ---------- */

.zh-audience {
  background: var(--surface);
}

.zh-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.zh-audience-grid article {
  display: grid;
  gap: 12px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.zh-audience-tag {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zh-audience-grid h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.45;
}

.zh-audience-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.85;
}

.zh-audience-grid a.text-link {
  align-self: start;
  margin-top: 4px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding-bottom: 1px;
}

.zh-audience-grid a.text-link.dark-link {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ---------- About (light, 2-col with side card) ---------- */

.zh-about {
  background: var(--paper);
}

.zh-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.zh-about-layout > div p {
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.85;
  margin: 0 0 16px;
}

.zh-about-layout > div p:last-child {
  margin-bottom: 0;
}

.zh-about-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.zh-about-card .card-eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zh-about-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.zh-about-card li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.zh-about-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.zh-about-card li strong {
  color: var(--ink);
  font-weight: 760;
}

.zh-about-card .card-foot {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- Contact (dark, 2-col) ---------- */

.zh-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.zh-contact-copy {
  color: rgba(248, 251, 251, 0.82);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.85;
  max-width: 38em;
  margin: 14px 0 32px;
}

.zh-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.zh-contact-card {
  padding: 26px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.zh-contact-card .card-eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zh-contact-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.zh-contact-card li {
  position: relative;
  padding-left: 22px;
  color: rgba(248, 251, 251, 0.82);
  font-size: 14px;
  line-height: 1.75;
}

.zh-contact-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.zh-contact-card .card-foot {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  color: rgba(248, 251, 251, 0.58);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .zh-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zh-audience-grid {
    grid-template-columns: 1fr;
  }

  .zh-about-layout,
  .zh-contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .zh-page .section {
    padding: 56px 0;
  }

  .zh-page .section-inner {
    width: calc(100% - 32px);
  }

  .zh-hero-content {
    padding: 72px 0 56px;
  }

  .zh-hero-content h1 {
    font-size: clamp(34px, 9vw, 52px);
    line-height: 1.15;
  }

  .zh-hero-stats {
    grid-template-columns: 1fr;
  }

  .zh-module-grid {
    grid-template-columns: 1fr;
  }
}
