/* ===============================
   base
   =============================== */

body {
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-align: left;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  letter-spacing: 0.1em;
  font-weight: 400;
  font-style: normal;
  font-family: "Quattrocento", "Shippori Mincho", serif;
}

/* リンク共通 */
a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  text-decoration: none;
}

/* PC / SP 切り替え */
.media-desktop {
  display: block;
}

.media-mobile {
  display: none;
}

/* ===============================
   layout
   =============================== */

.layout-main {
  width: 80%;
  padding: 3% 0;
  margin: 0 auto;
  max-width: 1200px;
  font-size: 108%;
}

.page-content {
  display: block;
  visibility: visible;
}

.site-footer {
  font-size: 80%;
  padding: 0;
  margin-top: 5em;
  margin-bottom: 0;
  margin-left: 0.5em;
  margin-right: 0;
  letter-spacing: 0.05em;
  text-align: right;
}

.site-footer__mail {
  letter-spacing: 0.05em;
  font-size: 110%;
  margin-bottom: 2em;
}

/* ===============================
   Profile / Info
   =============================== */

h1 {
  margin: 0.8em 0 0.3em 0;
  display: block;
  font-size: 220%;
  letter-spacing: 0.15em;
}

h1 span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

h2 {
  margin: 0em 0 1em 0.3em;
}

.profile-section {
  margin: 7em 0 6em 0;
  font-size: 90%;
}

.profile-section ul {
  text-align: left;
  padding: 0;
  margin: 0 0 0 0.3em;
}

.profile-section li {
  margin-bottom: 0.8em;
}

.profile-section p {
  margin: 2em 0.3em;
  font-size: 105%;
  letter-spacing: 0.1em;
  line-height: 1.7;

  text-align: justify;
  text-align-last: left;

  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

.profile-section__social {
  letter-spacing: 0.05em;
  font-size: 110%;
  margin-bottom: 0.7em;
}

.profile-section__social a:link,
.profile-section__social a:visited {
  color: #000;
}

.profile-section__social_psw {
  letter-spacing: 0.05em;
  font-size: 90%;
  margin-top: 2em;
}

/* Contact 内リンク */
a:link,
a:visited {
  color: #ba3f20;
  text-decoration: none;
}

a:hover {
  color: #6b7d89;
  text-decoration: none;
}

a:active {
  color: #e66b4c;
  text-decoration: none;
}

/* h2 の PHOTO リンク */
.profile-section h2 a:link {
  color: #333;
  text-decoration: underline;
}

.profile-section h2 a:visited,
.profile-section h2 a:hover,
.profile-section h2 a:active {
  color: #777;
  text-decoration: underline;
}

/* ===============================
   Work / Video list
   =============================== */

.work-section {
  margin-bottom: 5em;
  padding-bottom: 0;
}

.work-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 各アイテム */
.work-grid .work-item {
  position: relative;
  flex: 0 0 50%;
  background-color: transparent;
  --overlay-opacity: 0;
}

.work-grid .work-item a {
  position: relative;
  display: block;
}

.work-grid .work-item a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--overlay-opacity, 0);
  pointer-events: none;
  transition: opacity 0.2s linear;
  will-change: opacity;
}

.work-grid .work-item img {
  width: 100%;
  display: block;

  /* ロード完了まで非表示 → フェードイン */
  opacity: 0;
  transition: opacity 1000ms ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.work-grid .work-item.is-hover {
  --overlay-opacity: 0.5;
}

.work-grid .work-item.is-hover p {
  opacity: 1;
}

/* 読み込み完了後に付けるクラス */
.work-grid .work-item img.is-loaded {
  opacity: 1;
}

/* 2021 の横幅レイアウト（旧サイトから継承してる想定名） */
.work-grid .work-item--wide {
  flex-basis: 100%;
}

.work-grid .work-item--wide .media-desktop {
  display: block;
}

.work-grid .work-item--wide .media-mobile {
  display: none;
}

/* サムネイル上のテキスト */
.work-grid .work-item p {
  opacity: 0;
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 1;
  text-align: left;
  font-size: 72%;
  line-height: 2;
  letter-spacing: 0.1em;
  width: 85%;
  pointer-events: none;
  transition: opacity 0.2s linear;
  will-change: opacity;
}

.work-grid .work-item .work-item__title {
  display: block;
  font-size: 150%;
  letter-spacing: 0.1em;
}

.work-grid .work-item .work-item__meta {
  display: block;
  margin-top: 0.5em;
  font-size: 100%;
}

.work-grid .work-item .work-item__meta span,
.work-grid .work-item .work-item__title span {
  margin: 0;
  padding: 0;
  display: inline;
  background-color: transparent;
}

.work-item__title .jp {
  font-size: 92%;
}

.work-item__title span .sub {
  font-size: 85%;
}

.work-item__title .hosoku {
  background-color: transparent;
}

/* ===============================
   media queries
   =============================== */

@media (max-width: 960px) {
  .work-grid .work-item p {
    font-size: 60%;
  }
}

@media (max-width: 840px) {
  .media-desktop {
    display: none;
  }

  .media-mobile {
    display: block;
  }

  .layout-main {
    width: 96%;
    margin: 2em auto 0.5em auto;
  }

  h1 {
    margin: 0.8em 0 0.3em 0;
    padding-bottom: 3.5em;
    font-size: 185%;
  }

  h1 span {
    margin: 5em 0 0 0.2em;
  }

  h2 {
    line-height: 2;
  }

  /* ▼ SPレイアウト用：Profileをやや低めにして先頭画像を覗かせる */
  .profile-section {
    margin: 1.5em 1.1em 3em 1.1em;
    font-size: 80%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .profile-section p {
    margin: 1.2em 0;
  }

  .profile-section ul {
    margin: 0;
  }

  .work-section {
    margin-top: -3em;
    margin-bottom: 2em;
    padding-bottom: 30svh;
  }

  .work-grid .work-item {
    flex-basis: 100%;
  }

  .work-grid .work-item .work-item__title {
    font-size: 150%;
  }

  .work-grid .work-item p {
    font-size: 65%;
  }

  .work-grid .work-item--wide {
    flex-basis: 100%;
  }

  .work-grid .work-item--wide .media-desktop {
    display: none;
  }

  .work-grid .work-item--wide .media-mobile {
    display: block;
  }

  /* iOS Safari 対策：SPでは transition を切って再描画負荷を下げる */
  .work-grid .work-item p,
  .work-grid .work-item a::after {
    transition: none;
  }

  /* ▼ SP用 footer */
  .site-footer {
    margin-bottom: 1.5em;
    margin-left: 1em;
    margin-right: 2em;
    font-size: 80%;
    text-align: right;
  }

  .site-footer__mail {
    margin-bottom: 11em;
  }
}