@charset 'utf-8';

/* ==========================================
   ベース・リセットCSS（これだけでOK）
   ========================================== */

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", sans-serif;
  color: #333;
  background-color: #fcfcfc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* 全要素のサイズ計算を内包に統一（絶対書いておくべき1行） */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 画面外へのはみ出しを遮断 */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  /* ★横スクロールを強制的に消す */
}

/* ==========================================
   切り替え用の隠しラジオボタン
   ========================================== */
input[type="radio"][name="category"] {
  display: none;
}

/* ==========================================
   ヘッダー / 縦書きタイトル / ハンバーガー
   ========================================== */

/* ヘッダー構造 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  z-index: 10;
  /* pointer-events: none; */
  /* 下のコンテンツをクリック阻害しない */
}

/* .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
} */
/* 全ページ共通のヘッダー構造 */
.header-inner {
  display: flex;
  justify-content: space-between;
  /* ロゴとメニューを左右に離す */
  align-items: center;
  width: 100%;
  max-width: 1200px;
  /* サイト全体の最大幅と揃える */
  margin: 0 auto;
}

/* ★「M」のロゴを小さく調整 */
.sp-logo {
  display: inline-block;
  pointer-events: auto;
  /* リンクを押せるようにする */
}

.sp-logo img {
  width: 80px;
  /* ★ここでロゴの横幅を小さくコントロール */
  height: auto;
  display: block;
}

