/* CobaltStone 官网样式
   底色跟随系统。浅色、深色都在下面两段 :root 里。 */

:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #5c5c5c;
  --bg: #f3f2ee;
  --arrow: #0047ab;
  --mark: #0047ab;
  --header: rgba(243, 242, 238, 0.88);
  --max: 1080px;
  --font: InterVariable, Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f2f2f2;
    --muted: rgba(242, 242, 242, 0.68);
    --bg: #121316;
    --arrow: #4f8cff;
    --mark: #f2f2f2;
    --header: rgba(18, 19, 22, 0.86);
  }
}

@font-face {
  font-family: InterVariable;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

html.i18n-pending body { visibility: hidden; }

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

a { color: inherit; }

::selection { background: color-mix(in srgb, var(--arrow) 28%, transparent); }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand img { width: 30px; height: 30px; display: block; }

@media (prefers-color-scheme: dark) {
  .brand img { filter: brightness(0) invert(1); }
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 560;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] { color: var(--ink); }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 48px 0 80px;
  overflow: hidden;
}

.evolve {
  position: absolute;
  width: min(58vw, 760px);
  right: 2vw;
  bottom: 6vh;
  color: var(--ink);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

h1 {
  margin: 0;
  max-width: 9em;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--ink);
}

html[lang="zh-CN"] h1 {
  max-width: 8.4em;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.28;
}

.mark {
  white-space: nowrap;
  border-bottom: 0.06em solid var(--mark);
  padding-bottom: 0.06em;
}

.lede {
  margin: 28px 0 0;
  max-width: 28rem;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.6;
}

.contact-line {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.contact-line a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 0.22em;
}

.contact-line a:hover { text-decoration-color: var(--ink); }

.site-footer {
  position: relative;
  z-index: 1;
  padding: 8px 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--arrow);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .evolve {
    width: min(62vw, 520px);
    right: 2vw;
    bottom: 9vh;
  }
}

@media (max-width: 720px) {
  .wrap, .header-inner { width: min(var(--max), calc(100% - 32px)); }
  .hero { align-items: flex-start; padding-top: 40px; }
  h1 { font-size: clamp(2.1rem, 9.2vw, 3.1rem); }
  html[lang="zh-CN"] h1 { font-size: clamp(1.85rem, 8.7vw, 2.65rem); }
  .evolve {
    width: 78vw;
    right: 0;
    bottom: 7vh;
  }
}

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