/* ==========================================================
   Yutaka Matsushima / photographer  v2
   静かなオフホワイト。写真は大きく、動かさない。
   ========================================================== */

:root {
  --paper: #fbfbfb;
  --ink: #000000;
  --soft: #666666;
  --hair: #e2e2e2;
  --wash: #ececec;
  --head-bg: #777777;   /* ロゴ・メニュー部分の背景: 18％グレー（反射率18%の中間グレー）*/
  /* 左側から、かすかに光が差すようなグラデーション（右半分は18％グレーのまま） */
  --head-light: radial-gradient(ellipse 75% 280% at 0% 40%, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0) 75%);
  --head-soft: #e9e9e9; /* 18％グレーの上の補助文字（photographer） */

  --serif: "Cormorant Garamond", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: var(--mincho);  /* 日本語はサイト全体で「しっぽり明朝」 */

  --gutter: clamp(16px, 2.4vw, 32px);
  --header-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --maxw: 1760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--safe-top)); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) var(--gutter) 0;
  background: var(--head-light), var(--head-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap { display: flex; align-items: baseline; gap: 14px; }
.brand { font-family: var(--serif); font-size: 29px; line-height: 1; letter-spacing: 0.03em; }
.tag { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1; color: var(--head-soft); }

.nav { display: flex; gap: clamp(20px, 3.4vw, 44px); }
.nav a {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- Home: hero ---------- */

/* 作品一覧: 大きい1枚 + 細い縦の帯（カーソルを乗せるとなめらかに切り替わる）
   大きい写真の幅は一定（縦長4:5が収まる幅）。帯は残りの幅を等分して横に並ぶ */
.wslats {
  --wh: clamp(420px, calc(100svh - var(--header-h) - var(--safe-top) - 96px), 880px);
  display: flex;
  gap: 4px;
  height: var(--wh);
}
.wslat {
  flex: 1 1 0;
  min-width: 10px;
  height: 100%;
  overflow: hidden;
  background: var(--wash);
  display: block;
  transition: flex 1s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 画像は高さに合わせた大きさのまま中央に置く。帯が広がるにつれて、左右から写真が現れる（横にスライド） */
.wslat { position: relative; }
.wslat img { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: none; -webkit-user-drag: none; user-select: none; }
/* 4:5より横長の写真だけ: 切り抜かず、枠いっぱいに全体を表示 */
.wslat[data-fit="contain"] img { position: static; transform: none; width: 100%; height: 100%; object-fit: cover; }
.wslat.on { flex: 0 1 calc(var(--wh) * 0.8); min-width: 0; background: transparent; }
.wslat.on[data-fit="contain"] img { object-fit: contain; }

.more-link { display: flex; justify-content: center; margin: 24px 0 0; }  /* galleryとInstagramの「view more」・Send は同じ見た目（.btn） */
.more-link.right { justify-content: flex-end; margin-top: 20px; }  /* gallery の帯の下は右寄せ */

.works-all { max-width: var(--maxw); margin-inline: auto; padding: clamp(24px, 3vw, 48px) var(--gutter) 0; }

/* ---------- Gallery grid ---------- */

.works {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 8px var(--gutter) 0;
}

.grid { display: flex; gap: var(--gutter); align-items: flex-start; }
.gcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(36px, 4vw, 64px); }

.card { display: block; }
.thumb { display: block; background: var(--wash); }
.thumb img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }

.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px; }
.cap .t { font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.2; border-bottom: 1px solid transparent; }
.card:hover .cap .t { border-bottom-color: var(--ink); }
.cap .m { font-size: 13px; color: var(--soft); white-space: nowrap; }

/* ---------- Work (series) page ---------- */

.work-head {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 110px) var(--gutter) clamp(36px, 5vw, 72px);
}
.work-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 8vw, 128px);
  line-height: 1;
  letter-spacing: 0;
}
.meta { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 28px 0 0; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--soft); }
.credit { margin: 6px 0 0; color: var(--soft); font-size: 13px; }

.work-gap { height: clamp(16px, 2.4vw, 32px); }

.pile {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flow-root;
}

.pile-item {
  position: relative;
  display: block;
  width: 46%;
  background: var(--wash);
  box-shadow: 0 0 0 clamp(5px, 0.6vw, 9px) var(--paper);
}
.pile { position: relative; isolation: isolate; }  /* 前後の入れ替えをこの中だけで完結させる（ヘッダーや拡大表示より上に出ない） */
.pile-item img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }

