/* ============================================
   style.css — Photographer Portfolio
   共通スタイルシート
   ============================================ */

/* ---------- Google Fonts Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@300;400;500&family=Shippori+Antique&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg:         #0c0c0b;
  --surface:    #141412;
  --text:       #e8e2d9;
  --muted:      #5e5a54;
  --accent:     #b8a98e;
  --line:       rgba(232,226,217,0.1);
  --nav-h:      64px;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.7, 0, 0.84, 0);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---------- Page Transition Overlay ---------- */
#page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s var(--ease-out);
}

#page-overlay.active {
  opacity: 1;
  pointer-events: all;
}

body.is-loading #page-overlay {
  opacity: 1;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  mix-blend-mode: normal;
}

/* ナビ背景グラデ（スクロール対応はJSで） */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.nav__logo {
  font-family: 'Shippori Antique', serif;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s;
}
.nav__logo:hover { opacity: 0.6; }

.nav__links {
  display: flex;
  gap: 36px;
  position: relative;
  z-index: 1;
}

.nav__link {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}
/* ---------- Hamburger Nav (≤1023px) ---------- */
@media (max-width: 1023px) {

  .nav__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 200;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .nav__hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--text);
    transition: transform 0.4s var(--ease-out), opacity 0.3s;
    transform-origin: center;
  }

  .nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s var(--ease-out);
    z-index: 150;
  }

  .nav__links.is-open {
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    font-size: 2rem;
    letter-spacing: 0.18em;
  }
}

@media (min-width: 1024px) {
  .nav__hamburger { display: none; }
}
/* ---------- Cursor (desktop) ---------- */
@media (hover: hover) {
  * { cursor: none !important; }
  
  #cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--text);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), background 0.25s, opacity 0.3s;
  }
  
  #cursor.is-hovering {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 1px solid var(--text);
    opacity: 0.6;
  }
}


/* ============================================
   INDEX — Gallery / Works
   ============================================ */

.works-page {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 160px;
}

.works-header {
  padding: 40px 40px 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.works-header__title {
  font-family: 'Shippori Antique', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.works-header__count {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
}

/* 写真リスト */
.works-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding: 0 40px;
}

.work-item {
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.work-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 12列グリッドで大小交互 — detail-galleryと同パターン */
.works-list .work-item:nth-child(4n+1) { grid-column: 1 / 8; }
.works-list .work-item:nth-child(4n+2) { grid-column: 8 / 13; }
.works-list .work-item:nth-child(4n+3) { grid-column: 1 / 5; }
.works-list .work-item:nth-child(4n+0) { grid-column: 5 / 13; }

.work-item__inner {
  width: 100%;
  position: relative;
}

/* 写真ラッパー */
.work-item__img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.work-item__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 0.9s var(--ease-out) 0.1s;
}

.work-item.is-visible .work-item__img-wrap::after {
  transform: scaleY(0);
}

.work-item__img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.work-item__link:hover .work-item__img {
  transform: scale(1.03);
}

/* メタ情報 */
.work-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 20px;
  padding: 0 2px;
}

.work-item__title {
  font-size: clamp(1.1rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color 0.3s;
}

.work-item__link:hover .work-item__title {
  color: var(--accent);
}

.work-item__year {
  letter-spacing: 0.2em;
}

/* 区切り線 */
.works-divider {
  width: 1px;
  height: 80px;
  background: var(--line);
  margin: 0 auto 120px;
}


/* ============================================
   DETAIL PAGE
   ============================================ */

.detail-page {
  padding-top: var(--nav-h);
  padding-bottom: 160px;
}

.detail-hero {
  width: 100%;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
  position: relative;
}

.detail-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.detail-hero.is-loaded .detail-hero__img {
  transform: scale(1);
}

.detail-hero__caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 60px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232,226,217,0.5);
}

.detail-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 40px;
}

.detail-series {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.detail-title {
  font-family: 'Shippori Antique', serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out) 0.1s, transform 0.7s var(--ease-out) 0.1s;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}

.detail-info__item {}
.detail-info__label {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.detail-info__value {
  font-size: 1.5rem;
  color: var(--text);
}

.detail-description {
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(232,226,217,0.75);
  max-width: 60ch;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out) 0.3s, transform 0.7s var(--ease-out) 0.3s;
}

.detail-body.is-visible .detail-series,
.detail-body.is-visible .detail-title,
.detail-body.is-visible .detail-info,
.detail-body.is-visible .detail-description {
  opacity: 1;
  transform: translateY(0);
}

