/* ==========================================================================
   INZELL — Design System
   风格基调：Warm Editorial Minimalism（暖白 editorial 极简）
   ========================================================================== */

:root {
  --bg-primary: #fcfcfb;
  --bg-secondary: #f4f4f2;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9f8;
  --bg-pill: rgba(0, 0, 0, 0.04);
  --bg-pill-hover: rgba(0, 0, 0, 0.08);

  --text-primary: #101010;
  --text-secondary: rgba(16, 16, 16, 0.65);
  --text-tertiary: rgba(16, 16, 16, 0.40);
  --text-muted: rgba(16, 16, 16, 0.25);

  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-medium: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.85);

  --accent: #b98a76;
  --accent-soft: rgba(185, 138, 118, 0.10);
  --accent-line: rgba(185, 138, 118, 0.28);

  --font-serif: "Instrument Serif", "Playfair Display", "Newsreader", "Songti SC", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;

  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --card-width: clamp(272px, 26vw, 344px);
  --rail-gap: 28px;
  --nav-h: 44px;
}

@media (max-width: 1024px) {
  :root { --card-width: clamp(248px, 46vw, 320px); --rail-gap: 20px; }
}
@media (max-width: 640px) {
  :root { --card-width: 74vw; --rail-gap: 14px; }
}

/* ---------------- Reset & Base ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
}

::selection { background: #101010; color: #fff; }

a { color: inherit; text-decoration: none; }
button { background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

.site-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
@media (min-width: 768px) { .site-wrapper { padding: 0 48px; } }
@media (min-width: 1200px) { .site-wrapper { padding: 0 64px; } }

/* ---------------- 器皿图形样式 ---------------- */
.v-line  { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.v-thin  { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: 0.45; }
.v-solid { fill: currentColor; opacity: 0.88; }
.v-fill  { fill: currentColor; opacity: 0.16; }

/* ---------------- 浮动胶囊导航 ---------------- */
.site-nav {
  position: fixed;
  top: 20px; left: 0; right: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.site-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.3s ease;
}
.site-nav-inner:hover { box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07); }

.nav-logo-mark { display: flex; align-items: center; }
.nav-logo-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #101010;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform 0.25s var(--ease-spring);
}
.nav-logo-mark:hover .nav-logo-icon { transform: scale(1.08); }

.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.14em;
  padding-right: 2px;
}

.nav-divider { width: 1px; height: 18px; background: var(--border-medium); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: background 0.25s ease, color 0.25s ease;
}
.nav-links a:hover { background: var(--bg-pill); color: var(--text-primary); }

.nav-status {
  display: flex; align-items: center; gap: 7px;
  margin-left: 6px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.nav-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (max-width: 900px) { .nav-status { display: none; } }
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-divider { display: none; }
}

/* ---------------- 滚动揭示 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease-smooth), transform 0.75s var(--ease-smooth);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Hero ---------------- */
.hero-section { padding: calc(var(--nav-h) + 76px) 0 0; }

.hero-supertag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.hero-supertag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(42px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 400;
}
.hero-title .title-line { display: block; }
.hero-title .serif-italic { letter-spacing: -0.012em; }

.hero-lede {
  margin-top: 28px;
  max-width: 620px;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.72;
  color: var(--text-secondary);
}
.hero-lede strong { color: var(--text-primary); font-weight: 500; }

.hero-media-wrapper { position: relative; margin-top: 56px; }

.hero-media-glow {
  position: absolute;
  top: 6%; left: 12%; right: 12%; bottom: 14%;
  background: radial-gradient(58% 62% at 50% 46%, rgba(185, 138, 118, 0.22), rgba(185, 138, 118, 0) 72%);
  filter: blur(46px);
  pointer-events: none;
}

.hero-media-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  background: #f6f3f0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 640px) { .hero-media-card { aspect-ratio: 4 / 3; } }

