/* 几道官网 · 共享样式（首页 + 子页） */

:root {
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --accent: #3049c8;
  --accent-soft: rgba(48, 73, 200, 0.08);
  --dark: #111113;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 54px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 19px; letter-spacing: 0.04em; }
.brand .en { font-size: 11px; letter-spacing: 0.28em; color: var(--muted); font-weight: 500; }
.nav .links { display: flex; gap: 24px; margin-left: auto; font-size: 13px; color: var(--muted); }
.nav .links a { transition: color 0.2s ease; }
.nav .links a:hover, .nav .links a[aria-current="page"] { color: var(--fg); }
.nav .actions { display: flex; gap: 10px; align-items: center; }
.nav .actions .btn { padding: 7px 16px; font-size: 13px; }
@media (max-width: 860px) { .nav .links { display: none; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; border-radius: 980px; padding: 13px 26px; font-size: 16px;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-dark { background: var(--fg); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-light { background: #fff; color: var(--fg); }
.btn-light:hover { transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); }
.btn-outline-light:hover { border-color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 区块通用 ---------- */
section.block { padding: 112px 24px; }
.sec-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--fg); margin: 0 0 14px; }
.sec-title {
  font-size: clamp(28px, 3.6vw, 46px); line-height: 1.12; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 14px;
}

/* ---------- 区块1｜Hero 全屏氛围大图 ---------- */
.hero { position: relative; isolation: isolate; min-height: 92vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.6) 52%, rgba(0, 0, 0, 0.76) 100%);
}
.hero .inner { max-width: var(--max); margin: 0 auto; padding: 128px 24px; width: 100%; }
.hero h1 {
  font-size: clamp(32px, 5vw, 60px); line-height: 1.12; letter-spacing: -0.025em;
  font-weight: 700; margin: 0 0 22px; max-width: 19ch;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 18px rgba(0, 0, 0, 0.4);
}
.hero .lead {
  font-size: clamp(17px, 2vw, 21px); line-height: 1.6; color: rgba(255, 255, 255, 0.9);
  max-width: 40ch; margin: 0 0 34px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
@media (max-width: 820px) { .hero { min-height: 88vh; } .hero .inner { padding: 96px 24px; } }

/* ---------- 左图右文 / 左文右图 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split.reverse .split-copy { order: 1; }
.split-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}
.split-copy h2 {
  font-size: clamp(26px, 3vw, 40px); line-height: 1.16; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 20px;
}
.split-copy p { font-size: 17px; line-height: 1.68; color: var(--muted); margin: 0 0 18px; }
.split-copy p.note { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split .split-media { order: -1; }
  .split.reverse .split-media { order: -1; }
  .split.reverse .split-copy { order: 0; }
  .split .p-extra { display: none; }
}

/* ---------- 区块6｜通栏图文 ---------- */
.band-wide { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.band-wide .bw-bg { position: absolute; inset: 0; z-index: -2; }
.band-wide .bw-bg img { width: 100%; height: 100%; object-fit: cover; }
.band-wide .bw-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.62) 55%, rgba(0, 0, 0, 0.72) 100%);
}
.band-wide .inner { max-width: var(--max); margin: 0 auto; padding: 120px 24px; }
.band-wide h2 {
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.16; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 22px; max-width: 16ch;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.band-wide p {
  font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, 0.88);
  max-width: 46ch; margin: 0 0 16px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
@media (max-width: 820px) { .band-wide .inner { padding: 88px 24px; } .band-wide .p-extra { display: none; } }

/* ---------- 区块6.5｜不只是给程序员 ---------- */
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
@media (max-width: 820px) { .points { grid-template-columns: 1fr; gap: 28px; } }
.point h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 12px; }
.point p { font-size: 17px; line-height: 1.72; color: var(--muted); margin: 0; }
.example { margin: 48px 0 0; background: var(--bg-alt); border-radius: var(--radius-lg); padding: 40px 44px; }
.example blockquote { margin: 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.62; letter-spacing: -0.01em; font-weight: 500; color: var(--fg); max-width: 62ch; }
@media (max-width: 820px) { .example { padding: 30px 28px; margin-top: 32px; } }

/* ---------- 区块7｜理念总结 ---------- */
.philosophy { position: relative; background: var(--bg-alt); overflow: hidden; }
.philosophy .ph-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.06; }
.philosophy .ph-bg img { width: 100%; height: 100%; object-fit: cover; }
.philosophy .inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; text-align: center; }
.philosophy h2 {
  font-size: clamp(28px, 3.8vw, 46px); line-height: 1.18; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 26px;
}
.philosophy p { font-size: 17px; line-height: 1.8; color: var(--muted); margin: 0 0 18px; }

