/* Denki Digital — site styles.
   Dark by design. One family of tokens; each instrument page tints the glow with its own --tone. */

:root {
  color-scheme: dark;

  --ink: #0a0b0f;
  --ink-2: #0e1016;
  --surface: #12151c;
  --surface-2: #171a22;
  --line: rgba(236, 232, 222, 0.08);
  --line-strong: rgba(236, 232, 222, 0.16);

  --paper: #e6e2d8;
  --paper-soft: #bdb9b0;
  --muted: #86847e;
  --faint: #55544f;

  --tone: 160, 176, 196;            /* rgb triplet; instrument pages override */
  --glow: rgba(var(--tone), 0.10);

  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --wide: 1200px;
  --read: 640px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 1.4s;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(var(--tone), 0.07), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(120, 110, 150, 0.05), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* A fine grain over everything, so the dark reads as material rather than void. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 1px solid rgba(var(--tone), 0.8);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection { background: rgba(var(--tone), 0.28); color: var(--paper); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 0.85rem; transition: top 0.3s var(--ease);
}
.skip:focus { top: 16px; }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.005em;
  margin: 0;
  color: var(--paper);
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.12; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
p { margin: 0 0 1.2em; color: var(--paper-soft); }
p:last-child { margin-bottom: 0; }
strong { color: var(--paper); font-weight: 500; }

.label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--tone { color: rgba(var(--tone), 0.95); }

.kanji { font-family: var(--serif); font-weight: 400; letter-spacing: 0.08em; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.7;
  color: var(--paper);
  max-width: 34em;
}

.quiet { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--read); }

section { position: relative; }
.band { padding: clamp(80px, 14vw, 180px) 0; }
.band--tight { padding: clamp(56px, 8vw, 100px) 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split > .aside { position: sticky; top: 120px; }

.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .num { font-family: var(--serif); color: var(--faint); font-size: 1rem; letter-spacing: 0.1em; }
.section-head .label { flex: none; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }

/* ---------- Header ---------- */

.site-header {
  padding-top: env(safe-area-inset-top, 0px);
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.8s var(--ease), border-color 0.8s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 11, 15, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.wordmark { display: inline-flex; align-items: center; gap: 14px; }
.wordmark__mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: var(--serif); font-size: 0.95rem; color: var(--paper);
  transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.wordmark:hover .wordmark__mark { border-color: rgba(var(--tone), 0.6); box-shadow: 0 0 18px rgba(var(--tone), 0.18); }
.wordmark__text { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; }

.nav { display: flex; gap: clamp(20px, 3vw, 40px); align-items: center; }
.nav a {
  position: relative; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper-soft); padding: 6px 0; transition: color 0.4s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; background: none; border: 0; color: var(--paper); cursor: pointer;
  width: 44px; height: 44px; margin-right: -10px; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 1px; background: currentColor; margin: 6px auto; transition: transform 0.5s var(--ease), opacity 0.4s; }
.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--paper);
  font: 500 0.76rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease), background 0.6s var(--ease);
}
.btn:hover { border-color: rgba(var(--tone), 0.55); box-shadow: 0 0 36px rgba(var(--tone), 0.12); background: rgba(var(--tone), 0.04); }
.btn .arrow { width: 18px; height: 1px; background: currentColor; position: relative; transition: width 0.6s var(--ease); }
.btn .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .arrow { width: 26px; }
.btn[aria-disabled="true"] { cursor: default; color: var(--muted); border-style: dashed; }
.btn[aria-disabled="true"]:hover { box-shadow: none; background: transparent; border-color: var(--line-strong); }

.link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper);
}
.link .arrow { width: 22px; height: 1px; background: currentColor; position: relative; transition: width 0.6s var(--ease); }
.link .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.link:hover .arrow { width: 34px; }

.prose a, a.inline { border-bottom: 1px solid var(--line-strong); transition: border-color 0.4s var(--ease), color 0.4s; }
.prose a:hover, a.inline:hover { border-color: rgba(var(--tone), 0.7); color: var(--paper); }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 140px 0 clamp(64px, 10vh, 120px);
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 11, 15, 0) 40%, var(--ink) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero__vertical {
  position: absolute; z-index: 2; right: var(--gutter); top: 130px;
  writing-mode: vertical-rl; font-family: var(--serif); font-size: 0.95rem;
  letter-spacing: 0.5em; color: var(--muted); line-height: 2;
}
.hero__kicker { margin-bottom: 36px; }
.hero h1 { max-width: 12em; }
.hero__sub {
  margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted);
}
.hero__sub span + span::before { content: "·"; margin-right: 22px; color: var(--faint); }

