/* 正式 Hero：centered positioning + plain headline + focus background。 */

.site-home .intro-fold {
  display: flex;
  flex-direction: column;
}

body.site-home:not([data-view]) .intro-fold {
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
}

.site-home #hero.hero-primary {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: clamp(32px, 5vh, 56px) 0;
  border-bottom: 0;
  background: transparent;
  scroll-margin-top: 64px;
}

.site-home .hero-watermark-left,
.site-home .hero-watermark-right {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.16em;
  pointer-events: none;
}

.site-home .hero-watermark-left {
  top: 48%;
  left: 48px;
  gap: 3px;
  transform: translateY(-50%);
}

.site-home .hero-watermark-left .wm-square {
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 13px;
}

.site-home .hero-watermark-left .wm-slash {
  color: #94a3b8;
  font-size: 10px;
}

.site-home .hero-watermark-left .wm-dash {
  margin-top: 4px;
  color: #0284c7;
  font-weight: 800;
}

.site-home .hero-watermark-right {
  top: 24%;
  right: 48px;
  gap: 2px;
  font-weight: 600;
  text-align: right;
}

.site-home .hero-container {
  position: relative;
  z-index: 10;
}

.site-home #hero.hero-primary::before,
.site-home #hero.hero-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-home #hero.hero-primary::before {
  background: radial-gradient(
    ellipse 58% 75% at 50% 48%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.82) 30%,
    rgba(222, 234, 244, 0.52) 68%,
    rgba(83, 111, 143, 0.33) 100%
  );
}

/* 柔化預覽：保留中央明度，讓灰藍色階延伸到畫面外。 */
html[data-hero-focus="soft"] .site-home #hero.hero-primary::before {
  background: radial-gradient(
    ellipse 85% 115% at 50% 45%,
    rgba(255, 255, 255, 0.84) 0%,
    rgba(255, 255, 255, 0.66) 32%,
    rgba(232, 242, 250, 0.44) 62%,
    rgba(162, 187, 211, 0.18) 100%
  );
}

/* 正式模式：聚焦層固定於視窗，並在 Hero 離場時淡出。 */
html[data-hero-focus="fixed"] .site-home #hero.hero-primary::before {
  position: fixed;
  inset: auto 0 auto;
  top: var(--hero-focus-frame-top, 64px);
  height: var(--hero-focus-frame-height, 70svh);
  opacity: var(--hero-focus-opacity, 0);
}

.site-home #hero.hero-primary::after {
  opacity: 0.24;
  background: linear-gradient(
    90deg,
    transparent 22%,
    rgba(255, 255, 255, 0.75) 24%,
    transparent 27%,
    transparent 47%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 53%,
    transparent 74%,
    rgba(255, 255, 255, 0.70) 76%,
    transparent 79%
  );
}

.site-home #hero.hero-primary .hero-center-study {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 1040px);
  margin-inline: auto;
  text-align: center;
}

.site-home #hero.hero-primary .hero-center-kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  color: #33699d;
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: 0.15em;
}

.site-home #hero.hero-primary .hero-center-kicker > span + span {
  padding-left: 18px;
  border-left: 1px solid #74a4d5;
}

.site-home #hero.hero-primary .hero-center-kicker .hero-intensity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.14em;
}

.site-home #hero.hero-primary .hero-center-title {
  width: 100%;
}

.site-home #hero.hero-primary .hero-center-title .hero-h1 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  text-align: center;
}

.site-home #hero.hero-primary .hero-center-title .hero-h1::before,
.site-home #hero.hero-primary .hero-center-title .hero-h1::after {
  content: "";
  position: absolute;
  left: 50%;
  height: 1px;
  transform: translateX(-50%);
  transform-origin: center;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #176ec5 28%, #176ec5 72%, transparent);
}

.site-home #hero.hero-primary .hero-center-title .hero-h1::before {
  top: -17px;
  width: 104px;
  opacity: 0.8;
}

.site-home #hero.hero-primary .hero-center-title .hero-h1::after {
  bottom: -8px;
  width: 48px;
  opacity: 0.9;
}

.site-home.boot-complete #hero.hero-primary .hero-center-title .hero-h1::before {
  animation: hero-primary-marker-breathe 6s ease-in-out infinite;
}

.site-home.boot-complete #hero.hero-primary .hero-center-title .hero-h1::after {
  animation: hero-primary-marker-breathe 6s ease-in-out -1.7s infinite;
}