/* ---------- 区块8｜底部 CTA（深色） ---------- */
.cta-dark { position: relative; isolation: isolate; background: var(--dark); color: #fff; overflow: hidden; text-align: center; }
.cta-dark .cta-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.16; }
.cta-dark .cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-dark .cta-scrim { position: absolute; inset: 0; z-index: 0; background: radial-gradient(70% 120% at 50% 0%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.75)); }
.cta-dark .inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.cta-dark h2 {
  font-size: clamp(28px, 3.8vw, 46px); line-height: 1.18; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 18px;
}
.cta-dark p { font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, 0.82); margin: 0 0 34px; }
.cta-dark .btn-row { justify-content: center; }

/* ---------- 注册（保留既有功能） ---------- */
.register .reg-inner { max-width: 460px; margin: 0 auto; }
.form {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 34px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}
.form label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 16px 0 7px; }
.form label:first-of-type { margin-top: 0; }
.form input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; font-size: 16px; color: var(--fg); background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input::placeholder { color: #6e6e73; }
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form button {
  width: 100%; margin-top: 24px; border: 0; border-radius: 980px;
  padding: 14px; font-size: 16px; font-weight: 600; font-family: inherit;
  background: var(--fg); color: #fff; cursor: pointer;
  transition: opacity 0.2s ease, transform 0.18s ease;
}
.form button:hover:not(:disabled) { transform: translateY(-1px); opacity: 0.92; }
.form button:disabled { opacity: 0.4; cursor: default; }
.msg { margin-top: 14px; font-size: 14px; min-height: 20px; text-align: center; }
.msg.ok { color: #0a7a3d; }
.msg.err { color: #d70015; }
.form .hint { color: var(--muted); font-size: 13px; margin-top: 16px; text-align: center; }
.form .hint a { color: var(--accent); font-weight: 500; }
.success-ico { width: 44px; height: 44px; color: #0a7a3d; margin: 0 auto 14px; display: block; }

/* ---------- 手机端提示 ---------- */
.mobile-tip {
  display: flex; align-items: center; gap: 18px;
  max-width: 720px; margin: 0 auto; background: var(--bg-alt);
  border-radius: var(--radius-lg); padding: 22px 26px;
}
.mobile-tip .mt-ico { color: var(--fg); width: 30px; height: 30px; flex: none; }
.mobile-tip .mt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mobile-tip .mt-text b { font-size: 16px; font-weight: 600; }
.mobile-tip .mt-text span { font-size: 13px; color: var(--muted); }
.mobile-tip .btn { flex: none; padding: 10px 20px; font-size: 14px; }

/* ---------- 页脚 ---------- */
footer { background: var(--bg-alt); border-top: 1px solid var(--line-soft); }
footer .inner {
  max-width: var(--max); margin: 0 auto; padding: 44px 24px 34px;
  color: var(--muted); font-size: 13px;
}
footer .top { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .flinks { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
footer a:hover { color: var(--fg); }
footer .slogan { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--fg); font-size: 14px; font-weight: 600; }

/* ---------- 子页 ---------- */
.subpage-head { padding: 96px 24px 24px; }
.subpage-head .sec-eyebrow { color: var(--accent); }
.subpage-head h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 16px; }
.subpage-head .lead { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 62ch; margin: 0; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--muted); margin: 0 0 16px; }
.prose .note { font-size: 15px; }
.placeholder-card {
  background: var(--bg-alt); border-radius: var(--radius-lg);
  padding: 44px 40px; text-align: center; max-width: 560px;
}
.placeholder-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.placeholder-card p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }

/* ---------- 案例故事 ---------- */
.stories { display: grid; gap: 24px; max-width: 860px; }
.story { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 42px 44px; }
.story .who { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent); margin: 0 0 14px; }
.story blockquote { margin: 0; font-size: clamp(17px, 1.9vw, 21px); line-height: 1.66; letter-spacing: -0.01em; color: var(--fg); }
@media (max-width: 820px) { .story { padding: 28px 26px; } }

/* ---------- 首页案例预告 ---------- */
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
@media (max-width: 860px) { .teaser-grid { grid-template-columns: 1fr; } }
.tease { background: var(--bg-alt); border-radius: var(--radius-md); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.tease .who { font-size: 13px; font-weight: 600; color: var(--accent); margin: 0; }
.tease p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--fg); }
.teaser-more { margin-top: 34px; }

/* ---------- 入场动效 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.14s; }
.d3 { animation-delay: 0.23s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