/* Page heads for inner pages */
.page-head { padding: clamp(160px, 22vw, 240px) 0 clamp(56px, 8vw, 96px); position: relative; }
.page-head h1 { margin: 22px 0 0; max-width: 14em; }
.page-head .lede { margin-top: 32px; }
.page-head__glyph {
  position: absolute; right: var(--gutter); top: 110px; pointer-events: none;
  font-family: var(--serif); font-size: clamp(7rem, 20vw, 16rem); line-height: 1;
  color: rgba(var(--tone), 0.05); writing-mode: vertical-rl; letter-spacing: 0.02em; white-space: nowrap;
  user-select: none;
}

/* ---------- Statement ---------- */

.statement { font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.6; color: var(--paper); max-width: 22em; }
.statement em { font-style: normal; color: var(--muted); }
.lines p { font-family: var(--serif); font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--paper); margin-bottom: 0.4em; }

/* ---------- Instrument cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  --tone: inherit;
  position: relative; display: flex; flex-direction: column; min-height: 420px;
  padding: clamp(28px, 3vw, 40px); background: var(--ink-2); overflow: hidden; isolation: isolate;
  transition: background 0.9s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(120% 80% at 80% 0%, rgba(var(--tone), 0.16), transparent 60%);
  transition: opacity 1.1s var(--ease);
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card__glyph {
  position: absolute; right: 18px; bottom: 18px; z-index: -1;
  writing-mode: vertical-rl; white-space: nowrap; letter-spacing: 0;
  font-family: var(--serif); font-size: 6.5rem; line-height: 1; color: rgba(var(--tone), 0.07);
  transition: color 1.1s var(--ease), transform 1.6s var(--ease);
}
.card:hover .card__glyph { color: rgba(var(--tone), 0.13); transform: translateY(-6px); }
.card__type { margin-bottom: auto; }
.card__name { font-family: var(--serif); font-size: 1.9rem; margin: 64px 0 6px; }
.card__reading { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 20px; }
.card__line { color: var(--paper-soft); font-size: 0.95rem; max-width: 22em; margin-bottom: 28px; }
.card__more { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 12px; align-items: center; transition: color 0.6s var(--ease); }
.card__more::after { content: ""; width: 18px; height: 1px; background: currentColor; transition: width 0.6s var(--ease); }
.card:hover .card__more { color: var(--paper); }
.card:hover .card__more::after { width: 30px; }
.card__thumb {
  position: relative; display: block; flex: none; min-height: 0;
  aspect-ratio: 16 / 11; margin: 28px 0 0; opacity: 0.74; transition: opacity 0.9s var(--ease), transform 1.4s var(--ease);
}
.card__thumb img {
  position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 3px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0,0,0,0.95);
}
.card:hover .card__thumb { opacity: 1; transform: translateY(-4px); }
.card__thumb + .card__name { margin-top: 36px; }
.card--compact { min-height: 300px; }
.card--compact .card__name { margin-top: 48px; }

/* A group's companion tile, in the cells its last row leaves (--span of them). */
.card--note { grid-column: span var(--span, 2); }
.card--note .card__name { font-size: 1.7rem; margin-top: 56px; max-width: 18em; }
.card--note .card__line { max-width: 36em; }
.note__path { list-style: none; margin: 12px 0 36px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; max-width: 560px; }
.note__path::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 27px; height: 1px; background: linear-gradient(90deg, rgba(var(--tone), 0.1), rgba(var(--tone), 0.5), rgba(var(--tone), 0.1)); }
.note__path a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; }
.note__node {
  width: 54px; height: 54px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--ink); font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; color: var(--paper);
  transition: box-shadow 1s var(--ease), border-color 1s var(--ease);
}
.note__path a:hover .note__node, .note__path a:focus-visible .note__node { border-color: rgba(var(--tone), 0.6); box-shadow: 0 0 28px rgba(var(--tone), 0.25); }
.note__name { font-size: 0.9rem; color: var(--paper); }
.note__role { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.card--note .card__more:hover { color: var(--paper); }

/* ---------- Instrument page ---------- */

.inst-hero { padding: clamp(150px, 20vw, 220px) 0 0; position: relative; overflow: hidden; }
.inst-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 110%; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 30%, rgba(var(--tone), 0.13), transparent 70%);
}
.inst-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 40px; align-items: end; position: relative; }
.inst-hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); line-height: 1; margin: 22px 0 18px; }
.inst-hero__reading { font-size: 0.85rem; letter-spacing: 0.16em; color: var(--muted); }
.inst-hero__reading .kanji { color: var(--paper-soft); margin-right: 14px; letter-spacing: 0.2em; }
.inst-hero__glyph {
  font-family: var(--serif); font-size: clamp(6rem, 16vw, 13rem); line-height: 0.9;
  writing-mode: vertical-rl; white-space: nowrap; justify-self: end; color: rgba(var(--tone), 0.16);
  text-shadow: 0 0 80px rgba(var(--tone), 0.25); user-select: none;
}
.inst-hero .lede { margin-top: 40px; }