/* 詳細ページ内の画像グリッド */
.detail-gallery {
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 60px;
}

.detail-gallery__item {
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.detail-gallery__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.detail-gallery__item:nth-child(1) { grid-column: 1 / 8; }
.detail-gallery__item:nth-child(2) { grid-column: 8 / 13; }
.detail-gallery__item:nth-child(3) { grid-column: 1 / 5; }
.detail-gallery__item:nth-child(4) { grid-column: 5 / 13; }

.detail-gallery__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.detail-gallery__item:hover .detail-gallery__img {
  transform: scale(1.04);
}

/* ナビゲーション（前後） */
.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 40px 0;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.detail-nav__link {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s;
  margin-top: 80px;
}
.detail-nav__link:hover { color: var(--accent); }
.detail-nav__link span { font-size: 1.2rem; }

.detail-nav__back {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.detail-nav__back::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}
.detail-nav__back:hover { color: var(--text); }
.detail-nav__back:hover::after { width: 100%; }


/* ============================================
   ABOUT PAGE
   ============================================ */

.about-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  padding-bottom: 160px;
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
}

.about-split__img-col {
  position: relative;
  overflow: hidden;
}

.about-split__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
}

.about-split__img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.about-split__text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px 80px 60px;
}

.about-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  display: block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.about-name {
  font-family: 'Shippori Antique', serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out) 0.1s, transform 0.7s var(--ease-out) 0.1s;
}

.about-text {
  line-height: 2.1;
  max-width: 44ch;
  margin-bottom: 52px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out) 0.2s, transform 0.7s var(--ease-out) 0.2s;
}

.about-text + .about-text {
  margin-top: -32px;
}

.about-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out) 0.3s, transform 0.7s var(--ease-out) 0.3s;
}

.about-split__text-col.is-visible .about-eyebrow,
.about-split__text-col.is-visible .about-name,
.about-split__text-col.is-visible .about-text,
.about-split__text-col.is-visible .about-specs {
  opacity: 1;
  transform: translateY(0);
}

.about-spec__label {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.about-spec__value {
  font-size: 1.5rem;
  color: var(--text);
}

/* Selected works on about */
.about-works {
  padding: 120px 40px 0;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}


/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) 40px 80px;
  text-align: center;
}

.contact-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.contact-title {
  font-family: 'Shippori Antique', serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.1s, transform 0.8s var(--ease-out) 0.1s;
}

.contact-lead {
  font-size: 0.9rem;
  line-height: 2;
  color: rgba(232,226,217,0.6);
  margin: 0 auto 64px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.2s, transform 0.8s var(--ease-out) 0.2s;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.3s, transform 0.8s var(--ease-out) 0.3s;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text);
  padding: 16px 0;
  transition: color 0.3s;
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s var(--ease-out);
}

.contact-link:hover { color: var(--accent); }
.contact-link:hover::after { width: 80%; }

.contact-link__arrow {
  font-size: 0.8em;
  opacity: 0.5;
}

.contact-social {
  display: flex;
  gap: 32px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.4s, transform 0.8s var(--ease-out) 0.4s;
}

.contact-social__link {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.contact-social__link:hover { color: var(--text); }

.contact-page.is-visible .contact-eyebrow,
.contact-page.is-visible .contact-title,
.contact-page.is-visible .contact-lead,
.contact-page.is-visible .contact-links,
.contact-page.is-visible .contact-social {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
}

.site-footer__copy {
  letter-spacing: 0.18em;
}

.site-footer__top {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s;
}
.site-footer__top:hover { color: var(--text); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .works-list { display: block; padding: 0;}
  .works-header { padding: 20px 20px 48px; flex-direction: column; gap: 8px; }
  .work-item { padding: 0 20px; margin-bottom: 80px; }
  .work-item__inner,
  .work-item:nth-child(even) .work-item__inner,
  .work-item:nth-child(odd) .work-item__inner {
    width: 100%;
    margin: 0;
  }

  .detail-gallery {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
  }
  .detail-gallery__item { grid-column: unset !important; }
  .detail-body { padding: 60px 20px; }

  .about-split { grid-template-columns: 1fr; }
  .about-split__img-col { height: 60vw; }
  .about-split__text-col { padding: 48px 20px; }

  .contact-page { padding: var(--nav-h) 20px 80px; }
  .site-footer { padding: 24px 20px; }
  .detail-info__label { font-size: 0.7rem; }
  .detail-info__value { font-size: 1.1rem; }
  .detail-nav { padding: 0 20px ; }
}
