/* ==========================================================================
   LL 图鉴 · 主页样式 v8（在线即用右侧文档入口；顶栏取消粘顶；移动端紧凑按钮）
   语言：暖奶油米白底 + 超大黑体标题 + 高饱和撞色块 + 粗黑描边 + 硬偏移阴影（0 模糊）
   配色与尺寸全部在第 1 节变量里；想换配色只改这一节。
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  /* 底与墨 */
  --cream: #fff9ef;        /* 页面底色：暖奶油米白 */
  --paper: #fffdf8;        /* 卡片/按钮底 */
  --ink: #16172b;          /* 墨黑：标题、描边、硬偏移阴影、页脚底 */
  --ink-soft: #62647a;     /* 次级文字 */
  --line: #e8e1d7;         /* 分隔线（低频使用） */

  /* 撞色（品牌四色 + 延伸） */
  --purple: #6557e8;       /* 电紫：主按钮、箭头、主站标签 */
  --purple-dark: #463bb1;
  --rose: #e94368;         /* 玫粉：编号标签、强调 */
  --rose-deep: #c41f4c;    /* 玫粉深：小字专用（对比度更稳） */
  --yellow: #ffcf4a;       /* 暖黄：标题强调块、几何色块 */
  --mint: #b8f1df;         /* 薄荷青：几何色块、胶囊 */
  --coral: #e95f74;        /* 珊瑚红：备用延伸色 */

  /* 版式 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --fs-h1: clamp(38px, 6.4vw, 84px);
  --fs-h2: clamp(24px, 3vw, 34px);
  --fs-card: 17.5px;

  --page-max: 1200px;
  --gutter: clamp(16px, 3.4vw, 36px);
  --gap-grid: clamp(16px, 2vw, 26px);

  --r-card: 22px;
  --r-pill: 999px;

  /* 描边与硬偏移（0 模糊阴影） */
  --edge: 3px;             /* 粗黑描边粗细 */
  --push-lg: 8px;          /* 卡片静态偏移 */
  --push-lg-hover: 14px;   /* 卡片悬停偏移 */
  --push-sm: 4px;          /* 按钮/胶囊静态偏移 */
  --push-sm-hover: 6px;    /* 按钮/胶囊悬停偏移 */

  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, p, ul, li { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection { background: var(--yellow); color: var(--ink); }

/* 统一页宽容器 */
.topbar-inner,
.hero,
.galleries,
.footer-inner {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 10px;
  z-index: 40;
  transform: translate(-50%, -180%);
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-weight: 800;
  transition: transform .2s var(--ease-soft);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 3. 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 30;
  background: var(--paper);
  border-bottom: var(--edge) solid var(--ink);
  transition: box-shadow .25s var(--ease-soft);
}
html.is-scrolled .topbar { box-shadow: 0 5px 0 rgba(22, 23, 43, .15); }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--paper);
  border: var(--edge) solid var(--ink);
  border-radius: 13px;
  box-shadow: var(--push-sm) var(--push-sm) 0 var(--ink);
}
.brand-mark svg { width: 26px; height: 26px; display: block; }
.brand-mark--lg { width: 54px; height: 54px; border-radius: 15px; }
.brand-mark--lg svg { width: 32px; height: 32px; }

