/* --- 1. CSS Variables (Custom Properties) & Reset --- */
:root {
  --greige: #f2f0eb;
  --greige-light: #f4f3f1;
  --soft-black: #333333;
  --warm-gray: #888888;
  --accent: #d5d3d0;
  --logo-color: #d5d3d0;
  --bg: #ffffff;
  --font-sans: "M PLUS Rounded 1c", sans-serif;
  --font-serif: "Zen Kaku Gothic New", sans-serif;
  --screen-md: 768px;
  --header-height: 60px;
}

/* 基本スタイルとリセット */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f7f7f7;
  color: var(--soft-black);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7; /* leading-relaxed相当 */
  -webkit-font-smoothing: antialiased; /* antialiased相当 */
}

body.loading {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* 汎用クラス */
.font-serif {
  font-family: var(--font-serif);
}

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.75rem; /* px-6 相当 */
  padding-right: 0.75rem; /* px-6 相当 */
}
.max-w-6xl {
  max-width: 1152px; /* Tailwind 6xl 相当 */
}
.max-w-5xl {
  max-width: 1024px; /* Tailwind 5xl 相当 */
}
.max-w-2xl {
  max-width: 672px; /* Tailwind 2xl 相当 */
}

/* セクションのパディング */
.section-padding {
  padding-top: 5rem; /* py-24 相当 */
  padding-bottom: 5rem; /* py-24 相当 */
  padding-left: 0.75rem; /* px-4 相当 */
  padding-right: 0.75rem; /* px-4 相当 */
}
@media (min-width: 768px) {
  .section-padding {
    padding-top: 8rem; /* py-32 相当 */
    padding-bottom: 8rem; /* py-32 相当 */
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ボタン (VIEW ALL) */
.btn-primary {
  display: inline-block;
  border: 1px solid var(--soft-black);
  padding: 0.75rem 2.5rem; /* px-10 py-3 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  letter-spacing: 0.2em; /* tracking-widest 相当 */
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--soft-black);
}
.btn-primary:hover {
  background-color: var(--soft-black);
  color: white;
}

/* ヘッダーセクションのレスポンシブ処理用 */
.mobile-only {
  display: block;
}
@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
}

/* --- 2. Opening Animation Overlay --- */
#opening-overlay {
  position: fixed;
  inset: 0;
  background-color: #eeede8;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* アニメーション開始時の初期値 */
  mask-image: radial-gradient(circle at center, transparent 0%, black 0%);
  -webkit-mask-image: radial-gradient(
    circle at center,
    transparent 0%,
    black 0%
  );
  animation: mask-expand 1.8s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  animation-delay: 0.5s;
}

@keyframes mask-expand {
  0% {
    mask-image: radial-gradient(circle at center, transparent 0%, black 0%);
    -webkit-mask-image: radial-gradient(
      circle at center,
      transparent 0%,
      black 0%
    );
  }
  100% {
    mask-image: radial-gradient(circle at center, transparent 150%, black 150%);
    -webkit-mask-image: radial-gradient(
      circle at center,
      transparent 150%,
      black 150%
    );
    opacity: 0;
    visibility: hidden;
  }
}

/* --- 3. Scroll Fade-Up Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 4. Header (固定ヘッダー) --- */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 50;
  transition: all 0.3s ease;
  background-color: transparent; /* 初期値 */
}

