/* Sheepy · Motion Landing
 * 设计系统取自提示词库 focus-ai-landing（暗底 + 衬线大字 + 液态玻璃 + 多段视频背景）。
 * 配色整体换成 apps/ios/Sources/Theme.swift 的暗色主题色值，字体换成 Noto Serif SC，
 * 英文紧排参数按中文重排（行高放宽、去掉负字距、巨号标题降一档）。
 */

/* ── tokens ───────────────────────────────────────────── */
:root {
  --bg:      #1C1A17;   /* Theme.bg  dark */
  --shell:   #131210;   /* Theme.shell dark */
  --panel:   #26241F;   /* Theme.panel dark */
  --card:    #302D26;   /* Theme.card dark */
  --ink:     #EDE9E0;   /* Theme.ink dark */
  --muted:   #9A948A;   /* Theme.muted dark */
  --accent:  #8FB395;   /* Theme.accent dark · 鼠尾草绿，占比 ≤5% */
  --blush:   #F0A8B4;   /* Theme.blush */
  --sick:    #8AA2C0;   /* Theme.sick · 低饱和蓝，全站无红 */

  --line:  rgba(237, 233, 224, .11);
  --line2: rgba(237, 233, 224, .06);
  --track: rgba(237, 233, 224, .08);

  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --sans:  "Noto Sans SC", -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  --latin: "Instrument Serif", "Noto Serif SC", serif;

  --shell-x: clamp(1.25rem, 4vw, 3rem);
  --wrap: 80rem;          /* max-w-7xl */
  --radius: 1rem;         /* rounded-2xl */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* 视频兜底底色：压在所有视频之下，视频加载失败也不会白屏。
   注意 body 本身不再叠不透明背景在视频之上（视频是 section 内的 absolute 子元素）。 */
.page-floor {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: -10;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── 液态玻璃（提示词原样保留：0.01 白 + luminosity 混合 + 渐变描边） ── */
.liquid-glass {
  position: relative;
  overflow: hidden;
  border: none;
  background: rgba(255, 255, 255, .01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1);
}
.liquid-glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,.45) 0%,
    rgba(255,255,255,.15) 20%,
    rgba(255,255,255,0)   40%,
    rgba(255,255,255,0)   60%,
    rgba(255,255,255,.15) 80%,
    rgba(255,255,255,.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  font-size: .875rem;
  line-height: 1;
  padding: .9rem 1.75rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform .25s ease, color .25s ease, border-color .25s ease;
}
.pill:hover { transform: scale(1.03); }

.pill.outline {
  border: 1px solid var(--line);
  color: var(--muted);
}
.pill.outline:hover { color: var(--ink); border-color: rgba(237,233,224,.3); }

/* ── 入场动效 ─────────────────────────────────────────── */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
.fade-rise { animation: fade-rise .8s ease-out both; }
.fade-rise.d1 { animation-delay: .2s; }
.fade-rise.d2 { animation-delay: .4s; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease-out, transform .8s ease-out; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
.reveal.in { opacity: 1; transform: none; }

/* ── 小羊逐帧动画 ─────────────────────────────────────── */
/* 精灵条横向排列，用 steps() 平移。translateX(-100%) 相当于整条走完，
   steps(N) 把它切成 N 个整帧位移，正好落在每一帧的边界上。 */
.sheep-stage {
  position: relative;
  width: 100%;
  max-width: 13rem;
  aspect-ratio: 420 / 324;
  overflow: hidden;
  margin-inline: auto;
}
.sheep-stage--md { max-width: 15rem; }
.sheep-stage--lg { max-width: 22rem; }

.sheep-strip {
  height: 100%;
  width: calc(var(--frames, 1) * 100%);
  max-width: none;
  image-rendering: pixelated;
  animation: sheep-run var(--dur, 1s) steps(var(--frames, 1)) infinite;
  will-change: transform;
}
@keyframes sheep-run { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ══════════════ 1 · HERO ══════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* 原规格：inset-x-0 bottom-0 h-[40%] bg-gradient-to-t from-black via-black/60 to-transparent */
.hero-scrim {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(28,26,23,.55) 26%, rgba(28,26,23,.12) 58%, transparent 100%),
    linear-gradient(to bottom, rgba(28,26,23,.55) 0%, transparent 34%);
}

.nav {
  position: relative; z-index: 10;
  width: 100%; max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.5rem var(--shell-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--latin);
  font-size: 1.9rem;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand sup { font-size: .5em; margin-left: .12em; vertical-align: super; opacity: .7; }
.brand.small { font-size: 1.25rem; }
.brand.small sup { font-size: 8px; }

.nav-links { display: none; gap: 2.5rem; font-size: .875rem; }
.nav-links a { color: var(--ink); transition: color .2s; }
.nav-links a:hover { color: rgba(237,233,224,.7); }
.nav-cta { padding: .7rem 1.5rem; }

.hero-body {
  position: relative; z-index: 10;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 1.75rem var(--shell-x) 5rem;
}
/* 中文重排：原规格 leading-[0.95] / tracking-[-2.46px] / text-8xl(6rem)
   → 行高 1.12、字距归零、字号降一档 */
.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  line-height: 1.14;
  letter-spacing: 0;
  max-width: 22em;
  color: rgba(237, 233, 224, .82);
}
.hero h1 em { font-style: normal; color: var(--ink); }
.hero p {
  margin-top: 2rem;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(237, 233, 224, .78);
}
.hero-cta { margin-top: 2.5rem; padding: 1.15rem 2.75rem; font-size: 1rem; }

.hero-sheep { margin-top: 3.25rem; position: relative; }
/* 视频里人物和花丛的明度会变，给小羊垫一层柔和暗晕，保证白身任何一帧都托得住 */
.hero-sheep::before {
  content: ""; position: absolute; inset: -14% -22% -6%;
  background: radial-gradient(48% 46% at 50% 48%, rgba(19,18,16,.58), transparent 72%);
  pointer-events: none;
}
.hero-sheep > * { position: relative; }
.hero-sheep .sheep-stage { max-width: 10.5rem; }
.hero-ground {
  width: 11rem; height: 14px;
  margin: -9px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(143,179,149,.42), rgba(143,179,149,.10) 45%, transparent 72%);
}

/* ══════════════ 2 · TAGLINE ══════════════ */
.tagline {
  display: flex; align-items: center; justify-content: center;
  min-height: 58vh;
  padding: 6rem var(--shell-x);
  background: var(--bg);
}
.tagline h2 {
  font-size: clamp(1.85rem, 5.2vw, 3.4rem);
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  max-width: 24em;
}
.word-reveal span { color: rgba(237, 233, 224, .24); transition: color .35s ease; }
.word-reveal span.lit { color: var(--ink); }
.word-reveal span.accent.lit { color: var(--accent); }

/* ══════════════ 3 · 小羊状态机 ══════════════ */
.split {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--shell-x) 5rem;
}
.split-grid { display: grid; gap: 1rem; }
.card { background: var(--card); border-radius: var(--radius); }

