/* ============================================================
   1. Root & Base Settings
   ============================================================ */
:root {
  --bg-color: #f9f7f2;
  --accent-color: #b07d6a;
  --text-main: #2c2c2c;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Montserrat", sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden; /* 横揺れ防止 */
  width: 100%;
}

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

/* ============================================================
   2. Navigation
   ============================================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: sticky;
  top: 0;
  background: rgba(249, 247, 242, 0.95);
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: block;
  line-height: 0; /* 下部の不要な余白を消す */
}

.logo img {
  height: 100px;
  width: auto;
  transition: opacity 0.3s ease;
}

.logo img:hover {
  opacity: 0.7;
}

nav ul {
  display: flex;
  list-style: none;
  align-items: center;
}

nav ul li {
  margin-left: 2.5rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  font-weight: 400;
  text-transform: uppercase;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--accent-color);
}

/* ============================================================
   3. Hero Section
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  min-height: 60vh;
  padding: 0 5%;
  gap: 5rem;
}

.hero-image img {
  width: 100%;
  height: 63vh;
  object-fit: cover;
  filter: grayscale(10%);
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5.5vw, 6rem);
  line-height: 1.05;
  margin-bottom: 2rem;
}

.italic-text {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 560;
  text-transform: lowercase;
  font-size: 3.4rem;
}

.hero-text p {
  max-width: 420px;
  margin-bottom: 3rem;
  font-weight: 300;
  font-size: 0.9rem;
  color: #555;
}

.cta-button {
  display: inline-block;
  padding: 1.2rem 2.5rem;
  border: 1px solid var(--text-main);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.8rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

/* ============================================================
   4. Expertise & Services
   ============================================================ */
.services {
  padding: 8rem 5%;
  background-color: var(--bg-color);
  overflow: hidden;
}

/* --- セクション見出し & リードテキスト --- */
.services-lead {
  text-align: center;
  margin: 0 auto 5rem auto;
  width: 100%;
}

.lead-en {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent-color);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: block;
}

.lead-jp {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  line-height: 1.6;
  color: var(--text-main);
  font-weight: 500;
  display: inline-block;
}

/* --- グリッドレイアウト (PC) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* --- サービスカードの基本設定 --- */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  background-color: transparent;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  gap: 1.5rem;
}

/* ホバーエフェクト（背景色変更） */
.service-card:hover {
  background-color: #333;
}

/* ホバー時のテキスト色反転 */
.service-card:hover .service-info h3 {
  color: #fff;
}
.service-card:hover .service-info p {
  color: #ccc;
}
.service-card:hover .service-number {
  color: rgba(255, 255, 255, 0.4);
}

.service-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  transition: transform 0.6s ease;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card:hover .service-image img {
  transform: scale(0.95);
}

.service-number {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: block;
}

.service-info h3,
.service-info p,
.service-number {
  transition: color 0.4s ease;
}

/* ============================================================
   5. Business Cards / Works (共通パーツ含む)
   ============================================================ */

.business-cards {
  padding: 10rem 5%;
  background-color: #fff; /* 他のセクションと背景を変えて区切りを出す */
}

.card-intro {
  margin-bottom: 4rem;
  text-align: center;
}

.card-intro .lead-jp {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.card-intro .lead-en {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-color);
  letter-spacing: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2つの実績を大きく並べる */
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card-item {
  position: relative;
}

.card-image {
  position: relative;
  aspect-ratio: 1.6 / 1; /* 名刺の黄金比に近い比率 */
  overflow: hidden;
  background-color: #f0f0f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s ease;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 画像を切らずに全体を表示 */
  padding: 43px; /* 余白を作って高級感を出す */
  transition: opacity 0.5s ease;
}

/* ホバーすると裏面が出る仕掛け（もし裏面画像があれば） */
.card-hover-img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.card-item:hover .card-hover-img {
  opacity: 1;
}

.card-info {
  margin-top: 1.5rem;
  text-align: center;
}

.card-info h3 {
  font-family: var(--font-serif);
  letter-spacing: 2px;
  font-size: 1.2rem;
}

.card-info p {
  font-size: 0.7rem;
  color: #888;
  margin-top: 5px;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr; /* スマホでは縦に並べる */
    gap: 3rem;
  }
}

/* ============================================================
   Works Section セクションタイトル (透かし文字背景)
   ============================================================ */
.works {
  padding: 6rem 5%; /* 余白を広く */
}

.section-title {
  position: relative;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-color); /* 色をアクセントカラーに */
  margin-bottom: 8rem; /* 下のコンテンツとの距離を広げる */
  padding-left: 60px; /* 横棒を入れるスペース */
  display: flex;
  align-items: center;
  border-bottom: none; /* 古い下線を消す */
  z-index: 1;
}

/* タイトルの横に伸びる繊細なライン */
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  width: 45px;
  height: 1px;
  background-color: var(--accent-color);
}