.sp-logo-text {
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

/* ホバーしたときに少し薄くして「押せる」感覚を出す */
.sp-logo:hover {
  opacity: 0.6;
}

/* .site-title-vertical {
  font-size: 1.1rem;
  writing-mode: vertical-rl;
  letter-spacing: 0.25em;
  font-weight: 500;
  position: relative;
  padding-top: 30px;
} */

/* .site-title-vertical::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 20px;
  background-color: #666;
} */

/* --- ハンバーガーボタンの位置・スタイル設定 --- */
.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  /* ← これを追加！画面の右外に隠します */
  width: 100%;
  height: 100dvh;
  background-color: rgba(255, 255, 255, 0.98);
  transition: right 0.4s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-icon {
  position: fixed;
  /* 画面右上に固定 */
  top: 20px;
  right: 20px;
  pointer-events: auto;
  /* ★クリックを確実に反応させる */
  z-index: 2000;
  /* ★最前面に持ってくる */
  width: 30px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  transform-origin: center;
  background-color: #333;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* メニュー内のリスト設定 */
.sp-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;

  width: 50%;
  height: 100vh;
  /* background-color: rgb(255, 195, 247); */
  background: linear-gradient(to bottom, #7686cc, #deb1e5, #fd97b4);
  position: fixed;
  top: 0;
  right: 0;
}

.sp-menu-list li {
  margin: 35px 0;
  /* 文字同士の間隔 */
}

.sp-menu-list a {
  font-size: 18px;
  color: #2b2b2b;
  text-decoration: none;
  letter-spacing: 0.15em;
  font-weight: 500;
  display: block;
  padding: 10px 30px;
  transition: color 0.3s ease;
}

.sp-menu-list a:hover {
  opacity: 0.7;
  transition: opacity 0.3s;
  color: #ff7ec7;
}

/* --- スマホ全画面メニュー（文字を完全に中に閉じ込める設定） --- */
.sp-menu-screen {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: 100vw;
  height: 100vh;
  /* background-color: #f0f; */
  z-index: 900;
  box-sizing: border-box;
  pointer-events: none;
  /* 文字を中央寄せで綺麗に中に収めるレイアウト */
  display: flex;
  justify-content: center;
  align-items: center;

  transform: translateX(100%);
  transition: transform 0.4s ease-in-out;
}

/* --- 開いた時（JSで .is-active クラスが付与された時） --- */
.sp-menu-screen.is-active {
  transform: translate3d(0, 0, 0);
  /* スーッと画面内に入ってくる */
  /* ★【重要】開いた時だけメニュー内のクリックを受け付ける */
  pointer-events: auto;
}

/* バツ印（×）に変形させるアニメーション */
.menu-icon.is-active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-icon.is-active span:nth-child(2) {
  opacity: 0;
  /* 真ん中の線を消す */
}

.menu-icon.is-active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* aタグを枠いっぱいに広げる */
.work-banner-showcase a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* 画像が親要素からはみ出ないようにする */
.work-banner-showcase a img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  transition: opacity 0.3s ease;
}

/* カーソルを載せたときに少し透けさせてクリックできる感を出す */
.work-banner-showcase a:hover img {
  opacity: 0.85;
}

/* ==========================================
   カテゴリーメニュー（スマホ：上部）
   ==========================================

/* --- 1. 全体コンテナの余白設定 --- */
.works-container.section-inner {
  padding: 120px 24px 60px;
  /* 上余白は確保 */
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  /* 子要素のabsoluteの基準にする */
}

/* --- サイドバー(スマホ時は上部の目次) --- */
.sidebar {
  margin-bottom: 30px;
  /* ★作品との空白を適切に確保 */
  position: relative;
  z-index: 2;
  /* カテゴリー文字を装飾より前面に出す */
}

/* 縦書きタイトル（スマホでは非表示） */
.brand-area {
  display: none;
}

/* ==========================================
   カテゴリーメニューと選択時の横線（―）
   ========================================== */
.category-nav {
  margin-bottom: 30px;
  border-left: 1px solid #666;
  padding-left: 15px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-list label {
  cursor: pointer;
  font-size: 1.1rem;
  color: #333;
  letter-spacing: 0.08em;
  transition: opacity 0.2s;
  display: inline-block;
}

.category-list label:hover {
  opacity: 0.6;
}

/* 選択されていないときは横線を隠す */
.category-list label::before {
  content: "";
  margin-right: 0;
}

/* ★選択されたカテゴリー（ラジオボタンがchecked）の横にだけ横線を表示 */
#tab-all:checked~.works-container label[for="tab-all"]::before,
#tab-banner:checked~.works-container label[for="tab-banner"]::before,
#tab-card:checked~.works-container label[for="tab-card"]::before,
#tab-web:checked~.works-container label[for="tab-web"]::before,
#tab-slide:checked~.works-container label[for="tab-slide"]::before,
#tab-other:checked~.works-container label[for="tab-other"]::before {
  content: "― ";
  margin-right: 6px;
  font-weight: normal;
}


/* ==========================================
   作品一覧グリッド（前の表示設定に戻したバージョン）
   ========================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 30px 20px;
}

.work-item a {
  display: block;
  text-decoration: none;
}

.work-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #eee;
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 2px;
}

.work-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* ★画像を切れずに全体を表示させる前のアセット設定 */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.work-item a:hover .work-img img {
  transform: scale(1.04);
  opacity: 0.9;
}

.work-img.placeholder {
  background-color: #dcdcdc;
}

.work-title {
  font-size: 14px;
  font-weight: normal;
  color: #333;
}

/* --- 選択されたカテゴリー以外を非表示にするルール --- */
#tab-banner:checked~.works-container .work-item:not(.cat-banner),
#tab-card:checked~.works-container .work-item:not(.cat-card),
#tab-web:checked~.works-container .work-item:not(.cat-web),
#tab-slide:checked~.works-container .work-item:not(.cat-slide),
#tab-other:checked~.works-container .work-item:not(.cat-other) {
  display: none;
}

/* ==========================================
   1. CONTACTセクション (ベース：スマホ用)
   ========================================== */
