/* ============================================================
   MUNDARA · 创界 官网共享样式
   首页于子页面共用；导航/页脚/设计令牌集中在此
   ============================================================ */

/* ===== Fonts ===== */
@font-face {
  font-family: 'Tektur';
  src: url('../_shared/fonts/Tektur-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Tektur';
  src: url('../_shared/fonts/Tektur-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'GeistMono';
  src: url('../_shared/fonts/GeistMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ===== Design Tokens ===== */
:root {
  --bg: #070A14;
  --bg2: #0E1322;
  --bg3: #151C30;
  --ink: #E8ECF8;
  --muted: #98A2C0;
  --rule: rgba(232, 236, 248, 0.12);
  --accent: #6C8CFF;
  --accent2: #22D3EE;
  --accent-soft: rgba(108, 140, 255, 0.12);
  --accent2-soft: rgba(34, 211, 238, 0.12);
  --grad: linear-gradient(135deg, #6C8CFF, #22D3EE);
  --on-accent: #FFFFFF;
  --font-display: 'Tektur', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'GeistMono', 'JetBrains Mono', Consolas, monospace;
  --radius: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient glows */
body::before, body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
body::before {
  width: 640px; height: 640px;
  top: -220px; right: -160px;
  background: rgba(108, 140, 255, 0.16);
}
body::after {
  width: 560px; height: 560px;
  bottom: -200px; left: -160px;
  background: rgba(34, 211, 238, 0.10);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(108, 140, 255, 0.35); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(7, 10, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; letter-spacing: 0.06em; color: var(--ink);
}
.logo .logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--on-accent);
}
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); position: relative; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; border-radius: 2px; background: var(--grad);
}
.nav-cta {
  padding: 8px 16px; border-radius: 8px;
  background: var(--grad); color: var(--on-accent);
  font-weight: 600; box-shadow: 0 0 18px rgba(108, 140, 255, 0.35);
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule);
  color: var(--ink); border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font-size: 16px; line-height: 1;
}

/* ===== Hero (首页) ===== */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex; align-items: center;
  padding: 140px 0 100px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image: url('../assets/hero_2560x1440.jpg');
  background-size: cover; background-position: center 30%;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 20, 0.94) 0%, rgba(7, 10, 20, 0.72) 48%, rgba(7, 10, 20, 0.35) 100%),
    linear-gradient(180deg, rgba(7, 10, 20, 0.6) 0%, rgba(7, 10, 20, 0) 30%, rgba(7, 10, 20, 0) 70%, var(--bg) 100%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.22em;
  color: var(--accent2); text-transform: uppercase;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: var(--accent2-soft);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 58px);
  line-height: 1.22; font-weight: 700; letter-spacing: 0.01em;
  max-width: 780px; margin-bottom: 22px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-lead {
  max-width: 640px; font-size: 17px; color: var(--muted); margin-bottom: 38px;
}
.hero-lead strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px;
  font-size: 15.5px; font-weight: 600; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--grad); color: var(--on-accent);
  box-shadow: 0 0 26px rgba(108, 140, 255, 0.4);
}
.btn-ghost {
  border: 1px solid var(--rule); color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: var(--accent); }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-pills span {
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 6px 14px; background: rgba(14, 19, 34, 0.6);
}
.hero-pills b { color: var(--accent2); font-weight: 600; }

/* ===== Page Hero (子页面顶部) ===== */
.page-hero {
  padding: 148px 0 56px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.page-hero .crumb {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 16px;
}
.page-hero .crumb a { color: var(--muted); }
.page-hero .crumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  letter-spacing: 0.01em; margin-bottom: 16px; line-height: 1.25;
}
.page-hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-hero p {
  max-width: 720px; color: var(--muted); font-size: 16.5px;
}