/* 前面レイヤー: 選んだ写真だけを、元の位置にふわっと重ねる（前後の入れ替えを透明度で） */
.pile-front { position: absolute; inset: 0; pointer-events: none; z-index: 900; }
.pile-copy {
  position: absolute;
  opacity: 0;
  background: var(--wash);
  box-shadow: 0 0 0 clamp(5px, 0.6vw, 9px) var(--paper);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.pile-copy.on { opacity: 1; }
.pile-copy img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; user-select: none; }

/* 写真を保存させない: スマホの長押しメニュー・選択・ドラッグを止める */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.back { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.back a { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--soft); border-bottom: 1px solid var(--hair); padding-bottom: 2px; }
.back a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.back-bottom { padding-top: clamp(48px, 7vw, 96px); }

/* ---------- About / Contact ---------- */

.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(56px, 9vw, 140px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--gutter);
  row-gap: 32px;
}
.section h1 { margin: 0 0 24px; font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 6vw, 96px); line-height: 1; letter-spacing: 0; }
.contact h2 { margin: 0 0 28px; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3vw, 46px); line-height: 1.1; letter-spacing: 0; color: var(--soft); }  /* 見出しはすべてグレー */
.section-body { max-width: 640px; }
.contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.contact .lead { margin: 0; max-width: 28em; }

.lead { margin: 0 0 36px; color: var(--soft); }

.form { display: grid; gap: 22px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--soft); }
.form input,
.form textarea {
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 8px 0;
  width: 100%;
  resize: vertical;
}
.form input:focus,
.form textarea:focus { outline: 0; border-bottom-width: 2px; padding-bottom: 7px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.send[disabled] { opacity: 0.5; cursor: default; }  /* Send の見た目は view more と同じ .btn */
.form-msg { margin: 0; font-size: 13px; color: var(--soft); }
.form-msg a { border-bottom: 1px solid var(--ink); }

.direct { margin: 40px 0 0; font-size: 15px; line-height: 2.2; }
.direct .dl { display: inline-block; width: 6.2em; font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; color: var(--soft); }  /* Mail / Instagram の見出し語。アドレスの位置を揃える */
.direct a { font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }  /* 英字は Cormorant（ボタンと同じ大きさ） */

/* ---------- About ---------- */

.about {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 100px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  column-gap: clamp(32px, 5vw, 96px);
  row-gap: 64px;
  align-items: start;
}

.about-title { margin: 0 0 clamp(28px, 4vw, 56px); font-family: var(--serif); font-size: clamp(34px, 3vw, 46px); font-weight: 400; line-height: 1.1; color: var(--soft); }

.timeline { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--ink); }
.timeline li {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  column-gap: clamp(16px, 2.4vw, 40px);
  align-items: baseline;
  padding: clamp(14px, 1.6vw, 22px) 0;
  border-top: 1px solid var(--ink);
  font-size: clamp(18px, 1.5vw, 22px);
}
.timeline .year { font-family: var(--serif); font-weight: 400; line-height: 1; letter-spacing: 0.04em; font-variant-numeric: lining-nums; white-space: nowrap; }
.timeline .label { font-family: var(--mincho); font-size: 15px; letter-spacing: 0.12em; line-height: 1.7; }


/* ---------- Instagram grid ---------- */

.ig-grid { display: flex; gap: 6px; align-items: flex-start; }
.ig-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ig-tile { display: block; background: var(--wash); }
.ig-tile img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }

.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  padding: 9px 38px;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--ink); color: var(--paper); }


/* ---------- トップページの about / contact: それぞれ1画面に収める（PC・タブレット） ---------- */


.about.home-sec, .contact.home-sec { padding-top: clamp(56px, 9vw, 120px); }

@media (min-width: 801px) and (min-height: 480px) {
  .about.home-sec,
  .contact.home-sec {
    min-height: calc(100svh - var(--header-h) - var(--safe-top));
    padding-top: clamp(24px, 6vh, 72px);
    padding-bottom: clamp(24px, 6vh, 72px);
    row-gap: 0;
    align-content: center;
  }
  .about.home-sec .about-title { margin-bottom: clamp(16px, 3vh, 40px); }

  /* Instagramグリッドは、画面の高さに合わせた幅にする（1画面に収まる） */
  .about.home-sec .about-insta {
    --ig-w: calc((100svh - var(--header-h) - var(--safe-top) - 2 * clamp(24px, 6vh, 72px) - 84px) * 3 / (var(--ig-rows, 3) * 1.25));
    width: min(100%, var(--ig-w));
    justify-self: end;
  }
  .contact.home-sec + * { margin-top: 0; }
}

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

