:root {
  --bg:      #ececea;
  --ink:     #1a1a1a;
  --ink-soft: #55534d;
  --line:    rgba(26, 26, 26, 0.12);

  --sans: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(40px, 6vw, 100px);
  z-index: 100;
  background: var(--bg);
}

.logo img {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;  height: 14px;      /* お好みの高さに調整 */
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
  letter-spacing: 0.00em;
  font-weight: 500;
}

.main-nav a {
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  border-bottom-color: currentColor;
}

.ig-link {
  display: flex;
  border-bottom: none !important;
}

/* ---------- Intro ---------- */

.intro {
  max-width: 1400px;
  margin: 0 auto;
  padding: 320px clamp(20px, 4vw, 48px) 300px;
  text-align: center;
  overflow: hidden;
}

/* 表示される範囲 */
.marquee {
  width: 100%;
  overflow: hidden;
}

/* 複製した2セットを横並びにする */
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

/* JSの計算が終わってから動かす */
.marquee-track.is-ready {
  animation: intro-marquee 22s linear infinite;
}

/*
1セットの幅を、最低でもマーキーの表示幅と同じにする。
ここが空白防止の重要部分です。
*/
.marquee-set {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 0 0 auto;

  min-width: var(--marquee-viewport, 100vw);
  box-sizing: border-box;

  gap: clamp(70px, 9vw, 160px);
  padding-inline: clamp(20px, 4vw, 48px);
}

/*
.intro p に flex: 1 1 220px を設定すると
横幅が不安定になるため、マーキー内では解除します。
*/
.intro .marquee-set p {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin: 0;

  font-size: 12px;
  line-height: 1.9;
  color: var(--ink);
  white-space: nowrap;
}

.intro-name-en {
  font-size: 12px;
}

.intro-role,
.intro-contact {
  color: var(--ink-soft);
}

.intro-contact a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* 1セット分だけ左へ移動 */
@keyframes intro-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(
      calc(var(--marquee-distance) * -1),
      0,
      0
    );
  }
}

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px clamp(16px, 3vw, 32px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.work-item {
  margin: 0;
}

.work-item a {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: grayscale(1)contrast(85%) brightness(108%);
  transition: opacity 0.2s ease, filter 0.4s ease;
}

.work-item a:hover {
  opacity: 0.85;
  filter: grayscale(0);
}

.work-item--tall a {
  aspect-ratio: 3 / 4;
}

.work-item--full {
  grid-column: 1 / -1;
}

.work-item--full a {
  aspect-ratio: 21 / 9;
}

.work-item figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.section-divider {
  display: flex;
  justify-content: center;
  padding: 40px 0; /* 区切りとしての余白 */
}
.burger-stack {
  position: relative;
  width: 100px;   /* ← ここを変えるだけでサイズ調整できる */
  height: 100px;
}
.burger-stack .layer {
  position: absolute;
  left: 0;
  width: 100%;
  transition: transform 0.5s ease;
}
/* 閉じた状態（初期値）：隙間なく重なった普通のバーガー */
#l1 { top: 0%;    transform: translateY(38.5px); }
#l2 { top: 23.6%; transform: translateY(29.5px); }
#l3 { top: 41.4%; transform: translateY(13.5px); }
#l4 { top: 51.0%; transform: translateY(-4.5px); }
#l5 { top: 65.6%; transform: translateY(-25.5px); }
#l6 { top: 80.7%; transform: translateY(-39.5px); }

/* 画面に入ったら開く */
.section-divider.is-open .layer {
  transform: translateY(0) !important;
}
/* ---------- Footer / About ---------- */

.site-footer {
  padding: 200px clamp(20px, 4vw, 48px);
  text-align: center;
}

.footer-about {
  max-width: 480px;
  margin: 0 auto 80px;
  font-size: 12px;
  line-height: 2;
  color: var(--ink-soft);
}
.footer-about {
  max-width: 700px;
  text-align: center;
}

.about-hero-en {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 20px;
}

.about-hero-jp {
  font-size: 18px;
  margin: 0 0 24px;
}

.about-hero-role {
  font-size: 10px;
  margin: 0 0 18px;
}

.about-hero-divider {
  display: block;
  font-size: 10px;
  margin-bottom: 18px;
}

.about-hero-location {
  font-size: 10px;
  margin: 0 0 100px 0;
}

.about-block {
  text-align: left;
  padding: 0 clamp(40px, 6vw, 100px);
  margin-bottom: 16px;
}

.about-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.about-text {
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 120px;
}

.footer-block {
  margin: 0;
}

.footer-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.footer-block a {
  font-size: 12px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-block a:hover {
  color: var(--ink-soft);
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .intro { padding: 140px 36px 100px; text-align: left; }
  .work-grid { grid-template-columns: 1fr; }
  .work-item--tall a,
  .work-item--full a { aspect-ratio: 4 / 3; }
  .footer-about { margin-bottom: 100px; }
}

/* ---------- Intro ---------- */

.intro {
  max-width: 1400px;
  margin: 0 auto;
  padding: 320px 0 300px;
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  /* 幅が確定するまでは動かさない */
}

.marquee-track.is-ready {
  animation: marquee-scroll 25s linear infinite;
}

.marquee-set {
  display: flex;
  flex: 0 0 auto;
}

.intro p {
  flex: 0 0 auto;
  width: auto;
  margin: 0 80px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--marquee-distance))); }
}

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px clamp(16px, 3vw, 32px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 140px;
}