/* ===== Sections ===== */
section { padding: 96px 0; }
.sec-head { margin-bottom: 52px; max-width: 760px; }
.sec-num {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.28em;
  color: var(--accent); display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.sec-num::after { content: ''; width: 52px; height: 1px; background: var(--rule); }
.sec-head h2 {
  font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; line-height: 1.3;
  margin-bottom: 14px; letter-spacing: 0.01em;
}
.sec-head p { color: var(--muted); font-size: 16.5px; }

h3.card-title { font-size: 19px; font-weight: 600; margin-bottom: 8px; }

.lead-panel {
  max-width: 820px; font-size: 17.5px; line-height: 2;
}
.lead-panel strong { color: var(--ink); font-weight: 600; }

/* cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(108, 140, 255, 0.55); transform: translateY(-3px); }
.card .ico {
  width: 42px; height: 42px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 18px;
}
.ico-brand { background: var(--accent-soft); color: var(--accent); }
.ico-cyan { background: var(--accent2-soft); color: var(--accent2); }
.card p { color: var(--muted); font-size: 14.5px; }

/* ===== 首页板块导航入口 ===== */
.home-nav { padding: 96px 0; }
.home-nav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.home-card {
  position: relative;
  display: block;
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 30px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.home-card:hover { text-decoration: none; border-color: rgba(108, 140, 255, 0.55); transform: translateY(-3px); }
.home-card .num {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.24em;
  color: var(--accent); margin-bottom: 18px; display: block;
}
.home-card .ico {
  width: 46px; height: 46px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}
.home-card h3 { font-size: 21px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.home-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.home-card .more {
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.home-card .more::after { content: '→'; transition: transform 0.2s; }
.home-card:hover .more::after { transform: translateX(4px); }

/* ===== Architecture ===== */
.arch-note {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 28px;
}
.arch-note .item {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 22px;
}
.arch-note .item b { display: block; font-size: 15px; margin-bottom: 6px; }
.arch-note .item span { color: var(--muted); font-size: 13.5px; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.svc {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 14px 16px;
}
.svc code {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent2);
  white-space: nowrap; padding-top: 3px;
}
.svc div b { display: block; font-size: 14px; font-weight: 600; }
.svc div span { font-size: 13px; color: var(--muted); }

/* ===== Ecosystem ===== */
.quote {
  margin-top: 40px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 22px 28px; border-radius: 0 12px 12px 0;
  font-size: 17px; font-weight: 600; color: var(--ink);
}
.quote small { display: block; margin-top: 6px; font-weight: 400; color: var(--muted); font-size: 13.5px; }

/* ===== Quick start ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step {
  position: relative; background: var(--bg2);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px 22px;
}
.step .n {
  font-family: var(--font-display); font-size: 34px; font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  line-height: 1; margin-bottom: 12px;
}
.step b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.step span { font-size: 13.5px; color: var(--muted); }
.step .tag {
  display: inline-block; margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  border: 1px solid rgba(108, 140, 255, 0.4); border-radius: 6px; padding: 3px 8px;
}
.doc-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.doc-links a {
  font-size: 14px; padding: 9px 16px; border: 1px dashed rgba(108, 140, 255, 0.45);
  border-radius: 8px; color: var(--accent);
}
.doc-links a:hover { background: var(--accent-soft); text-decoration: none; }

/* ===== Community ===== */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.platform {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px; transition: border-color 0.2s;
}
.platform:hover { border-color: rgba(108, 140, 255, 0.55); }
.platform b { display: block; font-size: 17px; margin-bottom: 4px; }
.platform .role {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--accent2); border: 1px solid rgba(34, 211, 238, 0.4);
  background: var(--accent2-soft); border-radius: 999px; padding: 2px 10px;
  margin-bottom: 12px;
}
.platform p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.platform a { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }

.contribute { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.contribute .c {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: 10px;
  padding: 18px 20px; font-size: 14.5px;
}
.contribute .c b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.contribute .c span { color: var(--muted); font-size: 13.5px; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--rule);
  padding: 44px 0 40px; margin-top: 40px;
}
.foot-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13.5px;
}
.foot-inner .brand { font-family: var(--font-display); letter-spacing: 0.08em; color: var(--ink); }
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--ink); }
.foot-icp {
  max-width: 1080px; margin: 20px auto 0; padding: 14px 24px 0;
  text-align: center; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.foot-icp a { color: var(--muted); text-decoration: none; }
.foot-icp a:hover { color: var(--ink); }

/* figures */
figure.diagram { margin: 34px 0 6px; text-align: center; }
figure.diagram .mermaid { background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 12px; }
figure.diagram figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid-3, .arch-note, .svc-grid, .steps, .platforms, .contribute { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 10, 20, 0.97); border-bottom: 1px solid var(--rule);
    padding: 8px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--rule); }
  .nav-links a { display: block; padding: 13px 4px; }
  .nav-links .nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .arch-note, .svc-grid, .platforms, .contribute { grid-template-columns: 1fr; }
  .home-nav-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .page-hero { padding-top: 128px; }
  section { padding: 72px 0; }
  body { font-size: 15px; }
  .container, .nav-inner, .foot-inner { padding-left: 18px; padding-right: 18px; }
}

/* ===== Active nav (mobile) ===== */
.nav-links a.active { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}

/* ===== Print ===== */
@media print {
  :root {
    --bg: #FFFFFF;
    --bg2: #F4F5F9;
    --ink: #111111;
    --muted: #444444;
    --rule: #DDDDDD;
  }
  .nav, .hero-bg, .nav-toggle { display: none !important; }
  body { background: var(--bg); color: var(--ink); }
  section { padding: 40px 0; }
}