
.history-curve {
  position: relative;
  background: var(--warm-ink);
  height: 900vh; 
  --hc-out: cubic-bezier(0.16, 1, 0.3, 1);
  --hc-side: clamp(20px, 5vw, 80px);
  --hc-cy: 42%;      
  --hc-cap-top: 72%; 
  --hc-cap-left: 20%;
}
.hc-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.history-curve .ht-wrap .kicker { margin-bottom: 0; padding-bottom: 10px; }
body.lp-dark .history-curve .ht-wrap .kicker span { font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.08em; }

.hc-year3d {
  position: absolute;
  inset: 0;
  perspective: 900px;
  perspective-origin: calc(var(--hc-year-x, 20%) + var(--hc-year-fs, 120px) * 1.2) var(--hc-year-y, 70%);
  pointer-events: none;
  z-index: 3;
}
.hc-year3d-block {
  position: absolute;
  left: var(--hc-year-x, 20%);
  top: var(--hc-year-y, 70%);
  display: flex;
  font-size: var(--hc-year-fs, 120px);
  transform-style: preserve-3d;
  transform-origin: 0 50%;
  will-change: transform;
}
.hc-ys {
  position: relative;
  width: 0.62em;
  height: 1em;
  transform-style: preserve-3d;
}
.hc-yf {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 55%;
}
.hc-yf span {
  position: absolute;
  inset: 0;
  text-align: center;
  font-family: 'Jost', 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1;
  
  opacity: var(--o, 0);
  
  color: hsl(36 42% calc(34% - var(--d, 0) * 20%));
}

.hc-yf span.is-front {
  background-image:
    linear-gradient(105deg, transparent 42%, rgba(255,250,236,0.95) 50%, transparent 58%),
    linear-gradient(120deg, #f4dfa3 0%, var(--vp-gold) 55%, #a97a34 100%);
  background-size: 260% 100%, 100% 100%;
  background-position: var(--g, 120%) 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--vp-gold);
}

.hc-intro {
  position: absolute;
  left: var(--hc-side);
  top: var(--hc-cy);
  transform: translateY(-50%);
  max-width: min(520px, 46vw);
  z-index: 3;
  will-change: opacity, transform;
}
.hc-intro-lead {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.5;
  color: var(--paper);
  margin-bottom: 22px;
}
.hc-intro-text {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 2;
  color: rgba(246,247,242,0.72);
}
.hc-intro-hint {
  margin-top: 30px;
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(246,247,242,0.45);
}

.hc-space {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
}

.hc-today {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/top-history-today.webp") center / cover no-repeat;
  clip-path: circle(0 at 50% 50%);
  visibility: hidden;
}

.hc-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to top, rgba(3,14,26,0.82) 0%, rgba(3,14,26,0.35) 45%, rgba(3,14,26,0) 70%);
}

.hc-item { position: static; }
.hc-src {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hc-body {
  position: absolute;
  left: var(--hc-cap-left);
  right: var(--hc-side);
  top: var(--hc-cap-top);
  transform: translateY(var(--hc-cap-shift, 0%));
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 680px);
  column-gap: clamp(24px, 3vw, 48px);
  align-items: start;
  pointer-events: none;
}

.hc-item.hc-final .hc-body {
  left: var(--hc-cap-left5, var(--hc-cap-left));
  grid-template-columns: minmax(0, 860px);
}

.hc-era { display: none; flex-direction: column; gap: 10px; }
.hc-era-year {
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: clamp(40px, 4.2vw, 64px);
  font-weight: 500;
  line-height: 0.9;
  background: linear-gradient(120deg, #f4dfa3 0%, var(--vp-gold) 55%, #a97a34 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--vp-gold);
}
.hc-era-tag {
  font-size: clamp(14px, 1.1vw, 17px);
  letter-spacing: 0.14em;
  color: rgba(246,247,242,0.7);
}
.hc-out {
  font-size: clamp(17px, 1.65vw, 25px);
  line-height: 1.75;
  color: rgba(246,247,242,0.96);
  text-shadow: 0 1px 14px rgba(3,14,26,0.8);
}
.hc-out.hc-dim {
  color: rgba(246,247,242,0.66);
  font-size: clamp(14px, 1.25vw, 18px);
  margin-top: 10px;
}

.hc-body > * { opacity: 0; }
.hc-item.is-active .hc-body > * { opacity: 1; }

.hc-body .hc-era-year { display: none; }

.hc-index {
  position: absolute;
  right: var(--hc-side);
  bottom: clamp(24px, 4vh, 44px);
  z-index: 4;
  display: flex;
  gap: clamp(12px, 1.6vw, 22px);
  transition: opacity 0.5s ease;
}
.hc-index button {
  font-family: 'Jost', 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(246,247,242,0.38);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.hc-index button.is-active { color: var(--vp-gold); border-color: var(--vp-gold); }
@media (hover: hover) and (pointer: fine) {
  .hc-index button:hover { color: var(--paper); }
}
.history-curve.is-warp .hc-index,
.history-curve.is-intro .hc-index { opacity: 0; pointer-events: none; }

@media (max-width: 768px) {
  .history-curve { --hc-cy: 36%; --hc-side: 20px; }
  .hc-stage::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 46%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgba(3,14,26,0.92) 0%, rgba(3,14,26,0.7) 45%, rgba(3,14,26,0) 100%);
    transition: opacity 0.5s ease;
  }
  .history-curve.is-intro .hc-stage::after,
  .history-curve.is-warp .hc-stage::after { opacity: 0; } 
  .hc-intro { max-width: none; right: 20px; top: 50%; }
  .hc-body {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: calc(clamp(24px, 4vh, 44px) + 44px);
    transform: none;
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
  .hc-out { text-shadow: 0 1px 10px rgba(3,14,26,0.95); }
  .hc-era { flex-direction: row; align-items: baseline; gap: 14px; }
  .hc-out { font-size: 16px; line-height: 1.7; }
  .hc-out.hc-dim { font-size: 13.5px; margin-top: 6px; }
  .hc-era-year { font-size: clamp(36px, 11vw, 48px); }
  .hc-index { left: 20px; right: 20px; justify-content: space-between; gap: 0; }
  .hc-index button { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-body > *, .hc-item.is-active .hc-body > * { transition: opacity 0.2s linear; transform: none; }
}

.hc-w { display: inline-block; white-space: nowrap; }
.hc-out { text-wrap: balance; } 
.hc-ch {
  display: inline-block;
  transform-origin: 50% 90%;
  will-change: transform, opacity;
}
.hc-out,
.hc-era-tag,
.hc-intro-lead,
.hc-intro-text { perspective: 480px; }

.hc-ch { will-change: auto; }
.hc-caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  vertical-align: -0.14em; background: currentColor;
  animation: hc-caret-blink 1s steps(1) infinite;
}
@keyframes hc-caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hc-caret { animation: none; } }

.hc-body > * { opacity: 0; transform: translateY(-8px); transition: opacity .5s ease, transform .6s var(--hc-out); }
.hc-item.is-active .hc-body > * { opacity: 1; transform: none; transition: none; }
.hc-caret { display: none !important; }

.hc-sp-br { display: none; }
@media (max-width: 860px) { .hc-sp-br { display: inline; } }
