/* ==========================================================================
   y-iart portfolio — base
   ========================================================================== */

:root {
  --bg: #f7f4ed;
  --ink: #1c1a17;
  --ink-soft: rgba(28, 26, 23, 0.62);
  --ink-faint: rgba(28, 26, 23, 0.34);
  --line: rgba(28, 26, 23, 0.22);
  --wood: #b98d4f;
  --paper: #fffdf8;
  --ph: #b6413a;

  --serif: 'Cormorant Garamond', 'Times New Roman', 'Hiragino Mincho ProN', serif;
  --sans: -apple-system, 'Hiragino Kaku Gothic ProN', '游ゴシック体', 'Yu Gothic', 'Noto Sans JP', sans-serif;
  --script: 'Shadows Into Light', var(--serif);

  --canvas-top: 16.2%;
  --canvas-left: 1.5%;
  --canvas-right: 0.6%;
  --canvas-bottom: 32%;
}

* { box-sizing: border-box; }

/* scroll-behavior は付けない: ネイティブのアンカー遷移+多層のbox-shadowでChromeの再描画が
   崩れることがあるため(file://で確認)、スクロールはJS側(main.js)のscrollIntoViewに寄せる */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6em 1em;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* placeholder markers ------------------------------------------------ */
.ph-badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ph);
  border: 1px solid var(--ph);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  margin-right: 0.5em;
  vertical-align: middle;
  font-family: var(--sans);
}
.ph-text { color: var(--ink-soft); }
.ph-link { border-bottom: 1px dashed var(--ink-faint); }
.ph-link small { color: var(--ph); font-size: 0.68em; margin-left: 0.35em; }

/* nav ------------------------------------------------------------------ */
.nav a {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  margin-left: 2.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.nav a:first-child { margin-left: 0; }
.nav a:hover, .nav a:focus-visible { border-color: currentColor; }

/* ==========================================================================
   1. HERO / ファーストビュー
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 2.6rem clamp(1.2rem, 4vw, 3.5rem) 0;
  overflow: hidden;
}

.nav--hero {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
}

.hero-art {
  position: absolute;
  box-shadow: 0 22px 50px -18px rgba(28, 26, 23, 0.45);
  background: var(--paper);
  padding: 10px;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-art--main {
  left: -6%;
  top: 12%;
  width: min(46vw, 640px);
  height: min(58vh, 560px);
  transform: rotate(var(--rot, -2deg));
  z-index: 5;
}

.hero-art--side {
  width: min(14vw, 200px);
  height: min(24vh, 250px);
  z-index: 3;
}
.hero-art--side1 { right: 2%; top: 8%; transform: rotate(var(--rot, 3deg)); }
.hero-art--side2 { right: -2%; top: 36%; transform: rotate(var(--rot, -3deg)); }

.hero-art-tag {
  position: absolute;
  left: 0;
  bottom: -1.7rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.hero-art-tag--main { bottom: auto; top: calc(100% + 0.6rem); }

.hero-text {
  position: absolute;
  z-index: 10;
  right: 22%;
  top: 40%;
  transform: translateY(-50%);
  max-width: 560px;
  text-align: right;
}

.hero-word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 9vw, 6.4rem);
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1;
  /* 作家名(y-iart)はディセンダを持つため、下に逃げ幅を確保してACRYLIC PAINTINGと衝突させない */
  padding-bottom: 0.1em;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: 0.42em;
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
}

.hero-rule {
  border: none;
  border-top: 1px solid var(--line);
  width: 220px;
  margin: 1.4rem 0 1.4rem auto;
}

.hero-tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  letter-spacing: 0.08em;
  margin: 0 0 1.1rem;
}

.hero-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-faint);
  margin: 0;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 6.4rem;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
}
.hero-scroll i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--ink-faint), transparent);
  display: block;
}

.hero-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  overflow: hidden;
}
.hero-strip img {
  width: 100%;
  height: 260%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.9);
}

/* ==========================================================================
   2. WORKS
   ========================================================================== */

.works {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 4vw, 3.5rem) 5rem;
}

.works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.6rem;
  margin-bottom: 1rem;
}

.works-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0;
  letter-spacing: 0.04em;
}

.works-count {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin: 0.2rem 0 0;
}

.works-hint {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0 0 2.6rem;
}

.easel-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

.works-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.4rem, 3vw, 3.2rem);
  padding-bottom: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.works-row:last-child { border-bottom: none; margin-bottom: 0; }