.site-home #hero.hero-primary .hero-center-title .hero-capsule-line {
  position: relative;
  display: block;
  align-self: center;
  padding: 0;
  color: #102642;
  background: transparent;
  border: 0;
  box-shadow: none;
  font: var(--dv2-font-weight-display, 800) clamp(36px, 3.3vw, 64px)/1.18 Rajdhani, "Microsoft JhengHei", sans-serif;
  letter-spacing: 0.035em;
  text-align: center;
  text-shadow: 0 1px 0 #fff, 0 12px 32px rgba(20, 58, 110, 0.13);
  white-space: nowrap;
}

.site-home #hero.hero-primary .hero-center-title .hero-blue-badge {
  padding: 0;
  margin-left: 0;
  color: #0756bb;
  background: transparent;
  box-shadow: none;
}

.site-home #hero.hero-primary .hero-center-title .hero-capsule-line::before {
  content: attr(data-scan);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  color: #1871c9;
  clip-path: inset(0 100% 0 0);
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-shadow: none;
  white-space: nowrap;
}

.site-home.boot-complete #hero.hero-primary .hero-center-title .hero-capsule-line::before {
  animation: hero-primary-title-scan 12s ease-in-out infinite;
}

.site-home.boot-complete #hero.hero-primary .hero-center-title .hero-capsule-line:nth-child(2)::before {
  animation-delay: 0.14s;
}

.site-home #hero.hero-primary .hero-center-copy {
  width: 100%;
  max-width: 47rem;
  margin: 24px 0 28px;
  color: #304864;
  font: var(--dv2-font-weight-supporting, 500) 16px/1.75 var(--font-sans);
  text-wrap: balance;
}

.site-home #hero.hero-primary .hero-center-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.site-home #hero.hero-primary .hero-center-actions a {
  min-width: 185px;
  justify-content: center;
}

.site-home #hero.hero-primary .hero-center-bottom {
  display: flex;
  gap: 22px;
  margin-top: 38px;
  color: #5d7b9d;
  font: 700 10px/1.4 var(--font-mono);
  letter-spacing: 0.16em;
}

.site-home #hero.hero-primary .hero-center-bottom span + span {
  padding-left: 22px;
  border-left: 1px solid #9ab9d9;
}

@keyframes hero-primary-marker-breathe {
  0%, 100% {
    opacity: 0.72;
    transform: translateX(-50%) scaleX(0.8);
  }
  50% {
    opacity: 0.88;
    transform: translateX(-50%) scaleX(1.03);
  }
}

@keyframes hero-primary-title-scan {
  0%, 14% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  16% {
    opacity: 0.46;
    clip-path: inset(0 82% 0 0);
  }
  20% {
    opacity: 0.52;
    clip-path: inset(0 42% 0 42%);
  }
  24% {
    opacity: 0.46;
    clip-path: inset(0 0 0 82%);
  }
  27%, 100% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
}

@media (max-width: 1200px) {
  html[lang="en"] .site-home #hero.hero-primary .hero-center-title .hero-capsule-line {
    max-width: 100%;
    font-size: clamp(28px, 3.2vw, 44px);
    white-space: normal;
    text-wrap: balance;
  }

  html[lang="en"] .site-home #hero.hero-primary .hero-center-title .hero-capsule-line::before {
    white-space: normal;
    text-wrap: balance;
  }
}

@media (max-width: 880px) {
  .site-home #hero.hero-primary .hero-center-copy {
    font-size: 14px;
  }

  .site-home #hero.hero-primary .hero-center-kicker,
  .site-home #hero.hero-primary .hero-center-bottom {
    flex-wrap: wrap;
  }

  .site-home #hero.hero-primary .hero-center-actions {
    flex-direction: column;
    width: 100%;
  }

  .site-home #hero.hero-primary .hero-center-actions a {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .site-home #hero.hero-primary .hero-center-kicker {
    font-size: 9px;
  }

  .site-home #hero.hero-primary .hero-center-kicker > span + span {
    padding-left: 9px;
  }

  .site-home #hero.hero-primary .hero-center-title .hero-capsule-line {
    font-size: clamp(28px, 7vw, 36px);
  }

  html[lang="en"] .site-home #hero.hero-primary .hero-center-title .hero-capsule-line {
    max-width: 100%;
    font-size: clamp(25px, 6vw, 34px);
    line-height: 1.08;
    white-space: normal;
    text-wrap: balance;
  }

  html[lang="en"] .site-home #hero.hero-primary .hero-center-title .hero-capsule-line::before {
    white-space: normal;
    text-wrap: balance;
  }

  .site-home #hero.hero-primary .hero-center-bottom {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-home #hero.hero-primary .hero-center-title .hero-h1::before,
  .site-home #hero.hero-primary .hero-center-title .hero-h1::after,
  .site-home #hero.hero-primary .hero-center-title .hero-capsule-line::before {
    animation: none !important;
  }
}