.work-detail-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.work-detail-tag {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 500;
}

.work-item {
  margin: 0;
}

.work-item a {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease;
}

.work-item a:hover {
  opacity: 0.85;
}

.work-item--tall a {
  aspect-ratio: 3 / 4;
}

.work-item--full {
  grid-column: 1 / -1;
}

.work-item--full a {
  aspect-ratio: 21 / 9;
}

.work-item figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* ---------- Footer / About ---------- */

.site-footer {
  padding: 40px clamp(20px, 4vw, 48px) 160px;
  text-align: center;
}

.footer-about {
  max-width: 480px;
  margin: 0 auto 160px;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-soft);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.footer-block {
  margin: 0;
}

.footer-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.footer-block a {
  font-size: 16px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-block a:hover {
  color: var(--ink-soft);
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .intro { padding: 140px 20px 100px; text-align: left; }
  .work-grid { grid-template-columns: 1fr; }
  .work-item--tall a,
  .work-item--full a { aspect-ratio: 4 / 3; }
  .footer-about { margin-bottom: 100px; }
}

/* ---------- Work detail page ---------- */

.work-detail {
  display: flex;
  align-items: flex-start;
}

.work-detail-sidebar {
  position: sticky;
  top: 0;
  width: 38%;
  max-width: 560px;
  min-width: 320px;
  height: 100vh;
  overflow-y: auto;
  padding: 140px clamp(32px, 5vw, 64px) 60px;
  box-sizing: border-box;
}

.work-detail-title {
  font-size: clamp(12px, 2.6vw, 20px);
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.work-detail-date {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.work-detail-text {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 24px;
  white-space: pre-line;
}

.work-detail-data {
  line-height: 0.8;
}

.work-detail-block {
  margin-bottom: 24px;
}

.work-detail-label {
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
}

.work-detail-text a {
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.work-detail-text a:hover {
  transform: translateY(-2px);
  color: var(--ink-soft);
}

.work-detail-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: gap 0.25s ease, color 0.25s ease;
}

.back-arrow {
  display: inline-block;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.work-detail-back a:hover {
  color: var(--ink-soft);
  gap: 10px;
}

.work-detail-back a:hover .back-arrow {
  opacity: 1;
  transform: translateX(0);
}

.work-detail-images {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px; /* 画像同士の間隔。お好みで調整してください */
  padding-top: 80px;
}

.work-detail-images img {
  width: 100%;   /* デフォルトは1枚で1行を占有（縦並び） */
  display: block;
}

/* JSが「幅990px以下」と判定した画像だけ、2カラムに */
.work-detail-images img.is-narrow {
  width: calc(50% - 6px); /* gapの半分を引いて2枚がぴったり収まるように */
}

/* スマホでは常に1カラムに統一 */
@media (max-width: 600px) {
  .work-detail-images img.is-narrow {
    width: 100%;
  }
}

.work-detail-copyright {
  position: fixed;
  left: clamp(32px, 5vw, 64px);
  bottom: 20px;
  font-size: 10px;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 900px) {
  .work-detail {
    flex-direction: column;
  }

  .work-detail-sidebar {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 120px 20px 40px;
  }

  .work-detail-copyright {
    position: static;
    padding: 0 20px 40px;
  }
}

@media (hover: hover) {
  .work-detail-back a:hover {
    color: var(--ink-soft);
    gap: 10px;
  }

  .work-detail-back a:hover .back-arrow {
    opacity: 1;
    transform: translateX(0);
  }
}