.split-left {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 2.5rem;
  min-height: 32.5rem;
}
.dot-mark {
  display: block;
  width: 2rem; height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  margin-bottom: 2rem;
  position: relative;
  transition: border-color .4s ease;
}
.dot-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px;                 /* 像素方块，不用圆点 —— 和 App 的里程碑图标同源 */
  background: var(--mark, var(--accent));
  transition: background .4s ease;
}
.split-left h3 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.28;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
  min-height: 1.28em;
}
.split-left > .split-top p {
  font-size: .95rem;
  line-height: 1.95;
  color: var(--muted);
  max-width: 26rem;
}

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.tab {
  font-family: var(--sans);
  font-size: .75rem;
  line-height: 1;
  padding: .625rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--ink); color: var(--card); border-color: var(--ink); }

.meters { display: grid; gap: .9rem; margin-bottom: 1.75rem; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .45rem; }
.label { font-size: .6875rem; letter-spacing: .16em; color: var(--muted); }
.meter-head b { font-size: .8125rem; font-weight: 500; color: var(--ink); transition: color .3s; }
.meter-head b.low { color: var(--sick); }

/* 分格像素条 —— App 里唯一进入数据显示的像素语言，因为它属于小羊 */
.pixel-bar { display: flex; gap: 2px; height: 10px; }
.pixel-bar i { flex: 1; background: var(--track); transition: background .3s ease; }
.pixel-bar i.on { background: var(--accent); }
.pixel-bar.is-low i.on { background: var(--sick); }
.pixel-bar.is-bloom i.on { background: var(--blush); }