.header-inner {
  padding-top: 20px; /* py-5 相当 */
  padding-bottom: 12px; /* py-5 相当 */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ⭐▼▼▼ 追加：PCの広い画面で幅を制限し、中央寄せにする ▼▼▼⭐ */
@media (min-width: 1280px) { /* 1280px以上で適用 (必要に応じて 1536px など調整) */
  .header-inner {
    /* container max-w-6xl (1152px) に合わせる */
    max-width: 1200px; 
    /* container クラスが幅を制御しているため、この max-width を追加し、中央寄せを確保 */
    margin-left: auto;
    margin-right: auto;
    /* padding-left/right は既存の .container が持っているので不要 */
  }
}

/* ヘッダーのロゴとメニューの初期スタイル (FV上) */
.logo {
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 50;
  /* mix-blend-mode: difference; */
}

.logo img {
  width: 180px;
  height: auto;
}

@media (min-width: 768px) {
  .logo img {
    width: 200px;
  }
}

.logo:hover {
  opacity: 0.7;
}

/* Desktop Navigation */
.nav-desktop {
  display: none;
  font-size: 0.875rem; /* text-sm 相当 */
  letter-spacing: 0.1em; /* tracking-wider 相当 */
  font-weight: 500;
  mix-blend-mode: difference;
  color: white;
}
.nav-desktop a {
  margin-left: 2.5rem; /* space-x-10 相当 */
  text-decoration: none;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

/* ナビゲーションリンクのホバー下線 */
.nav-link {
  position: relative;
  display: inline-block;
  color: #333333;
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-link {
  color: #333333;
  transition: all 0.2s ease-out;
  text-decoration: none; /* 下線はデフォルトで非表示 */
  position: relative;
  display: inline-block;
}
/* .mobile-link:hover {
    color: var(--warm-gray);
} */

.menu-btn {
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  z-index: 50;
  /* mix-blend-mode: difference; */
  color: #333333;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
}
.menu-line {
  width: 1.5rem; /* w-6 相当 */
  height: 2px; /* h-0.5 相当 */
  background-color: var(--soft-black); /* 初期色 */
  margin-bottom: 0.375rem; /* mb-1.5 相当 */
  position: relative; /* 追記：z-index を効かせ、描画を安定させる */
  z-index: 5; /* 追記：線の描画順を安定させる */
  transition: all 0.3s ease;
  transform-origin: center; /* 回転の中心を線の中心に設定 */
}
.menu-line:nth-child(2) {
  margin-bottom: 0;
}
.menu-line:nth-child(3) {
  margin-top: 0.375rem; /* mt-1.5 相当 */
}

/* 補足: PCスクロール時の色変更対応 (ヘッダーが白背景になったとき) (既存) */
.header-scrolled .menu-btn.active .menu-line:nth-child(1),
.header-scrolled .menu-btn.active .menu-line:nth-child(3) {
  background-color: var(--soft-black);
}

/* Mobile Dropdown */
.nav-mobile-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--greige-light);
  border-top: 1px solid #e5e7eb; /* border-gray-200 相当 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 43vh; /* 画面下部に空間を作り、リンク全体を上に移動 */
  gap: 2rem; /* space-y-8 相当 */
  z-index: 40;
  color: var(--soft-black);
  overflow: hidden;
  position: relative;
}

.nav-mobile-dropdown::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image: url("../img/logo_path.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 235%;

  opacity: 0.05; /* ロゴだけを薄くする */
}
.nav-mobile-dropdown a {
  font-size: 1.25rem; /* text-xl 相当 */
  letter-spacing: 0.1em; /* tracking-widest 相当 */
  text-decoration: none;
}

.mobile-link::after {
  content: "";
  position: absolute;
  width: 0; /* 初期幅はゼロ */
  height: 1px;
  bottom: -2px;
  left: 0;
  /* 親要素の文字色と同じ色を下線に適用 */
  background-color: currentColor;
  transition: width 0.3s ease;
}

/* ホバー時に幅を100%に広げる */
.mobile-link:hover::after {
  width: 100%;
}

.hidden {
  display: none !important;
}
.flex {
  display: flex !important;
}

/* スクロール後のヘッダースタイル */
.header-scrolled .header {
  background-color: rgba(255, 255, 255, 0.6); /* bg-white/90 相当 */
  /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); */
  /* ⭐▼▼▼ 追加：すりガラス効果 (Backdrop Filter) ▼▼▼⭐ */
  -webkit-backdrop-filter: blur(5px); /* Safari対応 */
  backdrop-filter: blur(
    5px
  ); /* ぼかしの強さは調整してください (3px〜8px程度) */
}
.header-scrolled .logo,
.header-scrolled .nav-desktop {
  mix-blend-mode: normal;
  color: var(--soft-black);
}
.header-scrolled .menu-line {
  background-color: var(--soft-black);
}
.header-scrolled .nav-link::after {
  background-color: var(--soft-black);
}

/* --- 5. First View (FV) --- */
.fv-section {
  position: relative;
  height: 100vh;
  width: 100%;
  /* overflow: hidden; */
  /* 背景画像を削除し、サイトの基本背景色を使用 */
  background: linear-gradient(180deg, #F4F3F1 69.59%, #FDFCFB 100%);
}

/* FV Media Layerと関連要素は削除またはコメントアウト */
.fv-media-layer,
.fv-image,
.fv-overlay-top,
.fv-overlay-bottom {
  display: none; /* FVメディア要素は非表示 */
}

.fv-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
  color: var(--soft-black); /* テキスト色を黒に調整 */
  text-shadow: none;
}

