/* ============================================================
   tokens
   ============================================================ */
:root {
  --ink-void: #060A18;
  --panel-deep: #0B1024;
  --panel-line: rgba(255, 255, 255, 0.08);
  --panel-line-strong: rgba(255, 255, 255, 0.16);
  --signal-violet: #7C5CFF;
  --signal-violet-soft: rgba(124, 92, 255, 0.16);
  --signal-mint: #4CE0B3;
  --text-primary: #F5F6FA;
  --text-muted: rgba(245, 246, 250, 0.62);
  --text-faint: rgba(245, 246, 250, 0.38);

  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* ============================================================
   base
   ============================================================ */
* { box-sizing: border-box; }

html {
  /* アンカーリンク(#top, #features)のスムーズスクロール。
     ただしモーション低減設定のユーザーには適用しない */
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-mint);
  margin: 0 0 14px;
}

.card {
  background: var(--panel-deep);
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  padding: 34px;
}

/* ============================================================
   focus (キーボード操作時のアクセシビリティ)
   ============================================================ */
a:focus-visible,
.button:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--signal-violet);
  outline-offset: 3px;
  border-radius: 999px;
}

/* ============================================================
   buttons
   ============================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button-primary {
  background: var(--signal-violet);
  color: #FFFFFF;
}

.button-primary:hover { transform: translateY(-2px); background: #8C70FF; }

.button-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--panel-line-strong);
}

.button-ghost:hover { border-color: var(--signal-violet); }

.button-lg { padding: 18px 44px; font-size: 16px; }

/* ============================================================
   header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(6, 10, 24, 0.72);
  border-bottom: 1px solid var(--panel-line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  text-decoration: none;
}

.logo-icon {
  width: 20px;
  height: 20px;
  color: var(--signal-violet);
}

.logo-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--signal-mint);
  border: 1px solid rgba(76, 224, 179, 0.35);
  background: rgba(76, 224, 179, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}

.nav-cta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--panel-line-strong);
}

.nav-cta:hover { border-color: var(--signal-violet); }

/* ============================================================
   hero
   ============================================================ */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 24px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: 52px;
  line-height: 1.22;
  margin-bottom: 26px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.85;
  max-width: 46ch;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- signature visual: contribution graph / network sync --- */
.graph-card {
  background: var(--panel-deep);
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  padding: 18px 20px 22px;
  position: relative;
}

.graph-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.graph-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel-line-strong);
}

.graph-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-left: 8px;
}

.graph-grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 4px;
  position: relative;
  z-index: 2;
}

.graph-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.graph-cell.on-1 { background: rgba(124, 92, 255, 0.28); }
.graph-cell.on-2 { background: rgba(124, 92, 255, 0.55); }
.graph-cell.on-3 { background: var(--signal-violet); }
.graph-cell.on-mint { background: var(--signal-mint); }

.graph-cell.pulse {
  animation: pulse 2.4s ease-in-out infinite;
}

.graph-lines {
  position: absolute;
  inset: 56px 20px 22px;
  z-index: 1;
  pointer-events: none;
}

.graph-lines path {
  fill: none;
  stroke: var(--signal-mint);
  stroke-width: 0.5;
  opacity: 0.55;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: draw 1.6s ease forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* --- commit-log ticker --- */
.log-ticker {
  margin-top: 72px;
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.log-track {
  display: flex;
  width: max-content;
  gap: 48px;
  padding: 16px 0;
  animation: scroll-log 28s linear infinite;
}

.log-track:hover { animation-play-state: paused; }

.log-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.log-hash {
  color: var(--signal-mint);
  margin-right: 10px;
}

@keyframes scroll-log {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   generic section
   ============================================================ */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 24px;
}

.section h2 {
  font-size: 32px;
  margin-bottom: 28px;
}

.card-about p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.9;
  margin: 0;
  max-width: 62ch;
}

/* ============================================================
   features
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px;
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.feature-icon {
  width: 28px;
  height: 28px;
  color: var(--signal-violet);
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

/* ============================================================
   closing
   ============================================================ */
.closing {
  text-align: center;
  padding-bottom: 140px;
}

.closing h2 {
  font-size: 38px;
  margin-bottom: 34px;
}

.closing-note {
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 18px;
}

/* ============================================================
   footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--panel-line);
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 38px; }
  .feature-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 14px 20px; }
  .section { padding: 80px 20px; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .log-track,
  .graph-cell.pulse,
  .graph-lines path {
    animation: none !important;
  }
  .graph-lines path { stroke-dashoffset: 0; }
}