﻿/* ==========================================================
   style.css
   全ページ共通スタイル。
   色は黒・白・グレーのみ。角丸なし。装飾は最小限。
   ========================================================== */

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-text-soft: #6f6f6f;
  --color-border: #dcdcdc;
  --color-border-strong: #111111;

  --font-body: "Noto Sans JP", "Hiragino Sans", sans-serif;

  --nav-height: 64px;
  --gap-image: 6px;      /* 作品画像同士の間隔（詰め気味） */
  --gap-section: 96px;   /* セクション間の余白（広め） */

  /* サイト全体の基準コンテンツ幅。ヘッダー・本文・フッターすべてで
     この幅を共通に使うことで、どのページでも左右の余白の感覚を
     統一している */
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  border-radius: 0; /* 角丸なし */
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- ヘッダー ---------- */

.site-header {
  border-bottom: 1px solid var(--color-border);

}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* アーティスト名とハンバーガーボタンを同じ行に配置する。
   ナビが開いていても閉じていてもこの行自体の高さは変わらないため、
   ボタンの位置が動かない。 */
.site-header__top-row {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.artist-name {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--color-text-soft);
  text-transform: uppercase;
}

.artist-name a {
  color: inherit;
}

/* ナビゲーション：PC・タブレットは横並び */
.global-nav {
  display: flex;
  justify-content: flex-start;
  gap: 32px;
}

.global-nav a {
  font-size: 14px;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.global-nav a[aria-current="page"] {
  border-bottom-color: var(--color-border-strong);
}

/* ハンバーガーメニュー（モバイルのみ表示） */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border-strong);
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--color-text);
  margin: 0 auto;
  position: relative;
}

.nav-toggle__bar::before {
  content: "";
  top: -6px;
}

.nav-toggle__bar::after {
  content: "";
  top: 5px;
}

@media (max-width: 720px) {
  .global-nav {
    display: none;
    flex-direction: column;
    align-self: stretch;
    gap: 0;
    margin-top: 20px;
  }

  .global-nav.is-open {
    display: flex;
  }

  .global-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-toggle {
    display: block;
  }
}

/* ---------- 共通レイアウト ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding-top: var(--gap-section);
}

.section:first-of-type {
  padding-top: 72px;
}

/* more >> の下（Latestとの間）を、Recent Worksの上の余白と揃える */
.section--home-latest {
  padding-top: 56px;
}

