/* =======================================================
   首页（Hero）：视频背景 + 渐显动效 + 动画任务列表
   说明：以原生 CSS 复刻给定规格中的 Tailwind 类名效果
   ======================================================= */

/* ---------- 第一屏容器 ---------- */
.hero-script {
  position: relative;
  min-height: 100vh;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 0;
}

/* 背景视频层（absolute, z-0） */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  opacity: .98;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .05); /* bg-white/[0.05] */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* 内容层（relative, z-10） */
.hero-content-layer {
  position: relative;
  z-index: 10;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 80rem;      /* max-w-7xl */
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* 无标题后保持内容垂直居中 */
  flex-grow: 1;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- 文案 ---------- */
.hero-headline {
  font-size: 2.25rem;             /* text-4xl */
  letter-spacing: -.025em;        /* tracking-tight */
  color: #0f172a;
  margin: 0 auto 1.25rem;
  max-width: 56rem;               /* max-w-4xl */
  line-height: 1.12;
  font-weight: 700;
}
@media (min-width: 768px) {
  .hero-headline { font-size: 45px; }
}

.hero-sub {
  font-size: .75rem;
  color: #64748b;                 /* slate-500 */
  max-width: 36rem;               /* max-w-xl */
  margin: 0 auto 1.5rem;
  line-height: 1.625;
  font-weight: 400;
}
@media (min-width: 768px) { .hero-sub { font-size: 13px; } }

/* CTA 按钮：黑色胶囊 + 斜切白光扫过动效（参考 Uiverse by CristianMontoya98） */
.hero-cta-wrap { margin-bottom: 2.6rem; display: flex; justify-content: center; }
.hero-cta {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 2.4rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .5s ease;
}
/* 斜切白色光带：悬停时从中间向两侧铺满 */
.hero-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -20%;
  right: -20%;
  top: 0;
  bottom: 0;
  background: #fff;
  transform: skewX(-45deg) scale(0, 1);
  transition: transform .5s ease;
}
.hero-cta:hover { color: #000; }
.hero-cta:hover::after { transform: skewX(-45deg) scale(1, 1); }

/* ---------- 渐显入场动画 ---------- */
.fade-up { opacity: 0; transform: translateY(20px); }
.fade-up.in {
  opacity: 1; transform: translateY(0);
  transition: opacity .8s ease-out, transform .8s ease-out;
}
.scale-in { opacity: 0; transform: scale(.95); }
.scale-in.in {
  opacity: 1; transform: scale(1);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in { opacity: 0; }
.fade-in.in { opacity: 1; transition: opacity 1s ease-out; }

/* ---------- 动画任务列表 ---------- */
.task-area {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 24rem; /* max-w-sm */
  margin: 0 auto;
}
.task-card-wrap {
  position: relative;
  z-index: 20;
  width: 100%;
}
.task-box {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 220px;
  margin: 0 auto;
  text-align: left;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 768px) { .task-box { max-width: 420px; } }

/* 玻璃高亮卡：需求——去掉遮挡人物眼睛的玻璃块，仅保留前置白色方块 */
.task-glass {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 54px;
  border-radius: .75rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  pointer-events: none;
}
.task-icon {
  width: 30px; height: 30px;
  background: #fff;
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  border: 1px solid rgba(255, 255, 255, .4);
}
.mini-logo { display: flex; flex-direction: column; gap: 1.5px; transform: rotate(-15deg); }
.mini-logo i { display: block; height: 1.5px; border-radius: 999px; background: #0c101d; }
.mini-logo i:nth-child(1) { width: 10px; }
.mini-logo i:nth-child(2) { width: 7.2px; transform: translateX(.8px); }
.mini-logo i:nth-child(3) { width: 8.8px; transform: translateX(1.6px); background: #475569; }

/* 任务条目层 */
.task-layer {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 10;
  pointer-events: none;
}
.task-item {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  will-change: transform, opacity;
}
.task-item .tl-active, .task-item .tl-idle { padding-left: 58px; }
.task-item .tl-active { display: none; flex-direction: column; justify-content: center; text-align: left; }
.task-item .tl-idle { display: flex; align-items: center; text-align: left; }
.task-item[data-state="active"] .tl-active { display: flex; }
.task-item[data-state="active"] .tl-idle { display: none; }

.tl-label {
  font-size: 7.5px;
  color: rgba(255, 255, 255, .5);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  margin-bottom: 4px;
}
.tl-text {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -.025em;
  color: #fff;
  line-height: 1;
}
.tl-text-2 {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: -.025em;
  color: rgba(255, 255, 255, .7);
  line-height: 1;
}
@media (min-width: 768px) {
  .tl-text { font-size: 13px; }
  .tl-text-2 { font-size: 12px; }
}

.task-tagline {
  margin-top: 3.5rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .025em;
  color: rgba(255, 255, 255, .5);
  text-align: center;
}

/* ---------- 首屏导航字体（需求：改为黑色） ---------- */
body.has-video-hero .navbar:not(.scrolled) .nav-logo,
body.has-video-hero .navbar:not(.scrolled) .nav-link { color: rgba(0, 0, 0, .88); }
body.has-video-hero .navbar:not(.scrolled) .logo-mark { background: #000; color: #fff; }
body.has-video-hero .navbar:not(.scrolled) .nav-toggle span { background: #000; }

/* ---------- 首屏主标题块（参考图：AIGC PORTFOLIO） ---------- */
.hero-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2.2rem;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 1.4rem;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, .55);
  letter-spacing: .02em;
}
.kicker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #000;
}
.hero-mega {
  margin: 0 0 1.2rem;
  font-size: clamp(56px, 11vw, 118px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: .98;
  color: #0a0a0a;
}
.hero-sub2 {
  margin: 0;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 400;
  letter-spacing: .14em;
  color: rgba(0, 0, 0, .62);
  text-transform: uppercase;
}

/* =======================================================
   首屏标题「反光」效果
   鼠标划过时，高光跟着光标位置在文字上流动（背景裁切到文字实现）
   ======================================================= */
@property --glare-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --glare-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --glare-strength {
  syntax: '<number>';
  inherits: false;
  initial-value: .95;
}

.hero-mega {
  --glare-x: 50%;
  --glare-y: 50%;
  --glare-size: 150px;      /* 高光半径：越大越柔 */
  --glare-strength: .95;    /* 高光亮度 0~1 */
  position: relative;
  color: transparent;
  background-image:
    radial-gradient(circle var(--glare-size) at var(--glare-x) var(--glare-y),
      rgba(255, 255, 255, var(--glare-strength)) 0%,
      rgba(255, 255, 255, calc(var(--glare-strength) * .55)) 26%,
      rgba(255, 255, 255, 0) 62%),
    linear-gradient(#0a0a0a, #0a0a0a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: --glare-x .18s ease-out, --glare-y .18s ease-out, --glare-strength .28s ease-out;
}
/* 鼠标离开后高光淡走 */
.hero-mega.glare-off {
  --glare-strength: 0;
  transition: --glare-x .35s ease-out, --glare-y .35s ease-out, --glare-strength .45s ease-out;
}
/* 高光经过时，文字略微提亮（描边感的金属反光） */
.hero-mega.glare-on {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, .28));
}

/* 触屏设备不启用反光，保持纯黑标题 */
@media (pointer: coarse) {
  .hero-mega {
    color: #0a0a0a;
    background-image: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }
}

/* 兼容兜底：不支持 background-clip:text 的浏览器保持纯黑标题，避免文字消失 */
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero-mega {
    color: #0a0a0a;
    background-image: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }
}
