:root {
  color-scheme: light;
  --color-canvas: #f7f6f2;
  --color-surface: #ffffff;
  --color-surface-muted: #eef4f0;
  --color-ink: #17201e;
  --color-muted: #5d6863;
  --color-line: #d9ded8;
  --color-teal: #2f6f67;
  --color-sage: #7e8f64;
  --color-clay: #b86f55;
  --color-sky: #6c7d91;
  --shadow-soft: 0 24px 80px rgba(36, 45, 42, 0.12);
  --radius: 8px;
  --max-content: 1180px;
  --header-height: 72px;
  --space-section: 112px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body[data-locale="zh"] {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Inter, ui-sans-serif, system-ui, sans-serif;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 5.8vw, 5.05rem);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: normal;
}

h2 {
  font-size: clamp(2.25rem, 4.8vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.24;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
}

::selection {
  background: rgba(47, 111, 103, 0.18);
}

:focus-visible {
  outline: 3px solid rgba(47, 111, 103, 0.55);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--color-ink);
  color: #ffffff;
  padding: 10px 14px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