/* 背景に大きく配置する「透かし文字」 */
.section-title::after {
  content: attr(data-en);
  position: absolute;
  top: -1.5rem;
  left: -2rem;
  font-size: 8rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

/* Works Grid */
.work-grid {
  display: grid;
  /* PC: 4列 */
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; /* 間隔を少しタイトに */
  max-width: 1400px;
  margin: 0 auto;
}

.work-item {
  position: relative;
  overflow: hidden;
}

.work-item img {
  width: 100%;
  aspect-ratio: 2.2/4; /* 既存を維持 */
  object-fit: cover;
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

.work-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.work-image-container {
  position: relative;
  width: 100%;
  /* PCで「見切れない」ためのポイント：比率を少し調整 */
  /* 完全な9:16(177%)だと長すぎるので、3:4(133%)〜2:3(150%)程度に抑えると収まりが良いです */
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: #f0f0f0;
  margin-bottom: 1rem;
}

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

/* ラベルの装飾（少し小さくして4枚並びに対応） */
.video-overlay-text {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: var(--text-main);
  color: #fff;
  padding: 4px 10px;
  font-size: 0.6rem;
  letter-spacing: 1px;
  opacity: 0.9;
  z-index: 2;
}

.work-item:hover img {
  transform: scale(1.08);
}

.work-info h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem; /* 4つ並びなので少しサイズダウン */
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.work-info p {
  font-size: 0.7rem;
  color: #888;
  letter-spacing: 0.5px;
}

/* View More Button */
.view-more-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6rem;
}

.view-more-button {
  padding: 1.2rem 3rem;
  border: 1px solid var(--text-main);
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  transition: all 0.3s ease;
}

.view-more-button:hover {
  background: var(--text-main);
  color: #fff;
}

/* ============================================================
　Sponsorship Section
============================================================ */

.sponsorship {
  padding: 10rem 5%;
  background-color: #f0eee9; /* メインよりわずかに濃いベージュで区切りをつける */
}

.sponsor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sub-title {
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--accent-color);
  display: block;
  margin-bottom: 1rem;
  padding: 10px;
}

.sponsor-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  padding: 1.4rem 10px;
}

.team-name {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 400;
}

.sponsor-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.8;
  max-width: 450px;
}

/* ビジュアル部分：雑誌の切り抜きのような表現 */
.sponsor-visual {
  position: relative;
}

.visual-box {
  position: relative;
  overflow: hidden;
  box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.05);
}

.visual-box img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
  filter: sepia(20%) contrast(1.1); /* 少しヴィンテージでオシャレな加工 */
  padding: 0.5rem;
}

.floating-label {
  position: absolute;
  bottom: 2rem;
  right: -1rem;
  background: var(--text-main);
  color: #fff;
  padding: 0.5rem 1.5rem;
  font-size: 0.6rem;
  letter-spacing: 2px;
  transform: rotate(-90deg);
  transform-origin: right bottom;
}

/* 1. リンクの「ブルー」を解除して、サイト共通の黒系にする */
.sponsorship .team-insta-button {
  text-decoration: none;
  color: var(--text-main); /* 以前設定した #2c2c2c が適用されます */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 400;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 10px;
  transition: all 0.3s ease;
}

/* 2. アイコン(SVG)の色もテキストに追従させる */
.sponsorship .team-insta-button svg {
  stroke: currentColor;
  transition: transform 0.3s ease;
}

/* 3. ホバーした時：アクセントカラー(テラコッタ)に変更 */
.sponsorship .team-insta-button:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* 4. ホバーした時：アイコンを少しだけ動かす遊び心 */
.sponsorship .team-insta-button:hover svg {
  transform: scale(1.1) rotate(10deg);
}

/* ============================================================
   7. footer
   ============================================================ */
/* ） */
footer {
  padding: 10rem 5% 5rem;
  background: #1a1a1a;
  color: #fff;
  text-align: center;
}

.footer-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 3rem;
  font-weight: 400;
}

.social-icons {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.social-icons a {
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: #fff;
  transform: translateY(-3px);
}

/* ============================================================
　コピーライト
============================================================ */

.copyright {
  margin-top: 5rem;
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: #666;
  text-transform: uppercase;
}

/* ============================================================
　Footer
============================================================ */

footer {
  padding: 10rem 5%;
  background: #1a1a1a; /* 少し濃く */
  color: #fff;
  text-align: center;
}

.footer-content h2 {
  font-family: var(--font-serif);
  font-size: 3.5rem; /* 大きく */
  margin-bottom: 3rem;
  font-weight: 400;
}

.email-link {
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 8px;
  transition: border-color 0.3s ease;
}

.email-link:hover {
  border-color: rgba(255, 255, 255, 1);
}

.social-links {
  margin-top: 5rem;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #aaa;
}

.social-links a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 5%;
  }
  .logo img {
    height: 50px; /* スマホでは少し小さく */
  }
  nav ul li {
    margin-left: 1.5rem;
  }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 3rem;
  }
  .hero-image img {
    height: 50vh;
  }
  .hero-text p {
    margin: 0 auto 3rem;
  }
  /* .work-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }*/
}

/* ============================================================
　SNSアイコンの並び
============================================================ */

