/* Hinan Lab のページ（トップ・プライバシーポリシー・404）: 白基調のミニマルなデザイン。
   Hinan Games のページは別の見た目（games/css/games.css）。ロゴと色が決まったら、ここの変数を直す */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --sub: #6b6b6b;
  --faint: #a3a3a3;
  --line: #e7e7e7;
  --hover: #f6f6f6;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header: 64px;
  /* 英字は Helvetica（Mac・iPhone にある。無い環境〈Windows など〉では Arial） */
  --latin: "Helvetica Neue", Helvetica, Arial;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--latin), "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
html:lang(zh-Hans) body { font-family: var(--latin), "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html:lang(zh-Hant) body { font-family: var(--latin), "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; }
html:lang(ko) body { font-family: var(--latin), "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; word-break: keep-all; }
html:lang(en) body { letter-spacing: 0; line-height: 1.7; }
[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 32px; height: var(--header); }
.wordmark { font-family: var(--latin), sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; margin-right: auto; }
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--sub); text-decoration: none; white-space: nowrap; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.lang {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  padding: 5px 30px 5px 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang:hover { border-color: var(--ink); }

/* トップの一文（短く。主役は下の作品） */
.intro { padding-top: clamp(72px, 12vw, 152px); padding-bottom: clamp(40px, 6vw, 72px); }
.intro h1 { margin: 0; max-width: 16em; font-size: clamp(28px, 4.6vw, 56px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; white-space: pre-line; }
html:lang(ja) .intro h1, html:lang(zh-Hans) .intro h1, html:lang(zh-Hant) .intro h1, html:lang(ko) .intro h1 { font-weight: 700; line-height: 1.45; letter-spacing: 0; }

/* 作品（写真を主役にしたポートフォリオ） */
.works { padding-bottom: clamp(72px, 11vw, 136px); }
.works-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--ink); margin-bottom: clamp(20px, 3vw, 32px); }
.works-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.count { font-family: var(--latin), sans-serif; font-size: 13px; color: var(--faint); letter-spacing: 0.04em; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 72px) clamp(16px, 2.4vw, 28px); }
.work { display: block; text-decoration: none; color: inherit; }
.visual { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--hover); }
.visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.work:hover .visual img, .work:focus-visible .visual img { transform: scale(1.03); }
/* LIMap は、埋め込みの写真を載せないよう、LIMap の色の地にアイコンとロゴを置く */
.visual.limap { display: flex; align-items: center; justify-content: center; gap: 6%; background: #1a1a1a; }
.visual.limap img { width: auto; height: auto; object-fit: contain; }
.visual.limap .limap-icon { width: 18%; border-radius: 22%; }
.visual.limap .limap-logo { width: 34%; }
.work:hover .visual.limap img { transform: scale(1.05); }
.caption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding-top: 16px; }
.caption .title { font-size: clamp(17px, 1.8vw, 20px); font-weight: 600; letter-spacing: -0.005em; }
.caption .title::after { content: " →"; display: inline-block; margin-left: 4px; opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s; }
.work:hover .caption .title::after, .work:focus-visible .caption .title::after { opacity: 1; transform: none; }
.caption .meta { align-self: center; font-family: var(--latin), sans-serif; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sub); white-space: nowrap; }
.caption .desc { grid-column: 1 / -1; color: var(--sub); font-size: 14px; line-height: 1.8; }