.more-link {
  display: block;
  text-align: right;
  margin-top: 72px;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ---------- Home / Recent Works ---------- */

/* 4枚を1段（PC）/ 2列2段（モバイル）で表示する固定幅ブロック。
   中央寄せで左右の余白を均等にする。more >> もこのブロックと
   同じ幅の中に置くことで「4列の右端」を基準に右寄せになる。 */
.recent-works-wrap {
  max-width: 738px; /* 4 × 180px + 3 × gap(6px) */
  margin: 0 auto;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  gap: var(--gap-image);
  justify-content: center;
}

.works-grid a {
  display: block;
  overflow: hidden;
}

.works-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

@media (max-width: 640px) {
  .recent-works-wrap {
    max-width: 100%;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Home / Latest ---------- */

.latest {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  max-height: 168px; /* およそ3件分の高さでスクロール */
  overflow-y: auto;
}

.latest__item {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.latest__item:last-child {
  border-bottom: none;
}

.latest__date {
  flex: 0 0 auto;
  color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .latest__item {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- Works 一覧 ---------- */

.works-year-group {
  margin-bottom: 64px;
}

.works-year-group__label {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* 全ての年で高さをそろえた並び（縦横比は維持、横幅は画像ごとに変化）。
   --work-thumb-height は A003（現状のPC 6列時に187px相当）を基準にした値。
   列固定のCSS Gridではなく、高さ固定のflex-wrapで実現している。 */
:root {
  --work-thumb-height: 188px;
}

.works-year-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-image);
  align-items: flex-start;
}

.works-year-grid a {
  display: block;
  height: var(--work-thumb-height);
}

.works-year-grid img {
  height: 100%;
  width: auto;
  display: block;
}

/* work側で breakAfter:true を指定すると、ここで強制的に折り返す */
.works-year-grid__break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

@media (max-width: 720px) {
  :root {
    --work-thumb-height: 130px;
  }
}

/* ---------- Works 詳細 ---------- */

.work-detail__images {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.work-detail__info {
  max-width: 720px;
  margin: 32px auto 0;
}

.work-detail__nav {
  max-width: 720px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  font-size: 14px;
}

.work-detail__nav > *:nth-child(1) {
  text-align: left;
}

.work-detail__nav > *:nth-child(2) {
  text-align: center;
}

.work-detail__nav > *:nth-child(3) {
  text-align: right;
}

/* ---------- Exhibitions 一覧 ---------- */

.exhibitions-list {
  display: flex;
  flex-direction: column;
}

.exhibitions-list__item {
  display: flex;
  gap: 112px; /* 元の28pxの4倍 */
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}

.exhibitions-list__item:first-child {
  border-top: 1px solid var(--color-border);
}

/* 全展示共通で220×220pxの正方形の枠を用意し、その中に縦横比を保った
   まま画像を中央揃えで収める（object-fit: contain）。
   枠の幅が全展示で揃うので、右側の展覧会名・会期の左端も自動的に揃う。 */
.exhibitions-list__thumb {
  flex: 0 0 220px;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exhibitions-list__thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--color-border);
}

/* 情報部分は枠(220px)と同じ高さにし、その中で
   タイトル・会期を優先して縦方向中央に配置する。
   バッジは中央配置の計算に影響しないよう、絶対配置で上に重ねる。 */
.exhibitions-list__info {
  position: relative;
  height: 220px;
}

.exhibitions-list__status {
  position: absolute;
  top: 28px; /* バッジ自身の高さ分だけ下にずらし、展覧会名との余白を詰める */
  left: 0;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
  border: 1px solid var(--color-border);
  padding: 2px 8px;
}

/* 開催中・開催予定のバッジがない展示でも、バッジ分の要素は
   常に置いておく（visibility:hiddenで見えなくするだけ） */
.exhibitions-list__status.is-hidden {
  visibility: hidden;
}

.exhibitions-list__text {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.exhibitions-list__title {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 -6px;
}

.exhibitions-list__period {
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-text-soft);
}

@media (max-width: 600px) {
  .exhibitions-list__item {
    flex-direction: column;
    gap: 14px;
    /* 上(線からDMまで)を広げて、下(会期から線まで)の余白と揃える */
    padding: 47px 0 32px;
  }

  .exhibitions-list__thumb {
    flex: none;
    width: 220px;
    height: auto;
    display: block;
  }

  /* PC用の正方形の枠(object-fit:contain)をやめ、
     以前のように画像の縦横比のまま幅220pxで表示する */
  .exhibitions-list__thumb img {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: auto;
  }

  /* 縦積みレイアウトでは「220px枠に対して中央配置」の意味がないため、
     PC専用の絶対配置・高さ固定を解除して自然な並びに戻す */
  .exhibitions-list__info {
    position: static;
    height: auto;
  }

  .exhibitions-list__status {
    position: static;
    margin-bottom: 10px;
  }

  .exhibitions-list__text {
    height: auto;
    display: block;
  }
}

/* この展示に出品した作品グリッド：Home の Recent Works とは別サイズ。
   元のRecent Works(3列/2列)の半分の辺の長さにするため、6列/4列にしている。 */
.related-works-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap-image);
}

.related-works-grid a {
  display: block;
  overflow: hidden;
}

.related-works-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

@media (max-width: 720px) {
  .related-works-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Exhibition 詳細 ---------- */

.exhibition-detail__images {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.exhibition-detail__images img {
  border: 1px solid var(--color-border);
}

.exhibition-detail__info {
  max-width: 720px;
  margin: 32px auto 0;
}

#exhibition-photos {
  margin-top: 32px;
}

/* 作品詳細・展示詳細で共通のタイトル／1行ずつの項目表示スタイル */
.detail-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}

.detail-meta-row {
  font-size: 15px;
  margin: 0 0 6px;
}

.detail-meta-row .label {
  color: var(--color-text-soft);
}

.detail-description {
  font-size: 15px;
  margin: 16px 0 0;
}

.exhibition-detail__related {
  margin-top: var(--gap-section);
}

.exhibition-detail__related-heading {
  font-size: 14px;
  color: var(--color-text-soft);
  margin-bottom: 20px;
}

/* ---------- About / SNS&Shop ---------- */

.prose {
  max-width: 640px;
  font-size: 16px;
}

.prose p {
  margin: 0 0 1.4em;
}

/* 経歴・展示歴：西暦と本文を別の列に分け、本文が折り返しても
   西暦の下に回り込まず、常に本文側の列の中で折り返すようにする */
.cv-list {
  list-style: none;
  margin: 0 0 1.4em;
  padding: 0;
  max-width: 640px;
}

.cv-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.cv-year {
  flex: 0 0 auto;
  width: 52px;
  color: var(--color-text-soft);
}

.cv-text {
  flex: 1;
}

.link-list li {
  border-bottom: 1px solid var(--color-border);
}

.link-list a {
  display: block;
  padding: 16px 0;
  font-size: 15px;
}

.link-list li:first-child {
  border-top: 1px solid var(--color-border);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--gap-section);
  border-top: 1px solid var(--color-border);
  padding: 32px 0 48px;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-soft);
}

.site-footer__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer__icons {
  display: flex;
  gap: 16px;
}

.site-footer__icons a {
  display: flex;
  align-items: center;
  color: var(--color-text-soft);
}

.site-footer__icons a:hover {
  color: var(--color-text);
}

.site-footer__icons svg,
.site-footer__icons img {
  display: block;
}

.site-footer__signature-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__signature-row img {
  height: 42px;
  width: auto;
  display: block;
}

/* ---------- ページタイトル（Works/Exhibitions/About等の見出し） ---------- */

.page-title {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  margin: 0 0 40px;
}

/* Works詳細の「展示」欄：リンクだと分かるように下線をつける */
.detail-meta-row a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--color-text);
}

.detail-meta-row a:hover {
  color: var(--color-text-soft);
}

/* Latest：リンクがあるものだけ下線をつける */
.latest__title a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--color-text);
}

.latest__title a:hover {
  color: var(--color-text-soft);
}