/* ===================================================================
   SANO YUI — Portfolio
   トーン: 白基調・極ミニマル・モノトーン（binari.co.jp 参考）
   =================================================================== */

:root {
  --c-bg: #ffffff;
  --c-ink: #1a1a1a;
  --c-sub: #888888;
  --c-line: #e8e8e8;
  --c-placeholder: #f2f1ef;
  --ff-en: "Cormorant Garamond", serif;
  --ff-jp: "Noto Sans JP", sans-serif;
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-jp);
  color: var(--c-ink);
  background: var(--c-bg);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

/* プレースホルダー: 画像未配置でも崩れないよう背景を敷く */
figure { background: var(--c-placeholder); overflow: hidden; }

/* ===================== SNSアイコン ===================== */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 14px; height: 14px; flex: none;
  fill: currentColor; stroke: none;   /* 公式ロゴはベタ塗り */
}

/* ===================== Header / Nav ===================== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.header__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.header__logo {
  font-family: var(--ff-en);
  font-size: 1.4rem; letter-spacing: .25em; font-weight: 500;
}
.nav__list { list-style: none; display: flex; gap: clamp(20px, 3vw, 44px); }
.nav__list a {
  font-size: .8rem; letter-spacing: .2em; color: var(--c-sub);
  position: relative; transition: color .3s;
}
.nav__list a:hover { color: var(--c-ink); }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--c-ink); transition: width .3s;
}
.nav__list a:hover::after { width: 100%; }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; width: 28px; height: 20px; position: relative; }
.nav__toggle span {
  position: absolute; left: 0; width: 100%; height: 1px; background: var(--c-ink); transition: .3s;
}
.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav__toggle span:nth-child(3) { bottom: 0; }

/* ===================== Hero ===================== */
.hero { padding-top: 72px; }
.hero__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  height: 82vh; min-height: 480px;
}
.hero__item { height: 100%; }
.hero__item img { transition: transform 1.2s ease; }
.hero__item:hover img { transform: scale(1.04); }
.hero__caption { text-align: center; padding: clamp(40px, 7vw, 90px) var(--gutter) clamp(30px,5vw,60px); }
.hero__name {
  font-family: var(--ff-en); font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 5.5rem); letter-spacing: .2em; line-height: 1;
}
.hero__sub { margin-top: 1.4em; font-size: .85rem; letter-spacing: .3em; color: var(--c-sub); }

/* ===================== Section common ===================== */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(60px, 10vw, 130px) var(--gutter);
}
.section__head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.section__title {
  font-family: var(--ff-en); font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: .3em;
}
.section__lead { font-size: .75rem; letter-spacing: .35em; color: var(--c-sub); margin-top: .8em; text-transform: uppercase; }

/* ===================== Gallery ===================== */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.gallery__item { aspect-ratio: 3 / 4; min-width: 0; }
.gallery__item img { transition: transform 1s ease, opacity .6s; }
.gallery__item:hover img { transform: scale(1.05); }

/* ===================== More（その他の写真） ===================== */
.section--more { max-width: var(--maxw); padding-top: 0; }
.more__action { text-align: center; }
.more__open {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 56px; font: inherit; background: none; cursor: pointer;
  border: 1px solid var(--c-line); color: var(--c-ink);
  transition: border-color .3s, background .3s;
}
.more__open:hover { border-color: var(--c-ink); background: #fafafa; }
.more__open-en { font-family: var(--ff-en); font-size: 1.15rem; letter-spacing: .25em; }
.more__open-num { font-size: .68rem; letter-spacing: .22em; color: var(--c-sub); }

/* ===================== More モーダル ===================== */
.modal {
  position: fixed; inset: 0; z-index: 190;
  background: var(--c-bg); display: flex; flex-direction: column;
}
.modal[hidden] { display: none; }
.modal__bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--c-line); background: var(--c-bg);
}
.modal__title { font-family: var(--ff-en); font-size: 1.1rem; letter-spacing: .25em; display: flex; align-items: baseline; gap: 14px; }
.modal__title span { font-family: var(--ff-jp); font-size: .68rem; letter-spacing: .16em; color: var(--c-sub); }
.modal__close {
  background: none; border: 0; cursor: pointer; color: var(--c-ink);
  font-family: var(--ff-en); font-size: 2rem; line-height: 1; padding: 4px 8px;
  transition: opacity .3s;
}
.modal__close:hover { opacity: .5; }
.modal__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: clamp(14px, 3vw, 28px); }
.more {
  columns: 4; column-gap: 6px;          /* 元の縦横比のまま並べる（トリミングしない） */
}
.more__item { break-inside: avoid; margin: 0 0 6px; cursor: zoom-in; }
.more__item img { width: 100%; height: auto; object-fit: initial; transition: opacity .4s; }
.more__item:hover img { opacity: .78; }