.hero-scene {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5%;
  height: 100%;
  width: 100%;
  padding: 9% 12% 0;
}
.scene-item {
  height: var(--h);
  aspect-ratio: 200 / 280;
  color: var(--accent);
  animation: vesselFloat 6s ease-in-out infinite;
}
.scene-item use { color: inherit; }
#vessel-serum, #vessel-jar, #vessel-tube, #vessel-pump, #vessel-mist { color: inherit; }
.scene-a { --h: 68%; color: #b98a76; animation-duration: 6.2s; }
.scene-b { --h: 45%; color: #7f9583; order: -1; animation-duration: 5.4s; }
.scene-c { --h: 58%; color: #c0a480; animation-duration: 6.8s; }

@keyframes vesselFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-media-caption {
  position: absolute;
  left: 24px; bottom: 20px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 28px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.hero-stat-num {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1;
}
.hero-stat-unit { font-size: 0.5em; margin-left: 2px; }
.hero-stat-label { font-size: 12.5px; color: var(--text-tertiary); }
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 22px 8px; }
}

/* ---------------- 品牌宣言 ---------------- */
.manifesto-section { padding: 120px 0 0; }
.manifesto-text {
  max-width: 940px;
  font-size: clamp(19px, 2.5vw, 30px);
  line-height: 1.58;
  letter-spacing: -0.008em;
  color: var(--text-secondary);
}
.manifesto-text strong { color: var(--text-primary); font-weight: 500; }
.inline-badge {
  display: inline-block;
  padding: 3px 11px;
  margin: 0 2px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78em;
  white-space: nowrap;
}
.manifesto-sign {
  display: flex; align-items: center; gap: 12px;
  margin-top: 32px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.manifesto-sign-line { width: 40px; height: 1px; background: var(--border-medium); }

/* ---------------- 跑马灯 ---------------- */
.marquee-section { padding: 108px 0 0; }
.marquee-heading {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 26px;
}
.marquee-mask {
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 52px;
  width: max-content;
  animation: marqueeScroll 44s linear infinite;
}
.marquee-mask:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.marquee-ic {
  width: 17px; height: 17px;
  color: var(--accent);
  opacity: 0.75;
  flex: none;
}

/* ---------------- 产品滑轨 ---------------- */
.work-section { padding: 116px 0 0; }

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.section-heading-serif {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.3vw, 52px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
}

.work-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.work-filter-tabs {
  display: flex; align-items: center; gap: 3px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
}
.filter-tab {
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rail-arrows { display: flex; gap: 8px; }
.rail-arrow-btn, .car-arrow {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  font-size: 15px;
  color: var(--text-secondary);
  background: #fff;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-spring), border-color 0.25s ease;
}
.rail-arrow-btn:hover, .car-arrow:hover {
  background: #101010;
  color: #fff;
  border-color: #101010;
  transform: scale(1.06);
}
.rail-arrow-btn:disabled { opacity: 0.3; cursor: default; }
.rail-arrow-btn:disabled:hover { background: #fff; color: var(--text-secondary); border-color: var(--border-medium); transform: none; }

.rail-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 -24px;
  padding: 4px 24px 8px;
  cursor: grab;
}
.rail-container.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.rail-container::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .rail-container { margin: 0 -48px; padding: 4px 48px 8px; } }

.rail-track {
  display: flex;
  gap: var(--rail-gap);
  width: max-content;
}

.rail-item {
  width: var(--card-width);
  flex: none;
  scroll-snap-align: start;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.rail-item.is-hidden {
  display: none;
}

.project-card-link { display: block; }

.card-media-box {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.5s var(--ease-smooth);
}
.project-card-link:hover .card-media-box { transform: translateY(-6px); }

.tint-rose  { background: #f8f3f0; }
.tint-sage  { background: #f1f4f1; }
.tint-sand  { background: #f8f5ee; }
.tint-blue  { background: #f0f3f5; }
.tint-mauve { background: #f6f1f5; }
.tint-clay  { background: #f5f3f0; }

.card-vessel {
  height: 72%;
  aspect-ratio: 200 / 280;
  color: var(--vessel, var(--accent));
  transition: transform 0.6s var(--ease-smooth);
}
.project-card-link:hover .card-vessel { transform: scale(1.05) translateY(-6px); }

.card-badge {
  position: absolute;
  top: 16px; left: 16px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.card-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 2px 0;
}
.card-meta-text { min-width: 0; }
.card-title { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.card-desc {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.card-chips span {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.card-price {
  flex: none;
  font-family: var(--font-serif);
  font-size: 19px;
  padding-top: 2px;
}

/* ---------------- 成分哲学 + 3D 转台 ---------------- */
.spotlight-section { padding: 140px 0 0; }
.spotlight-wrapper {
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: clamp(40px, 6vw, 76px) clamp(24px, 5vw, 68px);
}
.spotlight-tag {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.spotlight-title {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.8vw, 60px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.spotlight-desc {
  margin-top: 22px;
  max-width: 660px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--text-secondary);
}
.spotlight-desc strong { color: var(--text-primary); font-weight: 500; }

.carousel-container {
  margin-top: 56px;
  /* 横向手势交给转台拖拽，竖向仍可正常滚动页面 */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.car { perspective: 1500px; }

.car-track {
  position: relative;
  height: 380px;
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-smooth);
  outline: none;
}
/* 拖拽中关掉过渡：转台严格跟手，不追动画 */
.car-track.is-dragging { transition: none; }
.car-track.is-dragging .car-slot { transition: none; }
.car-track.is-dragging .car-sheen { transition: none; }
/* 松手吸附用更短的时间，利落不拖沓 */
.car-track.is-snapping { transition-duration: 0.4s; }
@media (max-width: 900px) { .car-track { height: 330px; } }

.car-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 236px;
  height: 320px;
  margin-left: -118px;
  margin-top: -160px;
  transform-style: preserve-3d;
  transition: opacity 0.7s var(--ease-smooth);
  cursor: pointer;
}
@media (max-width: 900px) {
  .car-slot { width: 196px; height: 272px; margin-left: -98px; margin-top: -136px; }
}

.car-float { width: 100%; height: 100%; animation: carFloat 5.8s ease-in-out infinite; }
@keyframes carFloat {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  50% { transform: translateY(-7px) rotateZ(0.7deg); }
}

.car-card {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 20px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.07);
  backface-visibility: hidden;
}
.car-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--c, var(--accent));
  opacity: 0.75;
}
.car-ic {
  width: 52px; height: 52px;
  color: var(--c, var(--accent));
  opacity: 0.7;
}
.car-name {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.car-tag {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-tertiary);
}
.car-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.75) 50%, transparent 62%);
  transform: translateX(-110%);
  transition: transform 1.1s var(--ease-smooth);
  pointer-events: none;
}
.car-slot.is-active .car-sheen { transform: translateX(110%); }

.car-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 34px;
}
.car-active-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 240px;
  text-align: center;
}
.car-meta-title { font-size: 15.5px; font-weight: 500; }
.car-meta-tag { font-size: 12.5px; color: var(--text-tertiary); }

/* ---------------- 能力卡 ---------------- */
.about-profile-section { padding: 140px 0 0; }

.capabilities-header { max-width: 860px; }
.capabilities-heading {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.capabilities-quote {
  margin-top: 26px;
  padding-left: 22px;
  border-left: 2px solid var(--accent-line);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.72;
  color: var(--text-secondary);
}
.capabilities-quote strong { color: var(--text-primary); font-weight: 500; }

.capabilities-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 62px;
}
@media (max-width: 980px) { .capabilities-cards { grid-template-columns: 1fr; } }

.cap-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.45s var(--ease-smooth), box-shadow 0.45s ease, border-color 0.45s ease;
}
.cap-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-medium);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.06);
}
.cap-num {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.cap-card-content { flex: 1; }
.cap-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.cap-body {
  margin-top: 13px;
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-secondary);
}
.cap-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.cap-tag {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  font-size: 12px;
  color: var(--text-tertiary);
}

.capabilities-wiki-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 24px 30px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}
.cap-wiki-info { display: flex; flex-direction: column; gap: 6px; }
.cap-wiki-title { font-size: 14.5px; font-weight: 500; }
.cap-wiki-desc { font-size: 12.5px; color: var(--text-tertiary); }
.cap-wiki-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-wiki-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease-spring);
}
.cap-wiki-link:hover { background: #101010; color: #fff; transform: translateY(-2px); }
.wiki-arrow { font-size: 12px; opacity: 0.7; }

/* ---------------- 联络 ---------------- */
.about-contact-wrap { margin-top: 130px; }

.about-contact-intro { max-width: 720px; }
.about-contact-title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
}
.about-contact-subtitle {
  margin-top: 20px;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--text-secondary);
}