.plate {
  position: relative; margin-top: clamp(64px, 9vw, 120px);
  border-radius: 6px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 0 0 1px var(--line), 0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 120px -40px rgba(var(--tone), 0.25);
  transition: box-shadow 1s var(--ease);
  background: var(--surface);
}
.plate:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 140px -30px rgba(var(--tone), 0.35); }
.plate img { width: 100%; }
.plate__caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; font-size: 0.8rem; color: var(--muted); }

.poem p { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.75; color: var(--paper); margin-bottom: 0.9em; }
.poem p.quiet { color: var(--muted); }

.traits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.traits li { padding: 26px 0; border-top: 1px solid var(--line); }
.traits h3 { font-size: 1.1rem; margin-bottom: 8px; }
.traits p { font-size: 0.95rem; margin: 0; }

.spec { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 16px 0; border-top: 1px solid var(--line); }
.spec th { width: 34%; font-weight: 400; color: var(--muted); padding-right: 24px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; padding-top: 19px; }
.spec td { color: var(--paper-soft); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--line); }

.programs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.programs span { font-size: 0.8rem; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--paper-soft); }

/* ---------- Audio ---------- */

.listen { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.track {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 22px; align-items: center;
  padding: 22px clamp(18px, 2.4vw, 28px); background: var(--ink-2); transition: background 0.8s var(--ease);
}
.track.is-playing { background: var(--surface); }
.track__play {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--paper); cursor: pointer; display: grid; place-items: center;
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.track__play:hover { border-color: rgba(var(--tone), 0.7); box-shadow: 0 0 24px rgba(var(--tone), 0.2); }
.track__play svg { width: 14px; height: 14px; }
.track__play .i-pause { display: none; }
.track.is-playing .i-play { display: none; }
.track.is-playing .i-pause { display: block; }
.track__title { font-family: var(--serif); font-size: 1.08rem; color: var(--paper); }
.track__note { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.track__wave { position: relative; height: 36px; margin-top: 12px; cursor: pointer; }
.track__wave canvas { width: 100%; height: 100%; }
.track__time { font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted); font-variant-numeric: tabular-nums; align-self: start; padding-top: 4px; }
.ab { display: inline-flex; margin-top: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.ab button {
  font: 500 0.66rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.ab button[aria-pressed="true"] { background: rgba(var(--tone), 0.16); color: var(--paper); }

/* ---------- Acquire ---------- */

.acquire {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: clamp(32px, 4vw, 48px); border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(var(--tone), 0.06), transparent 60%);
}
.acquire__name { font-family: var(--serif); font-size: 1.5rem; }
.acquire__meta { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.acquire__price { font-family: var(--serif); font-size: 1.25rem; color: var(--paper-soft); margin-right: 24px; }
.acquire__action { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* ---------- Pillars / ecosystem ---------- */

.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { padding: clamp(32px, 4vw, 56px); background: var(--ink-2); position: relative; }
.pillar__num { font-family: var(--serif); color: var(--faint); font-size: 1.4rem; margin-bottom: 40px; display: block; }
.pillar h3 { font-size: 1.5rem; margin-bottom: 16px; }
.pillar p { font-size: 0.97rem; }
.pillar__names { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pillar__names a:hover { color: var(--paper); }
.pillar--wide { grid-column: 1 / -1; }

.chain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; margin-top: 24px; }
.chain::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 43px; height: 1px; background: linear-gradient(90deg, rgba(var(--tone), 0.1), rgba(var(--tone), 0.6), rgba(var(--tone), 0.1)); }
.chain__step { text-align: center; padding: 0 12px; position: relative; }
.chain__node {
  width: 86px; height: 86px; margin: 0 auto 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--ink); font-family: var(--serif); font-size: 1.7rem; color: var(--paper);
  transition: box-shadow 1s var(--ease), border-color 1s var(--ease);
}
.chain__step:hover .chain__node { border-color: rgba(var(--tone), 0.6); box-shadow: 0 0 40px rgba(var(--tone), 0.25); }
.chain__step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.chain__step p { font-size: 0.88rem; }

.lineage { width: 100%; border-collapse: collapse; }
.lineage td { padding: 22px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.lineage tr:last-child td { border-bottom: 1px solid var(--line); }
.lineage td:first-child { width: 30%; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.lineage td:nth-child(2) { font-family: var(--serif); font-size: 1.2rem; color: var(--paper); width: 30%; }
.lineage td:nth-child(2) .kanji { color: var(--muted); font-size: 0.95rem; margin-left: 10px; }
.lineage td:last-child { color: var(--paper-soft); font-size: 0.92rem; }

/* ---------- Support ---------- */

.downloads { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.downloads th { text-align: left; font-weight: 500; font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); padding: 0 16px 14px 0; }
.downloads td { padding: 20px 16px 20px 0; border-top: 1px solid var(--line); color: var(--paper-soft); vertical-align: middle; }
.downloads tr:last-child td { border-bottom: 1px solid var(--line); }
.downloads td:first-child { font-family: var(--serif); font-size: 1.1rem; color: var(--paper); }
.downloads td:first-child .kanji { color: var(--muted); font-size: 0.9rem; margin-left: 8px; }
.downloads .pending { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 26px 48px 26px 0; position: relative;
  font-family: var(--serif); font-size: 1.15rem; color: var(--paper);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq summary::before {
  content: ""; position: absolute; right: 8px; top: 50%; width: 13px; height: 1px; background: var(--muted);
  transition: transform 0.6s var(--ease);
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0deg); }
.faq .answer { padding: 0 0 28px; max-width: 42em; }
.faq .answer p { font-size: 0.97rem; }
.faq code, .prose code { font-size: 0.85em; padding: 2px 7px; background: var(--surface-2); border-radius: 3px; color: var(--paper); word-break: break-all; }

.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.log li:last-child { border-bottom: 1px solid var(--line); }
.log time { font-size: 0.78rem; letter-spacing: 0.14em; color: var(--muted); padding-top: 3px; }
.log h3 { font-size: 1.1rem; margin-bottom: 6px; }
.log p { font-size: 0.93rem; }

.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 26px 0; }
.index-list__name { font-family: var(--serif); font-size: 1.5rem; color: var(--paper); }
.index-list__name .kanji { font-size: 0.95rem; color: var(--muted); margin-left: 14px; }
.index-list__type { font-size: 0.85rem; color: var(--muted); }
.index-list a:hover .card__more { color: var(--paper); }
.index-list a:hover .card__more::after { width: 30px; }
@media (max-width: 620px) { .index-list a { grid-template-columns: minmax(0, 1fr) auto; } .index-list__type { grid-column: 1; grid-row: 2; } }

/* ---------- Prose (about, privacy) ---------- */

.prose { max-width: var(--read); }
.prose p { font-size: 1.04rem; line-height: 1.9; }
.prose h2 { font-size: 1.5rem; margin: 2.4em 0 0.9em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; color: var(--paper-soft); }
.prose li { margin-bottom: 0.5em; }
.pull { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.6; color: var(--paper); border-left: 1px solid rgba(var(--tone), 0.5); padding-left: 28px; margin: 2.4em 0; }

/* ---------- Closing & footer ---------- */

.closing { text-align: center; padding: clamp(110px, 16vw, 200px) 0; position: relative; }
.closing::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 80px; background: linear-gradient(transparent, var(--line-strong)); }
.closing h2 { max-width: 16em; margin: 22px auto 40px; }

.site-footer { border-top: 1px solid var(--line); padding: 72px 0 40px; font-size: 0.85rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 40px; }
.footer-grid h4 { font-family: var(--sans); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--paper-soft); transition: color 0.4s; }
.footer-grid a:hover { color: var(--paper); }
/* The holding site's footer: the wordmark and the line, with no columns of links beside them. */
.footer-grid.footer-grid--holding { grid-template-columns: minmax(0, 1fr); }
.footer-tag { font-family: var(--serif); font-size: 1.1rem; color: var(--paper-soft); margin: 22px 0 6px; }
.footer-jp { font-family: var(--serif); color: var(--muted); letter-spacing: 0.2em; font-size: 0.85rem; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.footer-base p { color: var(--muted); margin: 0; max-width: 60em; }
.footer-base .footer-company { flex-basis: 100%; max-width: none; }

/* ---------- Lightbox ---------- */

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1800px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 6, 9, 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { max-height: 90vh; width: auto; margin: 0 auto; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.lightbox button { position: fixed; top: 20px; right: 24px; background: none; border: 1px solid var(--line-strong); color: var(--paper); border-radius: 999px; padding: 10px 18px; font: 500 0.68rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer; }

/* ---------- Splash (home, once a session) ---------- */

.splash { display: none; }
.splashing .splash {
  --splash-bg: #0d0b0a; --splash-rain: #2e2622; --splash-glow: #ffab40; --splash-flash: #fff1d6;
  --splash-text: #f3ece6; --splash-muted: #8a7f78;
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(28px, 7vmin, 64px);
  background: var(--splash-bg);
  transition: opacity 1s var(--ease);
  animation: splash-failsafe 0.8s ease 14s forwards;   /* if the script never runs, it still leaves */
}
.splash.is-leaving { opacity: 0; pointer-events: none; }
@keyframes splash-failsafe { to { opacity: 0; visibility: hidden; } }
.splash__logo { width: min(58vmin, 400px); height: auto; overflow: visible; }
.splash__dim rect { fill: var(--splash-rain); }
.splash__lit rect, .splash__drops rect { fill: var(--splash-glow); opacity: 0; }
.splash__word {
  margin: 0; color: var(--splash-text); opacity: 0; white-space: nowrap;
  font: 400 clamp(13px, 3.3vmin, 26px)/1.2 Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.34em; padding-left: 0.34em;
}
.splash__skip {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: none; border: 1px solid var(--splash-rain); border-radius: 2px; color: var(--splash-muted);
  font: 400 13px/1 Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.04em; padding: 8px 18px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.splash__skip:hover { color: var(--splash-text); border-color: var(--splash-muted); }

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.no-js .reveal { opacity: 1; transform: none; }

/* The first screen rises by itself, with no script to wait for. */
.hero .reveal, .page-head .reveal, .inst-hero .reveal {
  opacity: 1; transform: none; transition: none;
  animation: rise var(--slow) var(--ease) both;
}
.hero .reveal[data-delay="1"], .page-head .reveal[data-delay="1"], .inst-hero .reveal[data-delay="1"] { animation-delay: 0.15s; }
.hero .reveal[data-delay="2"], .page-head .reveal[data-delay="2"], .inst-hero .reveal[data-delay="2"] { animation-delay: 0.3s; }
.hero .reveal[data-delay="3"], .page-head .reveal[data-delay="3"], .inst-hero .reveal[data-delay="3"] { animation-delay: 0.45s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01s !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--note { grid-column: 1 / -1; min-height: 0; }   /* a row of its own */
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    padding: 12px var(--gutter) 32px; background: rgba(10, 11, 15, 0.97); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s;
  }
  .nav a { padding: 16px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
  .nav a::after { display: none; }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open .site-header { background: rgba(10, 11, 15, 0.97); }

  .split, .split--even, .inst-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .split > .aside { position: static; }
  .inst-hero__glyph { display: none; }
  .traits, .pillars { grid-template-columns: minmax(0, 1fr); }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .chain::before { display: none; }
  .acquire { grid-template-columns: minmax(0, 1fr); }
  .acquire__action { justify-content: flex-start; }
  .hero__vertical { display: none; }
  .hero__sub { flex-direction: column; gap: 8px; }
  .hero__sub span + span::before { content: none; }
  .log li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 620px) {
  .cards, .cards--two { grid-template-columns: minmax(0, 1fr); }
  .card--note .card__name { margin-top: 40px; }
  .note__node { width: 46px; height: 46px; font-size: 0.95rem; }
  .note__path::before { top: 23px; }
  .note__role { letter-spacing: 0.12em; }
  .card { min-height: 360px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .track__play { width: 44px; height: 44px; }
  .track__time { display: none; }
  .spec th { width: 40%; }
  .downloads .hide-sm { display: none; }
  .page-head__glyph { font-size: 6rem; opacity: 0.7; }
  .lineage td:first-child { display: none; }
}
