/* ==========================================================================
   Bib 家族落地页 v2 · 「晨光」 First Light
   克制 · 留白 · 巨型轻字 · 产品为主角 · 圣别而属天
   ========================================================================== */

:root {
  --canvas: #fcfbf8;
  --ink: #17181c;
  --ink-60: rgba(23, 24, 28, 0.62);
  --ink-40: rgba(23, 24, 28, 0.42);
  --ink-12: rgba(23, 24, 28, 0.12);
  --ink-06: rgba(23, 24, 28, 0.06);
  --gold: #a8833b;
  --sky: #5b87b8;
  --vermilion: #b3503f;
  /* 每站覆盖:辉光双色 + 记号色 */
  --glow-a: #e9d9ae;
  --glow-b: #cfe0ee;
  --mark: var(--gold);
  --serif-zh: "Noto Serif SC", "Songti SC", serif;
  --serif-en: "Newsreader", "Noto Serif SC", serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="zh"] .en { display: none !important; }
html[lang="en"] .zh { display: none !important; }

::selection { background: color-mix(in srgb, var(--mark) 18%, transparent); }
a { color: inherit; }

.frame { max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ==========================================================================
   家族记号 — 极简方印(无旋转、无噪点)
   ========================================================================== */
.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.42em;
  background: var(--mark-bg, var(--ink));
  color: var(--canvas);
  font-family: var(--serif-zh);
  font-weight: 600;
  font-size: 0.9em;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.mark--du   { --mark-bg: var(--gold); }
.mark--ji   { --mark-bg: var(--sky); }
.mark--ting { --mark-bg: var(--vermilion); }
.mark--ghost {
  background: transparent;
  color: var(--ink-40);
  box-shadow: inset 0 0 0 1px var(--ink-12);
}

/* ==========================================================================
   顶栏 — 极轻
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.wordmark .en-name { color: var(--ink-40); font-weight: 400; font-size: 13px; }

.fam-nav { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.fam-nav a { text-decoration: none; font-size: 13px; opacity: 0.34; transition: opacity 0.2s; }
.fam-nav a:hover, .fam-nav a[aria-current="true"] { opacity: 1; }

.lang-toggle {
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--ink-40);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.lang-toggle:hover { color: var(--ink); }

.cta-mini {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  background: var(--ink);
  color: var(--canvas);
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s, opacity 0.2s;
}
.cta-mini:hover { opacity: 0.85; transform: translateY(-1px); }

/* ==========================================================================
   主视觉 — 居中,巨字,辉光,悬浮画面
   ========================================================================== */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(72px, 13vh, 140px) 0 0;
}

/* 晨光 — 唯一的颜色时刻 */
.dawn {
  position: absolute;
  top: -12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 130vw);
  height: 90vh;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(42% 36% at 38% 30%, color-mix(in srgb, var(--glow-a) 52%, transparent), transparent 70%),
    radial-gradient(40% 34% at 64% 22%, color-mix(in srgb, var(--glow-b) 46%, transparent), transparent 70%);
  filter: blur(8px);
  animation: dawnBreathe 9s ease-in-out infinite alternate;
}
@keyframes dawnBreathe {
  from { opacity: 0.7; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.05); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  letter-spacing: 0.22em;
  color: var(--ink-60);
  margin-bottom: clamp(22px, 4vh, 36px);
}
.eyebrow .mark { font-size: 14px; }

h1.hero-title {
  font-family: var(--serif-zh);
  font-weight: 250;
  font-size: clamp(52px, 9vw, 112px);
  line-height: 1.18;
  letter-spacing: 0.06em;
  margin-bottom: clamp(14px, 2.5vh, 22px);
}
html[lang="en"] h1.hero-title {
  font-family: var(--serif-en);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.08;
  font-size: clamp(48px, 8vw, 100px);
}

.hero-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-60);
  letter-spacing: 0.12em;
  margin-bottom: clamp(28px, 4.5vh, 44px);
}
.hero-sub .dot { margin: 0 0.7em; color: var(--ink-40); }

