/* ─────────────────────────────────────────────────────────
   Lazync — Site Styles
   雾白为纸 · 深海为墨 · 湛蓝作点 —— 配色取自 Lazync 标识本身
   ───────────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Mist paper & marine ink — sampled from the brand mark */
  --paper:      #f4f7f9;
  --paper-soft: #ecf1f5;

  --ink:        #14212e;
  --ink-soft:   #47586a;
  --ink-faint:  #82909f;

  /* 湛蓝 — brand azure, used sparingly like a signature */
  --azure:       #0a5dc8;
  --azure-soft:  #0a82cf;
  --crest:       #39c5ec;

  /* 深海 — the wordmark's near-black marine */
  --night:      #071f37;

  --line:       rgba(10, 61, 118, 0.16);
  --line-soft:  rgba(10, 61, 118, 0.08);

  --max-w: 1080px;

  --serif-cn: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  --serif-en: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
  /* 标题混排：拉丁字母走 Garamond，汉字自动落到 Noto Serif SC */
  --serif-mix: 'EB Garamond', 'Noto Serif SC', 'Source Han Serif SC', 'STSong', serif;
  --sans:     'Inter', 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
  --mono:     ui-monospace, 'Cascadia Mono', 'Consolas', 'SF Mono', 'JetBrains Mono', monospace;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

::selection { background: rgba(57, 197, 236, 0.28); }

/* In-text links */
p a {
  color: var(--azure);
  border-bottom: 1px solid rgba(10, 93, 200, 0.35);
  transition: border-color 0.15s, color 0.15s;
}
p a:hover { color: var(--night); border-color: var(--night); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 247, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.site-nav a:not(.nav-github) {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:not(.nav-github):hover {
  color: var(--night);
  border-color: var(--azure-soft);
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--night);
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.nav-github:hover {
  border-color: var(--azure);
  background: rgba(10, 93, 200, 0.05);
}

/* ── Language switch ────────────────────────────────────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lang-switch .is-active {
  color: var(--night);
  font-weight: 500;
}

.lang-sep { color: var(--line); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-solid {
  background: var(--night);
  color: #eef4f9;
}
.btn-solid:hover { background: #123156; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--night);
}
.btn-ghost:hover {
  border-color: var(--azure);
  background: rgba(10, 93, 200, 0.05);
}

.btn-accent {
  background: var(--azure-soft);
  color: #fff;
}
.btn-accent:hover { background: var(--azure); }

.btn-outline-light {
  border: 1px solid rgba(238, 244, 249, 0.35);
  color: #eef4f9;
}
.btn-outline-light:hover {
  border-color: rgba(238, 244, 249, 0.7);
  background: rgba(238, 244, 249, 0.07);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px 24px 0;
  overflow: hidden;
}

/* 巨型标识水印 */
.hero-mark {
  position: absolute;
  top: 30px;
  right: 24px;
  width: clamp(320px, 40vw, 520px);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  max-width: 640px;
}

.hero-meta {
  font-family: var(--serif-en);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--azure-soft);
  margin-bottom: 26px;
}

.hero h1 {
  font-family: var(--serif-mix);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.05rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--night);
  margin-bottom: 26px;
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 2;
  max-width: 34em;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-note {
  margin-top: 30px;
  max-width: 40em;
  border-left: 2px solid rgba(10, 130, 207, 0.4);
  padding-left: 16px;
  font-size: 0.84rem;
  color: var(--ink-faint);
  line-height: 1.9;
}

/* 三条原则 */
.hero-tenets {
  margin-top: 84px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}

.hero-tenets h3 {
  font-family: var(--serif-mix);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--night);
  margin-bottom: 10px;
}

.hero-tenets h3::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--azure-soft);
  margin-bottom: 14px;
}

.hero-tenets p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ── Sections ───────────────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 110px 24px 0;
}

.section-head { margin-bottom: 48px; }

.section-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--azure-soft);
  border-radius: 50%;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--azure-soft);
  margin-bottom: 20px;
}

.section-head h2 {
  font-family: var(--serif-mix);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--night);
}

.section-lead {
  margin-top: 14px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.9;
  max-width: 46em;
}

