/* 首页 ======================================================================
   整幅服内实景作 Hero 背景，下面四段内容（关于 / 加入 / 约定 / 官方账号）+ 收尾 CTA。
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
  scale: 1.06;
  animation: hero-zoom 26s var(--ease) infinite alternate;
}

/* 滚动视差：支持滚动驱动动画的浏览器里，背景比正文滚得慢一点。
   缩放和位移分别走 scale / translate 两个属性，互不覆盖。 */
@supports (animation-timeline: scroll()) {
  .hero-bg {
    animation: hero-zoom 26s var(--ease) infinite alternate, hero-parallax linear both;
    animation-timeline: auto, scroll(root);
    animation-range: normal, 0 100vh;
  }
}

@keyframes hero-zoom {
  to {
    scale: 1.14;
  }
}

@keyframes hero-parallax {
  to {
    translate: 0 18vh;
  }
}

html[data-theme="dark"] .hero-bg {
  filter: brightness(0.6) saturate(0.92);
}

/* 手机上文字铺满整宽，横向渐变挡不住图；改成从上到下的整层纱，
   顶部留出一点实景，越往下越接近页面底色 */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg) 34%, transparent) 0%,
      color-mix(in srgb, var(--bg) 72%, transparent) 34%,
      color-mix(in srgb, var(--bg) 90%, transparent) 70%,
      var(--bg) 100%
    );
}

html[data-theme="dark"] .hero-shade {
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg) 26%, transparent) 0%,
      color-mix(in srgb, var(--bg) 68%, transparent) 36%,
      color-mix(in srgb, var(--bg) 90%, transparent) 74%,
      var(--bg) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 40px 76px;
}

.hero .kicker {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 11vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(112deg, var(--brand-blue) 4%, var(--brand-violet) 46%, var(--brand-pink) 88%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 11s var(--ease) infinite alternate;
}

.hero-lead {
  max-width: 54ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
  max-width: 620px;
}

/* Hero 内容依次落位（首帧就排好，不等脚本） */
.hero-in {
  animation: rise-in 0.8s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 70ms + 60ms);
}

/* 数据格：悬浮在实景上的玻璃卡 */
.stat {
  position: relative;
  padding: 15px 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease-spring), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  transform: scaleY(0);
  transform-origin: 0 0;
  transition: transform 0.45s var(--ease);
}

.stat b {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(21px, 5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.stat > span {
  color: var(--muted);
  font-size: 12px;
}

@media (hover: hover) {
  .stat:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: var(--shadow);
  }

  .stat:hover::before {
    transform: scaleY(1);
  }
}

/* 向下滚动提示 */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 1;
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 72%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  translate: -50% 0;
  animation: hero-bounce 2.4s var(--ease) infinite;
}

.hero-scroll svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) {
  .hero-scroll:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
}

@keyframes hero-bounce {
  50% {
    transform: translateY(7px);
  }
}

@media (min-width: 560px) {
  .hero .kicker {
    font-size: 11.5px;
    letter-spacing: 0.2em;
  }

  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-stats {
    gap: 12px;
  }

  .stat {
    padding: 18px;
  }

  .stat > span {
    font-size: 13px;
  }
}

@media (min-width: 901px) {
  .hero {
    /* 略小于一屏：让下方「关于 TCT」露出一点，页面节奏更顺 */
    min-height: min(84vh, 760px);
  }

  .hero-bg {
    object-position: center 42%;
  }

  /* 宽屏文字只占左半边：左侧压实保证可读，右侧把实景让出来 */
  .hero-shade {
    background:
      linear-gradient(
        to right,
        color-mix(in srgb, var(--bg) 94%, transparent) 0%,
        color-mix(in srgb, var(--bg) 76%, transparent) 32%,
        color-mix(in srgb, var(--bg) 22%, transparent) 60%,
        transparent 80%
      ),
      linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 12%, transparent 34%);
  }

  html[data-theme="dark"] .hero-shade {
    background:
      linear-gradient(
        to right,
        color-mix(in srgb, var(--bg) 92%, transparent) 0%,
        color-mix(in srgb, var(--bg) 72%, transparent) 34%,
        color-mix(in srgb, var(--bg) 28%, transparent) 62%,
        transparent 82%
      ),
      linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 12%, transparent 34%);
  }

  .hero-inner {
    padding-block: 84px 104px;
  }

  .hero-lead {
    font-size: 16.5px;
  }

  .actions {
    gap: 14px;
    margin-top: 32px;
  }

  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 40px;
  }

  .hero-scroll {
    display: grid;
  }
}

