/* Layout: one long "threshold" — a dark opening, then a single lineage line the reader walks along, then quiet facts.
   配色は 2 種類。既定は blockchainlock.com と同じグループ配色（濃紫・紫・ライム）。
   <html data-palette="classic"> で旧 BCL Foundation（Wix）の配色（濃紺・青緑・ミント）に切り替わる。
   --fx-* はヒーロー背景（hero.js）の色。"r,g,b" で書く */
:root {
  --void: #0e0620;
  --void-soft: #1a0f3a;
  --bg: #faf9ff;
  --surface: #f2efff;
  --ink: #0e0620;
  --ink-soft: #4a3f66;
  --line: #d9d2f5;
  --accent: #6d28d9;
  --highlight: #a3e635;
  --on-void: #f5f3ff;
  --on-void-soft: #c4b5fd;
  --void-line: rgba(196,181,253,.22);
  --hero-rgb: 14,6,32;
  --fx-grid: 196,181,253;
  --fx-edge: 139,92,246;
  --fx-pulse: 196,181,253;
  --fx-door: 196,181,253;
  --fx-open: 163,230,53;
  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #120a26; --surface: #1a1133; --ink: #f2efff; --ink-soft: #b8acd9; --line: #2e2452; --accent: #b69bff; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #120a26; --surface: #1a1133; --ink: #f2efff; --ink-soft: #b8acd9; --line: #2e2452; --accent: #b69bff; color-scheme: dark;
}
/* 旧 BCL Foundation の配色 */
:root[data-palette="classic"] {
  --void: #1f2a37;
  --void-soft: #273240;
  --bg: #fafafa;
  --surface: #ecf7f5;
  --ink: #273042;
  --ink-soft: #4d5f76;
  --line: #d3e3e1;
  --accent: #00807e;
  --highlight: #3deecb;
  --on-void: #ffffff;
  --on-void-soft: #bbc4cf;
  --void-line: rgba(187,196,207,.22);
  --hero-rgb: 31,42,55;
  --fx-grid: 187,196,207;
  --fx-edge: 0,175,173;
  --fx-pulse: 188,249,237;
  --fx-door: 187,196,207;
  --fx-open: 61,238,203;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root[data-palette="classic"]:not([data-theme="light"]) {
  --bg: #141b23; --surface: #1a242e; --ink: #e8f0f2; --ink-soft: #9fb0bf; --line: #2a3744; --accent: #3ccfc4; color-scheme: dark;
} }
:root[data-palette="classic"][data-theme="dark"] {
  --bg: #141b23; --surface: #1a242e; --ink: #e8f0f2; --ink-soft: #9fb0bf; --line: #2a3744; --accent: #3ccfc4; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.65; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; text-wrap: balance; margin: 0; letter-spacing: -.01em; }

/* Header + hero */
.hero { background: var(--void); color: var(--on-void); border-bottom: 1px solid var(--void-line); position: relative; overflow: hidden; isolation: isolate; }
.hero .wrap { padding-block: 24px 88px; position: relative; z-index: 2; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--hero-rgb),.9) 0%, rgba(var(--hero-rgb),.55) 42%, rgba(var(--hero-rgb),.05) 100%), linear-gradient(0deg, rgba(var(--hero-rgb),.8) 0%, rgba(var(--hero-rgb),0) 35%); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mark { font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark img { width: 28px; height: 28px; display: block; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--on-void-soft); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--on-void); }
.hero-body { margin-top: 96px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--highlight); }
.hero p { color: var(--on-void-soft); max-width: 44ch; margin: 0; font-size: 17px; }
.hero .label { color: var(--on-void-soft); margin-bottom: 20px; display: block; }

/* Thesis */
.thesis { padding-block: 96px 64px; }
.thesis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.thesis h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; }
.thesis p { margin: 0 0 16px; color: var(--ink-soft); max-width: 62ch; }
.thesis p strong { color: var(--ink); font-weight: 500; }

/* Lineage */
.lineage { padding-block: 32px 96px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 40px; }
.sec-head h2 { font-size: 28px; }
.sec-head .label { color: var(--ink-soft); }
.line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.line::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line); }
.line li { position: relative; padding-top: 32px; padding-right: 16px; }
.line li::before { content: ""; position: absolute; top: 2px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent); }
.line li.now::before { background: var(--highlight); border-color: var(--highlight); box-shadow: 0 0 0 5px color-mix(in srgb, var(--highlight) 25%, transparent); }
.line .yr { font-family: var(--f-mono); font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.line h3 { font-size: 17px; margin: 6px 0 6px; line-height: 1.3; }
.line p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.era { display: flex; gap: 0; margin-top: 28px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.era span { padding: 8px 12px; border-top: 2px solid var(--line); }
.era span:nth-child(1) { flex: 2; }
.era span:nth-child(2) { flex: 3; border-top-color: var(--accent); }
.era span:nth-child(3) { flex: 1; border-top-color: var(--highlight); color: var(--ink); }

/* Group */
.group { background: var(--surface); padding-block: 88px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--bg); padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; text-decoration: none; transition: background .2s; }
.card:hover { background: var(--surface); }
.card .label { color: var(--accent); }
.card h3 { font-size: 24px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; flex: 1; }
.card .go { font-size: 14px; font-weight: 500; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }

/* Focus */
.focus { padding-block: 96px; }
.layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.layer { border-top: 1px solid var(--ink); padding-top: 18px; }
.layer .label { color: var(--ink-soft); }
.layer h3 { font-size: 20px; margin: 10px 0 8px; }
.layer p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Facts */
.facts { padding-block: 0 96px; }
.facts dl { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { font-family: var(--f-mono); font-size: 13px; color: var(--ink-soft); letter-spacing: .04em; padding-right: 16px; }

/* Footer */
footer { background: var(--void); color: var(--on-void-soft); }
footer .wrap { padding-block: 56px 40px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
footer h2 { color: var(--on-void); font-size: clamp(24px, 3vw, 34px); max-width: 18ch; }
.cta { display: inline-flex; align-items: center; gap: 10px; background: var(--highlight); color: var(--void); font-weight: 500; padding: 14px 22px; border-radius: 999px; text-decoration: none; margin-top: 20px; }
footer small { display: block; width: 100%; border-top: 1px solid var(--void-line); padding-top: 20px; font-size: 13px; }


@media (max-width: 860px) {
  .hero-body, .thesis-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-body { margin-top: 64px; }
  /* 狭い画面は文字が全幅に広がるので、左から暗くする代わりに全体を薄く暗くして模様を見せる */
  .hero::after { background: linear-gradient(180deg, rgba(var(--hero-rgb),.35) 0%, rgba(var(--hero-rgb),.6) 45%, rgba(var(--hero-rgb),.88) 100%); }
  .line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .line::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .line li { padding: 0 0 28px 32px; }
  .line li::before { top: 4px; }
  .era { display: none; }
  .cards, .layers { grid-template-columns: minmax(0, 1fr); }
  .facts dl { grid-template-columns: minmax(0, 1fr); }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