.site-footer {
  max-width: var(--maxw);
  margin: clamp(96px, 13vw, 190px) auto 0;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  font-size: 11px;  /* フッターは本文・補足より小さく控えめに */
  line-height: 1.8;
  color: var(--soft);
}

.empty { color: var(--soft); padding: 40px 0; }

/* ---------- Lightbox ---------- */

.lb { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; grid-template-rows: 1fr auto; }
.lb[hidden] { display: none; }
.lb-stage { min-height: 0; padding: calc(clamp(12px, 2vw, 28px) + var(--safe-top)) clamp(12px, 2vw, 28px) 0; }
.lb-img { width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.lb-bar {
  height: 60px;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}
.lb-bar button { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.3; border-bottom: 1px solid transparent; }
.lb-bar button:hover { border-bottom-color: var(--ink); }
.lb-nav { display: flex; gap: 28px; }
.lb-count { font-variant-numeric: tabular-nums; }

/* ---------- Narrow screens ---------- */

@media (max-width: 800px) {
  :root { --header-h: 60px; }
  .brand { font-size: 20px; letter-spacing: 0.01em; }
  .tag { font-size: 14px; }
  .nav { gap: 14px; }
  .nav a { font-size: 16px; }


  /* スマホ: 帯は横並びのまま、細くする。大きい写真の高さは縦横比から決まる */
  .wslats { height: auto; align-items: stretch; gap: 2px; }
  .wslat { flex: 0 0 10px; min-width: 0; height: auto; }
  .wslat.on { flex: 1 1 0; aspect-ratio: 4 / 5; }

  .cap { flex-direction: column; gap: 2px; }
  .cap .t { font-size: 20px; }

  .section { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; row-gap: 32px; }
  .form-2 { grid-template-columns: 1fr; gap: 22px; }

  .about { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 6.5em minmax(0, 1fr); font-size: 18px; }
}

@media (max-width: 520px) {
  .brand-wrap { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---------- 写真とページの表示 ---------- */

/* 写真は、読み込まれたらグレーの下地からふわっと浮かび上がる */
img.fade { opacity: 0; transition: opacity 0.7s ease; }
img.fade.in { opacity: 1; }

/* ページを移るときは、いったん静かに消えてから次のページが出る */
#app { transition: opacity 0.45s ease; }
#app.leaving { opacity: 0; transition-duration: 0.26s; }

/* スマホ: 帯の上を左右になぞって作品を切り替えられるようにする（縦のスクロールはそのまま） */
.wslats { touch-action: pan-y; }

/* なめらかなスクロール（Lenis）用 */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* 下へスクロールするとヘッダーが隠れ、上へ戻すと出てくる */
.site-header { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.6s ease; }
.site-header.tucked { transform: translateY(-100%); }
.site-header:has(:focus-visible) { transform: none; }  /* キーボードで操作しているときだけ、出したままにする */

/* 写真の上のカーソル: カメラのピント枠（白い線を反転させて、明るい写真でも暗い写真でも見える） */
.af {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  pointer-events: none;
  mix-blend-mode: difference;
}
.af svg { display: block; width: 100%; height: 100%; opacity: 0; transform: scale(1.45); transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.af.on svg { opacity: 1; transform: scale(1); }
.has-af .wslat, .has-af .card .thumb, .has-af .ig-tile, .has-af .pile { cursor: none; }

/* クリックした写真が、作品ページの1枚目へ移動してつながる */
::view-transition-group(hero) { animation-duration: 0.9s; animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
::view-transition-old(hero), ::view-transition-new(hero) { height: 100%; object-fit: cover; animation-duration: 0.9s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.5s; }

/* ---------- 仕上げ（余白・線・字間） ---------- */

:root { --line: 1px; }
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) { :root { --line: 0.5px; } }  /* 高精細な画面では、線を半分の細さに */

body { font-feature-settings: "palt" 1; }  /* 和文の字間を、文字の形に合わせて自然に詰める */
::selection { background: var(--head-bg); color: #fff; }

.brand { letter-spacing: 0.05em; }
.tag { letter-spacing: 0.06em; }
.nav a { letter-spacing: 0.06em; }
.btn { letter-spacing: 0.08em; }
.about-title, .contact h2 { letter-spacing: 0.02em; }
.timeline, .timeline li { border-width: var(--line); }
.form input, .form textarea { border-bottom-width: var(--line); }
.form input:focus, .form textarea:focus { border-bottom-width: 1px; padding-bottom: 8px; }
.site-footer { border-top-width: var(--line); }
.direct a { border-bottom-width: var(--line); }

/* ---------- gallery 一覧: 雑誌のような配置 ---------- */

.grid .card { width: 100%; }
.grid .gcol:nth-child(2) { padding-top: clamp(48px, 8vw, 140px); }
.grid .gcol:nth-child(3) { padding-top: clamp(20px, 3.5vw, 60px); }
@media (max-width: 1000px) { .grid .gcol:nth-child(2) { padding-top: clamp(40px, 9vw, 96px); } }

/* カーソルを乗せた写真が引き立つよう、ほかの写真を少しだけ淡くする */
.card { transition: opacity 0.6s ease; }
@media (hover: hover) {
  .grid:has(.card:hover) .card:not(:hover):not(.reveal:not(.shown)) { opacity: 0.42; }
}

/* スクロールして画面に入ってきた写真が、少し下からふわっと現れる */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.shown { opacity: 1; transform: none; }
.card.reveal.shown { transition: opacity 0.6s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* ---------- 作品ページだけ、背景を暗くする（写真展のように） ---------- */

:root:has(body[data-page="work"]) {
  --paper: #1d1d1d;
  --ink: #e6e6e6;
  --soft: #9a9a9a;
  --hair: #353535;
  --wash: #2a2a2a;
}
html { background: var(--paper); transition: background-color 0.6s ease; }
body { transition: background-color 0.6s ease, color 0.6s ease; }
/* ヘッダーも暗くして、作品に溶け込ませる */
:root:has(body[data-page="work"]) {
  --head-bg: #262626;
  --head-soft: #8c8c8c;
  --head-light: radial-gradient(ellipse 75% 280% at 0% 40%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0) 75%);
}
.site-header .brand, .site-header .nav a { transition: color 0.6s ease, border-color 0.6s ease; }

/* ---------- お問い合わせフォームの仕上げ ---------- */

/* 入力欄の線: ふだんは淡いグレー。入力中は、黒い線が左から伸びる */
.form input, .form textarea {
  -webkit-appearance: none;
  appearance: none;  /* iPhoneで、入力欄に影や角丸が付かないように */
  border-bottom-color: #b5b5b5;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat left bottom / 0 1px;
  transition: background-size 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.form input:focus, .form textarea:focus { border-bottom-width: var(--line); padding-bottom: 8px; background-size: 100% 1px; }
.form label { transition: color 0.4s ease; }
.form label:focus-within { color: var(--ink); }
.form-msg.show { animation: msg-in 0.7s ease both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 初めて開いたときの表示: ロゴが静かに現れてから、ページが見える ---------- */

.intro-veil { display: none; }
.intro .intro-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  padding-top: 46vh;
  background: var(--paper);
  animation: veil-out 1.4s cubic-bezier(0.45, 0, 0.25, 1) 2.1s both;  /* ロゴを見せてから、余韻を残してゆっくり消える */
}
.intro-veil .brand { font-size: clamp(26px, 3vw, 36px); }
.intro-veil .tag { color: var(--soft); font-size: clamp(16px, 1.8vw, 21px); }
.intro .intro-veil > * { animation: veil-in 1.1s ease 0.2s both; }
@keyframes veil-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes veil-out { to { opacity: 0; visibility: hidden; } }

/* ---------- 404（見つからないページ） ---------- */

.notfound {
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: calc(100svh - var(--header-h) - 160px);
  padding: clamp(56px, 12vh, 140px) var(--gutter) 0;
}
.notfound h1 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(72px, 12vw, 160px); line-height: 1; letter-spacing: 0.02em; color: var(--soft); }
.notfound p { margin: 24px 0 40px; color: var(--soft); }

/* トップの作品の帯: 上の余白を左右の余白と同じにそろえる */
.works.home-sec { padding-top: var(--gutter); }

@media (prefers-reduced-motion: reduce) {
  .wslat, .pile-copy, img.fade, #app, .site-header, .af svg, .card, .reveal, html, body, .form input, .form textarea { transition: none; }
  .form-msg.show { animation: none; }
  .intro .intro-veil { display: none; }
}


/* ---------- スマホのヘッダーとメニュー ---------- */
/* 名前は1行、右上に小さな「menu」。押すと、ヘッダーと同じグレーの面にメニューが静かに現れる */
.menu-btn { display: none; }
@media (max-width: 700px) {
  .brand-wrap { flex-direction: row; align-items: baseline; gap: 10px; }
  .brand { font-size: 19px; letter-spacing: 0.04em; white-space: nowrap; }
  .tag { font-size: 13px; white-space: nowrap; }

  .menu-btn {
    display: block;
    position: relative;
    z-index: 2;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 10px 0 10px 16px;  /* 指で押しやすいように、見た目より広く */
  }
  .brand-wrap { position: relative; z-index: 2; }
  .menu-btn .close-l { display: none; }
  .menu-open .menu-btn .open-l { display: none; }
  .menu-open .menu-btn .close-l { display: inline; }

  .site-header .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 22px;
    padding: calc(var(--header-h) + var(--safe-top) + 48px) var(--gutter) 0;
    background: var(--head-light), var(--head-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transition: opacity 0.45s ease, visibility 0s; }
  .site-header .nav a {
    align-self: flex-start;
    font-size: 22px;
    letter-spacing: 0.06em;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.6s ease, border-color 0.6s ease;
  }
  .menu-open .nav a { opacity: 1; transform: none; }
  .menu-open .nav a:nth-child(2) { transition-delay: 0.06s; }
  .menu-open .nav a:nth-child(3) { transition-delay: 0.12s; }
  .site-header.menu-open { transform: none; }
  .menu-lock, .menu-lock body { overflow: hidden; }

  /* Contact: 入力欄を詰めて、間延びしないように */
  .contact { row-gap: 24px; }
  .contact h2 { margin-bottom: 18px; }
  .form { gap: 18px; }
  .form-2 { gap: 18px; }
  .form textarea { height: 7.2em; min-height: 5em; }
  .form-row { margin-top: 6px; }
  .direct { margin-top: 24px; line-height: 2; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .site-header .nav, .site-header .nav a { transition: none; }
}

/* ---------- スマホの文字の大きさと余白（控えめに、写真が主役になるように） ---------- */
@media (max-width: 700px) {
  :root { --gutter: 12px; --header-h: 52px; }
  .brand { font-size: 17px; }
  .tag { font-size: 12px; }
  .menu-btn { font-size: 14px; }

  /* 見出し（Gallery / About / Contact / 作品名）は小さく */
  .about-title, .contact h2 { font-size: 24px; margin-bottom: 20px; }
  .section h1 { font-size: 30px; }
  .work-head { padding-top: 28px; padding-bottom: 20px; }
  .work-head h1 { font-size: 26px; }
  .meta { font-size: 14px; gap: 2px 16px; margin-top: 10px; }

  /* 経歴 */
  .timeline li { grid-template-columns: 6.8em minmax(0, 1fr); padding: 11px 0; font-size: 15px; }
  .timeline .label { font-size: 13px; letter-spacing: 0.08em; }

  /* 本文・フォーム */
  .lead, .contact .lead { font-size: 13px; }
  .direct, .direct a, .direct .dl { font-size: 14px; }
  .form input, .form textarea { font-size: 16px; }  /* iPhoneで入力時に拡大されないよう16pxは維持 */
  .form label { gap: 0; font-size: 12px; }
  .form input { padding: 4px 0 6px; line-height: 1.5; }
  .form input:focus { padding-bottom: 6px; }
  .form textarea { height: 6em; line-height: 1.6; }

  /* 一覧の作品名（入れた場合だけ表示） */
  .cap { padding-top: 8px; }
  .cap .t { font-size: 14px; }
  .cap .m { font-size: 11px; }

  /* ボタンも小ぶりに */
  .btn { font-size: 14px; padding: 7px 26px; }
  .more-link { margin-top: 16px; }
  .more-link.right { margin-top: 12px; }

  /* セクションの間隔 */
  .about.home-sec, .contact.home-sec { padding-top: 64px; }
  .about { row-gap: 32px; }

  /* フッター: 中央にそろえて小さく */
  .site-footer { margin-top: 72px; padding: 20px var(--gutter) 28px; justify-content: center; text-align: center; font-size: 10px; gap: 2px 16px; }
}
