/* ============================================================
   Web3おじさん新聞 4周年記念クロニクル
   司令部クロニクル・デザイン（深紺 × シアン × ゴールド）
   ============================================================ */

:root {
  --bg-deep: #030818;
  --bg-navy: #071230;
  --cyan: #4fd8ff;
  --cyan-dim: rgba(79, 216, 255, 0.35);
  --gold: #e6be5a;
  --gold-dim: rgba(230, 190, 90, 0.35);
  --text: #d7e6f5;
  --text-dim: #8ba3bf;
  --font-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 70, 140, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(230, 190, 90, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-navy) 50%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.9;
  overflow-x: hidden;
}

/* ---------- 星空 ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 出現アニメーション ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.35s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.85s; }
.delay-5 { transition-delay: 1.1s; }

/* ============ ヒーロー ============ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 24px 6vh;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-dim);
  margin-bottom: 2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.hero-title > span:first-child {
  font-size: clamp(2.2rem, 6.5vw, 4.6rem);
  letter-spacing: 0.08em;
  background: linear-gradient(120deg, #eaf6ff 20%, var(--cyan) 50%, #eaf6ff 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(79, 216, 255, 0.25));
}
.hero-title-sub {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  letter-spacing: 0.35em;
  color: var(--gold);
  text-shadow: 0 0 18px var(--gold-dim);
}

.hero-lead {
  margin-top: 3rem;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--text-dim);
}
.hero-lead em {
  font-style: normal;
  color: var(--text);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
}

/* カウンター */
.hero-counter {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3rem);
}
.counter-block { display: flex; flex-direction: column; align-items: center; }
.counter-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-dim);
  line-height: 1.2;
}
.counter-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-top: 0.4rem;
}
.counter-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, var(--cyan-dim), transparent);
}

/* スクロール誘導 */
.scroll-hint {
  margin-top: 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--text-dim);
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============ 年代記 ============ */
.chronicle {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10vh 24px 14vh;
}

/* 縦の背骨（グリッド線） */
.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(79, 216, 255, 0.08);
}
.timeline-spine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cyan), var(--gold));
  box-shadow: 0 0 16px var(--cyan-dim);
  transform: scaleY(var(--spine-scale, 0));
  transform-origin: top;
  transition: transform 0.2s linear;
}

/* 章 */
.chapter {
  position: relative;
  width: 46%;
  padding: 4vh 0 12vh;
}
.chapter-right { margin-left: 54%; }

/* ノード（結節点） */
.chapter-node {
  position: absolute;
  top: 5vh;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cyan-dim);
  background: var(--bg-deep);
  transition: all 0.8s ease;
}
.chapter .chapter-node { right: calc(-8.7% - 8px); }
.chapter-right .chapter-node { left: calc(-8.7% - 8px); right: auto; }
.chapter.lit .chapter-node {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold), 0 0 40px var(--gold-dim);
}

.chapter-meta {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}
.chapter-phase {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 3px 10px;
}
.chapter-year {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: 0.12em;
  color: #eef7ff;
  text-shadow: 0 0 30px rgba(79, 216, 255, 0.2);
  margin-bottom: 0.6rem;
}

.chapter-theme {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--gold);
  opacity: 0.9;
  margin-bottom: 2rem;
}

.chapter-body p {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 1.6rem;
}
.chapter-body strong {
  color: var(--gold);
  font-weight: 600;
}

.chapter-quote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cyan);
  border-left: 2px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin-top: 2.4rem;
  text-shadow: 0 0 14px rgba(79, 216, 255, 0.3);
}

/* ============ フィナーレ ============ */
.finale {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16vh 24px 12vh;
  overflow: hidden;
}
.finale-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 900px;
  height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center top, rgba(230, 190, 90, 0.12), transparent 65%);
  pointer-events: none;
}

.finale-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  color: var(--cyan);
  margin-bottom: 2.5rem;
}

.finale-message {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: #eef7ff;
}
.finale-message .gold {
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-dim);
}

.finale-sub {
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-dim);
}
.finale-sub em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan-dim);
}

/* 拍動CTA */
.cta-button {
  position: relative;
  display: inline-block;
  margin-top: 4.5rem;
  padding: 1.1rem 3.4rem;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--bg-deep);
  background: linear-gradient(120deg, var(--gold), #f5d98a);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 30px var(--gold-dim), 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: heartbeat 1.6s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
  transform: scale(1.06);
  box-shadow: 0 0 50px var(--gold), 0 4px 24px rgba(0, 0, 0, 0.5);
  animation-play-state: paused;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.05); }
  28% { transform: scale(1); }
  42% { transform: scale(1.04); }
  70% { transform: scale(1); }
}
.cta-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  animation: ripple 1.6s ease-out infinite;
  pointer-events: none;
}
@keyframes ripple {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

.finale-credit {
  margin-top: 6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  line-height: 2.2;
}
.credit-small { font-size: 0.65rem; opacity: 0.7; }

/* ============ レスポンシブ ============ */
@media (max-width: 760px) {
  .timeline-spine { left: 18px; transform: none; }
  .chapter,
  .chapter-right {
    width: auto;
    margin-left: 0;
    padding-left: 52px;
    padding-bottom: 9vh;
  }
  .chapter .chapter-node,
  .chapter-right .chapter-node {
    left: 11px;
    right: auto;
  }
  .hero-counter { gap: 1rem; }
  .counter-divider { height: 36px; }
  .chapter-meta { flex-wrap: wrap; gap: 0.6rem; }
}

/* モーション低減設定への配慮 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cta-button, .cta-pulse, .scroll-line { animation: none; }
  html { scroll-behavior: auto; }
}
