/* =============================================================
   KIDI 站点设计系统（共享壳）
   [INPUT]: 无外部依赖；字体由页面 head 的 Google Fonts 提供
   [OUTPUT]: 提供 :root 令牌与 .site-nav / .mobile-nav-* / .lang-* / .site-footer-* 样式
   [POS]: 全部营销页的共享壳样式；landing.css 在其后加载并消费令牌
   [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
   ============================================================= */

:root {
  --paper: #ffffff;
  --paper-2: #f2f1ee;
  --paper-3: #e6e3dd;
  --ink: #171512;
  --ink-2: #57524b;
  --muted: #6b655d;
  --bronze: #7a5a42;
  --bronze-2: #8a654d;
  --bronze-3: #c9a988;
  --stage: #221912;
  --ui-line: rgba(23, 21, 18, 0.14);
  --online: #35703f;

  --max: 1224px;
  --pad: clamp(20px, 4vw, 40px);
  --radius: 0;

  --s-display: clamp(2.75rem, 5.6vw, 5.25rem);
  --s-h2: clamp(1.75rem, 3vw, 3rem);
  --s-h3: 1.5rem;
  --s-lead: clamp(1.125rem, 1.4vw, 1.3125rem);
  --s-body: 1.0625rem;
  --s-small: 0.875rem;
  --s-micro: 0.8125rem;

  --font: "Bricolage Grotesque", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 12px; opacity: 1; pointer-events: auto; }

/* =============================================================
   共享导航：墨色平条，无边框、无模糊、无胶囊
   ============================================================= */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--ink);
  color: #f4f0e7;
}
.site-nav-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f7f3ea;
  font-family: var(--font);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-wordmark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.site-nav-links {
  display: none;
  align-items: center;
  gap: 30px;
}
.site-nav-link {
  color: #cfc8bc;
  text-decoration: none;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1;
  padding-block: 8px;
  transition: color 0.15s ease;
}
.site-nav-link:hover { color: #ffffff; }
.site-nav-link.is-active { color: var(--bronze-3); }
.site-nav a:focus-visible,
.site-nav button:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--bronze-3);
  outline-offset: 3px;
}
.site-nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--bronze);
  color: #ffffff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}
.site-nav-action:hover { background: var(--bronze-2); }

/* 语言切换（桌面悬停） */
.lang-switcher { position: relative; display: inline-block; font-family: var(--font); }
.lang-btn {
  background: none;
  border: 1px solid rgba(244, 240, 231, 0.28);
  border-radius: 2px;
  padding: 8px 12px;
  min-height: 40px;
  cursor: pointer;
  color: #ded7ca;
  font: inherit;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.lang-btn:hover { color: #fff; border-color: rgba(244, 240, 231, 0.55); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-dropdown {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18); /* taste-skill-ignore: overlay menu */
  overflow: hidden;
  z-index: 100;
  min-width: 148px;
}
.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown { display: block; }
.lang-switcher.just-selected .lang-dropdown { display: none; }
.lang-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: start;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
}
.lang-option:hover { background: var(--paper-2); }

/* 机器人下拉 */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown > .nav-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown > .nav-trigger .nav-caret { width: 11px; height: 11px; transition: transform 0.15s; }
.nav-dropdown:hover > .nav-trigger .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 208px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18); /* taste-skill-ignore: overlay menu */
  padding: 6px 0;
  margin-top: 8px;
  z-index: 200;
  visibility: hidden;
  transition: transform 0.15s ease, visibility 0s linear 0.3s;
}
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: transform 0.15s ease, visibility 0s linear 0s;
}
.nav-dropdown-menu a {
  display: block;
  padding: 11px 18px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  text-align: start;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover { background: var(--paper-2); color: var(--bronze); }
.nav-dropdown-menu a:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.nav-dropdown-menu a.active { color: var(--bronze); font-weight: 600; }

/* 移动端菜单 */
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid rgba(244, 240, 231, 0.3);
  border-radius: 2px;
  color: inherit;
  cursor: pointer;
}
.mobile-nav-toggle:hover { background: rgba(255, 255, 255, 0.06); }
.mobile-nav-toggle svg { width: 22px; height: 22px; }
.mobile-nav-toggle .mobile-nav-icon-close { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon-open { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon-close { display: inline-block; }

.mobile-nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ink);
  color: #f4f0e7;
  padding: 8px var(--pad) 20px;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  z-index: 199;
}
.mobile-nav-panel.open { display: block; }
.mobile-nav-link,
.mobile-nav-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 14px 2px;
  font-family: var(--font);
  font-size: 17px;
  color: #ded7ca;
  border: none;
  background: none;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.mobile-nav-link:hover,
