/* === Hero — Roar-inspired massive headline + stats === */

.hero {
  position: relative;
  padding: 110px 0 80px;
  overflow: hidden;
  z-index: 2;
}
@media (min-width: 768px) {
  .hero { padding: 130px 0 120px; }
}

.hero-glow {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle at center, var(--gold-glow), transparent 55%);
  opacity: 0.22;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-version {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  flex-direction: column;
  gap: 10px;
  opacity: 0.4;
}
@media (min-width: 1100px) {
  .hero-version { display: flex; }
}
.hero-version-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--fg-2), transparent);
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05em;
  margin-top: 24px;
}
.hero-title-cn {
  font-family: var(--font-serif-cn);
  font-weight: 300;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.92;
  letter-spacing: 0.06em;
  color: var(--fg-0);
}
.hero-title-en {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(40px, 8.5vw, 130px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin: 48px 0 32px;
}
@media (min-width: 768px) {
  .hero-meta { flex-direction: row; gap: 24px; margin: 64px 0 40px; }
}

/* === Manifest Terminal (replaces the old status pill) === */
.hero-terminal {
  position: relative;
  display: inline-flex;
  padding: 1px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(212,164,80,0.55), rgba(212,164,80,0.15) 40%, rgba(212,164,80,0.05) 70%, rgba(212,164,80,0.4));
  box-shadow: 0 0 24px rgba(212,164,80,0.18), inset 0 0 14px rgba(0,0,0,0.4);
  isolation: isolate;
}
.hero-terminal::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 2;
}
.hero-terminal-inner {
  background: rgba(5, 4, 2, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 3px;
  padding: 10px 14px 12px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
  /* Faint scanline texture */
  background-image:
    repeating-linear-gradient(180deg, transparent 0 2px, rgba(212,164,80,0.04) 2px 3px),
    linear-gradient(180deg, rgba(5,4,2,0.92), rgba(5,4,2,0.92));
}
.hero-terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  animation: terminal-dot 2.2s ease-in-out infinite;
}
@keyframes terminal-dot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}
.hero-terminal-body {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  min-height: 1.2em;
}
/* English phrases are ~3x longer than the Chinese ones — keep terminal tight */
html[lang="en"] .hero-terminal-body {
  font-size: 10.5px;
  letter-spacing: 0;
}
html[lang="en"] .hero-terminal-inner {
  padding: 8px 12px 10px;
  /* Reserve enough space for the longest phrase ("Embrace Humanity") so the
     outer box width stays constant — but the text itself stays auto-width
     so the blinking cursor still hugs the end of the typed text */
  min-width: 19ch;
}
.hero-terminal-prompt {
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}
.hero-terminal-text {
  color: var(--fg-0);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(255,225,170,0.25);
}
.hero-terminal-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--gold-light);
  box-shadow: 0 0 6px var(--gold-glow);
  transform: translateY(0.1em);
  animation: terminal-cursor 1s steps(1) infinite;
  flex-shrink: 0;
}
@keyframes terminal-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-tagline {
  font-family: var(--font-serif-cn);
  font-weight: 300;
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--fg-1);
  letter-spacing: 0.1em;
}

.hero-desc {
  font-family: var(--font-cn);
  font-size: clamp(13px, 1.4vw, 16px);
  color: var(--fg-2);
  max-width: 540px;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

/* Stats grid */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 64px;
  max-width: 1100px;
  width: 100%;
  background: var(--line-subtle);
}
@media (min-width: 700px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .hero-stats { grid-template-columns: repeat(3, 1fr); margin-top: 96px; } }

.stat-card {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: background var(--dur-fast) var(--ease-out);
}
.stat-card:hover { background: rgba(8, 6, 3, 0.78); }

.stat-card-corner {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.stat-card-icon { color: var(--fg-1); width: 24px; height: 24px; }
.stat-card-icon svg { width: 100%; height: 100%; }

.stat-badge {
  padding: 3px 8px;
  border: 1px solid var(--gold-dim);
  background: rgba(212,164,80,0.08);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg-0);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.stat-value--compact {
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.02em;
}
.stat-value-num {
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-2);
  position: relative;
  z-index: 1;
}

/* Ambient sparkline / chart sitting behind the value */
.stat-chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
  opacity: 0.65;
  mask: linear-gradient(180deg, transparent 0%, black 35%, black 100%);
  -webkit-mask: linear-gradient(180deg, transparent 0%, black 35%, black 100%);
  z-index: 0;
}
.stat-chart .chart-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: chart-draw 2s var(--ease-out) 0.6s forwards;
  filter: drop-shadow(0 0 4px rgba(255,225,170,0.5));
}
.stat-chart .chart-dot {
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255,225,170,0.8));
  animation: chart-dot-in 0.4s var(--ease-out) 2.4s forwards;
}
@keyframes chart-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes chart-dot-in {
  to { opacity: 1; }
}

/* Stat 1: progress bar (replaces sparkline) */
.stat-progress {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 0;
}
.stat-progress-track {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: visible;
}
.stat-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dim) 0%, var(--gold) 50%, var(--gold-light) 100%);
  box-shadow: 0 0 8px var(--gold-glow), 0 0 18px rgba(212,164,80,0.35);
  animation: progress-fill 1.6s var(--ease-out) 0.6s forwards;
}
.stat-progress-fill::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold-glow), 0 0 20px rgba(212,164,80,0.5);
  opacity: 0;
  animation: progress-dot 0.5s var(--ease-out) 2s forwards;
}
.stat-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--fg-4);
}
@keyframes progress-fill {
  to { width: 21%; }
}
@keyframes progress-dot {
  to { opacity: 1; }
}

/* When card has a progress bar, push the value/label up so they don't overlap */
.stat-card:has(.stat-progress) > div:last-child {
  margin-bottom: 36px;
}
