body {
  font-family: "Montserrat","Helvetica Neue",Arial,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;
  font-size: 15px;
  letter-spacing: .05em;
  color: #333;
}

a {
  transition: opacity .3s;
  text-decoration: none;
  color: #1ca9e3;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
  border-style: none;
}

.pc-only { display: block; }
.sp-only { display: none; }

/*--------------------------------
 レイアウト
---------------------------------*/
.wrapper { padding-top: 0; }
.section { padding: 90px 0; }
.section:nth-of-type(odd) { background-color: #f7f7f7; }
.container { max-width: 1340px; margin: 0 auto; padding: 0 40px; }

/*--------------------------------
 見出し
---------------------------------*/
.title {
  font-size: 34px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: .05em;
  color: #333;
}
.lead { font-size: 16px; line-height: 1.8; margin-bottom: 30px; }

/*--------------------------------
ヘッダー
---------------------------------*/
.header {
  position: fixed; top: 0; z-index: 1000; width: 100%;
  background-color: #fff; box-shadow: 0 5px 10px -6px rgba(0,0,0,.1);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
}
.header-logo { font-size: 20px; font-weight: bold; line-height: 1.2; margin-right: 20px; letter-spacing: .05em; }
.header-logo a { color: #333; }
.gnav-list { display: flex; justify-content: space-between; list-style: none; }
.gnav-item:not(:last-child) { margin-right: 20px; }
.gnav-item a {
  position: relative; font-size: 13px; font-weight: bold; display: inline-block;
  padding: 5px 0; transition: .3s; letter-spacing: .05em; color: #333;
}
.gnav-item a:after {
  position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; content: "";
  transition: .3s; transform: translateX(-50%); background-color: #333;
}
.gnav-item a:hover:after { width: 100%; }

/*--------------------------------
 メインビジュアル
---------------------------------*/
.mv { display: flex; align-items: center; justify-content: center; height: auto; text-align: center; }
.mv-container { position: relative; padding: 0 20px; }
.mv-container img { width: 100%; height: auto; }

/*--------------------------------
 Works
---------------------------------*/
.works-list { display: flex; flex-wrap: wrap; margin-bottom: -40px; }
.works-item { width: 31.74603%; margin-right: 1.58730%; margin-bottom: 40px; color: #333; }
.works-item:hover { opacity: .9; }
.works-item:nth-of-type(3n) { margin-right: 0; }
.works-img{
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f5f5f5;
}

.works-img img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;     /* 比率維持・余白あり */
  display: block;
  border: 1px solid #e6e6e6;
}
.works-name { font-size: 12px; font-weight: bold; margin-top: 8px; }
.works-info { font-size: 10px; margin-top: 5px; }

/*--------------------------------
 Skill
---------------------------------*/
.skill-list {
 display: flex;
 flex-wrap: wrap;
 justify-content: space-between;
 margin-bottom: -50px;
 }

.skill-item {
 display: flex;
 align-items: center;
 justify-content: flex-start;
 width: 48%;
 margin-bottom: 50px;
 }

.skill-img {
 width: 60px;
 height: 60px;
 margin-right: 20px;
display: flex;
  justify-content: center; /* 左右中央 */
  align-items: center;
 }

.skill-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;        /* 枠に収める（切り抜きなし） */
  display: block;             /* 余計な隙間を防ぐ */
}

.skill-body { flex: 1; }
.skill-name { margin-bottom: 10px; }
.skill-text { font-size: 14px; line-height: 1.8; }

/*--------------------------------
 About
---------------------------------*/
.profile { display: flex; flex-wrap: wrap; max-width: 800px; margin: 0 auto; }
.profile-img { width: 20%; margin-right: 30px; border-radius: 50%; }
.profile-img img { border-radius: 50%; }
.profile-body { flex: 1; }
.profile-body p { font-size: 15px; line-height: 1.8; }
.profile-body p:not(:last-child) { margin-bottom: 30px; }

/*--------------------------------
 Contact
---------------------------------*/
.contact { text-align: center; display:flex; justify-content:center; }
.contact-item:not(:last-child) { margin-right: 10px; }
.contact-text { margin-top: 10px; }

/*--------------------------------
 ページトップ
---------------------------------*/
.page-top { font-weight: bold; padding: 10px; cursor: pointer; text-align: center; background-color: #4c4c4c; }
.page-top .material-icons-outlined { vertical-align: bottom; color: #fff; }

/*--------------------------------
 フッター
---------------------------------*/
.footer { padding: 30px; background-color: #333; }
.copyright { font-size: 10px; text-align: center; color: #797979; }

/*--------------------------------
 下層：Worksページ
---------------------------------*/
.article { padding: 80px 0; }
.article-container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.article-title { margin-bottom: 30px; text-align: center; }
.article-body { max-width: 720px; margin: 0 auto; margin-bottom: 80px; }
.article-body h3 { position: relative; font-size: 18px; margin-bottom: 5px; padding-left: 1em; }
.article-body img { width: 100%; height: auto; }
.article-body h3:not(:first-child) { margin-top: 50px; }
.article-body h3::before { position: absolute; top: 0; left: 0; width: 4px; height: 100%; content: ""; border-radius: 3px; background-color: #333; }
.article-body p { font-size: 15px; line-height: 1.8; margin-bottom: 30px; }
.home-link { text-align: center; }

/*media Queries 767
----------------------------------------------------*/
@media screen and (max-width: 767px) {
  body { font-size: 14px; }
  .pc-only { display: none; }
  .sp-only { display: block; }

  .title { font-size: 26px; margin-bottom: 20px; }
  .lead { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }

  .wrapper { padding-top: 0; }
  .section { padding: 60px 0; }
  .container { padding: 0 20px; }

  .header .container { padding: 15px; }
  .header-logo { font-size: 15px; margin-right: 15px; }
  .gnav-item:not(:last-child) { margin-right: 10px; }
  .gnav-item a { font-size: 10px; }
  .gnav-item a:after { display: none; }

  .mv { height: 40vh; }
  .mv-container { padding: 0 20px; }
  .mv-title { font-size: 30px; }
  .mv-subtitle { font-size: 16px; margin-bottom: 20px; }
  .mv-text { top: 75%; font-size: 14px; line-height: 1.7; }

  .works-name { font-size: 12px; }
  .works-info { margin-top: 3px; }
  .works-list { justify-content: space-between; }
  .works-item { flex: 0 0 48%; margin-right: 0; margin-bottom: 30px; }

  .skill-list { display: block; margin-bottom: 0; }
  .skill-item { width: 100%; margin-bottom: 35px; }
  .skill-item:last-child { margin-bottom: 0; }
  .skill-name { margin-bottom: 5px; }
  .skill-text { font-size: 13px; line-height: 1.7; }

  .profile { display: block; }
  .profile-img { width: 150px; margin: 0 auto; margin-bottom: 25px; }
  .profile-body p { font-size: 14px; line-height: 1.7; }
  .profile-body p:not(:last-child) { margin-bottom: 20px; }

  .footer { padding: 20px; }

  .article { padding: 50px 0; }
  .article-body h3 { font-size: 16px; padding-left: .8em; }
  .article-body h3:not(:first-child) { margin-top: 30px; }
  .article-body p { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
}

h1 { font-weight: 200; margin: 0.4em 0; text-align: center; font-size: 6em; }

/* =========================
   ファーストビュー（重複整理版）
   ========================= */
:root{
  --zoom-duration: 4s;
  --zoom-duration-fast: 2s;
  --zoom-start: 0.72;
  --zoom-end: 0.999;
  --zoom-ease: cubic-bezier(0.25,1,0.5,1);
}

.firstview { width: 100%; max-width: 1200px; margin: 0 auto; padding: 5px 5px; }

/* ステージ：比率と最低高さを一元管理 */
.fv-stage{
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;   /* 高さは幅から自動計算：16:9で一定 */
  overflow: hidden;
}

/* 舞台の重ね物 */
.stage-item{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;                 /* 初期は非表示 */
  transform: scale(0.8);      /* 初期スケール（保険） */
}

/* 画像だけズーム対象にする */
img.stage-item{
  opacity: 0;
  transform: scale(var(--zoom-start));
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: center center;
  background: #fff;
  z-index: 1;
  will-change: transform, opacity;
}

/* ズームアニメ（A/Bは速い） */
img.stage-item.show{
  animation: zoomIn var(--dur, var(--zoom-duration)) var(--zoom-ease) forwards;
}
#imgA, #imgB { --dur: var(--zoom-duration-fast); }

@keyframes zoomIn{
  0%   { opacity: 0; transform: scale(var(--zoom-start)); }
  100% { opacity: 1; transform: scale(var(--zoom-end)); }
}

/* 動きを苦手とする環境の配慮（任意だが推奨） */
@media (prefers-reduced-motion: reduce){
  img.stage-item { opacity: 1; transform: scale(var(--zoom-end)); }
  img.stage-item.show { animation: none; }
}

/* タイプカーソル＆折返し制御 */
.txt-rotate > .wrap{
  border-right: 0.08em solid #666;
  white-space: nowrap;
}

/* タイプを中央に固定＆幅確保 */
#typeStage{
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1100px);            /* 少しだけ上限を拡張 */
  padding: 0 16px; box-sizing: border-box;
  text-align: center;
  line-height: clamp(1.1, 1.5vw, 1.3); /* 画面に応じて行間も微調整 */
  font-size: clamp(28px, 6vw, 72px);   /* ← PCで大きく、でも上限72pxで止める */
  letter-spacing: 0.02em;
  opacity: 1; transition: opacity 400ms ease;
}

/* 2行目（回転テキスト）は少しだけ小さく見せる */
#typeStage .txt-rotate { font-size: .82em; }

/* モバイル最適化 */
@media (max-width: 640px){
  #typeStage{
    font-size: clamp(20px, 7.2vw, 34px);
    line-height: 1.25;
 }
  .txt-rotate > .wrap{
    white-space: normal;
    word-break: keep-all;
    text-wrap: balance;
  }
  #typeStage .txt-rotate { font-size: .9em; }
}

/* 縦長画像だけ全体表示（中央だけ切れるのを防ぐ） */
img.stage-item.contain{
  object-fit: contain !important;
}

/* contactボタンデザイン */
.button-1 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    padding: 1em 2em;
    border: 1px solid #e7e7e7;
    border-radius: 5px;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #fff;
    background-color: #f7f7f7;
    color: #333;
    font-weight: 600;
}

a.button-1:hover {
    box-shadow: inset 4px 4px 12px #c5c5c5, inset -4px -4px 12px #fff;
}