/* ===================== Lightbox ===================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255,255,255,.97);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 7vw, 80px) clamp(16px, 6vw, 90px);
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: var(--c-ink); font-family: var(--ff-en); line-height: 1;
  padding: 10px 16px; transition: opacity .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { opacity: .5; }
.lightbox__close { top: 12px; right: 14px; font-size: 2rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.6rem; }
.lightbox__nav--prev { left: 4px; }
.lightbox__nav--next { right: 4px; }
.lightbox__count {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  font-family: var(--ff-en); font-size: .8rem; letter-spacing: .18em; color: var(--c-sub);
}
body.is-locked { overflow: hidden; }

/* ===================== Profile ===================== */
.section--profile { background: #fafafa; max-width: none; }
.section--profile > .section__head,
.section--profile > .profile { max-width: var(--maxw); margin-inline: auto; }
.profile {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 6vw, 80px);
  align-items: start;
}
.profile__photo, .profile__body { min-width: 0; }
.profile__photo { aspect-ratio: 3 / 4; }
.profile__name {
  font-family: var(--ff-en); font-weight: 500; font-size: 2rem; letter-spacing: .12em;
  margin-bottom: 1.4em; display: flex; flex-direction: column;
}
.profile__name span { font-family: var(--ff-jp); font-size: .7rem; letter-spacing: .3em; color: var(--c-sub); margin-top: .6em; }
.profile__list { border-top: 1px solid var(--c-line); margin-bottom: 2em; }
.profile__list > div {
  min-width: 0;
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--c-line);
}
.profile__list dt { font-size: .8rem; color: var(--c-sub); letter-spacing: .1em; }
.profile__list dd { font-size: .9rem; }
.profile__text { font-size: .92rem; color: #444; margin-bottom: 2em; }
.profile__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2.2em; }
.profile__tags li {
  font-size: .72rem; letter-spacing: .14em; color: var(--c-sub);
  border: 1px solid var(--c-line); padding: 6px 14px;
}
.profile__sns { list-style: none; display: flex; flex-wrap: wrap; gap: 24px; }
.profile__sns a { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; letter-spacing: .2em; transition: opacity .3s; }
.profile__sns a span { border-bottom: 1px solid var(--c-ink); padding-bottom: 3px; }
.profile__sns a:hover { opacity: .55; }

/* ===================== Works ===================== */
.section--works { max-width: 940px; }
.works { display: grid; gap: clamp(30px, 5vw, 46px); }
.works__group { border-top: 1px solid var(--c-line); padding-top: 18px; }
.works__cat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 14px; font-weight: 400; }
.works__cat-en { font-family: var(--ff-en); font-size: .98rem; letter-spacing: .14em; white-space: nowrap; }
.works__cat-ja { font-size: .68rem; letter-spacing: .18em; color: var(--c-sub); }
.works__list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; }
.works__list li {
  font-size: .88rem; line-height: 1.7; letter-spacing: .02em; min-width: 0;
}
/* 区切りは「次の項目の先頭」に置く。行をまたいでも記号だけが取り残されない */
.works__list li:not(:first-child)::before {
  content: "／"; color: #d5d5d5; margin: 0 7px 0 3px;
}
/* 補足（媒体）は括弧でくくって社名との切れ目を明確にする */
.works__list em {
  font-style: normal; font-size: .7rem; color: var(--c-sub); letter-spacing: .04em; margin-left: 3px;
}
.works__list em::before { content: "（"; }
.works__list em::after  { content: "）"; }
.works__note { margin-top: 2em; font-size: .7rem; letter-spacing: .12em; color: var(--c-sub); text-align: right; }

