/* 驰山科技 chishankeji.com
   刻度：间距 4/8/12/16/24/32，圆角 6/10/16，强调色仅一种（用于链接）。 */

:root {
  color-scheme: light dark;

  --bg: #fafaf8;
  --text: #16181a;
  --text-2: #5b6066;
  --text-3: #8a8f95;
  --line: #e3e3df;
  --accent: #1f6f54;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --text: #ecedeb;
    --text-2: #a3a8a5;
    --text-3: #737876;
    --line: #2a2d2b;
    --accent: #7cc4a6;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* 语言切换：两种语言都在页面里，按 html[data-lang] 显示其一 */
html[data-lang="zh"] [data-l="en"],
html[data-lang="en"] [data-l="zh"] {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* 页头 */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: 15px;
}

.nav a {
  color: var(--text-2);
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

.lang {
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: var(--space-1) var(--space-3);
  min-width: 48px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.lang:hover {
  border-color: var(--text-3);
}

/* 首屏 */
.hero {
  padding-block: var(--space-6);
}

.ridge {
  display: block;
  width: 100%;
  height: clamp(120px, 24vw, 240px);
  margin-bottom: var(--space-6);
  animation: reveal 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ridge polyline {
  fill: none;
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ridge .r1 {
  stroke: var(--line);
}

.ridge .r2 {
  stroke: var(--text-3);
}

.ridge .r3 {
  stroke: var(--text);
}

.hero h1 {
  margin: 0 0 var(--space-4);
  font-size: clamp(34px, 6.4vw, 60px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  animation: rise 0.6s ease both;
}

.lead {
  margin: 0;
  max-width: 34em;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
  animation: rise 0.6s 0.08s ease both;
}

/* 分区：左侧小标题，右侧内容 */
.section {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: var(--space-6);
  row-gap: var(--space-4);
  scroll-margin-top: var(--space-4);
}

.section > h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}

/* 业务 */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
}

.services li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
}

.services li:first-child {
  border-top: 0;
  padding-top: 0;
}

.services li:last-child {
  padding-bottom: 0;
}

.services .num {
  font-size: 15px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 28px;
}

.services h3 {
  margin: 0 0 var(--space-1);
  font-size: 19px;
  line-height: 28px;
  font-weight: 600;
}

.services p {
  margin: 0;
  color: var(--text-2);
  max-width: 36em;
}

/* 关于 */
.prose p {
  margin: 0 0 var(--space-3);
  font-size: 17px;
  line-height: 1.8;
  max-width: 36em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.facts {
  margin: var(--space-5) 0 0;
}

.facts > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: var(--space-4);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

.facts > div:last-child {
  padding-bottom: 0;
}

.facts dt {
  font-size: 15px;
  color: var(--text-3);
}

.facts dd {
  margin: 0;
}

/* 联系 */
.contact {
  margin: 0;
}

.contact > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

.contact > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact > div:last-child {
  padding-bottom: 0;
}

.contact dt {
  font-size: 15px;
  color: var(--text-3);
}

.contact dd {
  margin: 0;
  font-size: 19px;
}

.link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
  overflow-wrap: anywhere;
}

.link:hover {
  text-decoration-color: currentColor;
}

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-5);
  font-size: 13px;
  color: var(--text-3);
}

/* 404 */
.missing {
  padding-block: var(--space-6);
}

.missing .code {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.missing h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  font-weight: 600;
}

.missing p {
  margin: 0 0 var(--space-5);
  color: var(--text-2);
  max-width: 30em;
}

/* 小屏 */
@media (max-width: 720px) {
  .nav a {
    display: none;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
  }

  .services li {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .facts > div,
  .contact > div {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ridge,
  .hero h1,
  .lead {
    animation: none;
  }
}
