/* iTV 官网：一页到底。奈飞风格：纯黑底、奈飞红、粗体大标题。动画只动 transform / opacity，走 GPU 不卡。 */
:root {
  --bg: #000;
  --surface: #141414;
  --surface-3: #2b2b2b;
  --line: #232323;
  --red: #e50914;
  --red-hover: #f6121d;
  /* 下载量两层的颜色（深色底上过了色盲校验） */
  --c-android: #e50914;
  --c-windows: #3987e5;
  --text: #fff;
  --text-2: rgba(255, 255, 255, .7);
  --text-3: rgba(255, 255, 255, .45);
  --radius: 4px;
  --radius-lg: 10px;
  --pad: clamp(20px, 6vw, 148px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Helvetica Neue", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* 图片加载完再淡入，不是一块块「啪」地出来 */
img.fade { opacity: 0; transition: opacity .6s var(--ease); }
img.fade.loaded { opacity: 1; }

/* 首屏大标题用思源黑体 Black，只收了「好戏无界，全屏开演」这 9 个字（2.5 KB）；改标题要重新取子集 */
@font-face { font-family: "iTV Headline"; src: url("fonts/headline.woff2") format("woff2"); font-weight: 900; font-display: swap; }

/* ---------- 顶栏 ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 var(--pad);
  transition: background-color .35s, backdrop-filter .35s;
}
.top.solid { background: rgba(0, 0, 0, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.top-nav { display: flex; align-items: center; gap: 26px; }
.top-link { color: var(--text-2); font-size: 15px; font-weight: 600; text-decoration: none; transition: color .2s; }
.top-link:hover { color: #fff; }
.top .btn { max-width: 0; margin-left: -26px; padding-left: 0; padding-right: 0; overflow: hidden; white-space: nowrap; opacity: 0; pointer-events: none; transition: max-width .35s var(--ease), margin .35s var(--ease), padding .35s var(--ease), opacity .3s, background-color .2s; }
.top.cta .btn { max-width: 120px; margin-left: 0; padding-left: 18px; padding-right: 18px; opacity: 1; pointer-events: auto; }
.brand { display: block; line-height: 0; }
.brand img { display: block; height: 30px; width: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease), opacity .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-ghost { background: rgba(109, 109, 110, .4); color: #fff; }
.btn-ghost:hover { background: rgba(109, 109, 110, .6); }
.btn-sm { padding: 7px 18px; font-size: 14px; }
.btn-lg { padding: 14px 30px; font-size: 22px; border-radius: 8px; }
.btn-lg:hover { transform: translateY(-2px); }
.btn-block { display: flex; width: 100%; padding: 12px 16px; font-size: 16px; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.chev { font-size: 1.4em; line-height: 0; font-weight: 400; transition: transform .25s var(--ease); }
.btn:hover .chev { transform: translateX(4px); }
.btn:focus-visible, .chart:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 首屏：倾斜海报墙 ---------- */
.hero {
  position: relative;
  height: min(100svh, 900px);
  min-height: 560px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.35) rotate(-8deg);
  animation: drift 40s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: scale(1.35) rotate(-8deg) translate3d(0, 0, 0); }
  to { transform: scale(1.45) rotate(-8deg) translate3d(-3%, -2%, 0); }
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .35) 45%, transparent 70%),
    radial-gradient(ellipse at 65% 50%, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .92) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .2) 35%, rgba(0, 0, 0, .2) 60%, #000 100%);
}
/* 左边 Logo，右边四台设备拼在一起 */
.hero-inner {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(300px, .7fr) 1.6fr;
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: 80px var(--pad) 40px;
  text-align: left;
}
.hero-text > * { animation: rise .9s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.hero-text > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero h1.headline { font-family: "iTV Headline", var(--font); color: #fff; font-size: clamp(40px, 4.4vw, 76px); font-weight: 900; line-height: 1.2; letter-spacing: -.02em; text-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
/* 一行一个短句，不让浏览器把「无界」拆开 */
.hero h1.headline span { display: block; white-space: nowrap; }
.hero-sub { margin: 22px 0 38px; color: var(--text-2); font-size: clamp(13px, 1.25vw, 19px); white-space: nowrap; }
.hero-sub i { margin: 0 .5em; font-style: normal; color: var(--text-3); }
.hero-platforms { margin: 14px 0 0; color: var(--text-3); font-size: 13px; letter-spacing: .02em; }
.hero-devices { margin: 0 0 30px; color: var(--text-2); font-size: clamp(15px, 1.3vw, 18px); letter-spacing: .06em; }

.device .screen { overflow: hidden; background: #0b0b0f; }
.device .screen img { width: 100%; height: 100%; object-fit: cover; }
.devices {
  position: relative;
  aspect-ratio: 16 / 6.6;
  animation: rise 1.1s var(--ease) .2s both;
}
.devices .device { position: absolute; }
/* 设备组身后一团很淡的暗红环境光 */
.devices .glow { position: absolute; left: -12%; right: -12%; top: -25%; bottom: -30%; background: radial-gradient(ellipse 50% 50% at 50% 55%, rgba(229, 9, 20, .14), transparent 70%); pointer-events: none; }
/* 全家福：都站在同一条地面上，电视最大在左后，显示器在它右前，平板、手机最靠前 */
.devices::after { content: ""; position: absolute; left: -6%; right: -6%; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3) 25%, rgba(255, 255, 255, .3) 75%, transparent); }
.devices::before { content: ""; position: absolute; left: 0; right: 0; bottom: -44px; height: 44px; background: radial-gradient(ellipse 50% 100% at 50% 0, rgba(255, 255, 255, .09), rgba(229, 9, 20, .05) 45%, transparent); }
.devices .tv { left: 2%; bottom: 0; width: 62%; z-index: 1; }
.devices .tv .screen {
  aspect-ratio: 16 / 9;
  border: 6px solid #141414;
  border-bottom-width: 9px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #333, 0 30px 70px rgba(0, 0, 0, .8), 0 40px 90px -20px rgba(229, 9, 20, .3);
}
.devices .tv .feet { display: block; width: 100%; height: 18px; overflow: visible; }
.devices .tv .feet path { fill: none; stroke: #3a3a3a; stroke-width: 4px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.devices .monitor { left: 47%; bottom: 0; width: 36%; z-index: 2; }
.devices .monitor .screen {
  aspect-ratio: 1600 / 924;
  border: 6px solid #141414;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #3a3a3a, 0 30px 70px rgba(0, 0, 0, .8);
}
.devices .monitor .neck { position: relative; width: 9%; height: 26px; margin: 0 auto 5px; background: linear-gradient(90deg, #1a1a1a, #333, #1a1a1a); }
.devices .monitor .neck::after { content: ""; position: absolute; left: -120%; right: -120%; bottom: -5px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #1a1a1a, #3a3a3a, #1a1a1a); }
.devices .tablet { right: 6%; bottom: 0; width: 23%; z-index: 3; padding: 7px; border-radius: 14px; background: #111; box-shadow: 0 0 0 1px #3a3a3a, -10px 30px 70px rgba(0, 0, 0, .85); }
.devices .tablet .screen { border-radius: 8px; aspect-ratio: 16 / 10; }
.devices .phone { right: 0; bottom: 0; width: 8.5%; z-index: 4; padding: 4px; border-radius: 16px; background: #111; box-shadow: 0 0 0 1px #3a3a3a, -12px 20px 50px rgba(0, 0, 0, .9); }
.devices .phone .screen { border-radius: 12px; aspect-ratio: 9 / 19.5; }

/* ---------- 滚动出现 ---------- */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal .shot { opacity: 0; transform: translateY(32px) scale(.97); transition: opacity 1s var(--ease) .12s, transform 1s var(--ease) .12s; }
.reveal.in .shot { opacity: 1; transform: none; }

/* ---------- 功能介绍：一块一个功能，左右交替 ---------- */
.feat {
  display: grid;
  grid-template-columns: .62fr 1.38fr;
  align-items: center;
  gap: clamp(28px, 5vw, 88px);
  padding: clamp(56px, 8vw, 112px) var(--pad);
  border-top: 8px solid var(--line);
}
.feat.reverse { grid-template-columns: 1.38fr .62fr; }
.feat.reverse .feat-text { order: 2; }
.feat h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.05; }
.feat p { font-size: clamp(16px, 1.45vw, 20px); color: var(--text-2); margin: 12px 0 0; line-height: 1.7; }
.feat p.tag { margin-top: 16px; color: #fff; font-size: clamp(20px, 1.9vw, 28px); font-weight: 700; line-height: 1.35; }
.stats { display: flex; flex-wrap: wrap; gap: 18px 28px; margin: 28px 0 0; }
.stats div { margin: 0; }
.stats dt { color: var(--text-3); font-size: 14px; }
.stats dd { margin: 2px 0 0; font-size: clamp(34px, 3.4vw, 48px); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats small { font-size: .45em; font-weight: 700; color: var(--text-2); }
.shot {
  border-radius: 10px;
  overflow: hidden;
  background: #0b0b0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -20px rgba(229, 9, 20, .28), 0 30px 60px rgba(0, 0, 0, .7);
}
.shot img { width: 100%; height: auto; }
/* 一段几张图：同样比例，整齐拼在一起——两张并排，三张上一下二，四张田字格 */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, .9vw, 14px); }
.shots.n1 { grid-template-columns: 1fr; }
.shots.n3 .shot:first-child { grid-column: 1 / -1; }
.shots .shot { border-radius: 8px; }
.shots .shot img { display: block; aspect-ratio: 16 / 9.2; object-fit: cover; object-position: left top; }
.shots.n2 .shot img { aspect-ratio: 16 / 10; }
.reveal .shots .shot:nth-child(2) { transition-delay: .2s; }
.reveal .shots .shot:nth-child(3) { transition-delay: .28s; }
.reveal .shots .shot:nth-child(4) { transition-delay: .36s; }

/* ---------- 下载 / 下载量 / 捐赠：同一种区块 ---------- */
.block { padding: clamp(56px, 8vw, 104px) var(--pad); border-top: 8px solid var(--line); }
.block h2 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 28px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1000px; }
.dl-card {
  display: flex;
  flex-direction: column;
  padding: 0 26px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.dl-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .1); }
.dl-art {
  height: 150px;
  margin: 0 -26px 20px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(229, 9, 20, .45), rgba(229, 9, 20, 0) 65%), #0a0a0a;
}
.os-ico { width: 76px; height: 76px; transition: transform .4s var(--ease); }
.dl-card:hover .os-ico { transform: translateY(-4px) scale(1.04); }
.android-ico { fill: #3ddc84; }
.windows-ico { fill: #00a4ef; width: 66px; height: 66px; }
.apple-ico { fill: #fff; }
.dl-card.soon { opacity: .6; }
.dl-card.soon:hover { transform: none; box-shadow: none; }
.dl-card h3 { font-size: 26px; }
.dl-for { margin: 6px 0 0; color: var(--text-2); }
.dl-meta { margin: 6px 0 18px; color: var(--text-3); font-size: 14px; }
.dl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-card > .btn, .dl-pair { margin-top: auto; }


/* 下载量 */

.chart-card { position: relative; padding: 22px 24px 14px; background: var(--surface); border-radius: var(--radius-lg); max-width: 1200px; }
.chart-total { display: flex; align-items: baseline; gap: 14px; }
.chart-total b { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.chart-total span { color: var(--text-3); font-size: 14px; }
.chart { position: relative; height: 360px; margin-top: 8px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .axis text { fill: var(--text-3); font-size: 12px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .axis-line, .chart .tick { stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; }
.chart .line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .dot { fill: #fff; stroke: var(--red); stroke-width: 2.5; }
.chart .cross { stroke: rgba(255, 255, 255, .45); }
/* 出现动画：两层从左往右展开 */
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--text-2); }

.tip {
  position: fixed;
  z-index: 30;
  left: 0; top: 0;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(20, 20, 20, .96);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 24px rgba(0, 0, 0, .6);
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
  will-change: transform;
}
.tip b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tip .muted { color: var(--text-2); }

/* 捐赠 */
.donate { display: flex; flex-wrap: wrap; gap: 24px; }
.qr { margin: 0; padding: 18px; width: 260px; border-radius: var(--radius-lg); background: var(--surface); text-align: center; transition: transform .35s var(--ease); }
.qr:hover { transform: translateY(-6px); }
.qr-box { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius); background: #fff; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-box.empty { background: repeating-linear-gradient(45deg, #1d1d1d 0 10px, #232323 10px 20px); color: var(--text-3); font-size: 14px; }
.qr figcaption { margin-top: 12px; font-weight: 700; font-size: 18px; }

.foot-bar { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px var(--pad) 48px; border-top: 8px solid var(--line); color: var(--text-3); font-size: 13px; text-align: center; }
.foot-brand { display: block; line-height: 0; }
.foot-brand img { display: block; height: 26px; width: auto; }
.foot-links { display: flex; gap: 28px; }
.foot-links a { color: var(--text-2); font-size: 14px; text-decoration: none; transition: color .2s; }
.foot-links a:hover { color: #fff; }
.foot-note { max-width: 640px; margin: 6px 0 0; line-height: 1.8; text-wrap: balance; }
.foot-note a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); transition: color .2s, border-color .2s; }
.foot-note a:hover { color: #fff; border-color: #fff; }
.foot-copy { margin: 0; color: var(--text-2); }
/* 回到顶部：滚过首屏才出现，右下角圆按钮 */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px); z-index: 20;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(40, 40, 40, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease), background-color .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--red); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 窄屏 ---------- */
@media (max-width: 820px) {
  .top-link:not([href="#donate"]) { display: none; }
  .hero-sub { font-size: 14px; }
  .top { height: 58px; }
  .brand img { height: 26px; }
  .hero { height: auto; min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 96px; }
  .feat, .feat.reverse { grid-template-columns: 1fr; }
  .feat.reverse .feat-text { order: 0; }
  .chart { height: 260px; }
  .chart-total b { font-size: 32px; }
  .qr { width: calc(50% - 12px); padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .reveal .shot, img.fade { opacity: 1; transform: none; }
}