.fv-title {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  /* 修正: 文字間隔を広げる */
  letter-spacing: 0.15em;
}
@media (min-width: 768px) {
  .fv-title {
    font-size: 1.8rem;
    /* PC版でも文字間隔を広げる */
    letter-spacing: 0.2em;
  }
}
@media (min-width: 1024px) {
  .fv-title {
    font-size: 2.5rem;
    /* PC版でも文字間隔を広げる */
    letter-spacing: 0.15em;
  }
}

.fv-concept-text {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  /* 修正: 上のタイトルとの間隔を広げる (mt-4 -> mt-8 相当) */
  margin-top: 2rem;
}

/* FVタイトルの一文字アニメーション準備 */
.fv-title .char {
  display: inline-block;
  opacity: 0; /* GSAPで操作するため初期状態を非表示に */
}

/* FVコンセプトテキストの初期状態 */
.fv-concept-text.js-sub-catch {
  opacity: 0; /* GSAPで操作するため初期状態を非表示に */
}

/* style.css のFVセクションに追加 */

#svg-path-line {
  /* SVGパスの長さを取得し、stroke-dasharrayに設定 */
  /* GSAPがJavaScriptでこの値を動的に設定するため、ここでは設定しないか、または非常に大きな値を一時的に設定します。 */
  /* ただし、GSAPで実行する場合は、通常CSSでの初期設定は不要です。 */
}

#drawing-svg {
  position: absolute;
  inset: 0;
  z-index: 1;

  /* ⭐▼▼▼ 位置の調整 ▼▼▼⭐ */
  top: 50%; /* 親要素の上端から50%の位置 */
  left: 50%; /* 親要素の左端から50%の位置 */
  transform: translate(-50%, -50%) translate(600px, 600px);

  /* ⭐ SVGのサイズをCSSで上書きすることも可能 ⭐ */
  width: 130vh;
  height: 130vh;

  /* 要素が他の要素と重なり合う際のブレンドモード */
  mix-blend-mode: multiply;
}

@media (max-width: 767px) {
  #drawing-svg {
    /* 2. スマホ表示時のサイズを小さくする */
    /* 例えば、画面の高さ(vh)に対して 60% の大きさに設定 */
    width: 80vh;
    height: 80vh;
    top: 50%; /* 親要素の上端から50%の位置 */
    left: 50%; /* 親要素の左端から50%の位置 */
    transform: translate(-50%, -50%) translate(245px, 454px);
  }
}

/* 背景アニメーション用丸要素のスタイル */
.rolling-dots-container {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
}

.rolling-dot {
  position: absolute;
  border-radius: 50%;
  background-color: var(--accent); /* #D6D0C4: アクセントカラー */
  opacity: 0; /* GSAPで操作するため初期状態を非表示に */
  transform: scale(0); /* 初期サイズをゼロに */
  filter: blur(20px); /* ぼかしを少し強めに */
  will-change: transform, opacity; /* パフォーマンス最適化 */
  mix-blend-mode: multiply;
}

/* それぞれの丸の大きさ、位置を定義 */
.dot-1 {
  width: 200px;
  height: 200px;
  top: 20%;
  left: 15%;
}
.dot-2 {
  width: 270px;
  height: 270px;
  top: 25%;
  left: 75%;
}
.dot-3 {
  width: 100px;
  height: 100px;
  top: 73%;
  left: 63%;
}
@media (max-width: 768px) {
  .dot-1 {
    top: 26%;
    left: 10%;
    width: 50px;
    height: 50px;
  }
  .dot-2 {
    top: 15%;
    left: 80%;
    width: 100px;
    height: 100px;
  }
  .dot-3 {
    top: 53%;
    left: 52%;
    width: 120px;
    height: 120px;
  }
}

/* Scroll Indicator */
.scroll-indicator-left {
  position: fixed;
  left: 18px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 40;
  color: var(--warm-gray);
  transition: color 0.3s ease, opacity 0.5s ease, visibility 0.5s ease;
}

@media (max-width: 767px) {
  .scroll-indicator-left {
    display: none;
  }
}