/* 正文 -------------------------------------------------------------------- */
.page-content {
  padding-top: 24px;
}

.section {
  position: relative;
  margin: 0 0 48px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 18px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-violet), var(--brand-pink));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
}

.section-index {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.section-index::after {
  content: "";
  width: clamp(40px, 12vw, 160px);
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.feature-grid,
.rule-grid,
.steps {
  display: grid;
  gap: 14px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  line-height: 1.8;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  transition: transform 0.5s var(--ease-spring), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 加入方式：编号徽章在左，内容在右；宽屏两步之间连一条渐变线 */
.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
}

.step h3,
.step p {
  grid-column: 2;
}

.step h3 {
  margin: 8px 0 6px;
}

.step-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  transition: transform 0.45s var(--ease-spring), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

@media (hover: hover) {
  .card:hover .card-icon {
    transform: translateY(-3px) rotate(-6deg) scale(1.08);
    background: var(--accent);
    color: var(--on-accent);
  }

  .card:hover .step-num {
    transform: scale(1.08) rotate(-6deg);
    background: var(--accent);
    color: var(--on-accent);
  }
}

/* 官方账号：居中圆形头像，下面一行两个账号按钮 */
.follow {
  display: grid;
  justify-items: center;
  gap: 24px;
}

/* 品牌渐变外圈 + 一道底色缝 + 头像 */
.follow-avatar {
  display: block;
  width: 116px;
  height: 116px;
  padding: 4px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 18px 44px -16px color-mix(in srgb, var(--brand-violet) 80%, transparent);
}

.follow-face {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: #fff;
}

html[data-theme="dark"] .follow-face {
  background: var(--bg-soft);
}

/* avatar.png 是从高清 Logo 抠出的透明底字标（去掉了圆角方框），
   明暗两套主题共用一张，底色由上面的圆负责 */
.follow-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-theme="dark"] .follow-face img {
  filter: brightness(1.12);
}

.follow-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 380px);
}

/* 各按钮就地改写 --accent，btn-ghost 的悬停描边和文字跟着换成平台色 */
.follow-bili {
  --accent: #fb7299;
}

.follow-douyin {
  --accent: #fe2c55;
}

.follow-btn {
  padding-left: 10px;
}

.follow-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.45s var(--ease-spring);
}

.follow-badge svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.follow-bili .follow-badge {
  background: #fb7299;
}

/* 抖音：黑底白音符 + 青红错位描边 */
.follow-douyin .follow-badge {
  background: #161823;
}

html[data-theme="dark"] .follow-douyin .follow-badge {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.follow-douyin .follow-badge svg {
  filter: drop-shadow(-1px -1px 0 #25f4ee) drop-shadow(1px 1px 0 #fe2c55);
}

@media (hover: hover) {
  .follow-btn:hover .follow-badge {
    transform: rotate(-8deg) scale(1.08);
  }
}

/* 收尾 CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding: 44px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%),
    color-mix(in srgb, var(--bg-elevated) 84%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
}

.cta::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 80%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--brand-pink) 12%, transparent), transparent 70%);
  pointer-events: none;
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta h2 {
  margin-bottom: 10px;
}

.cta p {
  max-width: 52ch;
  margin: 0 auto 24px;
}

.cta .actions {
  margin-top: 0;
}

@media (min-width: 560px) {
  .cta .actions {
    justify-content: center;
  }
}

@media (min-width: 720px) {
  .steps,
  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .rule-grid,
  .steps {
    gap: 18px;
  }

  .follow-avatar {
    width: 132px;
    height: 132px;
  }

  .follow-links {
    gap: 14px;
  }

  .cta {
    padding: 64px 52px;
  }
}

@media (min-width: 901px) {
  .page-content {
    padding-top: 72px;
  }

  .section {
    margin-bottom: 64px;
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
  }

  .section-head h2 {
    padding-left: 20px;
  }
}

@media (min-width: 1000px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