.cta-row { display: flex; justify-content: center; align-items: center; gap: 22px; }
.cta-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  background: var(--ink);
  color: var(--canvas);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 13px 30px;
  border-radius: 999px;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s;
  box-shadow: 0 1px 2px rgba(23, 24, 28, 0.18);
}
.cta-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(23, 24, 28, 0.36);
}
.cta-main .arrow { transition: transform 0.22s; font-family: var(--serif-en); }
.cta-main:hover .arrow { transform: translateX(3px); }
.cta-ghost {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-60);
  transition: color 0.2s;
}
.cta-ghost:hover { color: var(--ink); }

/* 悬浮主画面 */
.stage {
  position: relative;
  margin: clamp(48px, 8vh, 84px) auto 0;
  max-width: 1080px;
  padding: 0 clamp(16px, 4vw, 40px);
}
.stage::before {
  /* 画面身后的地平线光 */
  content: "";
  position: absolute;
  inset: 8% -4% -10% -4%;
  background: radial-gradient(60% 55% at 50% 42%,
    color-mix(in srgb, var(--glow-a) 38%, transparent),
    color-mix(in srgb, var(--glow-b) 20%, transparent) 55%,
    transparent 75%);
  filter: blur(14px);
  z-index: -1;
}
.stage .shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(10px, 1.4vw, 18px);
  border: 1px solid var(--ink-12);
  box-shadow:
    0 1px 2px rgba(23, 24, 28, 0.08),
    0 24px 64px -24px rgba(23, 24, 28, 0.38);
  background: #fff;
  animation: levitate 7s ease-in-out infinite alternate;
}
@keyframes levitate {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

/* ==========================================================================
   特性 — 一句话 + 画面细部
   ========================================================================== */
.claims { padding: clamp(72px, 13vh, 150px) 0 0; }

.claim {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: clamp(44px, 9vh, 110px) 0;
}
.claim:nth-child(even) .claim-text { order: 2; }
.claim:nth-child(even) .claim-visual { order: 1; }

.claim-text h2 {
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.3;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
html[lang="en"] .claim-text h2 {
  font-family: var(--serif-en);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.12;
}
.claim-text p { font-size: 15px; color: var(--ink-60); max-width: 36ch; }

/* 细部画面:同一张高清截图的 CSS 裁切 */
.claim-visual {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--ink-12);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 44px -22px rgba(23, 24, 28, 0.32);
  aspect-ratio: 16 / 10.5;
}
.claim-visual > img {
  position: absolute;
  display: block;
  border: 0;
}
/* 裁切预设:用 width 放大 + 平移定位到画面区域 */
.crop-top    { aspect-ratio: 16 / 5; }
.crop-top    > img { width: 250%; left: -6%;  top: 0; }
.crop-body   > img { width: 240%; left: -70%; top: -16%; }
.crop-block  > img { width: 210%; left: -52%; top: -34%; }
.crop-full   > img { width: 114%; left: -7%;  top: -1%; }

/* 排印卡片(无截图的特性用文字本身作画面) */
.type-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--ink-12);
  background:
    radial-gradient(70% 80% at 30% 20%, color-mix(in srgb, var(--glow-a) 26%, transparent), transparent 70%),
    #fff;
  box-shadow: 0 18px 44px -22px rgba(23, 24, 28, 0.32);
  aspect-ratio: 16 / 10.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
}
.type-card .tc-big {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(38px, 4.6vw, 56px);
  color: var(--ink);
  letter-spacing: 0.01em;
}
.type-card .tc-zh {
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: 0.3em;
  color: var(--ink-60);
}
.type-card .tc-tag {
  position: absolute;
  top: 18px; left: 22px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--ink-40);
}
.type-card .tc-chip {
  font-size: 12.5px;
  color: var(--mark);
  border: 1px solid color-mix(in srgb, var(--mark) 36%, transparent);
  border-radius: 999px;
  padding: 4px 14px;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* 协作光标演示卡 */
.cursor-line {
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: 0.12em;
  color: var(--ink);
  display: flex;
  align-items: center;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.25em;
  margin: 0 2px;
  position: relative;
  animation: blink 1.1s steps(1) infinite;
}
.caret::after {
  content: attr(data-name);
  position: absolute;
  top: -1.5em; left: -4px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--c, var(--sky));
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
}
.caret { background: var(--c, var(--sky)); }
@keyframes blink { 50% { opacity: 0.15; } }