/* ── Features ───────────────────────────────────────────── */
.feature-group {
  font-family: var(--serif-mix);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--night);
  margin: 56px 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-group:first-of-type { margin-top: 0; }

.feature-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 44px;
}

.feature {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.feature-no {
  font-family: var(--serif-en);
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.1em;
  color: var(--azure-soft);
}

.feature h3 {
  font-family: var(--serif-mix);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--night);
  margin: 10px 0 12px;
}

.feature p {
  font-size: 0.89rem;
  color: var(--ink-soft);
  line-height: 1.9;
}

/* ── Architecture ───────────────────────────────────────── */
.arch {
  display: flex;
  align-items: stretch;
}

.arch-node {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fbfdfe;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 8px 8px 0 rgba(10, 61, 118, 0.05);
}

.arch-node h4 {
  font-family: var(--serif-mix);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--night);
  margin-bottom: 8px;
}

.arch-node p {
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.7;
}

.arch-node-server {
  border-color: rgba(10, 93, 200, 0.45);
  background: rgba(10, 130, 207, 0.045);
}

.arch-node-server h4 { color: var(--azure); }

.arch-link {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  width: 116px;
}

.arch-link-label {
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 10px;
}

.arch-arrow {
  position: relative;
  width: 100%;
  height: 1px;
  background: rgba(10, 93, 200, 0.5);
}

.arch-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(10, 93, 200, 0.7);
  border-right: 1px solid rgba(10, 93, 200, 0.7);
  transform: rotate(45deg);
}

.arch-arrow-both::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-bottom: 1px solid rgba(10, 93, 200, 0.7);
  border-left: 1px solid rgba(10, 93, 200, 0.7);
  transform: rotate(45deg);
}

/* ── Deployment ─────────────────────────────────────────── */
.deployment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
}

.deployment-col { min-width: 0; }

.deployment-col h3 {
  font-family: var(--serif-mix);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--night);
  margin-bottom: 18px;
}

.deployment-col h3::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--azure-soft);
  margin-bottom: 14px;
}

.deployment-copy {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.9;
}

.security-col code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(10, 93, 200, 0.07);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--ink-soft);
}

/* ── Pull quote ─────────────────────────────────────────── */
.quote-section { max-width: 820px; }

.pull-quote {
  position: relative;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.pull-quote::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--azure-soft);
}

.pull-quote p {
  font-family: var(--serif-mix);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ── Security ───────────────────────────────────────────── */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 64px;
}

.security-col ul { display: grid; gap: 14px; }

.security-col li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.9;
}

.security-col li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: rgba(10, 130, 207, 0.55);
}

.security-note {
  margin-top: 36px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ── Status ─────────────────────────────────────────────── */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}

.status-col h3 {
  font-family: var(--serif-mix);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--night);
  margin-bottom: 18px;
}

.status-col h3::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--azure-soft);
  margin-bottom: 14px;
}

.status-col ul { display: grid; gap: 12px; }

.status-col li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

.status-col li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: rgba(10, 130, 207, 0.55);
}

.status-note {
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--ink-faint);
  line-height: 1.9;
}

/* ── Origin band ────────────────────────────────────────── */
.origin-band {
  max-width: 820px;
  text-align: center;
}

.origin-line {
  font-family: var(--serif-en);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: 0.04em;
  color: var(--night);
}

.origin-line em { font-style: italic; }

.origin-line span {
  color: var(--ink-faint);
  font-size: 0.8em;
}

.origin-sub {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ── Download band ──────────────────────────────────────── */
.download-band {
  margin-top: 120px;
  background: var(--night);
  color: #dbe7f1;
}

.download-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 76px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 56px;
}

.section-no-light {
  border-color: rgba(57, 197, 236, 0.6);
  color: var(--crest);
}

.download-info h2 {
  font-family: var(--serif-mix);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: #eef4f9;
  margin-bottom: 16px;
}

.download-info p {
  font-size: 0.92rem;
  color: rgba(219, 231, 241, 0.72);
  line-height: 2;
  max-width: 30em;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  flex-shrink: 0;
  min-width: 240px;
  padding-top: 60px;
}

.download-note {
  font-size: 0.8rem;
  color: rgba(219, 231, 241, 0.45);
  text-align: right;
}