.contact-section {
  width: 100%;
  /* 上側はゆるやかなアーチに対応できるよう広め、下側はフッターにピタッとくっつける */
  padding: 100px 24px 80px;
  box-sizing: border-box;
  text-align: center;
  /* background: linear-gradient(to bottom, #dbeeff, #fbf2eb); */
  background: linear-gradient(to bottom, #7686cc, #deb1e5, #fd97b4);
}

/* イラストの丸バッジ*/
.contact-badge {
  margin: 0 auto 24px;
  display: inline-block;
}

.contact-lead {
  font-size: 13px;
  color: #333333;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* ★ CONTACTタイトル（スマホで切れない可変サイズ） */
.contact-big-title {
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 300;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
  margin: 0 auto 16px;
  word-break: break-word;
}

.contact-sub {
  font-size: 11px;
  color: #555555;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

/* ★ メールアドレスボタン（スマホで絶対に溢れないベース設計） */
.email-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 300px;
  padding: 12px 8px;
  margin: 0 auto;
  background-color: #ffffff;
  color: #ff7ec7;
  text-decoration: none;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid #ffa9da;
  border-radius: 30px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: all 0.6s ease;
  box-sizing: border-box;
  word-break: break-all;
}

.email-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(30deg);
  transition: transform 0.6s ease, left 1.0s ease;
}

.email-btn:hover::after {
  left: 120%;
}

.email-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 169, 218, 0.4);
}

/* ==========================================
   2. フッター (ベース：スマホ用)
   ========================================== */
.footer {
  width: 100%;
  background-color: #ffffff;
  padding: 0 24px 0 20px;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 8px;
  font-size: 11px;
  white-space: nowrap;
  /* 途中で改行させない */
  justify-content: center;
}

.footer-nav a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
  /* ★ ふわっと変わる効果（0.3秒） */
}

/* ★ ホバーした文字だけ色を変える */
.footer-nav a:hover {
  color: #ff7ec7;
}

.footer-nav span {
  color: #cccccc;
}

.copyright {
  font-size: 10px;
  color: #666666;
  letter-spacing: 0.08em;
  margin: 0;
}

.instagram-area {
  text-align: center;
  margin-top: 40px;

  /* 👇アイコンと文字をまとめて、ほんのり透けさせる（透明度60%） */
  opacity: 0.6;

  /* マウスを乗せたときに、ふわっと100%の濃さに戻る遊び心を入れるとさらにおしゃれです */
  transition: opacity 0.3s;
}

.instagram-area:hover {
  opacity: 1;
  /* ホバーするとくっきり光るような演出 */
}


/* TOPへ戻るロゴボタンの固定配置 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  /* 画面下からの距離 */
  right: 30px;
  /* 画面右からの距離 */
  z-index: 99;
  /* 他の要素より手前に表示 */
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 画像ロゴのサイズ指定 */
.back-to-top img {
  width: 70px;
  /* お好みの大きさに調整してね */
  height: auto;
  display: block;
}

/* ホバーした時のやさしい動き（少し浮いて少し透ける） */
.back-to-top:hover {
  transform: translateY(-5px);
  /* ふわっと5px上に浮く */
  opacity: 0.7;
  /* 少し透明になる */
}

/* 📱 スマホ表示の調整 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 55px;
    right: 20px;
  }

  .back-to-top img {
    width: 40px;
    /* スマホでは少しコンパクトに */
  }
}

/* ==========================================
   ページ表示時のふわっとアニメーション
   ========================================== */

/* 1. アニメーションの動きを定義（下から上に動きながら、透明から不透明へ） */
@keyframes fadeInUp {
  from {
    opacity: 0;
    /* 最初は透明 */
    transform: translateY(20px);
    /* 最初は少し下に下げる */
  }

  to {
    opacity: 1;
    /* 最後は不透明 */
    transform: translateY(0);
    /* 定位置に戻す */
  }
}