.brand-copy { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-copy strong { font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.brand-copy span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.topnav { display: flex; align-items: center; gap: 10px; }

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: var(--edge) solid var(--ink);
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: var(--push-sm) var(--push-sm) 0 var(--ink);
  transition: transform .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.btn-ic {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-label { white-space: nowrap; }
.btn--feedback { background: var(--mint); color: var(--ink); }
.btn--ghost { background: var(--paper); color: var(--ink); }
.btn--pop { background: var(--purple); color: #fff; }
.btn--signup { background: var(--yellow); color: var(--ink); }

html:not(.motion) .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--push-sm-hover) var(--push-sm-hover) 0 var(--ink);
}
html:not(.motion) .btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- 5. Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(34px, 5vw, 76px) clamp(26px, 3.4vw, 52px);
}

.eyebrow {
  display: inline-block;
  background: var(--paper);
  border: var(--edge) solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
}

.hero h1 {
  margin-top: 18px;
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: .99;
  letter-spacing: -.035em;
}

/* 一处高饱和强调：标题第二行做成暖黄撞色块 */
.mark {
  display: inline-block;
  margin-top: .08em;
  padding: .02em .16em .07em;
  background: var(--yellow);
  color: var(--ink);
  border: var(--edge) solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-sub {
  margin-top: 20px;
  max-width: 44ch;
  font-size: 16.5px;
  color: var(--ink-soft);
}

.hero-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta li {
  border: var(--edge) solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 800;
}
.hero-meta li:nth-child(1) { background: var(--mint); color: var(--ink); }
.hero-meta li:nth-child(2) { background: var(--yellow); color: var(--ink); }
.hero-meta li:nth-child(3) { background: var(--purple); color: #fff; }
.hero-meta li:nth-child(4) { background: var(--paper); color: var(--ink); }
.hero-meta li a { display: block; }

/* ---------- 6. 图鉴区 ---------- */
.galleries { padding-block: clamp(28px, 3.6vw, 52px) clamp(44px, 6vw, 86px); }

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.section-head h2 {
  font-size: var(--fs-h2);
  font-weight: 900;
  letter-spacing: -.028em;
}
.section-hint { font-size: 14px; color: var(--ink-soft); }
.section-chip {
  margin-left: auto;
  background: var(--paper);
  color: var(--rose-deep);
  border: var(--edge) solid var(--ink);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap-grid);
  margin-top: clamp(20px, 2.6vw, 32px);
}

/* ---------- 7. 卡片 ---------- */
.card {
  --tint: color-mix(in srgb, var(--a1, var(--purple)) 22%, var(--paper));
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--tint);
  border: var(--edge) solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--push-lg) var(--push-lg) 0 var(--ink);
  overflow: hidden;
  transition: box-shadow .28s var(--ease-soft);
}
.card.is-hover { box-shadow: var(--push-lg-hover) var(--push-lg-hover) 0 var(--ink); }

.card-art {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--a1, var(--purple));   /* 封面图下方留出 6px 撞色条 */
  overflow: hidden;
}
.card-cover {
  position: absolute;
  inset: 0 0 6px;
  width: 100%;
  height: calc(100% - 6px);
  display: block;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: transform .45s var(--ease-soft);
}

/* 小号玫粉标签（编号） */
.card-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--rose);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--purple);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
}

/* 图鉴徐标：墨线图形 + 纸底圆章 */
.card-emblem {
  position: absolute;
  left: 10px;
  bottom: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 7px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px 15px;
}
.card-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-name {
  font-size: var(--fs-card);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--ink);
}
.card-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--purple);
  color: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  transform: translateY(6px) scale(.9);
  transition: opacity .28s var(--ease-soft), transform .28s var(--ease-pop);
}
.card-go svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html:not(.motion) .card:hover,
html:not(.motion) .card:focus-visible { box-shadow: var(--push-lg-hover) var(--push-lg-hover) 0 var(--ink); }
html:not(.motion) .card:hover .card-go,
html:not(.motion) .card:focus-visible .card-go { opacity: 1; transform: translateY(0) scale(1); }
html:not(.motion) .card:hover .card-cover { transform: scale(1.04); }

@media (hover: none) {
  .card-go { opacity: 1; transform: none; }
}