@media (min-width: 1400px) {
  .scroll-indicator-left {
    /* 1. コンテナの最大幅 (1152px) を使って、コンテンツの左端位置を計算 */
    /* 計算例: (2000px - 1152px) / 2 = 424px (左側の余白) */
    /* 424px + 18px (元々の left) = 442px */
    /* ただし、コンテンツの左端に正確に揃えるため、以下のように計算ベースで設定 */
    
    /* 画面の右端からの相対位置として設定 */
    right: auto; 
    /* calc() を使用して、画面全体の幅からコンテナ幅の半分を引いた値を左端にする */
    left: calc(50% - (1400px / 2) ); /* 1152pxは max-w-6xl の幅 */

    /* コンテナ幅が max-w-6xl よりも小さい場合は、通常の left: 18px が適用される */
    /* 1280px (ブレークポイント) でのコンテナ幅は 1280px - 5rem(80px) = 1200px (approx) */
  }
}

.scroll-indicator-left.is-fv-visible {
    /* is-fv-visible が付与されたら表示 */
    display: flex; /* または block, flexなど、元の表示形式に合わせてください */
}

.header-scrolled .scroll-indicator-left {
  /* スクロール後は濃い色に変更 */
  color: var(--soft-black);
}

.scroll-text {
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}
.scroll-line {
  width: 1px;
  height: 80px;
  background-color: currentColor;
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}
@media (max-width: 768px) {
  .header-scrolled .scroll-indicator-left {
    color: var(--warm-gray);
  }
  .scroll-indicator-left {
    left: 8px;
    bottom: 15px;
  }
  .scroll-line {
    height: 50px;
  }
  .scroll-text {
    font-size: 10px;
  }
}

/* --- 6. Section Header (共通見出し) --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem; /* mb-16 相当 */
}
@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-title-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem; /* text-3xl 相当 */
  letter-spacing: 0.1em; /* tracking-widest 相当 */
  position: relative;
  z-index: 10;
}
@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem; /* md:text-4xl 相当 */
  }
  .rolling-circle {
    top: 0;
  width: 50px;
  height: 50px;
}
}

.section-sub-title {
  font-size: 0.75rem; /* text-xs 相当 */
  letter-spacing: 0.2em; /* tracking-widest 相当 */
  color: var(--warm-gray);
}

.rolling-circle {
  position: absolute;
  top: 5px;
  left: -30px;
  width: 40px;
  height: 40px;
  background-color: rgba(214, 208, 196, 0.4);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  filter: blur(1px); /* 👈 ぼかしの強さ。3px〜10px 程度で調整 */
}

.fade-up.visible .rolling-circle {
  animation: roll-horizontal 2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes roll-horizontal {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  70% {
    transform: translateX(110px) rotate(360deg);
    opacity: 1;
  }
  100% {
    transform: translateX(130px) rotate(420deg);
    opacity: 0;
  }
}

#contact .rolling-circle {
  background-color: rgba(214, 208, 196, 0.4);
  filter: blur(1px); /* 👈 ぼかしの強さ。3px〜10px 程度で調整 */
}

.contact-lead-text {
  margin-top: 2rem; /* mt-8 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  color: #4b5563; /* gray-600 相当 */
}

/* --- 7. WORKS Section --- */
#works > .container {
  /* container クラスが WORKS の直下にある場合 */
  padding-right: 0.75rem !important;
  padding-left: 0.75rem !important;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1.5rem; /* gap-x-10 gap-y-12 相当 */
  margin-left: 0;
  margin-right: 0;
}
@media (min-width: 768px) {
  .works-grid {
    gap: 3rem 1.5rem;
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 1.5rem;
    margin-left: 0;
    margin-right: 0;
  }
}

#works {
  background-color: rgb(253, 252, 251);
}

.work-item-card {
  cursor: pointer;
  text-decoration: none;
  display: block;
  padding: 0.5rem;
}

.work-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.3rem; /* rounded-lg 相当 */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  aspect-ratio: 16 / 9; /* aspect-[4/3] 相当 */
  background-color: #f3f4f6; /* bg-gray-100 相当 */
  margin-bottom: 1rem; /* mb-4 相当 */
  /* border: 1px solid #f3f4f6; */
}

.work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}
.work-item-card:hover .work-image {
  transform: scale(1.05);
}

.work-image-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.1); /* bg-black/10 相当 */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.work-item-card:hover .work-image-overlay {
  opacity: 1;
}

.work-title-wrapper {
  position: relative;
  display: inline-block;
}