/* 2. 作品一覧のグリッド（.works-grid）にアニメーションを適用 */
.works-grid {
  /* これを追加 */
  animation-name: fadeInUp;
  /* 上で定義した fadeInUp を使う */
  animation-duration: 0.8s;
  /* 0.8秒かけて動かす */
  animation-timing-function: ease-out;
  /* 動き出しを速く、後半をゆっくりに（自然な動き） */
  animation-fill-mode: forwards;
  /* アニメーション終了時の状態（不透明・定位置）をキープ */

  /* 初期状態を透明にしておく（CSSが読み込まれる瞬間の崩れ防止） */
  opacity: 0;
}

/* ==========================================
   PC表示用 (768px以上)
   ========================================== */
@media (min-width: 768px) {
  .works-container {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    padding-top: 40px;
  }

  .category-nav {
    width: 120px;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .category-list {
    flex-direction: column;
    gap: 15px;
  }

  .works-grid {
    flex-grow: 1;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 40px;
  }

  .work-title {
    font-size: 16px;
  }

  /* --- 1. 不要なスマホ要素の非表示 --- */
  .sp-logo,
  .soushoku01 {
    display: none !important;
    /* スマホ用のロゴやMの飾りは隠す */
  }

  /* --- 2. 全体コンテナ（2カラムレイアウト） --- */
  .works-container.section-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 100px;
    position: relative;
  }

  /* --- 3. 左側のサイドバーエリア --- */
  .sidebar {
    width: 140px;
    position: sticky;
    top: 60px;
    /* スクロールしても固定される位置 */
    flex-shrink: 0;
    margin-bottom: 0;
  }

  /* ★ 縦書きタイトルエリア */
  .brand-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 50px;
    position: relative;
  }

  /* ホバーしたときに少し薄くして「押せる」感覚を出す */
  a.brand-area:hover {
    opacity: 0.6;
  }

  /* 縦書きテキスト（h1）の設定 */
  .brand-area .brand-title {
    writing-mode: vertical-rl;
    /* 縦書き指定 */
    text-orientation: mixed;
    font-size: 13px;
    font-weight: normal;
    /* 必要に応じて太さを調整 */
    letter-spacing: 0.15em;
    color: #666;
    margin: 0;
    position: relative;
    display: inline-block;
  }

  /* 上の短い縦線（h1テキストの真上に配置） */
  .brand-area .brand-title::before {
    content: "";
    position: absolute;
    top: -60px;
    /* 上の空けたスペースに線を配置 */
    left: 50%;
    /* テキストの横幅の中央へ */
    transform: translateX(-50%);
    /* 完全に中央に一直線合わせ */
    width: 1px;
    height: 40px;
    /* 線の長さ */
    background-color: #aaa;
    /* 線の色 */
  }

  /* --- 4. 右側の制作物（2列グリッド） --- */
  .works-grid {
    /* ※HTMLの制作物一覧を囲むクラス名に書き換えてください */
    flex: 1;
    margin-left: 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* ★綺麗に2列で並べる */
    gap: 40px 30px;
    /* 上下の隙間 左右の隙間 */
  }

  .contact-section {
    padding: 100px 24px 80px;
  }

  .contact-lead {
    font-size: 14px;
    margin-bottom: 20px;
  }

  /* PCではしっかり64pxの大迫力タイトルに拡張 */
  .contact-big-title {
    font-size: 100px;
    /* letter-spacing: 0.15em;
    margin-bottom: 24px; */
  }

  .contact-sub {
    font-size: 12px;
    margin-bottom: 24px;
  }

  /* PC用のボタンサイズへ拡張 */
  .email-btn {
    max-width: 340px;
    padding: 14px 0;
    font-size: 13px;
    gap: 8px;
    letter-spacing: 0.05em;
  }

  .footer-container {
    flex-direction: row;
    /* 横並びにする */
    justify-content: space-between;
    /* 左と右に綺麗に振り分ける */
  }

  /* .footer {
    padding: 24px 24px;
  }

  .footer-container {
    gap: 12px;
  }

  .footer-nav {
    gap: 12px;
  } */

  .scroll-area {
    right: 6%;
    bottom: 40px;
    z-index: 10;
  }
}