/* ---------- 8. 12 卡撞色（--a1 = 该卡主色；--pos 可调封面取景） ---------- */
.is-g1  { --a1: #6557e8; }                     /* 电紫 · 交错战线（主站） */
.is-g2  { --a1: #ffc53d; }                     /* 暖黄 · 棕色尘埃 */
.is-g3  { --a1: #3d6bff; }                     /* 电蓝 · 碧蓝航线 */
.is-g4  { --a1: #e94368; }                     /* 玫粉 · 锚点降临 */
.is-g5  { --a1: #b943f0; }                     /* 洋紫 · 星陨计划 Ark Re：Code */
.is-g6  { --a1: #2ba6ff; }                     /* 天蓝 · 蔚蓝档案 */
.is-g7  { --a1: #1fc8a9; }                     /* 薄荷青 · 天下布魔 */
.is-g8  { --a1: #ff4fa3; --pos: 50% 26%; }     /* 亮粉 · 星欲姬绊（方图取上半身） */
.is-g9  { --a1: #ff8a3d; }                     /* 亮橙 · 胜利女神：新的希望 */
.is-g10 { --a1: #8fd63c; }                     /* 青柠 · 少女前线：云图计划 */
.is-g11 { --a1: #e63946; }                     /* 猩红 · 绯色回响 */
.is-g12 { --a1: #ffb020; }                     /* 琥珀 · 辉烬 */

/* ---------- 9. 页脚 ---------- */
.footer {
  margin-top: clamp(20px, 3vw, 40px);
  background: var(--ink);
  color: var(--cream);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px 24px;
  padding-block: clamp(28px, 4vw, 46px);
}
.footer-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.footer-brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand-copy strong { font-size: 19px; font-weight: 900; letter-spacing: -.02em; }
.footer-brand-copy span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: rgba(255, 249, 239, .66);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
/* 页脚入口：与顶栏同语言的按钮；深底上把硬偏移换成奶油色 */
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  border: var(--edge) solid var(--ink);
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: var(--push-sm) var(--push-sm) 0 rgba(255, 249, 239, .85);
  transition: transform .18s var(--ease-soft), box-shadow .18s var(--ease-soft);
}
.footer-links a svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-links a:last-child { background: var(--purple); color: #fff; }
html:not(.motion) .footer-links a:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--push-sm-hover) var(--push-sm-hover) 0 rgba(255, 249, 239, .85);
}
html:not(.motion) .footer-links a:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(255, 249, 239, .85);
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 249, 239, .18);
  font-size: 12.5px;
  color: rgba(255, 249, 239, .62);
}

/* ---------- 10. 动效契约（GSAP 接管位） ---------- */
html.motion .hero-copy > *,
html.motion .section-head > *,
html.motion .card,
html.motion .footer-inner > * { opacity: 0; }

html.motion .card-cover,
html.motion .card-go { transition: none; }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .topbar-inner {
    min-height: 68px;
    flex-wrap: nowrap;
    gap: 6px;
    padding-block: 8px;
  }
  .topnav {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    width: auto;
    gap: 6px;
  }
  .btn {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 0 6px;
    gap: 4px;
    font-size: 11px;
    line-height: 1.1;
  }
  .btn-ic { width: 14px; height: 14px; }
  .btn-label {
    display: inline;
    min-width: 0;
    white-space: nowrap;
  }
  .hero-meta { gap: 8px; }
  .hero-meta li { padding: 8px 10px; font-size: 12px; }

  .mark { border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .section-chip { margin-left: 0; }

  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card { flex-direction: row; align-items: stretch; }
  .card-art { width: 112px; flex: none; aspect-ratio: 1 / 1; }
  .card-body { flex: 1; padding: 12px 14px; }
  .card-num { top: 8px; left: 8px; font-size: 11px; padding: 1px 6px; }
  .card-flag { top: 8px; right: 8px; }
  .card-emblem { left: 8px; bottom: 14px; width: 30px; height: 30px; padding: 5px; }
}

@media (max-width: 400px) {
  .brand { gap: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .topnav { gap: 4px; }
  .btn { min-height: 44px; padding: 0 3px; gap: 2px; font-size: 10.5px; }
  .btn-ic { width: 13px; height: 13px; }
}

/* ---------- 12. 静态降级（prefers-reduced-motion） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-copy > *,
  .section-head > *,
  .card,
  .footer-inner > *,
  .card-go { opacity: 1 !important; transform: none !important; }
}