.footer-contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}
/* 海外社交渠道：紧贴上一行，间距更小 */
.footer-contact-pills--social {
  margin-top: 10px;
}
.contact-pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.28s ease, color 0.28s ease, transform 0.28s var(--ease-spring), border-color 0.28s ease;
}
/* 悬停效果仅限真正有鼠标的设备——避免 iOS 点按后残留 :hover（黑色胶囊 + 位移） */
@media (hover: hover) {
  .contact-pill-btn:hover {
    background: #101010;
    color: #fff;
    border-color: #101010;
    transform: translateY(-2px);
  }
  .contact-pill-btn:hover .ic-color-wechat,
  .contact-pill-btn:hover .ic-color-red,
  .contact-pill-btn:hover .ic-color-wa,
  .contact-pill-btn:hover .ic-color-fb,
  .contact-pill-btn:hover .ic-color-ig { color: inherit; }
}
.contact-pill-btn svg { width: 18px; height: 18px; flex: none; }
.contact-pill-btn .ic-color-wechat { color: #6bb657; }
.contact-pill-btn .ic-color-red { color: #ff2442; }
.contact-pill-btn .ic-color-wa { color: #25d366; }
.contact-pill-btn .ic-color-fb { color: #1877f2; }
.contact-pill-btn .ic-color-ig { color: #e1306c; }

.qr-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 172px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s var(--ease-smooth), visibility 0.28s;
  text-align: center;
}
/* 拆成三条独立规则：iOS 15.4 以下不认 :focus-visible，
   若与 .is-open 写在同一组合选择器里，整条规则会被丢弃导致弹层永不显示 */
.contact-pill-btn:hover .qr-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.contact-pill-btn:focus-visible .qr-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.qr-popover.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.qr-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: block;
  background: #fff;
}
.qr-popover-caption {
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 触屏设备：点按微信客服时，二维码以居中弹层 + 遮罩展示 */
/* 宽度条件兜底：个别安卓/定制浏览器会谎报 hover/pointer，小屏一律走弹层 */
@media (hover: none), (pointer: coarse), (max-width: 640px) {
  body.is-qr-open { overflow: hidden; }
  body.is-qr-open::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(16, 16, 16, 0.45);
    z-index: 1190;
  }
  .qr-popover.is-open {
    position: fixed;
    left: 50%;
    top: 50%;
    bottom: auto;
    width: 210px;
    max-width: 58vw;
    height: auto;
    padding: 14px 14px 12px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    z-index: 1200;
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  }
  .qr-popover.is-open::after {
    content: '点击空白处关闭';
    display: block;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-tertiary);
  }
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  margin-top: 140px;
  border-top: 1px solid var(--border-subtle);
  padding: 30px 0 40px;
}
.footer-bottom-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.footer-right { display: flex; align-items: center; gap: 20px; }
.footer-right a:hover { color: var(--text-primary); }
.footer-back-to-top { color: var(--text-tertiary); transition: color 0.25s ease; }
.footer-back-to-top:hover { color: var(--text-primary); }

/* ---------------- 语言切换（GitHub 风格下拉） ---------------- */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.lang-globe {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-caret {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease-smooth);
}
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s var(--ease-smooth), visibility 0.22s;
  z-index: 60;
}
.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-menu button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.lang-check {
  width: 12px;
  flex: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  visibility: hidden;
}
.lang-menu button[aria-selected="true"] { color: var(--text-primary); }
.lang-menu button[aria-selected="true"] .lang-check { visibility: visible; }

/* 触屏上 hover 残留会让按钮卡在选中态，与联络胶囊同理 */
@media (hover: hover) {
  .lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
    background: var(--bg-pill);
  }
  .lang-menu button:hover {
    background: var(--bg-pill);
    color: var(--text-primary);
  }
}
@media (hover: none) {
  .lang-btn { -webkit-tap-highlight-color: transparent; }
}

@media (max-width: 640px) {
  .footer-right {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
  .lang-menu { min-width: 150px; }
}

/* ---------------- Toast ---------------- */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 16px);
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: #101010;
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s var(--ease-spring), visibility 0.3s;
  z-index: 200;
}
.copy-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------------- 无障碍 / 动效降级 ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