/* ===================== Contact ===================== */
.section--contact { max-width: 680px; }
.contact__lead { text-align: center; font-size: .92rem; color: #444; margin-bottom: clamp(30px,5vw,52px); }
.form__row { margin-bottom: 26px; }
.form__row label { display: block; font-size: .8rem; letter-spacing: .12em; color: var(--c-sub); margin-bottom: 10px; }
.form__row label span { color: #c0392b; }
.form__row input, .form__row textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: .9rem;
  border: 1px solid var(--c-line); background: #fff; color: var(--c-ink);
  border-radius: 0; transition: border-color .3s;
}
.form__row input:focus, .form__row textarea:focus { outline: none; border-color: var(--c-ink); }
.form__row textarea { resize: vertical; }
.form__submit {
  display: block; margin: 8px auto 0; min-width: 220px;
  padding: 16px 40px; font: inherit; font-size: .82rem; letter-spacing: .25em;
  background: var(--c-ink); color: #fff; border: 1px solid var(--c-ink);
  cursor: pointer; transition: background .3s, color .3s;
}
.form__submit:hover { background: #fff; color: var(--c-ink); }

/* ===================== SNS / QR ===================== */
.sns { margin-top: clamp(56px, 8vw, 88px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--c-line); }
.sns__title { text-align: center; font-family: var(--ff-en); font-size: 1rem; letter-spacing: .3em; color: var(--c-sub); margin-bottom: clamp(26px,4vw,40px); }
.sns__list { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(24px, 5vw, 56px); }
.sns__item a { display: block; text-align: center; }
.sns__qr {
  width: 116px; height: 116px; margin: 0 auto 14px;
  border: 1px solid var(--c-line); padding: 8px; background: #fff;
  object-fit: contain; transition: border-color .3s;
}
.sns__item a:hover .sns__qr { border-color: var(--c-ink); }
.sns__label { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; letter-spacing: .18em; }
.sns__id { display: block; font-size: .7rem; letter-spacing: .1em; color: var(--c-sub); margin-top: 4px; }
.sns__links { list-style: none; display: flex; justify-content: center; gap: 24px; margin-top: clamp(28px,4vw,40px); }
.sns__links a { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; letter-spacing: .18em; color: var(--c-sub); transition: color .3s; }
.sns__links a span { border-bottom: 1px solid var(--c-line); padding-bottom: 3px; transition: border-color .3s; }
.sns__links a:hover { color: var(--c-ink); }
.sns__links a:hover span { border-color: var(--c-ink); }

/* ===================== Footer ===================== */
.footer {
  text-align: center; padding: clamp(50px,7vw,80px) var(--gutter);
  border-top: 1px solid var(--c-line);
}
.footer__logo { font-family: var(--ff-en); font-size: 1.2rem; letter-spacing: .25em; display: inline-block; margin-bottom: 1.4em; }
.footer__copy { font-size: .7rem; letter-spacing: .15em; color: var(--c-sub); }

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .more { columns: 3; }
  .profile { grid-template-columns: 1fr; }
  .profile__photo { max-width: 360px; margin-inline: auto; }
}

@media (max-width: 640px) {
  /* backdrop-filter を持つ固定ヘッダーは position:fixed の子の“基準”になってしまい、
     全画面ナビがヘッダーの帯の中に閉じ込められて背景が透ける。モバイルでは無効化する。 */
  .header {
    background: var(--c-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav__toggle { display: block; z-index: 110; }
  .header__logo { position: relative; z-index: 106; }   /* メニューを開いてもロゴは見えるように */
  .nav__list {
    position: fixed; inset: 0; z-index: 105; flex-direction: column;
    justify-content: center; align-items: center; gap: 36px;
    background: var(--c-bg); transform: translateX(100%); transition: transform .4s ease;
  }
  .nav__list a { color: var(--c-ink); }
  .nav__list a { font-size: 1rem; }
  .nav.is-open .nav__list { transform: translateX(0); }
  .nav.is-open .nav__toggle span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

  .more { columns: 2; }
  .lightbox__nav { font-size: 2rem; }
  .hero__grid { grid-template-columns: 1fr; height: auto; }
  .hero__item { aspect-ratio: 3 / 4; height: auto; }
  .hero__item:nth-child(3) { display: none; }
  .works__list li { font-size: .84rem; }
  .works__list em { white-space: normal; }
}
