/* =========================================================
   HAYATO KITAMURA — グルメの"色気"フォトグラファー
   ダーク基調 / 写真が主役のポートフォリオ
   ========================================================= */

:root {
  --bg: #0d0c0b;            /* 背景：ほぼ黒のチャコール */
  --bg-soft: #161412;       /* カード等の少し明るい面 */
  --text: #e8e2d9;          /* 本文：温かみのあるアイボリー */
  --text-dim: #9a938a;      /* 補助テキスト */
  --accent: #c9a15c;        /* アクセント：シャンパンゴールド */
  --serif-en: 'Cormorant Garamond', serif;
  --serif-jp: 'Noto Serif JP', serif;
  --header-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-jp);
  font-weight: 300;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(13,12,11,.85), rgba(13,12,11,0));
  transition: background .4s;
}
.site-header.scrolled {
  background: rgba(13,12,11,.92);
  backdrop-filter: blur(8px);
}
.site-logo {
  font-family: var(--serif-en);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.2;
}
.logo-sub {
  display: block;
  font-family: var(--serif-jp);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.28em;
  margin-top: 3px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  font-family: var(--serif-en);
  font-size: 0.92rem;
  letter-spacing: 0.24em;
  color: var(--text-dim);
  transition: color .3s;
  position: relative;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
}
.insta-link { color: var(--accent) !important; display: inline-flex; }
.insta-link:hover { color: var(--text) !important; }
.nav-toggle { display: none; }

/* ---------- ヒーロー（スライドショー） ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 540px;
  overflow: hidden;
}
.hero-slides, .hero-slide {
  position: absolute; inset: 0;
}
.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 2.2s ease, transform 8s ease;
}
.hero-slide.show {
  opacity: 1;
  transform: scale(1.0);
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(13,12,11,.35) 0%, rgba(13,12,11,0) 35%, rgba(13,12,11,.55) 100%);
  pointer-events: none;
}
.hero-caption {
  position: absolute;
  left: 34px; bottom: 76px;
  z-index: 2;
}
.hero-lead {
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.hero-sub {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-top: 10px;
  font-size: clamp(.85rem, 1.4vw, 1.05rem);
}
.hero-scroll {
  position: absolute;
  right: 38px; bottom: 30px;
  z-index: 2;
  font-family: var(--serif-en);
  font-size: .7rem;
  letter-spacing: .35em;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-line {
  width: 1px; height: 46px;
  background: var(--accent);
  animation: scrollPulse 2.2s infinite ease-in-out;
  transform-origin: top;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- グリッドギャラリー ---------- */
.gallery-wrap {
  padding: 90px 4vw 60px;
}
.masonry {
  columns: 4;
  column-gap: 18px;
}
.masonry .ph {
  margin-bottom: 18px;
  break-inside: avoid;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: var(--bg-soft);
  /* 高さをあらかじめ確保しておくことで、画像の読み込み完了時に
     グリッドがガクガク動く（レイアウトシフト）のを防ぐ */
  aspect-ratio: 4 / 5;
}
.masonry .ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease, opacity .8s;
  opacity: 0;
}
.masonry .ph img.loaded { opacity: 1; }
.masonry .ph:hover img { transform: scale(1.04); }

/* ---------- 横位置（landscape）写真だけの行 ---------- */
.masonry-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.masonry-wide .ph {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: var(--bg-soft);
}
.masonry-wide .ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease, opacity .8s;
  opacity: 0;
}
.masonry-wide .ph img.loaded { opacity: 1; }
.masonry-wide .ph:hover img { transform: scale(1.04); }

/* ---------- ライトボックス ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0;
  background: rgba(8,7,6,.95);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
}
.lightbox img { max-height: 90vh; max-width: 92vw; }
.lightbox-close {
  position: absolute;
  top: 22px; right: 30px;
  background: none; border: none;
  color: var(--text);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- 常時表示CONTACTボタン ---------- */
.contact-fab {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 150;
  font-family: var(--serif-en);
  font-size: .8rem;
  letter-spacing: .3em;
  padding: 14px 26px 14px 30px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(13,12,11,.72);
  backdrop-filter: blur(6px);
  transition: background .35s, color .35s;
}
.contact-fab:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- フッター ---------- */
.site-footer {
  text-align: center;
  padding: 60px 20px 90px;
  color: var(--text-dim);
  font-size: .74rem;
  letter-spacing: .18em;
}
.site-footer .insta-link { justify-content: center; margin-bottom: 18px; }

/* ---------- 下層ページ共通 ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 70px) 6vw 80px;
}
.page-title {
  font-family: var(--serif-en);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: .3em;
  margin-bottom: 8px;
}
.page-title-jp {
  color: var(--accent);
  font-size: .8rem;
  letter-spacing: .3em;
  margin-bottom: 54px;
}
.page p { line-height: 2.2; margin-bottom: 1.6em; color: var(--text); }
.page .dim { color: var(--text-dim); font-size: .9rem; }
.page p strong { color: var(--accent); font-weight: 400; }

.about-lead {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.6;
  color: var(--text);
  letter-spacing: .04em;
  margin: 6px 0 46px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(201,161,92,.25);
}
.about-quote {
  font-size: 1.05rem;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 40px 0;
  line-height: 2;
}

.profile-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 40px;
}
.profile-photo {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-soft);
}

/* 受賞歴リスト */
.awards-list { list-style: none; }
.awards-list li {
  display: flex;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(201,161,92,.22);
  line-height: 1.9;
}
.awards-list .year {
  font-family: var(--serif-en);
  color: var(--accent);
  letter-spacing: .1em;
  flex-shrink: 0;
  width: 64px;
}

/* ---------- 問い合わせフォーム ---------- */
.contact-form { margin-top: 10px; }
.contact-form label {
  display: block;
  font-size: .78rem;
  letter-spacing: .24em;
  color: var(--text-dim);
  margin: 30px 0 10px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid rgba(201,161,92,.25);
  color: var(--text);
  font-family: var(--serif-jp);
  font-size: 1rem;
  padding: 14px 16px;
  transition: border-color .3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form button {
  margin-top: 40px;
  font-family: var(--serif-en);
  font-size: .85rem;
  letter-spacing: .3em;
  padding: 16px 54px;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  transition: background .35s, color .35s;
}
.contact-form button:hover { background: var(--accent); color: var(--bg); }
.contact-note { font-size: .8rem; color: var(--text-dim); margin-top: 26px; line-height: 2; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1200px) {
  .masonry { columns: 3; }
}
@media (max-width: 900px) {
  .masonry { columns: 2; }
}
@media (max-width: 640px) {
  .site-header { padding: 0 20px; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    background: rgba(13,12,11,.97);
    padding: 26px 0 34px;
    gap: 24px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none; border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    width: 26px; height: 1px;
    background: var(--text);
    display: block;
  }
  /* ギャラリー：スマホでも2列（小さくなりすぎないよう余白は狭め） */
  .gallery-wrap { padding: 70px 12px 50px; }
  .masonry { columns: 2; column-gap: 10px; }
  .masonry .ph { margin-bottom: 10px; }
  .masonry-wide { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 10px; }

  /* ヒーロー：写真全体が見えるように（見切れ防止） */
  .hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-height: 88vh;
  }
  .hero-slide {
    background-size: contain;
    background-repeat: no-repeat;
    background-color: var(--bg);
  }

  .hero-caption { left: 20px; bottom: 66px; }
  .contact-fab { right: 16px; bottom: 16px; padding: 12px 20px 12px 24px; }
  .profile-block { flex-direction: column; }
}