.work-title {
  font-size: 1.125rem; /* text-lg 相当 */
  margin-bottom: 0.25rem; /* mb-1 相当 */
  position: relative;
  z-index: 10;
  transition: opacity 0.3s ease;
}
.work-item-card:hover .work-title {
  opacity: 0.7;
}

.work-title-circle {
  position: absolute;
  top: -4px;
  left: -10px;
  width: 24px;
  height: 24px;
  background-color: var(--greige);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.8;
  transition: transform 0.3s ease;
}
.work-item-card:hover .work-title-circle {
  transform: scale(1.15);
}

.work-category-text {
  font-size: 0.875rem; /* text-sm 相当 */
  color: var(--warm-gray);
}

.works-all-link-wrapper {
  text-align: center;
  margin-top: 4rem; /* mt-16 相当 */
}

/* --- 8. ABOUT Section --- */
.bg-greige-light {
  background: linear-gradient(180deg, #FDFCFB 69.59%, #F4F3F1 100%);
}

.relative-z-1 {
  position: relative;
  overflow: hidden;
}
.relative-z-10 {
  position: relative;
  z-index: 10;
}

.about-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem; /* gap-12 相当 */
}

@media (min-width: 1080px) {
  /* ⭐ ブレークポイントを 1080px に変更 ⭐ */
  .about-content-wrapper {
    flex-direction: row; /* 1080px以上で横並び */
    gap: 6rem;
  }
}

.about-text-area {
  width: 100%;
  order: 2; /* order-2 相当 */
  text-align: left;
  padding-left: 1rem; /* 24px 相当 */
  padding-right: 1rem; /* 24px 相当 */
}
@media (min-width: 1080px) {
  .about-text-area {
    width: 50%; /* md:w-1/2 相当 */
    order: 1; /* md:order-1 相当 */
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }
}

.about-main-text {
  font-size: 1.25rem; /* text-xl 相当 */
  margin-bottom: 1.5rem; /* mb-6 相当 */
  line-height: 1.6; /* leading-relaxed 相当 */
  font-weight: 500;
}

.about-body-text {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* space-y-4 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  line-height: 2; /* leading-loose 相当 */
  color: #4b5563; /* gray-600 相当 */
  text-align: left;
  font-weight: 300; /* font-light 相当 */
}

@media (min-width: 1080px) {
  .about-body-text {
    text-align: left;
  }
  .about-main-text {
  font-size: 1.1rem; 
}
}

.about-dl {
  margin-top: 2rem; /* mt-8 相当 */
  display: grid;
  grid-template-columns: 100px 1fr;
  row-gap: 0.5rem; /* gap-y-2 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  max-width: 400px; /* 👈 (任意) 幅を制限して見栄えを良くする */
  margin-left: 0;
  margin-right: auto;
}

@media (min-width: 1080px) {
  .about-dl {
    margin-left: 0; /* 左寄せに戻す */
  }
}

.about-dt {
  color: var(--warm-gray);
}
.about-dd {
  color: var(--soft-black);
}

.about-image-area {
  width: 100%;
  display: flex;
  justify-content: center;
  order: 1; /* order-1 相当 */
  position: relative;
}
@media (min-width: 1080px) {
  .about-image-area {
    width: 33.333333%; /* md:w-1/3 相当 */
    order: 2; /* md:order-2 相当 */
  }
}

.profile-img-container {
  position: relative;
  z-index: 20;
  width: 18rem; /* w-48 相当 */
  height: 18rem; /* h-48 相当 */
  max-width: 100%;
}
@media (min-width: 768px) {
  .profile-img-container {
    width: 24rem; /* md:w-64 相当 */
    height: 24rem; /* md:h-64 相当 */
  }
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- 9. CONTACT Section (フォーム) --- */
.bg-white {
  background-color: var(--greige-light);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* space-y-8 相当 */
  background-color: white;
  padding: 2rem; /* p-8 相当 */
  border-radius: 20px; /* rounded-[40px] 相当 */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm 相当 */
}

/* 擬似要素の基準とするため、#contact に relative を設定 */
#contact {
  position: relative;
  overflow: hidden; /* ロゴがはみ出しても親要素内にとどめる */
  padding-bottom: 128px;

  /* ⭐追記: 背景として猫のシルエットを設定⭐ */
  background-image: url("../img/cat_sp.png"); /* ⭐パスを修正してください⭐ */
  background-size: 150px auto; /* 画像サイズを指定 (必要に応じて調整) */
  background-repeat: no-repeat;

  /* 画像を右下隅に配置 */
  background-position: bottom -3px right 20px; /* 下から20px、右から20pxの位置 */
}

