/* ── 索引は無彩色に徹する。色は作品の側だけが持つ ────────────────── */
:root {
  --paper:   #F2F1ED;
  --paper-2: #E7E6E1;
  --paper-3: #DBDAD4;
  --ink:     #0E0E0D;
  --ink-2:   #4B4B48;
  --ink-3:   #83837E;
  --line:    #CFCEC8;
  --todo:    #F5E27A;
  /* Meiryo UI 優先。無い環境は OS 標準の日本語 UI 書体へ落とす */
  --ui: "Meiryo UI", Meiryo, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E0E0D; --paper-2: #171716; --paper-3: #202020;
    --ink: #F0EFEB; --ink-2: #B5B4AF; --ink-3: #83837E;
    --line: #2C2C2A; --todo: #6B5D19;
  }
}
:root[data-theme="dark"] {
  --paper: #0E0E0D; --paper-2: #171716; --paper-3: #202020;
  --ink: #F0EFEB; --ink-2: #B5B4AF; --ink-3: #83837E;
  --line: #2C2C2A; --todo: #6B5D19;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--ui);
  font-size: 15px; line-height: 1.9; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
.bod { font-family: var(--ui); }
.mono { font-family: var(--ui); font-variant-numeric: tabular-nums; }
a { color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 26px; }

/* ── 表題 ──────────────────────────────────────────────────── */
header { padding: 58px 0 44px; border-bottom: 1px solid var(--line); }
.eyebrow { font-family: var(--ui); font-size: 11px; letter-spacing: .22em; color: var(--ink-3); margin: 0 0 22px; }
h1 { font-size: clamp(30px, 5.6vw, 62px); line-height: 1.32; letter-spacing: .01em; }

/* 入れ替わる語 */
.slot { display: inline-block; position: relative; vertical-align: bottom; overflow: hidden; height: 1.32em; }
.slot span { display: block; transition: transform .5s cubic-bezier(.6,0,.2,1), opacity .4s; }
.slot .out { transform: translateY(-100%); opacity: 0; position: absolute; inset: 0; }
.slot .in  { animation: slotin .5s cubic-bezier(.2,.8,.3,1); }
@keyframes slotin { from { transform: translateY(100%); opacity: 0; } }

header .lede { max-width: 58ch; color: var(--ink-2); margin: 24px 0 0; }

/* ── 連絡先 ────────────────────────────────────────────────── */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.contact div { padding: 18px 0 18px 22px; border-left: 1px solid var(--line); }
.contact div:first-child { padding-left: 0; border-left: none; }
.contact dt { font-family: var(--ui); font-size: 10.5px; letter-spacing: .16em; color: var(--ink-3); margin-bottom: 3px; }
.contact dd { margin: 0; font-size: 14.5px; }

/* ── 作品の色帯（自動で流れる） ─────────────────────────────── */
.strip { overflow: hidden; border-bottom: 1px solid var(--line); padding: 14px 0 16px; }
.striplab { font-family: var(--ui); font-size: 10px; letter-spacing: .18em; color: var(--ink-3); margin: 0 0 11px; }
.striplab b { font-weight: 400; color: var(--ink-2); }
.srow { display: flex; gap: 10px; width: max-content; animation: drift 34s linear infinite; }
.trio { display: flex; }
.trio i { display: block; width: 46px; height: 26px; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ── 前置き ────────────────────────────────────────────────── */
.disclosure {
  padding: 44px 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 384px);
  gap: 56px; align-items: start;
}
.disclosure h2 { font-family: var(--ui); font-size: 11px; letter-spacing: .2em; color: var(--ink-3); margin-bottom: 14px; }
.disclosure p { margin: 0 0 12px; color: var(--ink-2); max-width: 60ch; font-size: 14.5px; }
.disclosure b { color: var(--ink); }
.disclosure .txt > :last-child { margin-bottom: 0; }

/* 10本の骨格を並べた図。色は各作品の配色だけが持つ */
.art h3 { font-family: var(--ui); font-size: 10.5px; letter-spacing: .2em; color: var(--ink-3); font-weight: 400; margin: 0 0 5px; }
.art .note { font-size: 11.5px; color: var(--ink-3); margin: 0 0 14px; max-width: none; line-height: 1.7; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
/* 図版なのでリンクにはしない。見本として並べるだけ */
.tile { background: var(--paper); border: 1px solid var(--line); }
.tile svg { display: block; width: 100%; height: auto; }
.tile .cap { display: block; padding: 3px 0 4px; border-top: 1px solid var(--line); text-align: center; }
.tile .n { font-family: var(--ui); font-size: 8.5px; letter-spacing: .06em; color: var(--ink-3); }

/* ── 一覧 ──────────────────────────────────────────────────── */
.listhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 40px 0 20px; }
.listhead h2 { font-size: 25px; letter-spacing: .06em; }
.count { font-family: var(--ui); font-size: 12px; color: var(--ink-3); }
.count b { font-size: 30px; color: var(--ink); }

.filters { display: flex; gap: 0; border: 1px solid var(--ink); width: max-content; max-width: 100%; flex-wrap: wrap; margin-bottom: 4px; }
.filters button {
  font: inherit; font-size: 13px; padding: 8px 18px; cursor: pointer;
  background: transparent; color: var(--ink); border: none; border-right: 1px solid var(--ink);
  transition: background .2s, color .2s;
}
.filters button:last-child { border-right: none; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* 一覧の見出し行。色が何を指すかをここで示す */
.workhead {
  display: grid; grid-template-columns: 58px 132px minmax(0,1fr) 132px;
  gap: 24px; align-items: end;
  padding: 0 0 8px; border-bottom: 1px solid var(--line);
  font-family: var(--ui); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3);
}
.workhead span:first-child { padding-left: 4px; }
.workhead .jp { font-family: var(--ui); letter-spacing: .06em; font-size: 10.5px; }

.works { border-top: 1px solid var(--line); }
.work {
  display: grid; grid-template-columns: 58px 132px minmax(0,1fr) 132px;
  gap: 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; position: relative;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.3,1), background .25s;
}
.work.seen { opacity: 1; transform: none; }
.work.gone { display: none; }
.work:hover { background: var(--paper-2); }
.work .n { font-family: var(--ui); font-size: 21px; color: var(--ink-3); padding-left: 4px; }

