/* ============================================================================
   2. EDITORIAL TYPOGRAPHY & STORYTELLING OVERLAYS (PHOENIX CV Spatial Editorial System)
   Fixes child .char stacking-context transparency bug on side cards and ensures
   high-contrast readability across both light and dark 3D backgrounds.
   ============================================================================ */

/* HomeHero Oversized Glass Serif Typography */
.home-hero h1 {
  color: #fdebfd;
  font-family: var(--font-serif);
  /* 每个 .char 实际占宽约 0.77 × 字号，9 个字符 = 6.9 倍字号。
     原来 15.8vw 在 1440 宽下算出 227px，整行要 1580px，容器只有 1280px，
     所以标题必然折成两行（1440/1024/768/390 四档全中）。
     这里取「单行能放下的最大值」：12.2vw 在 1440 下约 176px、整行 1220px，
     放进 1280 的内容区还剩 30px 余量，气势不缩太多又不会折行；
     white-space: nowrap 兜底，防止字体加载后度量变化再次折行。 */
  font-size: clamp(3rem, 12.2vw, 13.4rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.96;
  margin-bottom: 1.5vw;
  text-align: center;
  white-space: nowrap;
  transform: translate(0.6vw, 0);
}
@media (max-width: 767px) {
  .home-hero h1 {
    font-size: 11.6vw;
    transform: translate(1vw, 0);
  }
}
.home-hero h1 .char {
  display: inline-block;
  background: linear-gradient(180deg, #fffcff 0% 25%, #e3f0ff 65% 85%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding: 0.08em 0.14em 0.16em 0.08em;
  margin-left: -0.06em;
  filter: drop-shadow(0 14px 36px rgba(55, 98, 190, 0.16));
  will-change: transform, opacity, filter;
}
.home-hero h2 {
  color: var(--color-brand-black);
  margin-bottom: -1.8vw;
  margin-left: 5.5vw;
  will-change: transform, opacity, filter;
}
.home-hero h2 .char {
  display: inline-block;
  color: #29345a;
  will-change: transform, opacity, filter;
}
.home-hero h2 span.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
}

/* SplitText Character & Line Containers */
.animated-text .char,
.animated-text-big .char,
.animated-text .line {
  display: inline-block;
  will-change: transform, opacity, filter;
}

/* Light-section story blocks: crisp deep-indigo editorial contrast */
#story-block-1,
#story-block-2,
#story-block-3-intro {
  color: #242f54 !important;
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.65);
}
#story-block-1 .char,
#story-block-2 .char,
#story-block-3-intro .char {
  color: #242f54;
}

/* Dark-section story blocks: luminous high-contrast white with subtle halo protection */
#story-block-4,
#story-feather-header,
#story-block-5-header,
#story-block-6a,
#story-block-6 {
  color: #ffffff !important;
  text-shadow: 0 4px 28px rgba(6, 11, 29, 0.88), 0 1px 3px rgba(0, 0, 0, 0.65);
}
#story-block-4 .char,
#story-feather-header .char,
#story-block-5-header .char,
#story-block-6a .char,
#story-block-6 .char {
  color: #ffffff;
}

/* BigTextNew Frosted Ice-White Gradient Typography (narrative / Auto-Fill / Precision / Strategy) */
.animated-text-big {
  font-family: var(--font-serif);
  font-style: italic;
}
.gradient-text {
  display: inline-block;
}
.gradient-text .char {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(168deg, #1e1b4b 0%, #4338ca 36%, #9d4edd 68%, #d97757 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding: 0.12em 0.1em 0.26em 0.1em;
  margin-left: -0.04em;
  filter: drop-shadow(0 12px 28px rgba(67, 56, 202, 0.18)) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.72));
}
.dark-mode .gradient-text .char {
  background: linear-gradient(180deg, #ffffff 0% 22%, #dbeafe 55%, #c7d2fe 88%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 16px 44px rgba(136, 174, 255, 0.32));
}

/* Luminous Hairline Dividers (Luminous Hairline Dividers) */
.text-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0.96) 50%, rgba(255, 255, 255, 0) 88%);
  display: block !important;
  height: 2px;
  line-height: 0;
  width: 100%;
  margin: 10px auto;
  transform-origin: center;
  will-change: transform, opacity, filter;
}
.text-line.half {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 84%);
}
.text-line.dark,
.dark-mode .text-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 12%, rgba(186, 230, 253, 0.58) 50%, rgba(255, 255, 255, 0) 88%);
}

/* ============================================================================
   CRITICAL FIX FOR 4 FEATHER SIDE CARDS (#story-lines-left/right/3/4):
   Never use parent-only `-webkit-text-fill-color: transparent` when children
   are `.char` inline-blocks with `transform`, which made text invisible in
   Blink/WebKit. Instead, style `.lines-text-gradient` and `.char` with crisp
   luminous ice-white/sky-blue fill + protective glassmorphic card backdrop!
   ============================================================================ */