.download-note a {
  color: rgba(219, 231, 241, 0.7);
  border-bottom: 1px solid rgba(219, 231, 241, 0.3);
}
.download-note a:hover { color: #eef4f9; border-color: #eef4f9; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--night);
  border-top: 1px solid rgba(219, 231, 241, 0.1);
  padding: 36px 24px 30px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 16px; }

.footer-brand img { height: 26px; width: auto; opacity: 0.92; }

.footer-meta {
  font-size: 0.78rem;
  color: rgba(219, 231, 241, 0.45);
  letter-spacing: 0.04em;
}

.footer-links { display: flex; gap: 24px; font-size: 0.85rem; }

.footer-links a {
  color: rgba(219, 231, 241, 0.55);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.footer-links a:hover {
  color: #eef4f9;
  border-color: rgba(57, 197, 236, 0.7);
}

.footer-copy {
  max-width: var(--max-w);
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(219, 231, 241, 0.08);
  font-size: 0.78rem;
  color: rgba(219, 231, 241, 0.3);
  letter-spacing: 0.04em;
}

.footer-copy em { font-family: var(--serif-en); }

/* ── English typography ─────────────────────────────────────
   宽字距是为中文标题的疏朗感设的，拉丁字母下要收回来。
   ───────────────────────────────────────────────────────── */
/* 英文标题较长，放宽文本列，让人工断行落在该落的地方 */
html:lang(en) .hero-copy { max-width: 760px; }

html:lang(en) .hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.95rem);
  line-height: 1.28;
  letter-spacing: 0;
}

html:lang(en) .section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: 0;
}

html:lang(en) .hero-tenets h3 { letter-spacing: 0.02em; }
html:lang(en) .feature-group { letter-spacing: 0.04em; }
html:lang(en) .feature h3,
html:lang(en) .deployment-col h3,
html:lang(en) .status-col h3 { letter-spacing: 0; font-size: 1.12rem; }
html:lang(en) .arch-node h4 { letter-spacing: 0; font-size: 1rem; }
html:lang(en) .download-info h2 { letter-spacing: 0.01em; font-size: 1.85rem; }
html:lang(en) .pull-quote p { letter-spacing: 0; line-height: 1.8; }
html:lang(en) .footer-meta { letter-spacing: 0.02em; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-mark { width: 280px; right: 16px; opacity: 0.05; }
  .deployment-grid { grid-template-columns: 1fr; }

  .arch { flex-direction: column; align-items: stretch; }
  .arch-node { box-shadow: 6px 6px 0 rgba(10, 61, 118, 0.05); }
  .arch-link { width: auto; padding: 14px 0; flex-direction: row; gap: 14px; }
  .arch-link-label { margin-bottom: 0; order: 2; text-align: left; }
  .arch-arrow { width: 1px; height: 40px; flex: 0 0 auto; order: 1; margin-left: 48px; }
  .arch-arrow::after {
    right: auto;
    left: -3.5px;
    top: auto;
    bottom: 0;
    transform: rotate(135deg);
  }
  .arch-arrow-both::before {
    left: -3.5px;
    top: 0;
    transform: rotate(135deg);
  }
}

@media (max-width: 760px) {
  .hero { padding-top: 64px; }
  .hero-tenets { grid-template-columns: 1fr; gap: 28px; }

  .security-grid { grid-template-columns: 1fr; gap: 14px; }
  .status-grid { grid-template-columns: 1fr; }

  .download-inner {
    flex-direction: column;
    gap: 36px;
    padding: 56px 24px;
  }
  .download-actions { padding-top: 0; align-items: flex-start; min-width: 0; width: 100%; max-width: 320px; }
  .download-actions .btn { width: 100%; }
  .download-note { text-align: left; }
}

@media (max-width: 640px) {
  /* 窄屏交给自动换行，人工断行只在宽屏生效 */
  .br-wide { display: none; }

  /* 只收起章节锚点，语言切换保留 */
  .site-nav > a:not(.nav-github) { display: none; }

  .section { padding-top: 80px; }
  .download-band { margin-top: 90px; }

  .feature-grid { grid-template-columns: 1fr; gap: 36px; }

  .hero-actions .btn { flex: 1 1 100%; }

  .hero-mark { display: none; }
}