.easel-item {
  width: clamp(130px, 15vw, 195px);
  text-align: center;
  transform: translateY(var(--lift, 0));
}

.easel-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  width: 100%;
  cursor: pointer;
  position: relative;
  display: block;
}

.easel-frame-box {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 654 / 1404;
}

.easel-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 14px rgba(28, 26, 23, 0.14));
  transition: transform 0.35s ease;
}

.easel-canvas-window {
  position: absolute;
  top: var(--canvas-top);
  left: var(--canvas-left);
  right: var(--canvas-right);
  bottom: var(--canvas-bottom);
  overflow: hidden;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.06);
}
.easel-canvas-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.easel-btn:hover .easel-canvas-window img,
.easel-btn:focus-visible .easel-canvas-window img { transform: scale(1.06); }
.easel-btn:hover .easel-frame,
.easel-btn:focus-visible .easel-frame { transform: translateY(-3px); }

.easel-num {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

/* ==========================================================================
   鑑賞ビュー(Viewer)
   ========================================================================== */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.viewer.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 15, 0.88);
  backdrop-filter: blur(6px);
}

.viewer-close {
  position: absolute;
  top: 1.6rem;
  right: clamp(1.2rem, 4vw, 3rem);
  z-index: 5;
  background: none;
  border: 1px solid rgba(247, 244, 237, 0.4);
  color: var(--bg);
  font-family: var(--serif);
  letter-spacing: 0.08em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  cursor: pointer;
}
.viewer-close:hover { border-color: var(--bg); }

.viewer-nav {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  z-index: 5;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(247, 244, 237, 0.35);
  background: rgba(20, 18, 15, 0.3);
  color: var(--bg);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.viewer-nav:hover { background: rgba(247, 244, 237, 0.15); }
.viewer-prev { left: clamp(0.8rem, 3vw, 2.4rem); }
.viewer-next { right: clamp(0.8rem, 3vw, 2.4rem); }

.viewer-stage {
  position: absolute;
  inset: 0 0 130px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem clamp(4rem, 10vw, 8rem);
}
.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.viewer-stage figcaption {
  color: var(--bg);
  font-family: var(--serif);
  letter-spacing: 0.12em;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.viewer-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  margin: 0;
  list-style: none;
  overflow-x: auto;
  background: linear-gradient(rgba(20, 18, 15, 0), rgba(20, 18, 15, 0.55));
}
.viewer-strip li { flex: 0 0 auto; }
.viewer-strip button {
  appearance: none;
  border: 2px solid transparent;
  padding: 0;
  width: 62px;
  height: 78px;
  cursor: pointer;
  opacity: 0.45;
  filter: blur(0.3px) brightness(0.8);
  transition: opacity 0.25s ease, border-color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
.viewer-strip button img { width: 100%; height: 100%; object-fit: cover; }
.viewer-strip button:hover { opacity: 0.8; }
.viewer-strip li.is-active button {
  opacity: 1;
  border-color: var(--bg);
  filter: none;
  transform: translateY(-4px);
}

/* ==========================================================================
   3. ABOUT / CONTACT
   ========================================================================== */

.about {
  position: relative;
  padding: 0 0 2.5rem;
  background: var(--paper);
  overflow: hidden;
}

/* 本文エリア。背景の作品画像(.about-bg-art)の高さの基準がこれになるので、
   フッターはこの外側に出る=文字が作品の上に乗らない。
   セクション側の余白をここへ移しているため、画像は従来どおり上端から出る。 */
.about-body-area {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.2rem, 4vw, 3.5rem) 0;
}

.about-bg-art {
  position: absolute;
  right: 0;
  top: 0;
  width: 30%;
  min-width: 240px;
  max-width: 440px;
  height: 100%;
  opacity: 0.85;
  z-index: 0;
}
.about-bg-art img { width: 100%; height: 100%; object-fit: cover; }
.about-bg-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--paper) 0%, rgba(255,253,248,0) 28%);
}

.about-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 38%) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.about-photo { width: 100%; }
/* 制作風景は切らずに全体を出す(トリミングで筆先やイーゼルが欠けるのを避ける) */
.about-photo img {
  width: 100%;
  height: auto;
  box-shadow: 0 18px 40px -22px rgba(28, 26, 23, 0.5);
}
.ph-block {
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--ink-faint);
  background: repeating-linear-gradient(135deg, rgba(28,26,23,0.035) 0 10px, rgba(28,26,23,0.06) 10px 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
}
.ph-block small { display: block; font-size: 0.72rem; margin-top: 0.3rem; letter-spacing: 0.03em; }

