/* Hero title typography + rough-notation highlight / shiny sweep */
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.2vw, 60px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-title__lead {
  display: inline-block;
}

.hero-title__accent {
  display: block;
  margin-top: 0.12em;
  color: #111;
  -webkit-text-fill-color: #111;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  min-height: 1.18em;
  transition: color 0.25s ease;
}

[data-theme="dark"] .hero-title__accent {
  color: var(--text-primary, #f2f0ff);
  -webkit-text-fill-color: var(--text-primary, #f2f0ff);
  background: none;
}

@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(28px, 8.2vw, 40px);
  }
}

/* shadcnuikit 同款 rough-notation highlight；底层略偏转，定时重绘 */
.hero-title__mark {
  position: relative;
  display: inline-block;
  z-index: 0;
  padding: 0 0.04em;
  --mark-back-rot: 1.4deg;
  --mark-back-scale-y: 0.84;
  --mark-back-shift-x: 0px;
  --mark-back-shift-y: 1.5px;
}
.hero-title__mark-layer--back {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  transform:
    translate(var(--mark-back-shift-x), var(--mark-back-shift-y))
    rotate(var(--mark-back-rot))
    scaleY(var(--mark-back-scale-y));
  transform-origin: 50% 55%;
}
.hero-title__mark-ghost {
  display: inline-block;
  color: transparent;
  -webkit-text-fill-color: transparent;
  user-select: none;
}
.hero-title__mark-layer--front {
  position: relative;
  z-index: 1;
}
.hero-title__mark .shiny-text,
[data-theme="dark"] .hero-title__mark .shiny-text {
  color: #fff;
  -webkit-text-fill-color: #fff;
  --shiny-highlight: rgba(255, 255, 255, 0.72);
}
.hero-title__mark .rough-annotation {
  z-index: -1;
}

/* ShinyText — base text always visible; ::after adds a soft highlight sweep */
.shiny-text {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
  --shiny-highlight: rgba(255, 255, 255, 0.58);
}

.shiny-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  background-image: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    var(--shiny-highlight) 50%,
    transparent 60%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 220% 100%;
  background-position: 160% center;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shiny-text-sweep 5s ease-in-out infinite;
}

[data-theme="dark"] .shiny-text {
  --shiny-highlight: #c4b5fd;
}

[data-theme="dark"] .shiny-text::after {
  background-image: linear-gradient(
    120deg,
    transparent 0%,
    transparent 34%,
    var(--shiny-highlight) 50%,
    transparent 66%,
    transparent 100%
  );
}

@keyframes shiny-text-sweep {
  0%, 20% { background-position: 160% center; }
  100% { background-position: -60% center; }
}

@media (prefers-reduced-motion: reduce) {
  .shiny-text::after {
    animation: none;
    content: none;
  }
}
