/* takumimotokawa.com
   One deliberate dark world: warm near-black and warm ivory. Text stays monochrome; colour lives only inside the instruments.
   Layout: a single column of full-width bands; content held to 1280px with a 16–48px gutter. */
:root {
  --bg: #0e0e0c;
  --sky: #0a0b10;
  --raise: #161613;
  --fg: #ece8df;
  --soft: #d9d4c9;
  --muted: #a29d92;
  --faint: #8f8a80;
  --line: rgba(236, 232, 223, 0.14);
  --line-strong: rgba(236, 232, 223, 0.3);
  --accent: #ece8df;   /* monochrome: interactive marks use the ivory */
  --tone: #c4a46c;     /* muted brass, used sparingly inside graphics */
  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --body: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --jp: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --jp-display: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); scroll-behavior: smooth; }
body { font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html[lang="ja"] body { font-family: var(--body), var(--jp); line-height: 1.8; line-break: strict; word-break: auto-phrase; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] .word, html[lang="ja"] .big { word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fg); }
a:hover { color: var(--soft); text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
html[lang="ja"] .mono:lang(ja) { font-family: var(--jp); letter-spacing: 0.12em; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 24px; }
.who { display: flex; align-items: baseline; gap: 12px; text-decoration: none; padding-block: 16px; font-weight: 500; font-size: 15px; }
.who .ja { font-family: var(--jp); letter-spacing: 0.04em; }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.nav a { text-decoration: none; padding-block: 14px; display: inline-block; }
.nav .lang { color: var(--muted); }

/* hero instrument */
.hero { position: relative; }
.hero-text { position: absolute; left: 0; right: 0; top: clamp(64px, 8vw, 128px); pointer-events: none; }
.hero-text .wrap { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(54px, 11vw, 168px); line-height: 0.88; letter-spacing: -0.01em; }
.hero h1 .ja { display: block; font-family: var(--jp-display); font-size: 0.32em; letter-spacing: 0.08em; margin-top: 0.35em; line-height: 1; }
.hero p { margin: 0; max-width: 30ch; font-size: clamp(16px, 1.6vw, 21px); line-height: 1.45; color: var(--soft); }
html[lang="ja"] .hero p { max-width: 24em; line-height: 1.8; }

/* the instrument */
.inst { position: relative; width: 100%; aspect-ratio: 16 / 8.5; min-height: 600px; max-height: 860px; background: var(--bg); overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.inst.ensemble { min-height: 660px; }
.inst canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.inst-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 6px var(--gutter); color: var(--muted); font-variant-numeric: tabular-nums; }
.inst-bar .stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.inst-bar b { color: var(--fg); font-weight: 500; }
.inst-bar .live { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.inst-bar .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg); opacity: 0.35; }
.inst-bar .live.on i { opacity: 1; }
.sound { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--fg); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0 2px; }
.sound svg { width: 14px; height: 14px; }
.pedal-wrap { position: absolute; left: 0; right: 0; bottom: clamp(20px, 4vw, 52px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pedal { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(14, 14, 12, 0.55); display: grid; place-items: center; cursor: pointer; padding: 0; touch-action: manipulation; }
.pedal span { display: block; width: 66px; height: 66px; will-change: transform; }
.pedal-wrap .hint { color: var(--muted); }
.pads { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(12px, 3vw, 40px); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pad { min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 12px 14px; background: rgba(14, 14, 12, 0.72); border: 1px solid var(--line-strong); border-radius: 2px; color: var(--fg); cursor: pointer; text-align: left; font-family: var(--body); touch-action: manipulation; }
.pad .name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.pad .name i { width: 8px; height: 8px; border-radius: 50%; }
.pad .role { color: var(--muted); }
.pad .rpm { font-family: var(--mono); font-size: 22px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.pad .rpm small { font-size: 10px; color: var(--muted); }

/* sections */
.section { padding-block: clamp(72px, 9vw, 140px) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); }
h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 84px); line-height: 0.95; text-wrap: balance; }
html[lang="ja"] h2 { font-family: var(--jp-display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.15; letter-spacing: 0.04em; }
.section-head p { margin: 0; max-width: 38ch; color: var(--muted); }
html[lang="ja"] .section-head p { max-width: 26em; }

/* works: input → sound */
.work { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 48px; padding-block: 44px; border-top: 1px solid var(--line); }
.work:last-child { border-bottom: 1px solid var(--line); }
.work .in { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.work .in .word { font-family: var(--display); font-style: italic; font-size: clamp(48px, 7vw, 104px); line-height: 0.9; }
html[lang="ja"] .work .in .word { font-family: var(--jp-display); font-style: normal; font-size: clamp(40px, 5.5vw, 76px); line-height: 1.05; }
.work .lbl { color: var(--faint); }
.work svg { flex: 0 0 140px; width: 140px; height: 48px; }
.work .out { flex: 999 1 380px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.work h3 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
html[lang="ja"] .work h3 { font-family: var(--jp); font-size: 26px; letter-spacing: 0.02em; }
.work .sum { margin: 0; max-width: 52ch; font-size: 17px; color: var(--soft); }
html[lang="ja"] .work .sum { max-width: 34em; font-size: 16px; }
.work .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 6px; }
.work .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
html[lang="ja"] .work .meta { font-family: var(--jp); }
.go { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); padding-block: 12px; text-underline-offset: 4px; }

/* log as a score */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
html[lang="ja"] .chip { font-family: var(--jp); font-size: 13px; letter-spacing: 0.08em; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.stave-scroll { overflow-x: auto; padding-bottom: 12px; -webkit-overflow-scrolling: touch; }
.stave { display: flex; width: max-content; min-width: 100%; position: relative; background-image: repeating-linear-gradient(to bottom, rgba(236, 232, 223, 0.2) 0, rgba(236, 232, 223, 0.2) 1px, transparent 1px, transparent 24px); background-size: 100% 49px; background-repeat: repeat-x; background-position: 0 30px; }
/* start of the system: a single thin barline joining the three lines */
.system { flex: 0 0 24px; height: 270px; position: relative; }
.system::before { content: ""; position: absolute; left: 0; top: 30px; width: 1px; height: 49px; background: var(--faint); }
.entry { flex: 0 0 248px; height: 270px; position: relative; padding-left: 18px; }
.entry .gesture { position: absolute; left: 18px; top: 10px; overflow: visible; }
.gesture .dyn { font: italic 600 17px/1 var(--display); letter-spacing: -0.04em; }
/* the present moment: a dashed vertical cut through the staff */
.now { flex: 0 0 56px; height: 270px; position: relative; }
.now::before { content: ""; position: absolute; left: 16px; top: 14px; height: 82px; border-left: 1px dashed var(--line-strong); }
.now span { position: absolute; left: 22px; top: 6px; font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
html[lang="ja"] .now span { font-family: var(--jp); letter-spacing: 0.08em; }
.entry .txt { position: absolute; left: 18px; right: 24px; top: 118px; display: flex; flex-direction: column; gap: 6px; }
.entry .type { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
html[lang="ja"] .entry .type { font-family: var(--jp); }
.entry.k-exhibition .type { color: var(--soft); }
.entry .date { font-family: var(--mono); font-size: 12px; color: var(--muted); }
html[lang="ja"] .entry .date { font-family: var(--jp); }
.entry .title { font-size: 19px; font-weight: 500; line-height: 1.25; }
html[lang="ja"] .entry .title { font-size: 16px; line-height: 1.6; }
.entry .title a { text-decoration: none; }
.entry .title a:hover { text-decoration: underline; }
.entry .place { font-size: 14px; color: var(--muted); }

/* listen */
.split { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.split > :first-child { flex: 1 1 300px; }
.split > :last-child { flex: 999 1 460px; min-width: 0; }
.split .intro-p { margin: 0; max-width: 34ch; color: var(--muted); }
html[lang="ja"] .split .intro-p { max-width: 24em; }
.track { display: flex; align-items: center; gap: 16px; padding-block: 14px; border-top: 1px solid var(--line); }
.track .pp { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); display: grid; place-items: center; cursor: pointer; padding: 0; }
.track .pp[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.track .pp svg { width: 14px; height: 14px; }
.track .info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track .t { font-size: 18px; font-weight: 500; }
.track .r { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.track .seek { position: relative; height: 22px; margin-top: 2px; cursor: pointer; touch-action: pan-y; display: flex; align-items: center; outline: none; }
.track .seek[aria-disabled="true"] { cursor: default; }
.track .bar { flex: 1; height: 2px; background: var(--line); position: relative; transition: height 0.15s; }
.track .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.track .bar i::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity 0.15s; }
.track .seek:hover .bar, .track .seek:focus-visible .bar { height: 4px; }
.track .seek:hover .bar i::after, .track .seek:focus-visible .bar i::after, .track .pp[aria-pressed="true"] ~ .info .bar i::after { opacity: 1; }
.track .seek:focus-visible { box-shadow: 0 0 0 1px var(--accent); border-radius: 2px; }
@media (hover: none) { .track .bar { height: 3px; } }
.track .time { font-family: var(--mono); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.linkrow { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.linkrow a { padding-block: 12px; text-decoration: none; }

/* about */
.about-text { display: flex; flex-direction: column; gap: 20px; }
.about-text .lead { margin: 0; max-width: 46ch; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.45; }
html[lang="ja"] .about-text .lead { max-width: 28em; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.9; }
.about-text .more { margin: 0; max-width: 60ch; color: var(--muted); }
.email { font-family: var(--mono); font-size: 14px; color: var(--soft); user-select: all; }

/* work page */
.work-head { padding-block: clamp(48px, 7vw, 110px) clamp(32px, 4vw, 56px); }
.work-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(64px, 14vw, 220px); line-height: 0.85; letter-spacing: -0.015em; }
.work-head h1 .ja { display: block; font-family: var(--jp-display); font-size: 0.24em; letter-spacing: 0.1em; margin-top: 0.4em; line-height: 1; }
.work-head .lede-row { display: flex; flex-wrap: wrap; gap: 28px 64px; margin-top: clamp(28px, 4vw, 56px); }
.work-head .lede { flex: 999 1 420px; margin: 0; max-width: 40ch; font-size: clamp(19px, 2vw, 26px); line-height: 1.4; }
html[lang="ja"] .work-head .lede { max-width: 22em; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.8; }
.facts { flex: 1 1 300px; margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 15px; }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }
html[lang="ja"] .facts dt { font-family: var(--jp); }
.facts dd { margin: 0; }
.figure { margin-block: 0; }
.figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--raise); }
.figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 10px; color: var(--muted); font-size: 13px; }
.ride-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-bottom: 16px; }
.ride-head h2 { font-family: var(--body); font-size: 22px; font-weight: 500; line-height: 1.3; }
html[lang="ja"] .ride-head h2 { font-family: var(--jp); font-size: 20px; }
.ride-head p { margin: 0; max-width: 62ch; font-size: 15px; color: var(--muted); }
.statement { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 64px; }
.statement p { margin: 0 0 1em; font-size: 18px; line-height: 1.6; }
.statement .ja p { font-family: var(--jp); font-size: 16px; line-height: 2; }
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; counter-reset: s; }
.steps li { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); counter-increment: s; min-width: 0; }
.steps .n { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--faint); }
.steps .n::before { content: "0" counter(s); }
.steps .n i { color: var(--faint); font-style: normal; }
.steps strong { font-size: 21px; font-weight: 500; line-height: 1.3; }
.steps span { font-size: 15px; color: var(--muted); }
.materials { columns: 2 220px; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.materials li { padding: 10px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 15px; }
.callout { display: flex; flex-wrap: wrap; gap: 24px 64px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); }
.callout > div { flex: 1 1 260px; }
.callout p { flex: 999 1 380px; margin: 0; max-width: 52ch; font-size: 17px; color: var(--soft); }
.callout h2 { font-size: clamp(36px, 4.5vw, 60px); }
.credits { margin: 0; max-width: 64ch; font-size: 15px; color: var(--muted); }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-block: clamp(32px, 5vw, 64px); border-top: 1px solid var(--line); text-decoration: none; margin-top: clamp(64px, 8vw, 120px); }
.next .big { font-family: var(--display); font-size: clamp(40px, 6vw, 84px); line-height: 1; }
html[lang="ja"] .next .big { font-family: var(--jp-display); font-size: clamp(30px, 4.5vw, 56px); }

footer { border-top: 1px solid var(--line); margin-top: clamp(64px, 8vw, 120px); color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; }
footer a { text-decoration: none; color: var(--muted); }
.notice { color: var(--muted); font-size: 14px; }
.dim { color: var(--muted); }