.sw { display: flex; height: 62px; overflow: hidden; }
.sw i { display: block; flex: 1; transition: flex .45s cubic-bezier(.2,.8,.3,1); }
.work:hover .sw i:first-child { flex: 2.2; }

.work h3 { font-size: 19.5px; letter-spacing: .04em; margin-bottom: 2px; }
.work .cat { font-family: var(--ui); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); }
.work p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.work .tech { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.work .tech span { font-family: var(--ui); font-size: 10px; border: 1px solid var(--line); padding: 1px 7px; color: var(--ink-3); }

.work .go { text-align: right; font-family: var(--ui); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
.work .go i { display: inline-block; transition: transform .3s; font-style: normal; }
.work:hover .go i { transform: translateX(6px); }
.work:hover .go { color: var(--ink); }

/* ── 一般セクション ────────────────────────────────────────── */
section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.shead { font-family: var(--ui); font-size: 11px; letter-spacing: .2em; color: var(--ink-3); margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 22px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { padding: 14px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-family: var(--ui); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); font-weight: 400; }
/* 金額はいちばん読まれる数字なので、判読性の高い書体で大きく組む */
td.p {
  text-align: right; white-space: nowrap;
  font-family: var(--ui);
  font-weight: 700; font-size: 18px; letter-spacing: .005em;
  font-variant-numeric: tabular-nums;
}
td.p small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }
td.c { font-family: var(--ui); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
tbody tr:hover, table tr:hover { background: var(--paper-2); }
tr:last-child td { border-bottom: none; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--ui); font-size: 17px; color: var(--ink-3); }
.steps h3 { font-size: 16px; margin-bottom: 2px; }
.steps p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* ── ページ上部へ ──────────────────────────────────────────── */
.pagetop {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 50px; height: 50px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); text-decoration: none;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s;
}
.pagetop.on { opacity: 1; pointer-events: auto; transform: none; }
.pagetop:hover { background: var(--ink-2); }
.pagetop b { font-size: 15px; line-height: 1; }
.pagetop span { font-family: var(--ui); font-size: 7.5px; letter-spacing: .1em; margin-top: 3px; }

footer { padding: 40px 0 70px; font-size: 12.5px; color: var(--ink-3); }
/* 日本語は文節で折り返す。行末に「す。」だけが残るのを避ける */
footer p { margin: 0 0 8px; text-wrap: pretty; word-break: auto-phrase; }

.rise { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.3,1); }
.rise.seen { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .disclosure { grid-template-columns: 1fr; gap: 34px; }
  .disclosure p { max-width: 74ch; }
  .art .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .art { max-width: 560px; }
}
@media (max-width: 860px) {
  .work { grid-template-columns: 40px 92px minmax(0,1fr); gap: 16px; }
  .work .go { display: none; }
  .sw { height: 52px; }
}
@media (max-width: 560px) {
  .art .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .srow { animation: none; }
  .work, .rise { opacity: 1 !important; transform: none !important; }
  .slot .in { animation: none; }
  .work:hover .sw i:first-child { flex: 1; }
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── 制作ツール。13本の作品とは別枠。索引の無彩色のまま扱う ──────── */
.toolcard {
  display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: 34px; align-items: center;
  border: 1px solid var(--line); background: var(--paper-2); padding: 26px 28px;
  text-decoration: none; transition: background .25s, border-color .25s;
}
.toolcard:hover { background: var(--paper-3); border-color: var(--ink-3); }
.toolcard .cat { font-family: var(--ui); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); }
.toolcard h3 { font-size: 22px; letter-spacing: .03em; margin: 7px 0 9px; }
.toolcard p { margin: 0 0 13px; font-size: 13.5px; color: var(--ink-2); max-width: 58ch; }
.toolcard p b { color: var(--ink); font-weight: 400; border-bottom: 1px solid var(--ink-3); }
.toolcard .tech { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.toolcard .tech span {
  font-family: var(--ui); font-size: 10px; letter-spacing: .02em;
  border: 1px solid var(--line); background: var(--paper); padding: 1px 7px; color: var(--ink-3);
}
.toolcard .go { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }
.toolcard .go i { display: inline-block; transition: transform .3s; font-style: normal; }
.toolcard:hover .go { color: var(--ink); }
.toolcard:hover .go i { transform: translateX(6px); }

/* 3枚のLPは上端だけ見せる。中身はリンク先で読む */
.toolshots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.toolshots > span { display: block; height: 132px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.toolshots img { display: block; width: 100%; }

@media (max-width: 760px) {
  .toolcard { grid-template-columns: 1fr; gap: 22px; padding: 22px 20px; }
  .toolshots > span { height: 104px; }
}