@media (min-width: 768px) {
    #contact {
  background-image: none
}
  .contact-form {
    padding: 3rem; /* md:p-12 相当 */
  }
}

.works-alignment-wrapper {
  max-width: 1152px; /* WORKSセクションのコンテンツ幅 (max-w-6xl) に合わせる */
  margin-left: auto;
  margin-right: auto;
  position: relative; /* 猫の absolute の基準とする */
  height: 0; /* 高さを0にして、コンテンツに影響を与えないようにする */
}

#cat-silhouette {
  display: none; /* 初期状態では非表示 (モバイル対応のため) */
}

@media (min-width: 768px) {
  #cat-silhouette {
    display: block;
    position: absolute;
    width: 140px;
    height: auto;
    
    /* WORKS Alignment Wrapper (中央寄せされた max-w-6xl) の右端が基準 */
    right: 6rem; 
    /* 猫の右端が WORKS コンテンツの右端にぴったり揃います！ */
    
    bottom: -3px; /* 高さを調整 */
    z-index: 10;
  }
}
@media (min-width: 1200px) {
  #cat-silhouette {
    width: 155px;
    height: auto;
    right: 3rem; 
  }
}

#contact::after {
  content: "";
  position: absolute;
  z-index: 1;
  background-image: url("../img/logo_p.svg");
  background-repeat: no-repeat;

  /* 配置とサイズはそのまま */
  right: -265px;
  top: 545px;
  width: 1000px;
  height: 1000px;
  transform: translateY(-50%);

  /* ⭐ 1. 透明度を少し上げる (0.1より少し濃くして見えやすくする) ⭐ */
  opacity: 0.5; /* 白いロゴなので、0.2〜0.4くらいで調整してみてください */

  /* ⭐ 2. 削除: filter: invert(100%); は白いロゴを黒にするので削除します ⭐ */
  /* filter: invert(100%);  <-- この行を削除 */

  /* ⭐ 3. 変更: mix-blend-mode を light-blend-mode に変更して、白を活かす ⭐ */
  mix-blend-mode: soft-light; /* または screen, overlay, lighten など試してみてください */
  /* soft-light : 背景とロゴを柔らかく混ぜ合わせ、白を際立たせる効果があります。 */
  /* screen     : 白い部分を強調し、背景を明るく見せる効果があります。 */
  /* overlay    : 背景とロゴの色を重ね合わせる効果があります。 */
}

/* ⭐ スマートフォン表示での調整 ⭐ */
@media (max-width: 767px) {
  #contact::after {
    right: -117px;
    top: -6%;
    width: 500px;
    height: 500px;
    transform: none;
    opacity: 0.4; /* スマホも少し濃くして見えやすくする */
    /* ⭐ 削除: filter: invert(100%); を削除 ⭐ */
    /* filter: invert(100%); <-- この行を削除 */
    mix-blend-mode: soft-light; /* ⭐ 変更: soft-light に変更 ⭐ */
  }
}

.form-group {
  /* グループの親要素は特にスタイル不要 (gapで制御) */
}

.form-label {
  display: block;
  font-size: 0.75rem; /* text-xs 相当 */
  letter-spacing: 0.1em; /* tracking-wider 相当 */
  color: var(--warm-gray);
  margin-bottom: 0.5rem; /* mb-2 相当 */
}

.form-input,
.form-textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid #d1d5db; /* border-gray-300 相当 */
  padding-top: 0.75rem; /* py-3 相当 */
  padding-bottom: 0.75rem; /* py-3 相当 */
  background-color: transparent;
  transition: border-bottom-color 0.3s ease;
  resize: none;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--soft-black);
}
.form-textarea {
  /* rows=5 はHTMLで指定 */
}

.form-submit-wrapper {
  text-align: center;
  margin-top: 1rem;
}

.btn-submit {
  background-color: var(--soft-black);
  color: white;
  padding: 1rem 4rem; /* px-16 py-4 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  font-weight: 400;
  letter-spacing: 0.2em; /* tracking-widest 相当 */
  transition: background-color 0.3s ease;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1); /* shadow-lg 相当 */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1),
    0 0 0 1px #f3f4f6; /* shadow-gray-200 相当を工夫 */
}
.btn-submit:hover {
  background-color: #555555; /* hover:bg-gray-700 相当 */
}