#story-lines-left,
#story-lines-right,
#story-lines-3,
#story-lines-4 {
  background: radial-gradient(
    120% 120% at 50% 50%,
    rgba(8, 14, 34, 0.82) 0%,
    rgba(8, 14, 34, 0.62) 68%,
    rgba(8, 14, 34, 0.18) 100%
  );
  border: 1px solid rgba(186, 230, 253, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 1.35rem 1.6rem;
  border-radius: 1.35rem;
  color: #ffffff !important;
}

.lines-text-gradient,
.lines-text-gradient-left {
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  text-shadow: 0 2px 14px rgba(6, 11, 29, 0.9);
}

.lines-text-gradient .char,
.lines-text-gradient-left .char {
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  text-shadow: 0 2px 14px rgba(6, 11, 29, 0.9);
}

/* CaseHover Floating Project Titles for the 7 Crystals (Side Popups) */
.case-hover-item {
  transition: opacity 0.15s linear;
  will-change: transform, opacity;
}
.case-hover-card {
  background: radial-gradient(
    120% 120% at 50% 50%,
    rgba(8, 14, 34, 0.86) 0%,
    rgba(15, 23, 42, 0.68) 70%,
    rgba(15, 23, 42, 0.25) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 1.25rem;
  padding: 0.75rem 1.35rem;
  color: #ffffff !important;
}
.case-hover-card:hover {
  border-color: rgba(165, 180, 252, 0.65);
  box-shadow: 0 20px 48px rgba(99, 102, 241, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.case-hover-glow {
  background: radial-gradient(circle, rgba(6, 11, 29, 0.88) 0%, rgba(6, 11, 29, 0) 72%);
  filter: blur(24px);
}

/* ============================================================================
   RICH PRELUDE SHOWCASE STAGES (立体叙事力 / Auto-Fill / Precision / Strategy)
   Replaces empty flat pink/yellow space with sculpted architectural rings,
   eyebrow pills, and frosted pearl-champagne glass spec cards.
   ============================================================================ */
.story-rich-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.05rem;
  font-family: var(--font-sans);
  font-style: normal;
}
.story-rich-stage > p:not(.story-subtitle-line) {
  font-family: var(--font-serif);
  font-style: italic;
  position: relative;
  z-index: 2;
}
.story-orbital-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(76vw, 680px);
  height: min(76vw, 680px);
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background:
    radial-gradient(circle at 38% 34%, rgba(255, 236, 214, 0.56) 0%, rgba(246, 212, 234, 0.34) 38%, rgba(199, 210, 254, 0.18) 64%, transparent 74%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 0 60px rgba(255, 255, 255, 0.45),
    0 24px 80px rgba(99, 102, 241, 0.09);
  pointer-events: none;
  z-index: 0;
}
.story-orbital-halo::before,
.story-orbital-halo::after {
  content: '';
  position: absolute;
  inset: 9%;
  border-radius: 9999px;
  border: 1px dashed rgba(99, 102, 241, 0.18);
}
.story-orbital-halo::after {
  inset: -6%;
  border-style: solid;
  border-color: rgba(217, 119, 87, 0.16);
}
.story-theme-autofill .story-orbital-halo {
  background: radial-gradient(circle at 32% 30%, rgba(255, 237, 213, 0.62) 0%, rgba(244, 206, 232, 0.36) 42%, rgba(191, 219, 254, 0.22) 68%, transparent 76%);
}
.story-theme-precision .story-orbital-halo {
  background: radial-gradient(circle at 64% 32%, rgba(224, 231, 255, 0.62) 0%, rgba(251, 207, 232, 0.34) 44%, rgba(254, 243, 199, 0.24) 70%, transparent 78%);
}
.story-theme-strategy .story-orbital-halo {
  background: radial-gradient(circle at 50% 28%, rgba(254, 235, 210, 0.60) 0%, rgba(233, 213, 255, 0.38) 44%, rgba(199, 210, 254, 0.22) 70%, transparent 78%);
}
.story-eyebrow-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 1.05rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 8px 24px rgba(49, 46, 89, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #312e59;
}
.story-eyebrow-pill .eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6366f1, #ec4899, #f59e0b);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.55);
}
.story-subtitle-line {
  position: relative;
  z-index: 2;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: clamp(0.88rem, 1.35vw, 1.12rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #333b66;
  max-width: 38rem;
  margin: -0.25rem auto 0.25rem;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.85);
}
.story-spec-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(90vw, 46rem);
  margin-top: 0.35rem;
}
@media (max-width: 640px) {
  .story-spec-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    max-width: 19rem;
  }
}
.story-spec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: 1.15rem;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 247, 242, 0.52) 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 12px 32px rgba(49, 46, 89, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}
.story-spec-card .spec-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #6b5b8a;
  text-transform: uppercase;
}
.story-spec-card .spec-val {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  background: linear-gradient(135deg, #272459 0%, #5b3fd6 55%, #d96b52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.story-spec-card .spec-sub {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 400;
}
.story-rich-meta {
  will-change: opacity, transform;
}