.mobile-nav-group-trigger:hover { color: #fff; }
.mobile-nav-group-trigger .nav-caret { width: 14px; height: 14px; transition: transform 0.2s; }
.mobile-nav-group.open .mobile-nav-group-trigger .nav-caret { transform: rotate(180deg); }
.mobile-nav-sub { display: none; padding: 2px 0 10px 14px; }
.mobile-nav-group.open .mobile-nav-sub { display: block; }
.mobile-nav-sub a {
  display: block;
  padding: 11px 10px;
  font-family: var(--font);
  font-size: 14px;
  color: #b8b0a3;
  text-decoration: none;
}
.mobile-nav-sub a:hover { color: #fff; }
.mobile-nav-panel .lang-switcher {
  margin-top: 14px;
  padding-top: 14px;
  display: block;
}
.mobile-nav-panel .lang-btn { width: 100%; justify-content: center; }
.mobile-nav-panel .lang-dropdown { position: static; margin-top: 8px; box-shadow: none; /* taste-skill-ignore: overlay menu */ }
.mobile-nav-panel .lang-switcher.open .lang-dropdown { display: block; }
.mobile-nav-login {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  min-height: 48px;
  background: var(--bronze);
  color: #fff;
  font-family: var(--font);
  font-size: 17px;
  text-decoration: none;
}
.mobile-nav-login:hover { background: var(--bronze-2); }

@media (min-width: 900px) {
  .site-nav-links { display: flex; }
  .mobile-nav-toggle { display: none; }
  .mobile-nav-panel { display: none !important; }
}

/* =============================================================
   共享页脚：墨色收束，大字标、土星底、代理二维码
   ============================================================= */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #efeae1;
}
.site-footer-art {
  position: absolute;
  inset: -2%;
  background: url("./images/footer-bg.jpg") center / cover no-repeat;
  opacity: 0.42;
  transform: scale(1.06);
  animation: saturn-drift 42s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes saturn-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.6%, 1%, 0); }
}
.site-footer-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin-inline: auto;
  padding: 80px var(--pad) 36px;
}
.site-footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 56px;
}
.site-footer-brand { display: flex; align-items: flex-start; gap: 18px; }
.site-footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: none;
}
.site-footer-name {
  margin: 0 0 10px;
  font-family: var(--font);
  font-size: 21px;
  font-weight: 600;
  color: #f7f3ea;
}
.site-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: #b8b0a3;
}
.site-footer-links a { color: #b8b0a3; text-decoration: none; }
.site-footer-links a:hover { color: #fff; }
.site-footer-qr { text-align: center; }
.site-footer-qr .qr-box { width: 116px; height: 116px; background: #fff; padding: 6px; }
.site-footer-qr .qr-box img { width: 100%; height: 100%; display: block; }
.site-footer-qr p {
  margin: 10px 0 0;
  font-family: var(--font);
  font-size: var(--s-micro);
  color: #b8b0a3;
}
.site-footer-mark {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(5.5rem, 22vw, 19rem);
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-weight: 600;
  color: #f7f3ea;
  user-select: none;
}
.site-footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: var(--s-micro);
  color: #9c9488;
}
.site-footer-legal a { color: #9c9488; text-decoration: none; }
.site-footer-legal a:hover { color: #fff; }
.site-footer-legal nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* =============================================================
   共享壳窄屏规则（首页区块的窄屏规则在 landing.css）
   ============================================================= */
@media (max-width: 640px) {
  .site-footer-top { grid-template-columns: 1fr; gap: 32px; }
  .site-footer-qr { text-align: start; }
  .site-footer-mark { font-size: clamp(4.5rem, 26vw, 9rem); }
  .site-footer-legal { flex-direction: column; align-items: flex-start; }
}
