/* Mujica Guide Unit v5 — Obsidian / Pearl / Prism
   Shared foundation. No external fonts or dependencies. */
:root {
  --ink: #080a10;
  --ink-soft: #11151e;
  --ink-raised: #181d28;
  --pearl: #eef0f4;
  --pearl-deep: #e2e5eb;
  --surface: #f8f9fb;
  --text: #151923;
  --text-soft: #5f6878;
  --text-faint: #8a92a1;
  --on-dark: #f5f6f8;
  --on-dark-soft: #abb2c0;
  --violet: #8d68ff;
  --violet-light: #c2b2ff;
  --cyan: #75e6ef;
  --gold: #f6cf65;
  --coral: #ff7568;
  --line: rgba(19, 25, 38, .14);
  --line-strong: rgba(19, 25, 38, .28);
  --line-dark: rgba(255, 255, 255, .15);
  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --container: 1320px;
  --header-h: 78px;
  --ease: cubic-bezier(.22, .75, .22, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background: var(--pearl);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
::selection { color: #090b12; background: var(--cyan); }

.container {
  width: min(var(--container), calc(100% - 80px));
  margin-inline: auto;
}
.section { padding: clamp(84px, 9vw, 136px) 0; }
.section-heading { max-width: 760px; }
.section-heading.center { margin-inline: auto; text-align: center; }
.section-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .18em;
}
.section-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 62px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.section-desc {
  max-width: 650px;
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.95;
}
.on-dark .section-kicker, .dark-section .section-kicker { color: var(--on-dark-soft); }
.on-dark .section-desc, .dark-section .section-desc { color: var(--on-dark-soft); }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  color: var(--on-dark);
  background: rgba(8, 10, 16, .82);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}
.nav-container {
  width: min(var(--container), calc(100% - 64px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: cover;
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
  border: 1px solid rgba(255, 255, 255, .24);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 17px; letter-spacing: .025em; }
.brand-edition {
  margin-top: 5px;
  color: var(--violet-light);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .24em;
}
.nav-links { display: flex; align-items: stretch; gap: 4px; margin-left: auto; height: 100%; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--on-dark-soft);
  font-size: 14px;
  letter-spacing: .08em;
  transition: color .25s ease, background .25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .035); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: #fff; }
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-dark);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  margin: 6px auto;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons and links */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  padding: 0 26px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .05em;
  line-height: 1.3;
  cursor: pointer;
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -100%;
  bottom: -100%;
  left: -55%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: rotate(18deg);
  transition: left .7s var(--ease-out);
}
.btn:hover::before { left: 125%; }
.btn-primary { color: #11131a; background: var(--gold); border-color: var(--gold); }
.btn-primary:hover { background: #ffe08b; border-color: #ffe08b; }
.btn-secondary { color: var(--on-dark); background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .32); }
.btn-secondary:hover { background: rgba(255, 255, 255, .1); border-color: var(--cyan); }
.btn-dark { color: var(--on-dark); background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: #242a38; }
.btn .arr { font-family: var(--font-mono); font-size: 17px; transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .04em;
}
.text-link span:last-child { transition: transform .3s var(--ease); }
.text-link:hover span:last-child { transform: translateX(5px); }

/* Interior page masthead */
.page-masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(62px, 7vw, 100px)) 0 clamp(64px, 7vw, 96px);
  color: var(--on-dark);
  background: var(--ink);
}
.page-masthead::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -40%;
  background:
    radial-gradient(ellipse at 26% 46%, rgba(141, 104, 255, .26), transparent 28%),
    radial-gradient(ellipse at 74% 36%, rgba(117, 230, 239, .12), transparent 25%);
  filter: blur(28px);
  animation: masthead-drift 12s ease-in-out infinite alternate;
}
.page-masthead::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8vw;
  bottom: -34%;
  width: 58vw;
  height: 70%;
  border-top: 1px solid rgba(117, 230, 239, .22);
  background: linear-gradient(115deg, transparent 15%, rgba(141, 104, 255, .08), transparent 70%);
  transform: skewX(-24deg);
}
@keyframes masthead-drift { to { transform: translate3d(5%, 3%, 0) rotate(4deg); } }
.masthead-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 80px; align-items: end; }
.page-index {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--violet-light);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .18em;
}
.page-index::before { content: ""; width: 30px; height: 1px; background: currentColor; }
.page-title {
  max-width: 840px;
  font-family: var(--font-display);
  font-size: clamp(52px, 7.5vw, 102px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.055em;
}
.page-title em { color: var(--gold); font-weight: 400; }
.page-lead { max-width: 510px; color: var(--on-dark-soft); font-size: 16px; line-height: 2; }
.page-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
  color: #d9dde6;
  font-size: 12px;
  letter-spacing: .06em;
}