.split-right {
  position: relative;
  overflow: hidden;
  min-height: 25rem;
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem;
}
.stage-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 48% at 50% 46%, rgba(143,179,149,.16), transparent 70%),
    repeating-linear-gradient(0deg, var(--line2) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--line2) 0 1px, transparent 1px 40px);
}
.split-right .sheep-stage { position: relative; z-index: 1; }

/* ══════════════ 4 · 传感 ══════════════ */
.statement {
  position: relative;
  overflow: hidden;
  min-height: 76vh;
  display: flex; align-items: center; justify-content: center;
  padding: 5rem var(--shell-x);
}
.statement-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(28,26,23,.7) 22%, rgba(28,26,23,.7) 76%, var(--bg) 100%);
}
.statement-body {
  position: relative; z-index: 10;
  max-width: 62rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.eyebrow {
  font-size: .75rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.statement h2, .cta h2 {
  font-size: clamp(1.9rem, 4.8vw, 3.1rem);
  line-height: 1.32;
  letter-spacing: 0;
}
.lede {
  margin-top: 2rem;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
  width: 100%;
}
.stat { display: flex; flex-direction: column; gap: .5rem; }
.stat b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: .75rem; line-height: 1.7; color: var(--muted); }

/* ══════════════ 5 · 开花 / CTA ══════════════ */
.cta {
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  padding: 5rem var(--shell-x);
}
.cta-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(28,26,23,.5) 26%, rgba(28,26,23,.66) 72%, var(--bg) 100%);
}
.cta-body {
  position: relative; z-index: 10;
  max-width: 48rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.cta-body .sheep-stage { position: relative; }
.cta-body .sheep-stage::before {
  content: ""; position: absolute; inset: -18% -12%;
  background: radial-gradient(50% 46% at 50% 52%, rgba(19,18,16,.62), transparent 72%);
  z-index: -1;
}
.cta-body .eyebrow { margin-top: 1.75rem; }
.cta-body .lede { max-width: 32rem; margin-top: 1.5rem; }
.cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.5rem; }
.cta-buttons .pill { padding: 1rem 2.5rem; }

/* ══════════════ 6 · FOOTER ══════════════ */
.footer {
  background: var(--shell);
  border-top: 1px solid var(--line);
  padding: 4rem 0 0;
}
.footer > * { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--shell-x); }
.footer-grid { display: grid; gap: 3rem; margin-bottom: 4rem; }
.foot-claim { font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.6; letter-spacing: 0; }
.foot-links { display: flex; flex-direction: column; gap: .7rem; font-size: .875rem; }
.foot-links a { color: var(--muted); transition: color .2s; }
.foot-links a:hover { color: var(--ink); }
.foot-note { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.foot-note p { font-size: .875rem; color: var(--muted); max-width: 20rem; }
.foot-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8125rem;
  color: var(--accent);
  background: rgba(143,179,149,.08);
  padding: .35rem .7rem;
  border-radius: .4rem;
}
.foot-note .pill { padding: .7rem 1.5rem; }
.foot-bar {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--line);
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
}

/* ── 断点 ─────────────────────────────────────────────── */
.br-md { display: none; }

@media (min-width: 768px) and (max-width: 1100px) {
  .hero h1 { line-height: 1.26; }
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .br-md { display: inline; }
  .split-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-bar { flex-direction: row; justify-content: space-between; text-align: left; }
  .hero h1 { max-width: 18em; }
  .meters { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 767px) {
  .hero h1 { line-height: 1.34; }
  .hero-body { padding-bottom: 2rem; }
  .hero-sheep { padding-top: 2rem; }
  .tagline { min-height: 52vh; padding: 4.5rem var(--shell-x); }
  .statement, .cta { min-height: auto; padding: 5rem var(--shell-x); }
  .split { padding-bottom: 4.5rem; }
  .split-left { min-height: 0; }
  .split-right { min-height: 20rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-rise, .sheep-strip { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .word-reveal span { color: var(--ink); }
}