/* 送信完了メッセージのスタイル */
.submission-message {
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--accent);
  background-color: var(--greige); /* やや暖かい背景色 */
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
}

.submission-message p:first-child {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* フォームの代わりに表示するためのユーティリティクラス */
.hidden {
  display: none !important;
}

/* 送信成功時にフォームを隠すためのクラス */
.form-hidden {
  opacity: 0;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: all 0.5s ease-out;
}

/* --- トップへ戻るボタン (To Top Button) --- */
.to-top-btn {
  position: fixed;
  bottom: 12rem;
  right: 0.5rem;
  display: block; /* テキストがないのでflexは不要 */
  width: 40px; /* ⭐画像の実際の幅に合わせて調整⭐ */
  height: 40px; /* ⭐画像の実際の高さに合わせて調整⭐ */
  box-shadow: 0 4px 6px rgba(164, 161, 157, 0.2);
  cursor: pointer;
  text-decoration: none;
  z-index: 1000;
  background-color: transparent; /* 画像が透過の場合に背景色を透明に保つ */
  border-radius: 50%;

  /* ⭐ここを修正/確認: PNG画像を背景として設定⭐ */
  background-image: url("../img/back_btn.png");
  background-size: contain; /* ボタンサイズに合わせて画像を完全に表示 */
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
  transform-origin: center bottom;
}

@media (min-width: 768px) {
  .to-top-btn {
    bottom: 12rem;
    right: 1rem;
    width: 60px; /* ⭐画像の実際の幅に合わせて調整⭐ */
    height: 60px; /* ⭐画像の実際の高さに合わせて調整⭐ */
  }
  body.modal-open .to-top-btn {
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

@media (max-width: 767px) {
  .to-top-btn {
    /* display: none; を設定して要素自体を消す */
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .to-top-btn {
    right: calc(50% - (1280px / 2));
    left: auto;
    width: 70px;
    height: 70px;
  }
}

.to-top-btn:hover {
  animation: sway-horizontal 1.0s ease-in-out infinite;
  /* - sway-horizontal: 新しいアニメーション名 (手順2で定義)
     - 1.8s: 実行時間（速度をゆっくりにするため長めに設定）
     - ease-in-out: 始まりと終わりが滑らかになる緩急
     - infinite: 無限に繰り返す
  */
}

/* 表示状態 */
.to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
}

/* --- 10. Footer --- */
.footer {
  padding: 2.5rem 1.5rem; /* py-10 px-6 相当 */
  background-color: var(--logo-color);
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem; /* space-x-6 相当 */
  margin-bottom: 2rem; /* mb-8 相当 */
}

.social-link {
  text-decoration: none;
  color: var(--soft-black);
  transition: color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem; /* gap-2 相当 */
}
.social-link:hover {
  color: var(--warm-gray);
}

.social-icon-wrapper {
  /* 修正点: 固定の正方形サイズを設定 */
  width: 40px;
  height: 40px;

  /* 修正点: アイコンを中央に配置 */
  display: flex;
  justify-content: center;
  align-items: center;

  /* 変更なし: 円形を維持 */
  border-radius: 50%;
  border: 1px solid var(--soft-black);

  /* paddingは不要になるため削除（または、width/heightで調整） */
  transition: all 0.3s ease;
}

.social-link:hover .social-icon-wrapper {
  background-color: #555555;
  color: white;
}

.social-text {
  font-size: 0.625rem; /* text-[10px] 相当 */
  letter-spacing: 0.1em; /* tracking-widest 相当 */
  text-transform: uppercase;
}

.footer-copyright {
  font-size: 0.75rem; /* text-xs 相当 */
  color: var(--warm-gray);
  letter-spacing: 0.05em; /* tracking-wider 相当 */
}

/* --- 11. Work Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem; /* p-4 相当 */
  padding-top: 3rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  align-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 相当 */
  backdrop-filter: blur(4px); /* backdrop-blur-sm 相当 */
  cursor: pointer;
}

/* --- 11. Work Modal --- */
.modal-content {
  position: relative;
  background-color: white;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  height: 100%;
}

.modal-close-btn {
  position: absolute;
  top: 0.5rem; /* top-4 相当 */
  right: 0.5rem;
  z-index: 10;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.8); /* bg-white/80 相当 */
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 2.5rem;  
  height: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-close-btn:hover {
  background-color: #f4f4f4; /* hover:bg-gray-100 相当 */
}
.close-icon {
  height: 1.5rem; /* h-6 相当 */
  width: 1.5rem; /* w-6 相当 */
  color: var(--soft-black);
}

/* 768px以上 (PC・タブレット表示) の場合 */
@media (min-width: 768px) {
  .modal-content {
    /* PC版では最大幅を896pxに戻す */
    max-width: 896px;
    flex-direction: row;
    align-items: stretch;
    height: 55vh;
    overflow-y: hidden;
  }

  .modal-close-btn {
    right:1.5rem;
    top: 0.5rem;
  }

  /* PC版ではモーダルの周囲の隙間を少し広げる */
  .modal-overlay {
    align-items: center;
    padding: 2rem;
    padding-top: 2rem;
  }
}

.modal-text-area {
  padding: 1.5rem 1.5rem 1.5rem 1.5rem; /* p-6 相当 */
  /* ⭐▼▼▼ 追記: テキストエリア内でスクロールを有効にする ▼▼▼⭐ */
  overflow-y: auto; /* テキストエリア内でスクロール可能に */
  -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかにする */
  
  /* 追記: Flexアイテムとして、残りの高さを全て使うように設定 */
  flex-grow: 1;
  flex-basis: 0;
  max-height: 55vh;
  order: 2;
}
@media (min-width: 768px) {
  .modal-text-area {
    width: 50%; /* md:w-1/2 相当 */
    padding: 2.5rem; /* md:p-10 相当 */
    order: 2;
    height: 100%;
    overflow-y: auto;
    max-height: none;
  }
}

.modal-sticky-header {
  /* position: sticky; */
  top: 0;
  background-color: white;
  padding-top: 0; /* pt-1 相当 */
  box-shadow: 0 4px 5px -5px rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-size: 1.2rem; /* text-2xl 相当 */
  margin-bottom: 0.5rem; /* mb-2 相当 */
}

.modal-category {
  font-size: 0.875rem; /* text-sm 相当 */
  color: var(--warm-gray);
  margin-bottom: 1rem; /* mb-4 相当 */
}

.modal-divider {
  border: none;
  border-top: 1px solid #e5e7eb; /* hr 相当 */
  margin-bottom: 1.5rem; /* mb-6 相当 */
}

.modal-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #4b5563; /* gray-600 相当 */
  margin-bottom: 1rem; /* mb-8 相当 */
}

.modal-role-details {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* space-y-4 相当 */
  font-size: 0.875rem; /* text-sm 相当 */
  margin-bottom: 2.5rem; /* mb-10 相当 */
}

.modal-detail-label {
  font-size: 0.75rem; /* text-xs 相当 */
  letter-spacing: 0.05em; /* tracking-wider 相当 */
  color: var(--warm-gray);
  margin-bottom: 0.25rem; /* mb-1 相当 */
}

.modal-detail-value {
  font-weight: 500;
  color: var(--soft-black);
}

.modal-image-area {
  overflow: hidden;
  padding-top: 2.5rem;
  padding-bottom: 0rem;
  /* 画像エリアが、モーダル全体の最大高さ(90vh)の約35%を超えないように制限 */
  max-height: 35vh; 
  /* flex-shrink: 0; を設定し、高さをテキストエリアに奪われないようにします */
  flex-shrink: 0;
  height: 35vh; /* max-heightと同じ値を設定 */
  order: 1;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: white;
}
@media (min-width: 768px) {
    .modal-sticky-header {
  padding-top: 0.5rem; /* pt-1 相当 */
}
  .modal-image-area {
    width: 50%; /* md:w-1/2 相当 */
    padding-bottom: 2.5rem;
    order: 1;
    height: 100%;
    max-height: none;
  }
  .modal-image {
    object-fit: contain;
    padding-left: 40px;
    height: 100%;
  }
}

@keyframes sway-horizontal {
  0% {
    /* 開始: わずかに左に傾く (-5度) */
    transform: rotate(-5deg) scale(1.03);
  }
  50% {
    /* 中央: わずかに右に傾く (+5度) */
    transform: rotate(5deg) scale(1.03);
  }
  100% {
    /* 終了: 開始位置に戻る (-5度) */
    transform: rotate(-5deg) scale(1.03);
  }
}