.about-body { max-width: 460px; }

.about-name {
  font-family: var(--script);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 0;
  line-height: 1;
  /* 作家名(y-iart)はディセンダを持つため、下に逃げ幅を確保して肩書きと衝突させない */
  padding-bottom: 0.12em;
}
.about-role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
}
.about-rule {
  border: none;
  border-top: 1px solid var(--line);
  width: 90px;
  margin: 1.6rem 0;
}

.about-statement, .about-profile {
  font-size: 0.92rem;
  line-height: 1.9;
  margin: 0 0 2.2rem;
}
.about-statement p, .about-profile p { margin: 0 0 0.9rem; }
.about-statement p:last-child, .about-profile p:last-child { margin-bottom: 0; }

/* 個展参加予定。会期(dt)を淡く小さく、内容(dd)を本文と同じ扱いにする */
.about-exhibition {
  font-size: 0.92rem;
  line-height: 1.9;
  margin: 0 0 2.2rem;
}
/* 会期は日付なので欧文セリフ(Cormorant Garamond)に載せない。
   このフォントは小さめの光学サイズで数字が細く小さく出るため、
   和文フォールバックの「年月日」と並ぶと数字だけ潰れて読めなくなる。 */
.about-exhibition dt {
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.about-exhibition dd { margin: 0.2rem 0 0; }

.about-h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.7rem;
  scroll-margin-top: 2rem;
}

.about-contact {
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.about-contact li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.about-contact svg { flex: 0 0 auto; color: var(--ink-soft); }

.about-sign {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0;
}
.about-sign span {
  font-family: var(--script);
  font-size: 1.9rem;
  color: var(--ink-soft);
}

.site-footer {
  position: relative;
  z-index: 1;
  /* 左右の余白は .about ではなくフッター自身が持つ。区切り線は本文と同じ1180pxで揃える */
  max-width: 1180px;
  width: calc(100% - 2 * clamp(1.2rem, 4vw, 3.5rem));
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
/* 制作クレジットは和文を含むため筆記体(Shadows Into Light)に載せない。
   このフォントは日本語の字形を持たず、「Site by」だけ手書き・「安島元」だけゴシックに割れる。 */
.site-footer-sign { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-soft); }
/* 制作者名だけリンク。押せると分かる最小限の下線に留め、フッターの静けさを崩さない */
.site-footer-sign a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1em;
  transition: border-color 0.2s ease;
}
.site-footer-sign a:hover, .site-footer-sign a:focus-visible { border-color: currentColor; }

/* ==========================================================================
   Responsive — tablet
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-art--side2 { display: none; }
  .hero-art--main { width: 56vw; height: 46vh; left: -8%; top: 16%; }
  .hero-art--side1 { width: 26vw; height: 22vh; top: 6%; right: 3%; }
  .hero-text { right: 6%; top: 68%; max-width: 80vw; }
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .about-bg-art { width: 46%; opacity: 0.55; }
}

/* ==========================================================================
   Responsive — mobile
   ========================================================================== */

@media (max-width: 640px) {
  .hero { padding-top: 1.6rem; min-height: 92vh; }
  .nav a { margin-left: 1.2rem; font-size: 0.78rem; letter-spacing: 0.06em; }

  .hero-art--side { display: none; }
  .hero-art--main {
    position: relative;
    left: -4vw;
    top: 0;
    width: 90vw;
    height: 46vh;
    margin: 1.6rem 0 0;
  }
  .hero-art-tag--main { top: calc(100% + 1.4rem); }

  .hero-text {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    text-align: left;
    max-width: none;
    margin: 3.4rem 0 0;
  }
  .hero-rule { margin: 1.2rem auto 1.2rem 0; }

  .hero-scroll {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: fit-content;
    margin: 2.4rem auto 1.6rem;
  }
  .hero-strip { position: relative; left: auto; right: auto; height: 60px; }

  .works-row { gap: 1.1rem; }
  .easel-item { width: 40vw; max-width: 170px; }

  .viewer-stage { padding: 2.4rem 1.2rem; inset: 0 0 110px 0; }
  .viewer-nav { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
  .viewer-close { padding: 0.4em 0.8em; font-size: 0.85rem; }

  .about-bg-art { display: none; }
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { max-width: 240px; margin: 0 auto; }
  .about-body { max-width: none; }
}
