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

:root {
  --bg: #ffffff;
  --fg: #1c1c1c;
  --muted: #999;
  --placeholder: #d9d9d9;
  --font: 'Cormorant Garamond', serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --nav-h: 100px;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* =====================
   NAVIGATION
===================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  background: var(--bg);
}

.nav-logo {
  font-family: var(--font);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--fg);
}

.nav-links {
  display: none;
  gap: 2.8rem;
}

.nav-links a {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  color: var(--fg);
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.active { opacity: 0.4; }

/* =====================
   HAMBURGER → X アニメーション
===================== */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  position: fixed;
  top: 1.3rem;
  right: 1.5rem;
  z-index: 500;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--fg);
  transition: transform 0.35s ease, opacity 0.25s ease;
  transform-origin: center;
}

.hamburger.is-open span { background: var(--fg); }

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

/* =====================
   MOBILE MENU OVERLAY
===================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-overlay.open { transform: translateX(0); }

.menu-overlay a {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--fg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s;
}

.menu-overlay.open a { opacity: 1; transform: translateY(0); }
.menu-overlay.open a:nth-child(1) { transition-delay: 0.06s; }
.menu-overlay.open a:nth-child(2) { transition-delay: 0.12s; }
.menu-overlay.open a:nth-child(3) { transition-delay: 0.18s; }
.menu-overlay a:hover { color: var(--muted); }

/* =====================
   HOME
===================== */
.home-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem;
}

.home-image {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9/16;
  background: var(--placeholder);
  border-radius: 28px;
  display: block;
  object-fit: cover;
}

/* =====================
   GALLERY
===================== */
.gallery-body {
  padding: calc(var(--nav-h) + 1.5rem) 1.2rem 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--placeholder);
  transition: opacity 0.2s;
}

.gallery-item:hover { opacity: 0.82; }

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

/* =====================
   LIGHTBOX
===================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.93);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lb-img {
  max-width: 88vw;
  max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
}

.lb-placeholder {
  width: 72vw;
  height: 52vw;
  max-height: 72vh;
  background: #2a2a2a;
  border-radius: 14px;
}

.lb-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 700;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0.65;
  font-family: var(--font);
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }

/* =====================
   ABOUT
===================== */
.about-body {
  padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem;
}

.about-image {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--placeholder);
  border-radius: 24px;
  margin-bottom: 2rem;
  display: block;
  object-fit: cover;
}

.about-year {
  font-family: var(--font-jp);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 1.6rem;
}

.about-text {
  font-family: var(--font-jp);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 2.1;
  color: #444;
}

.about-text p + p { margin-top: 1rem; }

/* =====================
   CONTACT
===================== */
.contact-body {
  padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  margin-bottom: 2rem;
  text-align: center;
}
.contact-desc {
  font-family: var(--font-jp);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
  text-align: center;
}

.btn-send {
  align-self: center; /* flex-start → center に変更 */
  background: none;
  border: 1px solid var(--fg);
  padding: 0.5rem 2rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.25s;
}
.btn-send:hover { background: var(--fg); color: #fff; }

/* =====================
   DESKTOP (768px+)
===================== */
@media (min-width: 768px) {
  nav { padding: 2.5rem 5rem; }
  .hamburger { display: none; }
  .nav-links { display: flex; }

  /* HOME */
  .home-body {
    align-items: center;
    padding: calc(var(--nav-h) + 2rem) 5vw 4rem;
  }
  .home-image {
    max-width: 100%;
    width: 88vw;
    aspect-ratio: 16/9;
    border-radius: 28px;
    max-height: 76vh;
  }

  /* GALLERY: 3列・横長 */
  .gallery-body { padding: calc(var(--nav-h) + 2rem) 3.5rem 5rem; }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .gallery-item {
    aspect-ratio: 4/3;
    border-radius: 20px;
  }

  /* ABOUT: 左画像・右テキスト */
  .about-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    padding: calc(var(--nav-h) + 2rem) 5vw 5rem;
    align-items: start;
  }
  .about-image {
    aspect-ratio: 3/4;
    border-radius: 24px;
    margin-bottom: 0;
    width: 100%;
  }
  .about-right { padding-top: 1rem; }

  /* CONTACT: タイトル中央・横長フォームエリア */ */
  .contact-body {
    padding: calc(var(--nav-h) + 3rem) 5vw 5rem;
  }
  .contact-title { font-size: 1.6rem; margin-bottom: 2.5rem; }
}
/* =====================
   ページ遷移 ディゾルブ
===================== */
body {
  animation: dissolve 0.5s ease;
}

@keyframes dissolve {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* =====================
   SLIDESHOW
===================== */
.slideshow {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9/16;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active { opacity: 1; }

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

@media (min-width: 768px) {
  .slideshow {
    max-width: 100%;
    width: 88vw;
    aspect-ratio: 16/9;
    border-radius: 28px;
    max-height: 76vh;
  }
}