.social-icons {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-icons a {
  color: #aaa; /* 通常時はグレー */
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: #fff; /* ホバーで白に光る */
  transform: translateY(-3px); /* 軽く浮き上がる演出 */
}

/* ============================================================
   8. Responsive Settings (Mobile)
   ============================================================ */
@media (max-width: 768px) {
  /* 1. 全ての要素のサイズ計算を「内側に含める」設定に統一 */
  *,
  *::before,
  *::after {
    box-sizing: border-box !important;
  }

  /* 2. ページ全体の横揺れ・はみ出しを強制カット */
  html,
  body {
    overflow-x: hidden;
    width: 100vw; /* 画面幅ぴったりに固定 */
    position: relative;
    margin: 0;
    padding: 0;
  }

  /* 3. コンテナの幅を「100%」ではなく「自動計算」にする */
  .container {
    width: auto; /* 100% + paddingで溢れるのを防ぐ */
    margin: 0;
    padding: 0 5%;
  }

  /* Navbar */
  .logo img {
    height: 60px;
  }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  /* Section Titles */
  .section-title {
    width: 100%;
    max-width: 100vw;
    padding-left: 0;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 6rem;
  }
  .section-title::before {
    display: none;
  }
  .section-title::after {
    font-size: 3.5rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }

  /* Grids */
  .services-grid,
  .card-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cards */
  .service-card {
    align-items: center;
    text-align: center;
  }

  .service-card,
  .card-item {
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  /* 5. 画像やグリッドの「100%」が原因の場合の保険 */
  img,
  .services-grid,
  .card-grid,
  .work-grid {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* スポンサー */
  .sponsorship {
    padding: 3rem 0; /* 上下の余白をさらに凝縮 */
  }

  .sponsorship .sponsor-container {
    display: flex;
    flex-direction: column; /* 縦並び */
    align-items: center;
    gap: 1.5rem; /* テキストと画像の隙間を最小限に */
  }

  .sponsor-text {
    order: 1; /* テキストを上へ */
    width: 100%;
    padding: 1rem;
  }

  .sponsor-text p {
    font-size: 1.2rem; /* 文字サイズを少し抑えてスマートに */
    line-height: 1.4;
    padding: 0 10%;
    margin-bottom: 0;
  }

  .sponsor-logo {
    order: 2; /* 画像を下へ */
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;
  }

  .sponsor-logo img {
    /* ここがポイント：高さを抑えて「縦長感」を消す */
    width: auto;
    max-width: 160px; /* 横幅をコンパクトに */
    max-height: 80px; /* 縦幅をガッツリ制限 */
    object-fit: contain; /* 枠内で比率を保って収める */
    filter: grayscale(
      1
    ); /* 少しグレーにするとより馴染んでスッキリします（お好みで） */
    opacity: 0.7;
  }

  .sponsorship .team-insta-button {
    margin-top: 1rem;
    justify-content: center; /* スマホでは中央寄せ */
  }

  /* 名刺セクションの調整 */
  #cards {
    padding: 5rem 0;
  }

  /* スマホでは1列に強制して中央寄せ */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .card-item {
    align-items: center;
    text-align: center;
  }

  .card-item img {
    width: 100%; /* スマホでは少し余裕を持たせる */
  }

  /* 前後のセクションとの干渉を防ぐ */
  .section-title {
    margin-bottom: 4rem;
  }
}

/* ============================================================
  問い合わせ
   ============================================================ */

/* style.css への追加イメージ */
.works-page-container {
  width: 100%;
  max-width: 900px; /* PCでの最大幅 */
  margin: 0 auto;
  padding: 100px 20px; /* 上下の余白を適切に */
  box-sizing: border-box;
}

.category-title {
  font-family: "Playfair Display", serif; /* お洒落なセリフ体 */
  font-size: 3rem;
  text-align: center;
  margin-bottom: 60px;
}

.category-title span {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: #999;
  margin-top: 10px;
}

.contact-form {
  width: 100%;
  background: #fff;
  padding: 60px;
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 40px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: none;
  border-bottom: 1px solid #ddd; /* 下線のみのモダンなスタイル */
  transition: border-color 0.3s;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom: 1px solid #000; /* フォーカス時に黒く */
}

.cta-button {
  display: inline-block;
  padding: 18px 60px;
  background: #000;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  border: 1px solid #000;
  cursor: pointer;
}

.cta-button:hover {
  background: #fff;
  color: #000;
}

.cta-button.secondary {
  background: #fff;
  color: #999;
  border: 1px solid #ddd;
}

/* --- スマホ用の調整 --- */
@media screen and (max-width: 768px) {
  .works-page-container {
    padding: 60px 15px; /* 上下余白を削る */
  }

  .category-title {
    font-size: 2rem; /* タイトルを小さく */
    margin-bottom: 40px;
  }

  .contact-form {
    padding: 30px 20px; /* フォーム内の内側余白を削る */
  }

  .cta-button {
    width: 100%; /* ボタンを横幅いっぱいに（押しやすさ重視） */
    padding: 15px 0;
    text-align: center;
  }
}