/* 区切り（見出し ＋ 中身） */
.section { display: grid; grid-template-columns: minmax(180px, 1fr) 2.4fr; gap: 24px var(--gutter); padding: clamp(72px, 11vw, 136px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 6px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.lead { margin: 0; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.75; font-weight: 500; letter-spacing: 0.01em; }
html:lang(en) .lead { line-height: 1.5; letter-spacing: -0.01em; }

/* お問い合わせ */
.contact-links { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.contact-links li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-links .kind { font-size: 13px; color: var(--sub); }
.contact-links a { font-family: var(--latin), sans-serif; font-size: clamp(18px, 2.4vw, 24px); text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size 0.3s; }
.contact-links a:hover { background-size: 100% 1px; }

/* プライバシーポリシー・404 */
.doc { max-width: 760px; padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(72px, 10vw, 120px); }
.doc h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.doc .updated { margin: 0 0 40px; color: var(--sub); font-size: 13px; }
.doc h2 { margin: 48px 0 8px; font-size: 17px; font-weight: 600; }
.doc p { margin: 0 0 16px; }
.back { display: inline-flex; align-items: center; gap: 10px; margin-top: 40px; padding: 12px 22px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 14px; transition: background 0.2s, color 0.2s; }
.back::before { content: "←"; }
.back:hover { background: var(--ink); color: var(--bg); }

main { flex: 1; }

/* フッター */
.footer { border-top: 1px solid var(--line); font-size: 13px; color: var(--sub); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 36px; }
.footer a { color: var(--sub); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; gap: 24px; }

/* 作品のページ（共通のレイアウト。/works/〈作品〉/） */
.work-page { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(72px, 10vw, 120px); }
.crumbs { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); text-decoration: none; }
.crumbs::before { content: "←"; transition: transform 0.2s; }
.crumbs:hover { color: var(--ink); }
.crumbs:hover::before { transform: translateX(-4px); }
.work-head { padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.work-head .meta { margin: 0 0 14px; font-family: var(--latin), sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.work-head h1 { margin: 0; font-size: clamp(34px, 6vw, 72px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.work-head .sub { margin: 6px 0 0; color: var(--sub); font-size: clamp(15px, 1.6vw, 18px); }
.work-hero { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--hover); }
.work-hero img { width: 100%; height: 100%; object-fit: cover; }
.work-hero.limap { display: flex; align-items: center; justify-content: center; gap: 5%; background: #1a1a1a; }
.work-hero.limap img { width: auto; height: auto; object-fit: contain; }
.work-hero.limap .limap-icon { width: 14%; border-radius: 22%; }
.work-hero.limap .limap-logo { width: 28%; }

.work-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px var(--gutter); padding: clamp(48px, 7vw, 88px) 0; }
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
html:lang(en) .facts div { grid-template-columns: 6.5em minmax(0, 1fr); }
.facts dt { color: var(--sub); }
.facts dd { margin: 0; }
.work-text .lead { margin-bottom: 20px; white-space: pre-line; }
.work-text p { margin: 0 0 16px; }
.work-text .note { color: var(--sub); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 24px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; text-align: center; transition: background 0.2s, color 0.2s; }
.btn::after { content: "→"; transition: transform 0.2s; }
.btn[target="_blank"]::after { content: "↗"; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover::after { transform: translateX(3px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: #333; }

.work-section { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.work-section > h2 { margin: 0 0 28px; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--hover); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: 40px; }
.figures p { margin: 0; padding-top: 14px; border-top: 1px solid var(--ink); }
.figures .value { display: block; font-family: var(--latin), sans-serif; font-size: clamp(40px, 6vw, 64px); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.figures .label { display: block; margin-top: 8px; color: var(--sub); font-size: 14px; }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px var(--gutter); list-style: none; margin: 0; padding: 0; }
.points li { padding-top: 14px; border-top: 1px solid var(--line); }
.points h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.points p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.8; }
.link-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.link-list a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15px; }
.link-list a::after { content: "↗"; color: var(--sub); }
.link-list a:hover::after { color: var(--ink); }

/* 次の作品 */
.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gutter); align-items: center; padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ink); text-decoration: none; }
.next .label { display: block; font-size: 13px; color: var(--sub); }
.next .name { display: block; margin-top: 6px; font-size: clamp(24px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.01em; }
.next .name::after { content: " →"; transition: margin 0.2s; }
.next:hover .name::after { margin-left: 8px; }
.next .visual { aspect-ratio: 16 / 9; }
.next:hover .visual img { transform: scale(1.03); }

/* 開いたときに、文が下から現れる（動きを減らす設定なら、しない） */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 760px) {
  .header .wrap { gap: 16px; }
  .nav { display: none; }
  .works-grid { grid-template-columns: minmax(0, 1fr); }
  .caption { grid-template-columns: minmax(0, 1fr); }
  .caption .meta { order: -1; }
  .section { grid-template-columns: 1fr; gap: 28px; }
  .section-head { flex-direction: row; gap: 14px; align-items: baseline; }
  .contact-links li { grid-template-columns: 1fr; gap: 4px; }
  .work-body, .next { grid-template-columns: minmax(0, 1fr); }
  .gallery, .points, .link-list { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 100%; }
}