/* ==========================================================================
   生态 — 一行轻语
   ========================================================================== */
.eco {
  text-align: center;
  padding: clamp(80px, 14vh, 160px) 0;
}
.eco-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  margin-bottom: 26px;
}
.eco-line a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-60);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), color 0.25s;
}
.eco-line a:hover { transform: translateY(-4px); color: var(--ink); }
.eco-line .mark { font-size: 19px; }
.eco-line a[aria-current="true"] { color: var(--ink); }
.eco-line .sep {
  width: clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--ink-12);
}
.eco-caption {
  font-size: clamp(16px, 1.8vw, 20px);
  font-family: var(--serif-zh);
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--ink-60);
}
html[lang="en"] .eco-caption { font-family: var(--serif-en); letter-spacing: 0.08em; font-style: italic; }

/* ==========================================================================
   经文 — 一声低语
   ========================================================================== */
.verse-whisper {
  text-align: center;
  padding: 0 0 clamp(80px, 13vh, 150px);
}
.verse-whisper blockquote {
  font-family: var(--serif-zh);
  font-weight: 300;
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: 0.16em;
  line-height: 2.2;
  color: var(--ink-60);
  max-width: 30ch;
  margin: 0 auto;
}
html[lang="en"] .verse-whisper blockquote { font-family: var(--serif-en); font-style: italic; letter-spacing: 0.02em; }
.verse-whisper .v-ref {
  display: block;
  margin-top: 18px;
  font-size: 11.5px;
  letter-spacing: 0.34em;
  color: var(--ink-40);
}

/* ==========================================================================
   页脚 — 一行
   ========================================================================== */
footer {
  border-top: 1px solid var(--ink-06);
  padding: 30px 0 38px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  font-size: 12.5px;
  color: var(--ink-40);
}
.foot-inner .marks { display: flex; gap: 6px; font-size: 11px; }
.foot-inner a { text-decoration: none; color: var(--ink-40); transition: color 0.2s; }
.foot-inner a:hover { color: var(--ink); }
.foot-inner .spacer { flex: 1; }

/* ==========================================================================
   动效
   ========================================================================== */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.9s cubic-bezier(0.2, 0.65, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.65, 0.3, 1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.1s; }
.rv.d2 { transition-delay: 0.2s; }
.rv.d3 { transition-delay: 0.32s; }
.rv-scale { opacity: 0; transform: translateY(30px) scale(0.975); transition: opacity 1.1s cubic-bezier(0.2, 0.65, 0.3, 1), transform 1.1s cubic-bezier(0.2, 0.65, 0.3, 1); }
.rv-scale.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv, .rv-scale { opacity: 1; transform: none; transition: none; }
  .stage .shot, .dawn { animation: none; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 840px) {
  .claim { grid-template-columns: 1fr; gap: 22px; padding: clamp(36px, 7vh, 64px) 0; }
  .claim:nth-child(even) .claim-text { order: 0; }
  .claim:nth-child(even) .claim-visual { order: 1; }
  .claim-text p { max-width: none; }
}
@media (max-width: 640px) {
  .wordmark .en-name { display: none; }
  .cta-row { flex-direction: column; gap: 14px; }
  .hero-sub .dot { margin: 0 0.45em; }
  .eco-line { gap: 14px; }
  .eco-line .sep { width: 16px; }
}
