/* === Global layout vars === */
:root{
  --header-h: 120px;   /* 固定ヘッダーの見た目高さ */
  --footer-gap: 120px; /* フッター被り防止の余白 */
}
@media (max-width: 900px){
  :root{ --header-h: 100px; --footer-gap: 100px; }
}

/* 固定ヘッダー対策：全ページで本文上下に余白 */
main{
  padding-top: var(--header-h);
  padding-bottom: var(--footer-gap);
}
/* アンカー(#about 等)での被り対策 */
section, [id]{ scroll-margin-top: calc(var(--header-h) + 20px); }

/* 基本設定 */
body {
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  padding: 0;
  background: #fff;
}

/* ロゴ */
.logo { width: 100px; height: auto; }

/* ヘッダー */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 20px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

/* ヘッダーナビ（現行仕様） */
.main-nav { display: block; }
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav li { margin: 0; padding: 0; }
.main-nav a {
  white-space: nowrap;
  text-decoration: none;
  color: #333;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  transition: opacity 0.3s ease;
}
.main-nav a:hover { opacity: 0.6; }
/* 現在ページの下線は出さない（統一） */
.main-nav .active a { border: none; text-decoration: none; }

/* セクション共通 */
section { /* scroll-margin-top は上で定義済み */ }

/* WORKS レイアウト */
.masonry-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5vw 80px;
  /* main の上余白で十分なので、ここは上側のパディング無し */
  column-count: 2;
  column-gap: 60px;
}
.item {
  break-inside: avoid;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.item.visible { opacity: 1; transform: translateY(0); }
.item img { width: 100%; height: auto; border-radius: 0; }
.caption { font-size: 0.7rem; color: #555; margin-top: 8px; }

/* WORKS 見出し削除 */
.works h2 { display: none; }

/* ABOUT セクション */
#about {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5vw 80px;
  font-size: 0.85rem;
  line-height: 1.9;
  color: #555;
  font-weight: 300;
  letter-spacing: 0.02em;
}
#about h2 {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 2em;
  color: #333;
  text-transform: uppercase;
}

/* CONTACT セクション */
#contact {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 5vw 80px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.8;
}
#contact form { display: flex; flex-direction: column; gap: 24px; }
#contact input, #contact textarea {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 12px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 0;
}
#contact button {
  align-self: flex-start;
  background: #000;
  color: #fff;
  padding: 10px 24px;
  font-size: 0.8rem;
  border: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}
#contact button:hover { background: #333; }

/* フッター */
.site-footer {
  background: #f8f8f8;
  padding: 40px 5vw 20px;
  font-size: 0.75rem;
  color: #444;
  border-top: 1px solid #ddd;
}
.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.footer-logo { width: 80px; height: auto; margin-bottom: 10px; }
.footer-company { font-size: 0.9rem; font-weight: bold; display: block; margin-bottom: 4px; }
.footer-address { color: #666; line-height: 1.8; font-size: 0.75rem; margin: 0; }
.footer-social { display: flex; gap: 16px; justify-content: center; }
.footer-icon { width: 24px; height: 24px; opacity: 0.8; transition: opacity 0.3s ease; }
.footer-icon:hover { opacity: 1; }
.footer-copy { text-align: center; font-size: 0.7rem; color: #888; margin-top: 20px; }

/* ハンバーガーアイコン（PCでは非表示） */
.menu-toggle {
  position: fixed;
  top: 20px; right: 5vw;
  z-index: 2001;
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 30px; height: 24px;
  cursor: pointer;
  background: none; border: 0; padding: 0;
}
.menu-toggle span {
  height: 2px; background: #000;
  margin: 4px 0; transition: all 0.4s ease;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

/* フルスクリーンメニュー */
[hidden]{ display: none !important; }
.fullscreen-menu {
  position: fixed; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: #111;
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  transition: top 0.5s ease;
}
.fullscreen-menu.open { top: 0; }
.fullscreen-menu nav {
  display: flex; flex-direction: column; align-items: center;
}
.fullscreen-menu nav a {
  color: #fff; font-size: 1.5rem; margin: 20px 0;
  text-decoration: none; letter-spacing: 0.1em; transition: opacity 0.3s;
}
.fullscreen-menu nav a:hover { opacity: 0.6; }

/* レスポンシブ対応 */
@media screen and (max-width: 900px) {
  .masonry-grid { column-count: 1; column-gap: 0; }

  /* スマホ：デスクトップメニューを隠し、ハンバーガーを出す */
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
}