/* Procedural 3D mastheads — no stretched image panels, no input interception. */
.page-masthead .masthead-grid { position: relative; z-index: 2; }
.page-masthead .page-lead, .page-masthead .page-note, .page-masthead .page-title { text-shadow: 0 2px 22px rgba(0,0,0,.72); }
.masthead-canvas {
  position: absolute;
  z-index: 1;
  top: 0;
  right: -4%;
  width: 66%;
  height: 100%;
  opacity: .82;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 24%, #000 78%, transparent);
}

/* Loading / empty / error */
.state-box {
  grid-column: 1 / -1;
  width: 100%;
  padding: 64px 24px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  text-align: center;
}
.state-box h3 { margin-bottom: 8px; color: var(--text); font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.state-box p { max-width: 560px; margin-inline: auto; font-size: 14px; }
.state-box .btn { margin-top: 22px; }
.state-icon { width: 40px; height: 40px; margin: 0 auto 16px; color: var(--violet); }
.state-icon svg { width: 100%; height: 100%; }
.state-box.loading .state-icon { animation: state-spin 1.5s linear infinite; }
@keyframes state-spin { to { transform: rotate(360deg); } }

/* Footer */
.site-footer {
  position: relative;
  color: var(--on-dark-soft);
  background: #07090e;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.65fr .7fr .7fr;
  gap: 72px;
  padding: 72px 0 54px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; color: var(--on-dark); }
.footer-brand img { width: 42px; height: 42px; object-fit: cover; clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%); }
.footer-brand strong { font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.footer-brand small { display: block; margin-top: 3px; color: var(--violet-light); font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; }
.footer-about { max-width: 490px; margin-top: 20px; font-size: 13px; line-height: 1.9; }
.footer-col h4 { margin: 0 0 18px; color: var(--on-dark); font-size: 12px; font-weight: 650; letter-spacing: .16em; }
.footer-col a { display: flex; align-items: center; min-height: 44px; color: var(--on-dark-soft); font-size: 13px; transition: color .2s ease, padding-left .25s var(--ease); }
.footer-col a:hover { padding-left: 5px; color: var(--cyan); }
.footer-bottom { padding: 24px 0 32px; border-top: 1px solid var(--line-dark); text-align: center; }
.footer-bottom > span { display: block; margin-top: 7px; font-size: 12px; line-height: 1.9; }
.footer-disclaimer { color: #7f8795; }
.footer-credit {
  color: #7f8795;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.footer-credit a { color: #c8a96a; border-bottom: 1px solid transparent; }
.footer-credit a:hover { color: #e8d5a8; border-bottom-color: #e8d5a8; }

/* Gemini（哈基米）链接：照 2026 新版 sparkle 图标四色 —— 红 #FA4340 / 黄 #F6C013 / 绿 #14BB69 / 蓝 #3186FF（蓝尾段拉长，对应图标"蓝铺到中间"） */
.footer-credit a.credit-gemini {
  background: linear-gradient(90deg, #FA4340 0%, #F6C013 26%, #14BB69 52%, #3186FF 78%, #3186FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-credit a.credit-gemini:hover {
  color: transparent;
  border-bottom-color: #3186FF;
}

/* ── 其余链接：按各家官方图标真实配色（2026-11-16）──
   色源：LobeHub 官方图标 SVG / 官方品牌指南 / 用户提供的应用图标截图（像素取样）。
   所有品牌链接共用的裁剪方式： */
.footer-credit a[class*="credit-"] {
  color: transparent;
}
/* 注意：background 简写会重置 background-clip，所以每条品牌规则里都单独声明了一次。 */

/* Kimi（黑底白 K，右上角只有一点蓝）→ 主体白，尾段收进品牌蓝 */
.footer-credit a.credit-kimi {
  background: linear-gradient(90deg, #FFFFFF 0%, #E7EAEF 68%, #1783FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-kimi:hover { color: transparent; border-bottom-color: #1783FF; }

/* OpenAI / GPT6（官方声明无单一品牌色，Blossom 为黑白） */
.footer-credit a.credit-gpt {
  background: linear-gradient(90deg, #FFFFFF 0%, #A7AEBA 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-gpt:hover { color: transparent; border-bottom-color: #A7AEBA; }

/* DeepSeek #4D6BFE */
.footer-credit a.credit-ds {
  background: linear-gradient(90deg, #4D6BFE 0%, #A3B5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-ds:hover { color: transparent; border-bottom-color: #4D6BFE; }

/* 豆包 Seed → 取即梦图标：橙黄尖 → 亮青 → 天蓝 → 蓝 */
.footer-credit a.credit-seed {
  background: linear-gradient(90deg, #FFC53D 0%, #63E4FC 24%, #20B1FD 62%, #0D82FD 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-seed:hover { color: transparent; border-bottom-color: #20B1FD; }

/* xAI / Grok（黑白，官方 mark 无彩色） */
.footer-credit a.credit-grok {
  background: linear-gradient(90deg, #F4F6F9 0%, #8B9099 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-grok:hover { color: transparent; border-bottom-color: #8B9099; }

/* Qwen #082DFF */
.footer-credit a.credit-qwen {
  background: linear-gradient(90deg, #082DFF 0%, #6E8CFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-qwen:hover { color: transparent; border-bottom-color: #082DFF; }

/* PRODUCER（银老板）：亮金色，取自站点 --gold #f6cf65，起点加白金光、收尾压深金 */
.footer-credit a.credit-gold {
  background: linear-gradient(90deg, #FFF3CF 0%, #F6CF65 42%, #E9B949 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer-credit a.credit-gold:hover { color: transparent; border-bottom-color: #F6CF65; }

/* Reveal is progressively enhanced; content remains visible without JS. */
.reveal-enabled [data-reveal] { opacity: 0; transform: translateY(28px); }
.reveal-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
.reveal-enabled [data-reveal][data-delay="1"] { transition-delay: .08s; }
.reveal-enabled [data-reveal][data-delay="2"] { transition-delay: .16s; }
.reveal-enabled [data-reveal][data-delay="3"] { transition-delay: .24s; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

@media (max-width: 1020px) {
  .container { width: min(var(--container), calc(100% - 48px)); }
  .masthead-grid { grid-template-columns: 1fr; gap: 36px; }
  .page-lead { max-width: 680px; }
  .masthead-canvas { right: -18%; width: 82%; opacity: .58; }
  .footer-grid { gap: 42px; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav-container { width: calc(100% - 36px); }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background: rgba(8, 10, 16, .985);
    border-bottom: 1px solid var(--line-dark);
    transition: max-height .4s var(--ease-out), opacity .25s ease, padding .4s var(--ease-out), visibility .4s;
  }
  .nav-links.open { max-height: calc(100vh - var(--header-h)); padding-top: 12px; padding-bottom: 22px; visibility: visible; opacity: 1; overflow-y: auto; }
  .nav-links a { min-height: 52px; padding: 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav-links a::after { right: auto; bottom: 10px; left: 8px; width: 26px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 36px); }
  .section { padding: 72px 0; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 15px; }
  .brand-edition { font-size: 8px; }
  .page-masthead { padding-top: calc(var(--header-h) + 50px); padding-bottom: 58px; }
  .masthead-grid { gap: 28px; }
  .page-title { max-width: 88%; font-size: clamp(48px, 15vw, 68px); }
  .page-lead { max-width: 100%; font-size: 14px; }
  .masthead-canvas { top: 0; right: -46%; width: 132%; height: 78%; opacity: .3; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 32%, #000 70%, transparent); }
  .section-title { font-size: 38px; }
  .section-desc { font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding: 54px 0 38px; }
  .footer-col.about { grid-column: 1 / -1; }
  .footer-bottom > span { font-size: 11px; }
  .footer-credit { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-enabled [data-reveal] { opacity: 1; transform: none; }
}
